2
3
shihang 6 лет назад
Родитель
Сommit
4638ab5eb4

+ 29 - 54
src/dashoo.cn/frontend_web/src/components/oilsupplier/businesslist.vue

@@ -4,13 +4,13 @@
       <div slot="header" class="clearfix">
         <span style="font-weight: bold">准入范围</span>
         <span style="float: right;">
-          <el-button type="primary" size="mini" style="margin-right: 3px" @click="nextStep()" v-if="canadd">提交审批
-          </el-button>
-          <el-button type="primary" size="mini" style="margin-right: 3px" @click="showDialog" v-if="canadd">添加
+          <!-- <el-button type="primary" size="mini" style="margin-right: 3px" @click="nextStep()" v-if="canadd">提交审批
+          </el-button> -->
+          <el-button style="float: right; padding: 3px 0" type="text" @click="showDialog" v-if="canadd">添加
           </el-button>
         </span>
       </div>
-      <el-table :data="businessList" border>
+      <el-table :data="businessList" border style="height: calc(100vh - 435px);">
         <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)" :disabled="!canadd">编辑
@@ -29,17 +29,6 @@
       </el-pagination>
     </el-card>
 
-    <el-card class="box-card" style="margin-top: 10px;">
-      <div slot="header" class="clearfix">
-        <span style="font-weight: bold">资质列表</span>
-        <el-button style="float: right; padding: 3px 0" type="text" @click="subfiledialog" v-if="canadd">添加</el-button>
-      </div>
-      <subfile-list ref="subfileList" :data.sync="subfileList" :SupplierId="SupplierId" :SupplierCertId="SupplierCertId"
-        :SupplierTypeCode="SupplierTypeCode" :businessList="businessList" :BusinessForm="BusinessForm" :canadd="canadd"
-        height="360px" style="margin-top: 20px">
-      </subfile-list>
-    </el-card>
-
     <el-dialog :title="Title" :visible.sync="visible" top="5vh">
       <el-form :model="BusinessForm" label-width="100px">
         <el-row>
@@ -124,26 +113,12 @@
   import {
     mapGetters
   } from 'vuex'
-  import SubfileList from '../../components/oilsupplier/subfilelist'
 
   export default {
     name: 'EquipmentList',
     components: {
-      SubfileList // 文档
     },
     props: {
-      SupplierCertId: {
-        type: String,
-        default: '0'
-      },
-      SupplierId: {
-        type: String,
-        default: '0'
-      },
-      SupplierTypeCode: {
-        type: String,
-        default: '0'
-      },
       canadd: {
         type: Boolean,
         default: false
@@ -159,6 +134,10 @@
     },
     data () {
       return {
+        SupplierId: 0,
+        SupplierTypeCode: '',
+        SupplierCertId: 0,
+
         oneList: [],
         OneCode: '',
         businessList: [],
@@ -194,8 +173,6 @@
         CurrentPage: 1, // 分页
         Size: 10,
         CurrentItemCount: 0,
-
-        subfileList: [] // 文档
       }
     },
     methods: {
@@ -218,11 +195,9 @@
         })
           .then(res => {
             _this.businessList = res.data.items
-            _this.currentItemCount = res.data.currentItemCount
-            _this.$refs['subfileList'].getvalue(this.SupplierId, this.SupplierTypeCode, this.SupplierCertId)
+            _this.currentItemCount = res.data.currentItemCount                  
           })
           .catch(err => {
-            // handle error
             console.error(err)
           })
       },
@@ -435,27 +410,27 @@
         this.BusinessForm.Name = val.Name
         this.basicDialog = false
       },
