瀏覽代碼

修改有效期

lining 6 年之前
父節點
當前提交
83b26d349d

+ 20 - 0
src/dashoo.cn/backend/api/business/oilsupplier/supplierapplytime/supplierapplytime.go

@@ -0,0 +1,20 @@
+package supplierapplytime
+
+import (
+	"time"
+)
+
+type OilSupplierApplyTime struct {
+	Id               int       `xorm:"not null pk autoincr INT(11)"`
+	SupplierId       int       `xorm:"comment('供方基本信息表主键') INT(11)"`
+	SupplierCertId   int       `xorm:"INT(11)"`
+	SupplierTypeCode string    `xorm:"comment('(01 物资类,02 基建类,03 技术服务类)') VARCHAR(10)"`
+	SupplierName     string    `xorm:"comment('企业名称') VARCHAR(255)"`
+	CommercialNo     string    `xorm:"comment('工商注册号') VARCHAR(50)"`
+	BeforeDate       time.Time `xorm:"comment('修改前有效期') DATETIME"`
+	AfterDate        time.Time `xorm:"comment('修改后有效期') DATETIME"`
+	Remark           string    `xorm:"comment('备注') VARCHAR(500)"`
+	CreateOn         time.Time `xorm:"DATETIME"`
+	CreateUserId     int       `xorm:"INT(11)"`
+	CreateBy         string    `xorm:"VARCHAR(50)"`
+}

+ 1 - 0
src/dashoo.cn/backend/api/controllers/base.go

@@ -268,6 +268,7 @@ var (
 	DelOilSupplierCertAppendName             string = "Del_OilSupplierCertAppend"
 	DelOilAnnualAuditName                    string = "Del_OilAnnualAudit"
 	DelOilInfoChangeName                     string = "Del_OilInfoChange"
+	SupplierApplyTimeName                    string = "OilSupplierApplyTime"
 )
 
 //分页信息及数据

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

