Jelajahi Sumber

年审初审页面,资质变更页面修改

huahaiyan 6 tahun lalu
induk
melakukan
216e4cc939

+ 3 - 3
src/dashoo.cn/backend/api/business/oilsupplier/annualaudit/annualauditService.go

@@ -35,7 +35,7 @@ func (s *OilAnnualAuditService) GetSupplierList(supname, auditname string) []Sup
 }
 
 //通用多部门多实例审核方法
-func (s *OilAnnualAuditService) SubmitOrgAudit(workflowid, certId, wfName, wfNodeCode, userId, result, remarks, OilSupplierCertSubName, OilClassOrgSettingName string) (processInstanceId string) {
+func (s *OilAnnualAuditService) SubmitOrgAudit(workflowid, certId, annualId, wfName, wfNodeCode, userId, result, remarks, OilSupplierCertSubName, OilClassOrgSettingName string) (processInstanceId string) {
 	//取出审批列表
 	var supplierCert suppliercert.OilSupplierCert
 	s.GetEntityById(certId, &supplierCert)
@@ -104,9 +104,9 @@ func (s *OilAnnualAuditService) SubmitOrgAudit(workflowid, certId, wfName, wfNod
 	svcActiviti := workflow.GetActivitiService(s.DBE)
 	if workflowid == "0" || len(workflowid) <= 0 {
 		//启动工作流
-		processInstanceId = svcActiviti.StartProcess(wfName, certId, userId)
+		processInstanceId = svcActiviti.StartProcess(wfName, annualId, userId)
 	}
 	//多实例提交给下一步
-	svcActiviti.MultiTaskComplete(wfName, certId, "", orgAudits, userId, result, remarks)
+	svcActiviti.MultiTaskComplete(wfName, annualId, "", orgAudits, userId, result, remarks)
 	return processInstanceId
 }

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

@@ -82,6 +82,76 @@ func (this *AnnualAuditController) GetEntityList() {
 	this.ServeJSON()
 }
 
+// @Title 获取列表
+// @Description get user by token
+// @Success 200 {object} []annualaudit.OilAnnualAudit
+// @router /mytasks [get]
+func (this *AnnualAuditController) GetMyTaskEntityList() {
+
+	//获取分页信息
+	page := this.GetPageInfoForm()
+	where := " 1=1 "
+	orderby := "Id"
+	asc := false
+	Order := this.GetString("Order")
+	Prop := this.GetString("Prop")
+	if Order != "" && Prop != "" {
+		orderby = Prop
+		if Order == "asc" {
+			asc = true
+		}
+	}
+	SupplierTypeName := this.GetString("SupplierTypeName")
+	RecUnitId := this.GetString("RecUnitId")
+	AccessCardNo := this.GetString("AccessCardNo")
+	SupplierName := this.GetString("SupplierName")
+	CreateOn := this.GetString("CreateOn")
+
+	if SupplierTypeName != "" {
+		where = where + " and SupplierTypeName like '%" + SupplierTypeName + "%'"
+	}
+
+	if RecUnitId != "" {
+		where = where + " and RecUnitId like '%" + RecUnitId + "%'"
+	}
+
+	if AccessCardNo != "" {
+		where = where + " and AccessCardNo like '%" + AccessCardNo + "%'"
+	}
+
+	if SupplierName != "" {
+		where = where + " and SupplierName like '%" + SupplierName + "%'"
+	}
+
+	if CreateOn != "" {
+		dates := strings.Split(CreateOn, ",")
+		if len(dates) == 2 {
+			minDate := dates[0]
+			maxDate := dates[1]
+			where = where + " and CreateOn>='" + minDate + "' and CreateOn<='" + maxDate + "'"
+		}
+	}
+
+	svc := annualaudit.GetOilAnnualAuditService(utils.DBE)
+	var list []annualaudit.OilAnnualAudit
+	//找出待办任务
+	actisvc := workflow.GetActivitiService(utils.DBE)
+	certIdList := actisvc.GetMyTasks(workflow.OIL_AUDIT_APPLY, this.User.Id)
+	where += " and Id in (" + certIdList + ")"
+	//根据部门查询待办任务
+
+	total := svc.GetPagingEntitiesWithOrderBytbl("", page.CurrentPage, page.Size,orderby,asc, &list, where)
+	//total := svc.GetMyPagingEntitiesWithOrderBytbl(OilSupplierName, OilSupplierCertName, page.CurrentPage, page.Size, orderby, asc, &list, where)
+
+	var datainfo DataInfo
+	datainfo.Items = list
+	datainfo.CurrentItemCount = total
+	datainfo.PageIndex = page.CurrentPage
+	datainfo.ItemsPerPage = page.Size
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
 // @Title 获取年审企业名称
 // @Description 获取实体
 // @Success 200 {object} annualaudit.OilAnnualAudit
@@ -180,7 +250,7 @@ func (this *AnnualAuditController) AddEntity() {
 	_, err := svc.InsertEntityBytbl(""+OilAnnualAuditName, &model)
 	annualId := model.Id
 	//工作流开始
-	processInstanceId := svc.SubmitOrgAudit(model.WorkflowId, utils.ToStr(model.CerId), workflow.OIL_AUDIT_APPLY, workflow.FIRST_TRIAL, this.User.Id, "1", "提交给二级单位初审", OilSupplierCertSubName, OilClassOrgSettingName)
+	processInstanceId := svc.SubmitOrgAudit(model.WorkflowId, utils.ToStr(model.CerId), utils.ToStr(model.Id), workflow.OIL_AUDIT_APPLY, workflow.FIRST_TRIAL, this.User.Id, "1", "提交给二级单位初审", OilSupplierCertSubName, OilClassOrgSettingName)
 	var auditmodel annualaudit.OilAnnualAudit
 	auditmodel.WorkflowId = processInstanceId
 	cols := []string{

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

@@ -86,10 +86,6 @@ func (this *OilSupplierCertSubController) GetEntityList() {
 		where = where + " and IsDelete like '%" + IsDelete + "%'"
 	}
 
-	if CreateOn != "" {
-		where = where + " and CreateOn like '%" + CreateOn + "%'"
-	}
-
 	if CreateUserId != "" {
 		where = where + " and CreateUserId like '%" + CreateUserId + "%'"
 	}

+ 1 - 1
src/dashoo.cn/frontend_web/src/api/oilsupplier/annualaudit.js

@@ -13,7 +13,7 @@ export default {
       params: params
     })
   },
-  getMyTasks (CreateOn, params, myAxios) {
+  getMyList (CreateOn, params, myAxios) {
     return myAxios({
       url: '/annualaudit/mytasks?CreateOn=' + CreateOn,
       method: 'GET',

+ 474 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/annualfistaudit.vue

@@ -0,0 +1,474 @@
+<template>
+  <div>
+    <el-breadcrumb class="heading">
+      <el-breadcrumb-item :to="{ path: '/' }">平台首页</el-breadcrumb-item>
+      <el-breadcrumb-item :to="{ path: '/oilsupplier/annualfistaudit' }">年审审核表</el-breadcrumb-item>
+    </el-breadcrumb>
+    <el-card class="box-card" style="height: calc(100vh - 115px);">
+      <div slot="header">
+        <span>
+          <i class="icon icon-table2"></i> 年审初审表
+        </span>
+        <el-form ref="form" :inline="true" style="float: right; margin-top: -10px">
+          <el-form-item label="年审日期">
+            <el-date-picker size="mini" style="width: 220px" v-model="CreateOn" type="daterange" range-separator="至"
+              start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
+          </el-form-item>
+          <el-form-item label="准入类别">
+            <el-select size="mini" style="width:100px" v-model="searchForm.SupplierTypeName" placeholder="准入类别">
+              <el-option label="物资类" value="01"></el-option>
+              <el-option label="技术服务类" value="03"></el-option>
+              <el-option label="基建类" value="02"></el-option>
+            </el-select>
+          </el-form-item>
+          <el-form-item>
+            <el-dropdown split-button type="primary" size="mini" @click="handleSearch" @command="searchCommand">
+              查询
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item command="search">高级查询</el-dropdown-item>
+                <el-dropdown-item command="clear">查询重置</el-dropdown-item>
+              </el-dropdown-menu>
+            </el-dropdown>
+          </el-form-item>
+        </el-form>
+      </div>
+      <el-table :data="entityList" border height="calc(100vh - 243px)" style="width: 100%" @sort-change="orderby">
+        <el-table-column label="操作" min-width="180" align="center" fixed>
+          <template slot-scope="scope">
+            <router-link :to="'/oilsupplier/annualaudit/' + scope.row.SupplierId + '/operation?certid=' + scope.row.CerId +'&WorkflowId='+scope.row.WorkflowId">
+              <el-button type="primary" plain title="审核" size="mini">审核</el-button>
+            </router-link>
+          </template>
+        </el-table-column>
+
+        <el-table-column prop="RecUnitId" label="推荐单位编码" sortable min-width="130" align="center" show-overflow-tooltip>
+        </el-table-column>
+        <el-table-column prop="AccessCardNo" label="准入证号" sortable min-width="110" align="center" show-overflow-tooltip>
+        </el-table-column>
+        <el-table-column prop="SupplierTypeName" label="准入类别" sortable min-width="110" align="center"
+          show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{ checkSupplierTypeName(scope.row.SupplierTypeName) }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="SupplierName" label="企业名称" sortable min-width="130" align="center" show-overflow-tooltip>
+        </el-table-column>
+        <!-- <el-table-column prop="OrganCode" label="组织机构代码" sortable min-width="130" align="center" show-overflow-tooltip>
+        </el-table-column> -->
+        <el-table-column sortable min-width="110" align="center" prop="Status" label="审核状态">
+          <template slot-scope="scope">
+            <el-alert v-if="scope.row.Status=='2'" :closable="false" style="background:rgba(255,255,255,0.2)"
+              title="初审未通过" type="warning">
+            </el-alert>
+            <el-alert v-if="scope.row.Status=='4'" :closable="false" style="background:rgba(255,255,255,0.2)"
+              title="审核未通过" type="error">
+            </el-alert>
+            <el-alert v-if="scope.row.Status=='0'" :closable="false" style="background:rgba(255,255,255,0.2)"
+              title="已申请" type="info">
+            </el-alert>
+            <el-alert v-if="scope.row.Status=='1'" :closable="false" style="background:rgba(255,255,255,0.2)"
+              title="初审通过" type="success">
+            </el-alert>
+            <el-alert v-if="scope.row.Status=='5'" :closable="false" style="background:rgba(255,255,255,0.2)"
+              title="已交费" type="success">
+            </el-alert>
+            <el-alert v-if="scope.row.Status=='3'" :closable="false" style="background:rgba(255,255,255,0.2)"
+              title="专业审核通过" type="success">
+            </el-alert>
+          </template>
+        </el-table-column>
+        <el-table-column prop="ApplyTime" sortable min-width="130" label="年审日期" align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{ jstimehandle(scope.row.ApplyTime+'') }}
+          </template>
+        </el-table-column>
+        <el-table-column prop="CreateOn" sortable min-width="130" label="申请日期" align="center" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{ jstimehandle(scope.row.CreateOn+'') }}
+          </template>
+        </el-table-column>
+      </el-table>
+      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :current-page="currentPage"
+        :page-sizes="[10, 15, 20, 25]" :page-size="size" layout="total, sizes, prev, pager, next, jumper"
+        :total="currentItemCount">
+      </el-pagination>
+    </el-card>
+
+    <el-dialog title="高级查询" :visible.sync="dialogVisible" width="720px">
+      <el-form ref="searchForm" label-width="110px">
+        <el-row>
+
+          <el-col :span="12">
+            <el-form-item label="推荐单位编码">
+              <el-input size="mini" v-model="searchForm.RecUnitId" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="准入证号">
+              <el-input size="mini" v-model="searchForm.AccessCardNo" style="width:100%" placeholder="请输入">
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="准入类别">
+              <el-input size="mini" v-model="searchForm.SupplierTypeName" style="width:100%" placeholder="请输入">
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="12">
+            <el-form-item label="企业名称">
+              <el-input size="mini" v-model="searchForm.SupplierName" style="width:100%" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="mini" @click="dialogVisible = false">取 消</el-button>
+        <el-button size="mini" type="primary" @click="handleSearch">查 询</el-button>
+      </span>
+    </el-dialog>
+    <el-dialog title="年审申请添加" :visible.sync="addshow" width="360px">
+      <el-form label-width="90px">
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="企业名称">
+              <el-select filterable default-first-option ref="supselect" v-model="entityForm.SupplierId"
+                placeholder="请选择" @change="supplierchange" style="width: 100%">
+                <el-option v-for="item in selectsupplierlist" :key="item.Id" :label="item.Realname" :value="item.Id">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="24">
+            <el-form-item label="准入类别">
+              <el-select filterable default-first-option v-model="entityForm.SupplierTypeName" placeholder="请选择"
+                style="width: 100%">
+                <el-option label="物资类" value="01"></el-option>
+                <el-option label="技术服务类" value="03"></el-option>
+                <el-option label="基建类" value="02"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+      <span style="float: right;margin-top:-10px;">
+        <el-button size="small" @click="addUserShow = false">取 消</el-button>
+        <el-button type="primary" size="small" @click="addAnnualAudit()">确 定</el-button>
+      </span>
+      <br>
+    </el-dialog>
+    <el-dialog title="审核历史查看" :visible.sync="historyVisible" width="900px">
+      <wf-history ref="WfHistory" :entryinfo="entrydetail"></wf-history>
+    </el-dialog>
+  </div>
+</template>
+<script>
+  import {
+    mapGetters
+  } from 'vuex';
+  import WfHistory from '@/components/workflow/wfhistory.vue'
+  import supplierapi from '@/api/oilsupplier/supplier';
+  import api from '@/api/oilsupplier/annualaudit';
+
+  export default {
+    components: {
+      WfHistory,
+    },
+    computed: {
+      ...mapGetters({
+        authUser: 'authUser'
+      })
+    },
+    name: 'annualaudit',
+
+    data() {
+      return {
+        historyVisible: false,
+        addshow: false,
+        dialogVisible: false,
+        delevisble: false,
+        //列表数据
+        selectsupplierlist: [],
+        entityList: [],
+        //分页参数
+        size: 10,
+        currentPage: 1,
+        currentItemCount: 0,
+        //列表排序
+        Column: {
+          Order: '',
+          Prop: ''
+        },
+        //工作流
+        entrydetail: {
+          process: 'oil_audit_apply',
+          business: '',
+          instance: ''
+        },
+        //查询时间
+        CreateOn: [new Date(new Date().getTime() - 30 * 24 * 60 * 60 * 1000), new Date()],
+        //查询项
+        searchFormReset: {},
+        entityForm: {
+          Id: '',
+          SupplierName: '',
+          SupplierId: '',
+          SupplierTypeName: '',
+        },
+        searchForm: {
+          Id: '',
+          RecUnitId: '',
+          AccessCardNo: '',
+          SupplierTypeName: '',
+          SupplierName: '',
+          Num: '',
+          ProjectName: '',
+          Performance: '',
+          WorkRange: '',
+          Status: '',
+          BackReason: '',
+          ApplyTime: '',
+          AuditDate: '',
+          EnterUserId: '',
+          EnterUserName: '',
+          EnterUserTel: '',
+          SCR: '',
+          SCRQ: '',
+          SCYJ: '',
+          SCJG: '',
+          SPR: '',
+          SPRQ: '',
+          SPYJ: '',
+          SPJG: '',
+          CreateOn: '',
+          CreateUserId: '',
+          CreateBy: '',
+          ModifiedOn: '',
+          ModifiedUserId: '',
+          ModifiedBy: '',
+
+        },
+      }
+    },
+    created() {
+      //查询条件初始值备份
+      Object.assign(this.searchFormReset, this.searchForm)
+      //查询列表
+      this.initDatas()
+      this.getselectsupplier()
+      //this.getDictOptions()
+    },
+    methods: {
+      initDatas() {
+        //分页及列表条件
+        let params = {
+          _currentPage: this.currentPage,
+          _size: this.size,
+          Order: this.Column.Order,
+          Prop: this.Column.Prop,
+        }
+        let myCreateOn = []
+        // 解析时间
+        if (this.CreateOn.length == 2) {
+          this.CreateOn[1].setHours(23)
+          this.CreateOn[1].setMinutes(59)
+          this.CreateOn[1].setSeconds(59)
+          myCreateOn.push(this.formatDateTime(this.CreateOn[0]))
+          myCreateOn.push(this.formatDateTime(this.CreateOn[1]))
+        }
+        //查询条件
+        Object.assign(params, this.searchForm)
+        //访问接口
+        api.getMyList(myCreateOn.join(','), params, this.$axios).then(res => {
+          this.entityList = res.data.items
+          console.log("---this.entityList ----",this.entityList )
+          this.currentItemCount = res.data.currentItemCount
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      supplierchange(value) {
+        let obj = {};
+        obj = this.selectsupplierlist.find((item) => {
+          return item.Id === value;
+        });
+        this.entityForm.SupplierName = obj.Realname
+      },
+      addAnnualAudit() {
+        console.log("----this.entityForm--", this.entityForm)
+        api.addEntity(this.entityForm, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            console.log("--------res.data----", res.data)
+            //保存成功后,初始化数据,变成修改
+            this.entityForm.Id = res.data.item;
+            this.initDatas();
+            this.addshow = false
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            });
+
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            });
+          }
+        }).catch(err => {
+          console.error(err)
+        });
+      },
+      addaudit() {
+        this.addshow = true
+      },
+
+      getselectsupplier() {
+        api.getSupList(this.$axios).then(res => {
+          if (res.data.items.length != 0) {
+            for (var i = 0; i < res.data.items.length; i++) {
+              this.selectsupplierlist.push({
+                Id: res.data.items[i].Id,
+                Realname: res.data.items[i].SupplierName
+              })
+            }
+          }
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+
+      getDictOptions() {
+        api.getDictList(this.$axios).then(res => {
+          //this.dictOptions.customerList = res.data.items['customerList']
+          //this.dictOptions.projectList = res.data.items['projectList']
+
+        }).catch(err => {
+          console.error(err)
+        })
+      },
+      checkSupplierTypeName(val) {
+        if (val == '01') {
+          return '物资类'
+        } else if (val == '02') {
+          return '基建类'
+        } else if (val == '03') {
+          return '技术服务类'
+        }
+      },
+
+      searchCommand(command) {
+        if (command == 'search') {
+          this.dialogVisible = true
+        } else if (command == 'clear') {
+          this.clearSearch()
+        }
+      },
+      //列表排序功能
+      orderby(column) {
+        if (column.order == 'ascending') {
+          this.Column.Order = 'asc'
+        } else if (column.order == 'descending') {
+          this.Column.Order = 'desc'
+        }
+        this.Column.Prop = column.prop
+        this.initDatas()
+      },
+      clearSearch() {
+        Object.assign(this.searchForm, this.searchFormReset);
+        //this.searchForm = this.searchFormReset;
+        this.CreateOn = ''
+        this.initDatas()
+      },
+      handleSearch() {
+        this.currentPage = 1;
+        this.dialogVisible = false;
+        this.initDatas();
+      },
+      handleCurrentChange(value) {
+        this.currentPage = value
+        this.initDatas()
+      },
+      handleSizeChange(value) {
+        this.size = value
+        this.currentPage = 1
+        this.initDatas()
+      },
+      deleteEntity(row) {
+        api.deleteEntity(row.Id, this.$axios).then(res => {
+          if (res.data.code === 0) {
+            this.initDatas();
+            this.$message({
+              type: 'success',
+              message: res.data.message
+            });
+
+          } else {
+            this.$message({
+              type: 'warning',
+              message: res.data.message
+            });
+          }
+        }).catch(err => {
+          console.error(err)
+        });
+      },
+
+      getvalues(val) {
+        this.entrydetail.business = val.Id
+        this.entrydetail.instance = val.WorkflowId
+        this.historyVisible = true
+      },
+
+      MoreCmdClick(cmd) {
+        if (cmd.Command == 'History') {
+          this.getvalues(cmd.row)
+
+        } else if (cmd.Command == 'Delete') {
+          this.deleteEntity(cmd.row)
+        }
+      },
+
+      GetCommand(cmdType, row) {
+        let cmd = {}
+        cmd.Command = cmdType
+        cmd.row = row
+        return cmd
+      },
+
+      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)
+        }
+      },
+
+      formatDateTime(date) {
+        var y = date.getFullYear();
+        var m = date.getMonth() + 1;
+        m = m < 10 ? ('0' + m) : m;
+        var d = date.getDate();
+        d = d < 10 ? ('0' + d) : d;
+        var h = date.getHours();
+        var minute = date.getMinutes();
+        minute = minute < 10 ? ('0' + minute) : minute;
+        return y + '-' + m + '-' + d + ' ' + h + ':' + minute;
+      }
+    }
+  }
+
+</script>
+
+<style lang="scss">
+
+</style>

+ 20 - 497
src/dashoo.cn/frontend_web/src/pages/oilsupplier/qualchange/_opera/operation.vue

@@ -17,355 +17,10 @@
           </router-link>
         </span>
       </div>
-      <el-form label-width="240px" ref="EntityForm" :model="formData">
-         <el-row>
-           <el-col :span="8">
-            <el-form-item v-if="serviceId == 'add'" label="编码" label-width="110px">
-              <el-input v-model="formData.Code" placeholder="请输入" style="width: 100%"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :span="8">
-            <el-form-item v-if="serviceId == 'add'" label="名称" label-width="110px">
-              <el-input v-model="formData.Name" placeholder="请输入" style="width: 100%"></el-input>
-            </el-form-item>
-          </el-col>
-           <el-col :span="8">
-            <el-form-item v-if="serviceId == 'add'" label-width="110px" label="一级编码">
-              <el-input v-model="formData.Code1" style="width:100%" placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="8">
-            <el-form-item v-if="serviceId == 'add'" label-width="110px" label="一级名称">
-              <el-input v-model="formData.Name1" style="width:100%" placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="8">
-            <el-form-item v-if="serviceId == 'add'" label-width="110px" label="二级编码">
-              <el-input v-model="formData.Code2" style="width:100%" placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="8">
-            <el-form-item v-if="serviceId == 'add'" label-width="110px" label="二级名称">
-              <el-input v-model="formData.Name2" style="width:100%" placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="8">
-            <el-form-item v-if="serviceId == 'add'" label-width="110px" label="三级编码">
-              <el-input v-model="formData.Code3" style="width:100%" placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="8">
-            <el-form-item v-if="serviceId == 'add'" label-width="110px" label="三级名称">
-              <el-input v-model="formData.Name3" style="width:100%" placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="8">
-            <el-form-item v-if="serviceId == 'add'" label-width="110px" label="四级编码">
-              <el-input v-model="formData.Code4" style="width:100%" placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="8">
-            <el-form-item v-if="serviceId == 'add'" label-width="110px" label="四级名称">
-              <el-input v-model="formData.Name4" style="width:100%" placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="8">
-            <el-form-item v-if="serviceId == 'add'" label-width="110px" label="部门ID">
-              <el-input v-model="formData.OrgId" style="width:100%" placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-        <el-row>
-          <el-col :span="6">
-            <el-form-item label="营业执照">
-              <el-switch v-model="formData.F01" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="组织机构代码证">
-              <el-switch v-model="formData.F02" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="税务登记证">
-              <el-switch v-model="formData.F03" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="银行开户许可证">
-              <el-switch v-model="formData.F04" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="质量管理体系认证证书">
-              <el-switch v-model="formData.F05" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="环境管理体系认证证书">
-              <el-switch v-model="formData.F06" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="职业健康安全管理体系认证证书">
-              <el-switch v-model="formData.F07" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="软件企业认定证书">
-              <el-switch v-model="formData.F08" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="安全生产许可证">
-              <el-switch v-model="formData.F09" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="陆上石油天然气安全生产许可证">
-              <el-switch v-model="formData.F10" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="海洋石油作业安全生产许可证">
-              <el-switch v-model="formData.F11" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="辐射安全许可证">
-              <el-switch v-model="formData.F12" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="石油工程技术服务企业资质证书">
-              <el-switch v-model="formData.F13" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="物业服务企业资质证书">
-              <el-switch v-model="formData.F14" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="工业清洗企业资质证书">
-              <el-switch v-model="formData.F15" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="建设项目环境影响评价资格证书">
-              <el-switch v-model="formData.F16" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="消防设施维护保养资质证书">
-              <el-switch v-model="formData.F17" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="安全评价机构资质证书">
-              <el-switch v-model="formData.F18" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="工程咨询招标代理机构资质证书">
-              <el-switch v-model="formData.F19" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="工程监督资质证书">
-              <el-switch v-model="formData.F20" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="土地开发资格证">
-              <el-switch v-model="formData.F21" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="房屋预售资格证">
-              <el-switch v-model="formData.F22" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="保安服务许可证">
-              <el-switch v-model="formData.F23" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="道路运输经营许可证">
-              <el-switch v-model="formData.F24" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="机动车维修经营许可证">
-              <el-switch v-model="formData.F25" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="道路危险货物运输许可证">
-              <el-switch v-model="formData.F26" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="特种设备安装改造维修许可证">
-              <el-switch v-model="formData.F27" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="建筑安全许可证">
-              <el-switch v-model="formData.F28" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="防火许可证">
-              <el-switch v-model="formData.F29" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="印刷经营许可证">
-              <el-switch v-model="formData.F30" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="餐饮服务许可证">
-              <el-switch v-model="formData.F31" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="劳务派遣经营许可证">
-              <el-switch v-model="formData.F32" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="人力资源服务许可证">
-              <el-switch v-model="formData.F33" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="国家实验室认可证书">
-              <el-switch v-model="formData.F34" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="海洋石油专业设备检验检测机构证书">
-              <el-switch v-model="formData.F35" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="安全生产检验检测证书">
-              <el-switch v-model="formData.F36" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="液化气钢瓶检验证书">
-              <el-switch v-model="formData.F37" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="国家电网承试承装承修许可证">
-              <el-switch v-model="formData.F38" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="建筑企业资质证书">
-              <el-switch v-model="formData.F39" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-          <el-col :span="6">
-            <el-form-item label="中油集团监造许可">
-              <el-switch v-model="formData.F40" active-value="1" inactive-value="0">
-              </el-switch>
-            </el-form-item>
-          </el-col>
-
-        </el-row>
-      </el-form>
+      <el-tab-pane label="企业资质" :disabled="!certId">
+        <business-list ref="businessList" :data="businessList" :SupplierCertId="certId" :SupplierId="serviceId"
+          :SupplierTypeCode="classId" height="360px" style="margin-top: 20px"></business-list>
+      </el-tab-pane>
     </el-card>
   </div>
 </template>
@@ -374,6 +29,7 @@
   import {
     mapGetters
   } from 'vuex'
+  import BusinessList from '@/components/oilsupplier/businesslist'
   import api from '@/api/oilsupplier/technologyservice';
   export default {
     computed: {
@@ -381,108 +37,33 @@
         authUser: 'authUser'
       })
     },
+    components: {
+      BusinessList,
+    },
     name: 'oiltechnologyserviceEdit',
 
     data() {
       return {
+        businessList: [], //准入业务
         serviceId: '',
-        formData: {
-          Id: '',
-          Code: '',
-          Name: '',
-          Code1: '',
-          Name1: '',
-          Code2: '',
-          Name2: '',
-          Code3: '',
-          Name3: '',
-          Code4: '',
-          Name4: '',
-          OrgId: '',
-          OrgName: '',
-          F01: '',
-          F02: '',
-          F03: '',
-          F04: '',
-          F05: '',
-          F06: '',
-          F07: '',
-          F08: '',
-          F09: '',
-          F10: '',
-          F11: '',
-          F12: '',
-          F13: '',
-          F14: '',
-          F15: '',
-          F16: '',
-          F17: '',
-          F18: '',
-          F19: '',
-          F20: '',
-          F21: '',
-          F22: '',
-          F23: '',
-          F24: '',
-          F25: '',
-          F26: '',
-          F27: '',
-          F28: '',
-          F29: '',
-          F30: '',
-          F31: '',
-          F32: '',
-          F33: '',
-          F34: '',
-          F35: '',
-          F36: '',
-          F37: '',
-          F38: '',
-          F39: '',
-          F40: '',
-          F41: '',
-          F42: '',
-          F43: '',
-          F44: '',
-          F45: '',
-          F46: '',
-          F47: '',
-          F48: '',
-          F49: '',
-          F50: '',
-          F51: '',
-          F52: '',
-          Remark: '',
-          DeletionStateCode: '',
-          CreateOn: '',
-          CreateUserId: '',
-          CreateBy: '',
-          ModifiedOn: '',
-          ModifiedUserId: '',
-          ModifiedBy: '',
-
-        },
-
-        //下拉选择项
-        //wellNoOptions: [],
-        //supervisersOptions: [],
+        certId: '',
+        classId: '03',
 
       }
     },
     created() {
       this.serviceId = this.$route.params.opera;
-      this.getDictOptions();
-      console.log(this.serviceId);
-      if(this.serviceId != 'add' && this.serviceId>0) {
-        this.formData.Id = this.serviceId;
-        this.initDatas();
-      } else {
-        this.formData.Id = 0;
+      if (this.$route.query.certid) {
+        this.certId = this.$route.query.certid + ''
       }
+      if (this.$route.query.classId) {
+        this.classId = this.$route.query.classId + ''
+      }
+      this.getDictOptions();
     },
     methods: {
       initDatas() {
-        if(this.formData.Id) {
+        if (this.formData.Id) {
           api.getEntity(this.formData.Id, this.$axios).then(res => {
             this.formData = res.data;
           }).catch(err => {
@@ -500,67 +81,9 @@
         })
       },
 
-      //保存信息
-      saveEntity() {
-        this.$refs['EntityForm'].validate((valid) => {
-          if (valid) {
-            //this.formData.WellNo = this.$refs.selectWellNo.selectedLabel + '';
-
-            if (!this.formData.Id) {
-              this.addEntity();
-            } else {
-              this.updateEntity();
-            }
+      submitqualChange() {
 
-          } else {
-            return false
-          }
-        })
-      },
-
-      addEntity() {
-        api.addEntity(this.formData, this.$axios).then(res => {
-          if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
-            this.formData.Id = res.data.item;
-            this.initDatas();
-            this.$message({
-              type: 'success',
-              message: res.data.message
-            });
-
-          } else {
-            this.$message({
-              type: 'warning',
-              message: res.data.message
-            });
-          }
-        }).catch(err => {
-          console.error(err)
-        });
       },
-
-      updateEntity() {
-        api.updateEntity(this.formData.Id, this.formData, this.$axios).then(res => {
-          if (res.data.code === 0) {
-            //保存成功后,初始化数据,变成修改
-            this.initDatas();
-            this.$message({
-              type: 'success',
-              message: res.data.message
-            });
-
-          } else {
-            this.$message({
-              type: 'warning',
-              message: res.data.message
-            });
-          }
-        }).catch(err => {
-          console.error(err)
-        });
-      },
-
       jstimehandle(val) {
         if (val === '') {
           return '----'
@@ -587,5 +110,5 @@
       }
     }
   }
-</script>
 
+</script>

+ 30 - 74
src/dashoo.cn/frontend_web/src/pages/oilsupplier/qualchange/index.vue

@@ -19,7 +19,7 @@
               start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
           </el-form-item>
           <el-form-item label="准入类别">
-            <el-select size="mini" style="width:100px" v-model="searchForm.SupplierTypeName" placeholder="准入类别">
+            <el-select size="mini" style="width:100px" v-model="searchForm.SupplierTypeCode" placeholder="准入类别">
               <el-option label="物资类" value="01"></el-option>
               <el-option label="技术服务类" value="03"></el-option>
               <el-option label="基建类" value="02"></el-option>
@@ -39,27 +39,20 @@
       <el-table :data="entityList" border height="calc(100vh - 243px)" style="width: 100%" @sort-change="orderby">
         <el-table-column label="操作" min-width="90" align="center" fixed>
           <template slot-scope="scope">
-            <router-link :to="'/oilsupplier/qualchange/' + scope.row.Id + '/operation'">
+            <router-link :to="'/oilsupplier/qualchange/' + scope.row.SupplierId + '/operation?certid=' + scope.row.SupplierCertId +'&classId='+ scope.row.SupplierTypeCode">
               <el-button type="primary" plain title="编辑" size="mini">编辑</el-button>
             </router-link>
-            <!-- <el-popover placement="top" title="提示">
-              <el-alert
-                title=""
-                description="确认要删除吗?"
-                type="warning"
-                :closable="false">
-              </el-alert>
-              <br/>
-              <div style="text-align: right; margin: 0">
-                <el-button type="primary" size="mini" @click="deleteEntity(scope.row)">删除</el-button>
-              </div>
-              <el-button :disabled="scope.row.Status != 0" slot="reference" type="primary" plain title="删除" style="margin-left:3px" size="mini">删除</el-button>
-            </el-popover> -->
           </template>
         </el-table-column>
-
-        <el-table-column v-for="column in tableColumns" :key="column.Id" :prop="column.prop" sortable min-width="100"
-          :label="column.label" align="center" show-overflow-tooltip>
+        <el-table-column prop="AccessCardNo" label="准入证号" sortable min-width="110" align="center" show-overflow-tooltip>
+        </el-table-column>
+        <el-table-column prop="SupplierName" label="企业名称" sortable min-width="110" align="center" show-overflow-tooltip>
+        </el-table-column>
+        <el-table-column prop="SupplierTypeCode" label="准入类别" sortable min-width="110" align="center"
+          show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{ checkSupplierTypeName(scope.row.SupplierTypeCode) }}
+          </template>
         </el-table-column>
         <el-table-column sortable min-width="110" align="center" prop="Status" label="审核状态">
           <template slot-scope="scope">
@@ -83,11 +76,6 @@
             </el-alert>
           </template>
         </el-table-column>
-        <el-table-column prop="ApplyTime" sortable min-width="100" label="年审日期" align="center" show-overflow-tooltip>
-          <template slot-scope="scope">
-            {{ jstimehandle(scope.row.ApplyTime+'') }}
-          </template>
-        </el-table-column>
         <el-table-column prop="CreateOn" sortable min-width="100" label="申请日期" align="center" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ jstimehandle(scope.row.CreateOn+'') }}
@@ -104,18 +92,6 @@
       <el-form ref="searchForm" label-width="110px">
         <el-row>
 
-          <!-- <el-col :span="12">
-            <el-form-item label="生成时间">
-              <el-date-picker size="mini" v-model="CreateOn" type="daterange" style="width:100%" range-separator="至"
-                start-placeholder="生成日期" end-placeholder="结束日期"></el-date-picker>
-            </el-form-item>
-          </el-col> -->
-          <!-- 
-          <el-col :span="12">
-            <el-form-item label="">
-              <el-input size="mini" v-model="searchForm.Id" style="width:100%" placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col> -->
 
           <el-col :span="12">
             <el-form-item label="推荐单位编码">
@@ -132,7 +108,7 @@
 
           <el-col :span="12">
             <el-form-item label="准入类别">
-              <el-input size="mini" v-model="searchForm.SupplierTypeName" style="width:100%" placeholder="请输入">
+              <el-input size="mini" v-model="searchForm.SupplierTypeCode" style="width:100%" placeholder="请输入">
               </el-input>
             </el-form-item>
           </el-col>
@@ -142,7 +118,7 @@
               <el-input size="mini" v-model="searchForm.SupplierName" style="width:100%" placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
-         
+
         </el-row>
       </el-form>
       <span slot="footer" class="dialog-footer">
@@ -171,7 +147,7 @@
       return {
         addshow: false,
         dialogVisible: false,
-        delevisble:false,
+        delevisble: false,
         //列表数据
         selectsupplierlist: [],
         entityList: [],
@@ -192,13 +168,13 @@
           Id: '',
           SupplierName: '',
           SupplierId: '',
-          SupplierTypeName: '',
+          SupplierTypeCode: '',
         },
         searchForm: {
           Id: '',
           RecUnitId: '',
           AccessCardNo: '',
-          SupplierTypeName: '',
+          SupplierTypeCode: '',
           SupplierName: '',
           Num: '',
           ProjectName: '',
@@ -227,37 +203,6 @@
           ModifiedBy: '',
 
         },
-        tableColumns: [
-
-          // {
-          //   prop: "RecUnitId",
-          //   label: '推荐单位编码',
-          //   width: 100,
-          //   sort: true
-          // },
-
-          {
-            prop: "AccessCardNo",
-            label: '准入证号',
-            width: 100,
-            sort: true
-          },
-
-          {
-            prop: "SupplierTypeName",
-            label: '准入类别',
-            width: 100,
-            sort: true
-          },
-
-          {
-            prop: "SupplierName",
-            label: '企业名称',
-            width: 100,
-            sort: true
-          },
-
-        ],
       }
     },
     created() {
@@ -288,14 +233,17 @@
         //查询条件
         Object.assign(params, this.searchForm)
         //访问接口
-        supplierapi.getCertList(myCreateOn.join(','), params, this.$axios).then(res => {
+        this.$axios.get('suppliercertsub/list?CreateOn=' + myCreateOn.join(','), {
+          params
+        }).then(res => {
+          console.log("----res.data---", res.data)
           this.entityList = res.data.items
           this.currentItemCount = res.data.currentItemCount
         }).catch(err => {
           console.error(err)
         })
       },
-     
+
       getDictOptions() {
         api.getDictList(this.$axios).then(res => {
           //this.dictOptions.customerList = res.data.items['customerList']
@@ -362,7 +310,15 @@
           console.error(err)
         });
       },
-
+      checkSupplierTypeName(val) {
+        if (val == '01') {
+          return '物资类'
+        } else if (val == '02') {
+          return '基建类'
+        } else if (val == '03') {
+          return '技术服务类'
+        }
+      },
       jstimehandle(val) {
         if (val === '') {
           return '----'