-      nextStep () {
-        this.subfileList = this.$refs['subfileList'].subfileList
-        if (this.subfileList && this.subfileList.length > 0) {
-          for (var i = 0; i < this.subfileList.length; i++) {
-            if (this.subfileList[i].FileType === '1' && this.subfileList[i].FileUrl === '') {
-              this.$message({
-                type: 'warning',
-                message: '请上传文件' + this.subfileList[i].NeedFileType + '!'
-              })
-              return
-            }
-          }
-          this.$emit('close')
-        } else {
-          this.$emit('close')
-        }
-      },
+      // nextStep () {
+      //   this.subfileList = this.$refs['subfileList'].subfileList
+      //   if (this.subfileList && this.subfileList.length > 0) {
+      //     for (var i = 0; i < this.subfileList.length; i++) {
+      //       if (this.subfileList[i].FileType === '1' && this.subfileList[i].FileUrl === '') {
+      //         this.$message({
+      //           type: 'warning',
+      //           message: '请上传文件' + this.subfileList[i].NeedFileType + '!'
+      //         })
+      //         return
+      //       }
+      //     }
+      //     this.$emit('close')
+      //   } else {
+      //     this.$emit('close')
+      //   }
+      // },
 
-      subfiledialog () {
-        this.$refs['subfileList'].showDialog()
-      },
+      // subfiledialog () {
+      //   this.$refs['subfileList'].showDialog()
+      // },
 
       handleSizeChange (value) {
         this.size = value

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

@@ -1,25 +1,40 @@
 <template>
   <div>
-    <el-table :data="subfileList" border>
-      <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)" :disabled="!canadd">编辑
-          </el-button>
-          <el-button type="primary" plain size="mini" title="删除" style="margin-left:3px"
-            :disabled="scope.row.FileType == '1' || !canadd" @click="deletedata(scope.row)">删除</el-button>
-        </template>
-      </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+'') }}
-        </template>
-      </el-table-column>
-      <el-table-column prop="OtherRemark" label="描述" show-overflow-tooltip></el-table-column>
-      <!-- <el-table-column prop="Remark" label="备注信息" show-overflow-tooltip></el-table-column> -->
-    </el-table>
+    <el-card class="box-card" style="margin-top: 10px;">
+      <div slot="header" class="clearfix">
+        <span style="font-weight: bold">准入范围</span>
+      </div>
+      <el-table :data="businessList" border bordertooltip-effect="dark" style="height: calc(100vh - 500px);">
+        <el-table-column prop="Code" label="分类编码" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="Name" label="分类名称" show-overflow-tooltip></el-table-column>
+        <el-table-column prop="Remark" label="备注" show-overflow-tooltip></el-table-column>
+      </el-table>
+    </el-card>
+
+    <el-card class="box-card" style="margin-top: 10px;">
+      <div slot="header" class="clearfix">
+        <span style="font-weight: bold"> 企业资质</span>
+        <el-button style="float: right; padding: 3px 0" type="text" @click="showDialog" v-if="canadd">添加</el-button>
+      </div>
+      <el-table :data="subfileList" border>
+        <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)" :disabled="!canadd">编辑
+            </el-button>
+            <el-button type="primary" plain size="mini" title="删除" style="margin-left:3px"
+              :disabled="scope.row.FileType == '1' || !canadd" @click="deletedata(scope.row)">删除</el-button>
+          </template>
+        </el-table-column>
+        <el-table-column prop="NeedFileType" 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+'') }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="OtherRemark" label="描述" show-overflow-tooltip></el-table-column>
+      </el-table>
+    </el-card>
 
     <el-dialog :title="Title" :visible.sync="visible" top="5vh">
       <el-form :model="SubfileForm" label-width="100px">
@@ -38,11 +53,6 @@
               <el-input v-model="SubfileForm.NeedFileType" 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>
-            </el-form-item>
-          </el-col> -->
           <el-col :span="12">
             <el-form-item label="有效日期" required>
               <el-date-picker style="width: 100%" v-model="SubfileForm.EffectDate" type="date" placeholder="请选择有效日期">
@@ -97,26 +107,18 @@
   } from 'vuex'
   import axios from 'axios'
   import uploadajax from '../../assets/js/uploadajax.js'