@@ -1442,7 +1442,7 @@ func (this *OilSupplierController) GetEntityAndCert() {
 	//svc.GetEntityByIdBytbl(OilSupplierName, Id, &model)
 
 	var sql string
-	sql = `select a.*, b.Id as CertId, b.AccessCardNo, b.SupplierTypeCode, b.SupplierTypeName, b.Step, b.WorkerTotal, b.ContractNum, b.UniversityNum, b.TechnicalNum, b.AboveProfNum, b.InFlag,
+	sql = `select a.*, b.Id as CertId, b.AccessCardNo, b.SupplierTypeCode, b.SupplierTypeName, b.Step, b.WorkerTotal, b.ContractNum, b.UniversityNum, b.TechnicalNum, b.AboveProfNum, b.InFlag, b.ApplyTime,
          b.MiddleProfNum, b.NationalRegNum, b.NationalCertTotal, b.DesignerTotal, b.SkillerTotal, b.InStyle, b.WorkflowId, b.Status, b.ThirdAudit, b.BusinessKey, b.AuditIndex ,b.ProcessKey from ` + OilSupplierName + ` a `
 	sql += ` left join ` + OilSupplierCertName + " b on b.SupplierId = a.Id"
 	sql += ` where b.Id ='` + Id + `'`

+ 106 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/suppliercert.go

@@ -9,6 +9,7 @@ import (
 	"dashoo.cn/backend/api/business/oilsupplier/oilactivity"
 	"dashoo.cn/backend/api/business/oilsupplier/oilcostmanage"
 	"dashoo.cn/backend/api/business/oilsupplier/supplier"
+	"dashoo.cn/backend/api/business/oilsupplier/supplierapplytime"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercertappend"
 	"dashoo.cn/backend/api/business/oilsupplier/suppliercertsub"
 	"dashoo.cn/backend/api/business/oilsupplier/supplierfile"
@@ -1989,3 +1990,108 @@ func (this *OilSupplierCertController) ReInput() {
 	}
 
 }
+
+// @Title 修改年审到期时间
+// @Description 修改年审到期时间
+// @Success 200 {object} controllers.Request
+// @router /updataapplytime/:id [post]
+func (this *OilSupplierCertController) UpdataApplyTime() {
+
+	session := utils.DBE.NewSession()
+
+	defer func() {
+		session.Close()
+	}()
+
+	id := this.Ctx.Input.Param(":id")
+	var errinfo ErrorInfo
+	if id == "" {
+		errinfo.Message = "操作失败!请求信息不完整"
+		errinfo.Code = -2
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+
+	var model supplierapplytime.OilSupplierApplyTime
+	svc := suppliercert.GetOilSupplierCertSession(session)
+
+	var jsonBlob = this.Ctx.Input.RequestBody
+	json.Unmarshal(jsonBlob, &model)
+	model.CreateOn = time.Now()
+	model.CreateBy = this.User.Realname
+	model.CreateUserId, _ = utils.StrTo(this.User.Id).Int()
+	//model.OrganizeId, _ = utils.StrTo(this.User.DepartmentId).Int()
+
+	_, err := svc.InsertEntityBytbl(SupplierApplyTimeName, &model)
+
+	if err != nil {
+		session.Rollback()
+		errinfo.Message = "修改失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+
+	var modelcert suppliercert.OilSupplierCert
+	modelcert.ApplyTime = model.AfterDate
+	if model.AfterDate.Unix() < time.Now().Unix() {
+		modelcert.InFlag = "2"
+	} else {
+		modelcert.InFlag = "1"
+	}
+
+	var cols = []string{
+		"ApplyTime",
+		"InFlag",
+	}
+
+	err = svc.UpdateEntityBytbl(OilSupplierCertName, id, &modelcert, cols)
+
+	if err != nil {
+		session.Rollback()
+		errinfo.Message = "修改失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+		return
+	}
+
+	err = session.Commit()
+
+	if err == nil {
+		errinfo.Message = "修改成功!"
+		errinfo.Code = 0
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	} else {
+		errinfo.Message = "修改失败!" + utils.AlertProcess(err.Error())
+		errinfo.Code = -1
+		this.Data["json"] = &errinfo
+		this.ServeJSON()
+	}
+}
+
+// @Title 获取列表
+// @Description get user by token
+// @Success 200 {object} []suppliercert.OilSupplierCert
+// @router /getapplytimelist [get]
+func (this *OilSupplierCertController) GetApplyTimeList() {
+	SupplierCertId := this.GetString("SupplierCertId")
+
+	var model []supplierapplytime.OilSupplierApplyTime
+	svc := suppliercert.GetOilSupplierCertService(utils.DBE)
+
+	where := "SupplierCertId = " + SupplierCertId
+	svc.GetEntities(&model, where)
+
+	var errinfo ErrorDataInfo
+	errinfo.Message = "修改成功!"
+	errinfo.Code = 0
+	errinfo.Item = model
+	this.Data["json"] = &model
+	this.ServeJSON()
+
+
+}

+ 14 - 0
src/dashoo.cn/frontend_web/src/api/oilsupplier/suppliercert.js

@@ -111,5 +111,19 @@ export default {
       method: 'post',
       params: params
     })
+  },
+  updataApplyTime (entityId, params, myAxios) {
+    return myAxios({
+      url: '/suppliercert/updataapplytime/' + entityId,
+      method: 'post',
+      data: params
+    })
+  },
+  getApplyTimeList (params, myAxios) {
+    return myAxios({
+      url: '/suppliercert/getapplytimelist',
+      method: 'GET',
+      params: params
+    })
   }
 }

+ 123 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstore/_opera/basisedit.vue

@@ -11,6 +11,7 @@
           <i class="icon icon-table2"></i> 信息
         </span>
         <span style="float: right;">
+          <el-button type="primary" size="mini" style="margin-right: 5px" @click="showApplyTime" v-if="formData.InFlag != '3' && showBtn ">延长有效期</el-button>
           <el-button type="primary" size="mini" style="margin-right: 5px" @click="reInput" v-if="formData.InFlag == '3'">确认重新准入</el-button>
           <el-button plain icon="el-icon-right" size="mini" style="margin-right: 5px" @click="nextTab">下一步</el-button>
           <el-popover>
@@ -247,7 +248,53 @@
         <!--<el-button size="mini" type="primary" @click="AuditEntity">确定</el-button>-->
       <!--</span>-->
     <!--</el-dialog>-->
-
+    <el-dialog title="修改有效期" :visible.sync="dialogApplyTime" width="655px">
+      <el-dialog
+        width="40%"
+        title="内层 Dialog"
+        :visible.sync="innerVisible"
+        append-to-body>
+        <el-table :data="historyDatas">
+          <el-table-column property="BeforeDate" label="修改日期" width="150"></el-table-column>
+          <el-table-column property="BeforeDate" label="修改前" width="150"></el-table-column>
+          <el-table-column property="AfterDate" label="修改后" width="200"></el-table-column>
+          <el-table-column property="Remark" label="备注"></el-table-column>
+        </el-table>
+      </el-dialog>
+      <el-form label-width="80px" :model="formDataApplyTime" ref="formDataApplyTime">
+        <el-form-item label="有效期">
+          <el-date-picker v-model="formDataApplyTime.BeforeDate"
+                          type="date"
+                          format="yyyy 年 MM 月 dd 日"
+                          value-format="yyyy-MM-dd"
+                          placeholder="选择日期"
+                          style="width: 100%"
+                          readonly>
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item prop="AfterDate" label="延长到" :rules="[{ required: true, message: '请选择日期', trigger: 'change' }]">
+          <el-date-picker v-model="formDataApplyTime.AfterDate"
+                          type="date"
+                          format="yyyy 年 MM 月 dd 日"
+                          placeholder="选择日期"
+                          style="width: 100%"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="备注">
+          <el-input v-model="formDataApplyTime.Remark"
+                    maxlength="500"
+                    placeholder="请输入"
+                    type="textarea"
+                    style="width: 100%">
+          </el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" size="mini" style="display:block;margin:0 auto" @click="saveApplyTime">保存</el-button>
+          <!--<el-button type="primary" size="mini"  @click="saveinnerVisible">修改记录</el-button>-->
+        </el-form-item>
+      </el-form>
+    </el-dialog>
     <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
       :visible="chooseAuditorVisible"></choose-auditor>
   </div>
@@ -273,6 +320,7 @@
   import BasisInfo from '@/components/oilsupplier/basisinfo'
 
   import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
+  import catalogapi from '@/api/oilsupplier/oilcatalog'
 
   export default {
 
@@ -301,6 +349,9 @@
 
     data () {
       return {
+        showBtn: false,
+        innerVisible: false,
+        dialogApplyTime: false,
         delete_flat: true,
         newadd_flat: true,
         activeName: '0',
@@ -321,6 +372,7 @@
         auditerOption: [], // 审批人
         secOrganize: [],
         orgtreelist: [],
+        historyDatas: [],
         auditer: '',
         auditerName: '',
         firstAudit: '',
@@ -337,6 +389,17 @@
           label: 'Fullname',
           children: 'children'
         },
+        formDataApplyTime: {
+          Id: '',
+          SupplierId: '',
+          SupplierCertId: '',
+          SupplierTypeCode: '',
+          SupplierName: '',
+          CommercialNo: '',
+          BeforeDate: null,
+          AfterDate: null,
+          Remark: ''
+        },
         formData: {
           Id: '',
           SupplierName: '',
@@ -478,8 +541,58 @@
         this.initDatas()
       }
       this.Jurisdiction()
+      this.isAccess()
     },
     methods: {
+      isAccess () {
+        let params = {
+          RoleId: '10000203'
+        }
+        catalogapi.isAccess(params, this.$axios).then(res => {
+          this.showBtn = res.data
+        }).catch(err => {
+          console.log(err)
+        })
+      },
+      saveApplyTime () {
+        console.log(this.formDataApplyTime, 'formDataApplyTime')
+        this.$refs['formDataApplyTime'].validate((valid) => {
+          if (valid) {
+            console.log(this.formDataApplyTime, 'formDataApplyTime')
+            apiCert.updataApplyTime(this.formData.CertId, this.formDataApplyTime, this.$axios).then(res => {
+              if (res.data.code === 0) {
+                this.initDatas()
+                this.dialogApplyTime = false
+                this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+              } else {
+                this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
+            }).catch(err => {
+              console.error(err)
+            })
+          }
+        })
+      },
+      saveinnerVisible () {
+        let params = {
+          SupplierCertId: this.formData.CertId
+        }
+        console.log(params, 'params')
+        apiCert.getApplyTimeList(params, this.$axios).then(res => {
+          this.historyDatas = res.data
+          console.log(res.data, '==========')
+        })
+        this.innerVisible = true
+      },
+      showApplyTime () {
+        this.dialogApplyTime = true
+      },
       reInput () {
         this.$confirm('确认可以重新提交准入申请', '提示', {
           confirmButtonText: '确认',
@@ -655,6 +768,15 @@
             if (this.formData.Status != 0) {
               this.add_flat = false
             }
+
+            this.formDataApplyTime.BeforeDate = res.data.ApplyTime
+            this.formDataApplyTime.AfterDate = res.data.ApplyTime
+            this.formDataApplyTime.SupplierId = res.data.Id
+            this.formDataApplyTime.CommercialNo = res.data.CommercialNo
+            this.formDataApplyTime.SupplierName = res.data.SupplierName
+            this.formDataApplyTime.SupplierCertId = parseInt(res.data.CertId)
+            this.formDataApplyTime.SupplierTypeCode = res.data.SupplierTypeCode
+
             this.$refs['BasisInfo'].CityAry = []
             this.$refs['BasisInfo'].CityAry.push(this.formData.Province)
             this.$refs['BasisInfo'].CityAry.push(this.formData.City)

+ 121 - 3
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstore/_opera/goodsedit.vue

@@ -11,6 +11,7 @@
           <i class="icon icon-table2"></i> 信息
         </span>
         <span style="float: right;">
+          <el-button type="primary" size="mini" style="margin-right: 5px" @click="showApplyTime" v-if="formData.InFlag != '3' && showBtn ">延长有效期</el-button>
           <el-button type="primary" size="mini" style="margin-right: 5px" @click="reInput" v-if="formData.InFlag == '3'">确认重新准入</el-button>
           <el-button plain icon="el-icon-right" size="mini" style="margin-right: 5px" @click="nextTab">下一步</el-button>
           <el-popover>
@@ -224,7 +225,53 @@
          </goods-info>
        </el-card>
     </el-dialog>
-
+    <el-dialog title="修改有效期" :visible.sync="dialogApplyTime" width="655px">
+      <el-dialog
+        width="40%"
+        title="内层 Dialog"
+        :visible.sync="innerVisible"
+        append-to-body>
+        <el-table :data="historyDatas">
+          <el-table-column property="BeforeDate" label="修改日期" width="150"></el-table-column>
+          <el-table-column property="BeforeDate" label="修改前" width="150"></el-table-column>
+          <el-table-column property="AfterDate" label="修改后" width="200"></el-table-column>
+          <el-table-column property="Remark" label="备注"></el-table-column>
+        </el-table>
+      </el-dialog>
+      <el-form label-width="80px" :model="formDataApplyTime" ref="formDataApplyTime">
+        <el-form-item label="有效期">
+          <el-date-picker v-model="formDataApplyTime.BeforeDate"
+                        type="date"
+                        format="yyyy 年 MM 月 dd 日"
+                        value-format="yyyy-MM-dd"
+                        placeholder="选择日期"
+                        style="width: 100%"
+                          readonly>
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item prop="AfterDate" label="延长到" :rules="[{ required: true, message: '请选择日期', trigger: 'change' }]">
+          <el-date-picker v-model="formDataApplyTime.AfterDate"
+                          type="date"
+                          format="yyyy 年 MM 月 dd 日"
+                          placeholder="选择日期"
+                          style="width: 100%"
+                          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="备注">
+          <el-input v-model="formDataApplyTime.Remark"
+                    maxlength="500"
+                    placeholder="请输入"
+                    type="textarea"
+                    style="width: 100%">
+          </el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" size="mini" style="display:block;margin:0 auto" @click="saveApplyTime">保存</el-button>
+          <!--<el-button type="primary" size="mini"  @click="saveinnerVisible">修改记录</el-button>-->
+        </el-form-item>
+      </el-form>
+    </el-dialog>
     <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
       :visible="chooseAuditorVisible"></choose-auditor>
   </div>
@@ -250,6 +297,7 @@
   import GoodsInfo from '@/components/oilsupplier/goodsinfo'
 
   import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
+  import catalogapi from '@/api/oilsupplier/oilcatalog'
 
   export default {
 
@@ -279,6 +327,9 @@
 
     data () {
       return {
+        showBtn: false,
+        innerVisible: false,
+        dialogApplyTime: false,
         delete_flat: true,
         activeName: '0',
         chooseAuditorVisible: false,
@@ -298,6 +349,7 @@
         auditerOption: [], // 审批人
         orgtreelist: [],
         secOrganize: [],
+        historyDatas: [],
         auditer: '',
         auditerName: '',
         serviceId: '',
@@ -314,6 +366,17 @@
           label: 'Fullname',
           children: 'children'
         },
+        formDataApplyTime: {
+          Id: '',
+          SupplierId: '',
+          SupplierCertId: '',
+          SupplierTypeCode: '',
+          SupplierName: '',
+          CommercialNo: '',
+          BeforeDate: null,
+          AfterDate: null,
+          Remark: ''
+        },
         formData: {
           Id: '',
           SupplierName: '',
@@ -456,8 +519,58 @@
         this.initDatas()
       }
       this.Jurisdiction()
+      this.isAccess()
     },
     methods: {
+      isAccess () {
+        let params = {
+          RoleId: '10000203'
+        }
+        catalogapi.isAccess(params, this.$axios).then(res => {
+          this.showBtn = res.data
+        }).catch(err => {
+          console.log(err)
+        })
+      },
+      saveApplyTime () {
+        console.log(this.formDataApplyTime, 'formDataApplyTime')
+        this.$refs['formDataApplyTime'].validate((valid) => {
+          if (valid) {
+            console.log(this.formDataApplyTime, 'formDataApplyTime')
+            apiCert.updataApplyTime(this.formData.CertId, this.formDataApplyTime, this.$axios).then(res => {
+              if (res.data.code === 0) {
+                this.initDatas()
+                this.dialogApplyTime = false
+                this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+              } else {
+                this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
+            }).catch(err => {
+              console.error(err)
+            })
+          }
+        })
+      },
+      saveinnerVisible () {
+        let params = {
+          SupplierCertId: this.formData.CertId
+        }
+        console.log(params, 'params')
+        apiCert.getApplyTimeList(params, this.$axios).then(res => {
+          this.historyDatas = res.data
+          console.log(res.data, '==========')
+        })
+        this.innerVisible = true
+      },
+      showApplyTime () {
+        this.dialogApplyTime = true
+      },
       reInput () {
         this.$confirm('确认可以重新提交准入申请', '提示', {
           confirmButtonText: '确认',
@@ -467,7 +580,6 @@
           let params = {
             InFlag: '4'
           }
-          console.log(this.formData, 'this.formDatathis.formData')
           apiCert.reInput(this.formData.Id, params, this.$axios).then(res => {
             if (res.data.code === 0) {
               this.$message({
@@ -658,7 +770,13 @@
             if (this.formData.Status != 0) {
               this.add_flat = false
             }
-            console.log(this.add_flat)
+            this.formDataApplyTime.BeforeDate = res.data.ApplyTime
+            this.formDataApplyTime.AfterDate = res.data.ApplyTime
+            this.formDataApplyTime.SupplierId = res.data.Id
+            this.formDataApplyTime.CommercialNo = res.data.CommercialNo
+            this.formDataApplyTime.SupplierName = res.data.SupplierName
+            this.formDataApplyTime.SupplierCertId = parseInt(res.data.CertId)
+            this.formDataApplyTime.SupplierTypeCode = res.data.SupplierTypeCode
             this.$refs['GoodsInfo'].CityAry = []
             this.$refs['GoodsInfo'].CityAry.push(this.formData.Province)
             this.$refs['GoodsInfo'].CityAry.push(this.formData.City)

+ 123 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstore/_opera/techedit.vue

@@ -11,6 +11,7 @@
           <i class="icon icon-table2"></i> 信息
         </span>
         <span style="float: right;">
+          <el-button type="primary" size="mini" style="margin-right: 5px" @click="showApplyTime" v-if="formData.InFlag != '3' && showBtn ">延长有效期</el-button>
           <el-button type="primary" size="mini" style="margin-right: 5px" @click="reInput" v-if="formData.InFlag == '3'">确认重新准入</el-button>
           <el-button plain icon="el-icon-right"  size="mini" style="margin-right: 5px" @click="nextTab">下一步</el-button>
           <el-popover>
@@ -254,7 +255,53 @@
         <el-button size="mini" type="primary" @click="AuditEntity">确定</el-button>
       </span>
     </el-dialog>
-
+    <el-dialog title="修改有效期" :visible.sync="dialogApplyTime" width="655px">
+      <el-dialog
+        width="40%"
+        title="内层 Dialog"
+        :visible.sync="innerVisible"
+        append-to-body>
+        <el-table :data="historyDatas">
+          <el-table-column property="BeforeDate" label="修改日期" width="150"></el-table-column>
+          <el-table-column property="BeforeDate" label="修改前" width="150"></el-table-column>
+          <el-table-column property="AfterDate" label="修改后" width="200"></el-table-column>
+          <el-table-column property="Remark" label="备注"></el-table-column>
+        </el-table>
+      </el-dialog>
+      <el-form label-width="80px" :model="formDataApplyTime" ref="formDataApplyTime">
+        <el-form-item label="有效期">
+          <el-date-picker v-model="formDataApplyTime.BeforeDate"
+                          type="date"
+                          format="yyyy 年 MM 月 dd 日"
+                          value-format="yyyy-MM-dd"
+                          placeholder="选择日期"
+                          style="width: 100%"
+                          readonly>
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item prop="AfterDate" label="延长到" :rules="[{ required: true, message: '请选择日期', trigger: 'change' }]">
+          <el-date-picker v-model="formDataApplyTime.AfterDate"
+                          type="date"
+                          format="yyyy 年 MM 月 dd 日"
+                          placeholder="选择日期"
+                          style="width: 100%"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="备注">
+          <el-input v-model="formDataApplyTime.Remark"
+                    maxlength="500"
+                    placeholder="请输入"
+                    type="textarea"
+                    style="width: 100%">
+          </el-input>
+        </el-form-item>
+        <el-form-item>
+          <el-button type="primary" size="mini" style="display:block;margin:0 auto" @click="saveApplyTime">保存</el-button>
+          <!--<el-button type="primary" size="mini"  @click="saveinnerVisible">修改记录</el-button>-->
+        </el-form-item>
+      </el-form>
+    </el-dialog>
     <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
       :visible="chooseAuditorVisible"></choose-auditor>
 
@@ -281,6 +328,7 @@
   import TechInfo from '@/components/oilsupplier/techinfo'
 
   import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
+  import catalogapi from '@/api/oilsupplier/oilcatalog'
 
   export default {
 
@@ -309,6 +357,9 @@
 
     data () {
       return {
+        showBtn: false,
+        innerVisible: false,
+        dialogApplyTime: false,
         delete_flat: true,
         activeName: '1',
         chooseAuditorVisible: false,
@@ -328,6 +379,7 @@
         auditerOption: [], // 审批人
         orgtreelist: [],
         secOrganize: [],
+        historyDatas: [],
         auditer: '',
         auditerName: '',
         firstAudit: '',
@@ -344,6 +396,17 @@
           label: 'Fullname',
           children: 'children'
         },
+        formDataApplyTime: {
+          Id: '',
+          SupplierId: '',
+          SupplierCertId: '',
+          SupplierTypeCode: '',
+          SupplierName: '',
+          CommercialNo: '',
+          BeforeDate: null,
+          AfterDate: null,
+          Remark: ''
+        },
         formData: {
           Id: '',
           SupplierName: '',
@@ -486,8 +549,58 @@
         this.initDatas()
       }
       this.Jurisdiction()
+      this.isAccess()
     },
     methods: {
+      isAccess () {
+        let params = {
+          RoleId: '10000203'
+        }
+        catalogapi.isAccess(params, this.$axios).then(res => {
+          this.showBtn = res.data
+        }).catch(err => {
+          console.log(err)
+        })
+      },
+      saveApplyTime () {
+        console.log(this.formDataApplyTime, 'formDataApplyTime')
+        this.$refs['formDataApplyTime'].validate((valid) => {
+          if (valid) {
+            console.log(this.formDataApplyTime, 'formDataApplyTime')
+            apiCert.updataApplyTime(this.formData.CertId, this.formDataApplyTime, this.$axios).then(res => {
+              if (res.data.code === 0) {
+                this.initDatas()
+                this.dialogApplyTime = false
+                this.$message({
+                  type: 'success',
+                  message: res.data.message
+                })
+              } else {
+                this.$message({
+                  type: 'warning',
+                  message: res.data.message
+                })
+              }
+            }).catch(err => {
+              console.error(err)
+            })
+          }
+        })
+      },
+      saveinnerVisible () {
+        let params = {
+          SupplierCertId: this.formData.CertId
+        }
+        console.log(params, 'params')
+        apiCert.getApplyTimeList(params, this.$axios).then(res => {
+          this.historyDatas = res.data
+          console.log(res.data, '==========')
+        })
+        this.innerVisible = true
+      },
+      showApplyTime () {
+        this.dialogApplyTime = true
+      },
       reInput () {
         this.$confirm('确认可以重新提交准入申请', '提示', {
           confirmButtonText: '确认',
@@ -663,7 +776,15 @@
               this.add_flat = false
             }
             this.formDataCert.WorkflowId = this.formData.WorkflowId
-            console.log(this.formData)
+
+            this.formDataApplyTime.BeforeDate = res.data.ApplyTime
+            this.formDataApplyTime.AfterDate = res.data.ApplyTime
+            this.formDataApplyTime.SupplierId = res.data.Id
+            this.formDataApplyTime.CommercialNo = res.data.CommercialNo
+            this.formDataApplyTime.SupplierName = res.data.SupplierName
+            this.formDataApplyTime.SupplierCertId = parseInt(res.data.CertId)
+            this.formDataApplyTime.SupplierTypeCode = res.data.SupplierTypeCode
+
             this.$refs['TechInfo'].CityAry = []
             this.$refs['TechInfo'].CityAry.push(this.formData.Province)
             this.$refs['TechInfo'].CityAry.push(this.formData.City)