+  import BusinessList from '../../components/oilsupplier/businesslist'
+
   export default {
     name: 'SubfileList',
+    components: {
+      BusinessList // 准入范围
+    },
     props: {
-      SupplierId: {
-        type: String,
-        default: '0'
-      },
-      SupplierCertId: {
-        type: String,
-        default: '0'
-      },
-      SupplierTypeCode: {
-        type: String,
-        default: '0'
-      },
       canadd: {
         type: Boolean,
         default: false
       },
-      BusinessForm: {}
     },
     created() {},
     computed: {
@@ -126,6 +128,11 @@
     },
     data() {
       return {
+        SupplierId: 0,
+        SupplierTypeCode: '',
+        SupplierCertId: 0,
+
+        businessList: [],
         subfileList: [],
         techList: [],
         techTreeList: [],
@@ -165,7 +172,9 @@
       getvalue(SupplierId, SupplierTypeCode, certId) {
         this.SupplierId = SupplierId
         this.SupplierTypeCode = SupplierTypeCode
+        this.SupplierCertId = certId
         this.initData()
+        this.getbusList()
       },
       initData() {
         let _this = this
@@ -181,6 +190,25 @@
           .then(res => {
             _this.subfileList = res.data.items
             _this.currentItemCount = res.data.currentItemCount
+
+          })
+          .catch(err => {
+            console.error(err)
+          })
+      },
+      getbusList() {
+        let _this = this
+        const params = {
+          SupplierCertId: this.SupplierCertId,
+          SupplierTypeCode: this.SupplierTypeCode,
+          _currentPage: 1,
+          _size: 1000
+        }
+        this.$axios.get('suppliercertsub/list', {
+            params
+          })
+          .then(res => {
+            _this.businessList = res.data.items
           })
           .catch(err => {
             console.error(err)
@@ -188,7 +216,7 @@
       },
       makesure() {
         if (this.Title == '新增文件') {
-          if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {           
+          if (this.$refs.refuploadattach.uploadFiles && this.$refs.refuploadattach.uploadFiles.length > 0) {
             // 上传附件是否完成判断
             if (!this.attachissuccess()) {
               this.$message.error('有附件未成功上传!不能保存数据')

+ 47 - 37
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/techedit.vue

@@ -12,11 +12,11 @@
         </span>
         <span style="float: right;">
           <router-link :to="'/oilsupplier/annualaudit'">
-          <el-button type="primary" plain size="mini" :disabled="formDataCert.Status == 0">年审申请</el-button>
+            <el-button type="primary" plain size="mini" :disabled="formDataCert.Status == 0">年审申请</el-button>
           </router-link>
           <!--v-if="formData.Step>=5"-->
           <router-link :to="'/oilsupplier/supplierappend/techlist'">
-          <el-button type="primary" plain size="mini" :disabled="formDataCert.Status == 0">增项申请</el-button>
+            <el-button type="primary" plain size="mini" :disabled="formDataCert.Status == 0">增项申请</el-button>
           </router-link>
           <router-link :to="'/oilsupplier/supplier/techlist'">
             <el-button type="primary" size="mini" style="margin-left: 8px" v-if="showReturn">返回
@@ -170,17 +170,18 @@
               <el-button style="float: right; padding: 3px 0" type="text" @click="winningdialog"
                 v-if="formDataCert.Status == 0">添加</el-button>
             </div>
-            <winning-list ref="winningList" :data.sync="winningList" :SupplierCertId="certId" :SupplierTypeCode="classId"
-              :canadd="add_flat" height="360px" style="margin-top: 20px">
+            <winning-list ref="winningList" :data.sync="winningList" :SupplierCertId="certId"
+              :SupplierTypeCode="classId" :canadd="add_flat" height="360px" style="margin-top: 20px">
             </winning-list>
           </el-card>
         </el-tab-pane>
         <el-tab-pane label="准入范围" :disabled="!certId">
+          <business-list ref="businessList" :data.sync="businessList" :canadd="add_flat" height="360px"
+            style="margin-top: 20px"></business-list>
         </el-tab-pane>
         <el-tab-pane label="企业资质" :disabled="!certId">
-          <business-list ref="businessList" :data.sync="businessList" :SupplierCertId="certId" :SupplierId="formData.Id+''"
-            :SupplierTypeCode="classId" :canadd="add_flat" @close="selectAuditOrg" height="360px" style="margin-top: 20px">
-          </business-list>
+          <subfile-list ref="subfileList" :data.sync="subfileList" :canadd="add_flat" @close="selectAuditOrg"
+            height="360px" style="margin-top: 20px"></subfile-list>
         </el-tab-pane>
 
         <el-tab-pane label="审批流程" v-if="formDataCert.Status > 0">
@@ -206,8 +207,7 @@
           <el-col :span="24">
             <el-form-item label="二级单位">
               <el-cascader :options="orgtreelist" :props="orgtreeprops" change-on-select :show-all-levels="false"
-                           filterable style="width: 100%" @change="auditOrgChang"
-                           placeholder="请选择组织">
+                filterable style="width: 100%" @change="auditOrgChang" placeholder="请选择组织">
               </el-cascader>
             </el-form-item>
           </el-col>
@@ -249,6 +249,7 @@
   import PatentList from '@/components/oilsupplier/patentlist'
   import WinningList from '@/components/oilsupplier/winninglist'
   import BusinessList from '@/components/oilsupplier/businesslist'
+  import SubfileList from '@/components/oilsupplier/subfilelist'
   import TechInfo from '@/components/oilsupplier/techinfo'
 
   export default {
@@ -263,6 +264,7 @@
       PatentList, // 拥有专利、专有技术及工法列表
       WinningList, // 近三年获得省部级及以上主要技术、管理成果、获奖项目列表
       BusinessList, // 选择准入范围
+      SubfileList, // 选择企业资质
       TechInfo
     },
     computed: {
@@ -272,7 +274,7 @@
     },
     name: 'oilsupplierEdit',
 
-    data () {
+    data() {
       return {
         showReturn: 1,
         IsCompanyUser: 0,
@@ -285,6 +287,7 @@
         patentList: [], // 拥有专利、专有技术及工法
         winningList: [], // 近三年获得省部级及以上主要技术、管理成果、获奖项目
         businessList: [], // 准入业务
+        subfileList: [], // 准入业务
         organizeOption: [], // 审批部门
         auditerOption: [], // 审批人
         orgtreelist: [],
@@ -402,8 +405,13 @@
         }
       }
     },
-
-    created () {
+    mounted() {
+      this.serviceId = this.$route.params.opera + ''
+      if (this.$route.query.certid) {
+        this.certId = this.$route.query.certid + ''
+      }
+    },
+    created() {
       this.serviceId = this.$route.params.opera + ''
       if (this.$route.query.rtn) {
         this.showReturn = 0
@@ -434,7 +442,7 @@
       }
     },
     methods: {
-      inputCompany (val) {
+      inputCompany(val) {
         if (!this.certId) {
           api.getEntityByName(val, this.$axios).then(res => {
             if (res.data && res.data.Id) {
@@ -445,12 +453,12 @@
           })
         }
       },
-      changeFormData (fdata) {
+      changeFormData(fdata) {
         if (!this.certId) {
           this.SetFormData(fdata)
         }
       },
-      SetFormData (fdata) {
+      SetFormData(fdata) {
         this.isCanUpdateSupplier(fdata.Id)
         this.formData.Id = fdata.Id
         this.formData.SupplierName = fdata.SupplierName
@@ -512,27 +520,27 @@
         }*/
       },
 
-      isCanUpdateSupplier (supplierId) {
+      isCanUpdateSupplier(supplierId) {
         api.isCanUpdateSupplier(supplierId, this.$axios).then(res => {
           this.canUpdateSupplier = (res.data.code === 0)
         }).catch(err => {
           console.error(err)
         })
       },
-      equipmentdialog () {
+      equipmentdialog() {
         this.$refs['equipmentList'].showDialog()
       },
-      performancedialog () {
+      performancedialog() {
         this.$refs['performanceList'].showDialog()
       },
-      patentdialog () {
+      patentdialog() {
         this.$refs['patentList'].showDialog()
       },
-      winningdialog () {
+      winningdialog() {
         this.$refs['winningList'].showDialog()
       },
 
-      initDatas () {
+      initDatas() {
         this.isCanUpdateSupplier(this.formData.Id)
         if (this.formData.Id) {
           api.getEntityAndCert(this.certId, this.$axios).then(res => {
@@ -569,20 +577,21 @@
             this.entrydetail.business = this.certId
             this.entrydetail.instance = this.formDataCert.WorkflowId
             if (this.certId && this.formDataCert.WorkflowId) {
-              //this.$refs['WfHistory'].getHistoryTask() /* 刷新工作流 */
+              this.$refs['WfHistory'].getHistoryTask() /* 刷新工作流 */
             }
             this.$refs['equipmentList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['performanceList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['patentList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['winningList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['businessList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
+            this.$refs['subfileList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
           }).catch(err => {
             console.error(err)
           })
         }
       },
 
-      getDictOptions () {
+      getDictOptions() {
         api.getDictList(this.$axios).then(res => {
           this.dictData = res.data.items
           this.organizeOption = res.data.items['Organizes']
@@ -593,14 +602,14 @@
           console.error(err)
         })
       },
-      getorgtreelist () {
+      getorgtreelist() {
         let _this = this
         let params = {
           IsInnerOrganize: 1
         }
         _this.$axios.get('organizes/orgalllist', {
-          params
-        })
+            params
+          })
           .then(res => {
             _this.orgtreelist = window.toolfun_gettreejson(res.data.items, 'Id', 'Parentid', 'Id,Fullname')
           })
@@ -608,7 +617,7 @@
             console.error(err)
           })
       },
-      auditOrgChang (val) {
+      auditOrgChang(val) {
         let deptid = val[val.length - 1]
         console.log(deptid)
         this.auditerOption = []
@@ -628,7 +637,7 @@
       }, */
 
       // 保存信息
-      saveEntity () {
+      saveEntity() {
         this.$refs['TechInfo'].$refs['EntityForm'].validate((valid) => {
           if (valid) {
             if (!this.formData.SetupTime) {
@@ -649,11 +658,11 @@
       },
 
       // 保存信息
-      saveCertEntity () {
+      saveCertEntity() {
         this.$refs['SupplierCertEditCompoment'].saveEntity()
       },
 
-      addEntity () {
+      addEntity() {
         this.formData.SupplierTypeCode = '03'
         this.formData.SupplierTypeName = '技术服务类'
         api.addEntity(this.formData, this.$axios).then(res => {
@@ -677,7 +686,7 @@
         })
       },
 
-      updateEntity () {
+      updateEntity() {
         api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
           if (res.data.code === 0) {
             // 保存成功后,初始化数据,变成修改
@@ -697,7 +706,7 @@
         })
       },
 
-      CheckCompanyBase () {
+      CheckCompanyBase() {
         if (!this.formData.Id) {
           this.$message({
             type: 'error',
@@ -715,7 +724,7 @@
         return true
       },
       // 企业人员结构情况
-      updateNumberEntity () {
+      updateNumberEntity() {
         if (!this.CheckCompanyBase()) {
           return false
         }
@@ -737,10 +746,10 @@
           console.error(err)
         })
       },
-      selectAuditOrg () {
+      selectAuditOrg() {
         this.dialogVisible = true
       },
-      AuditEntity () {
+      AuditEntity() {
         this.applyLoading = true
         this.firstAudit = this.auditer
         apiCert.auditEntity(this.certId, this.firstAudit, this.$axios).then(res => {
@@ -764,7 +773,7 @@
         })
       },
 
-      jstimehandle (val) {
+      jstimehandle(val) {
         if (val === '') {
           return '----'
         } else if (val === '0001-01-01T08:00:00+08:00') {
@@ -777,7 +786,7 @@
         }
       },
 
-      formatDateTime (date) {
+      formatDateTime(date) {
         var y = date.getFullYear()
         var m = date.getMonth() + 1
         m = m < 10 ? ('0' + m) : m
@@ -790,6 +799,7 @@
       }
     }
   }
+
 </script>
 
 <style lang="scss">