Browse Source

年审信息变更bug修改

huahaiyan 6 years ago
parent
commit
4007732379

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

@@ -544,6 +544,7 @@ func (this *InfoChangeController) GetInfoForItem() {
 // @router /getchangelist/:id [get]
 func (this *InfoChangeController) GetChangeEntity() {
 	Id := this.Ctx.Input.Param(":id")
+	InfoId := this.GetString("InfomainId")
 	var models [2]supplier.OilSupplier
 	var model supplier.OilSupplier
 	var enumModel supplier.OilSupplier
@@ -552,7 +553,7 @@ func (this *InfoChangeController) GetChangeEntity() {
 	models[0] = model
 
 	var infoitems []infochange.OilInfoChangeItem
-	where := " SupplierId = " + Id
+	where := " SupplierId = " + Id +" and InfoId ="+InfoId
 	where = where + " and ChangeStatus = 0"
 	svc.GetEntitysByWhere(OilInfoChangeItemName, where, &infoitems)
 	tmpModel := &model
@@ -845,6 +846,8 @@ func (this *InfoChangeController) AddInfoMain() {
 		return
 	}
 	svc.GetEntityById(SupplierId, &suppliermodel)
+	infochmain.Status = "0"
+	infochmain.SupplierName = suppliermodel.SupplierName
 	infochmain.OldSupplierName = suppliermodel.SupplierName
 	infochmain.PACNumber = suppliermodel.PACNumber
 	infochmain.SupplierCertificate = suppliermodel.SupplierCertificate

+ 3 - 2
src/dashoo.cn/frontend_web/src/api/oilsupplier/infochange.js

@@ -31,10 +31,11 @@ export default {
       method: 'GET'
     })
   },
-  GetChangeEntity (entityId, myAxios) {
+  GetChangeEntity (entityId, params, myAxios) {
     return myAxios({
       url: '/infochange/getchangelist/' + entityId,
-      method: 'GET'
+      method: 'GET',
+      params: params
     })
   },
   GeAccessCardNo (entityId, myAxios) {

+ 12 - 10
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/auditoperation.vue

@@ -37,7 +37,7 @@
           <el-button type="primary" size="mini" style="margin-left: 8px;" onclick="window.history.go(-1)">返回</el-button>
         </span>
       </div>
-      <el-tabs tab-position="top" style="margin-top: 10px">
+      <el-tabs tab-position="top" style="margin-top: 10px" size="mini">
         <el-tab-pane label="企业信息">
           <el-card class="box-card">
             <div slot="header" class="clearfix">
@@ -285,6 +285,7 @@
 
     data() {
       return {
+        auditBtn:false,
         textplaceholder: '审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)',
         audithistoryshow: false,
         dialogProfAudit: false,
@@ -445,6 +446,7 @@
       this.formData.Id = this.serviceId
       this.initDatas()
       this.getorgtreelist()
+      this.getannualdata()
       //this.getorgtreelistbydeptid()
     },
     methods: {
@@ -462,19 +464,19 @@
       getannualdata() {
         annualapi.getEntity(this.annualId, this.$axios).then(res => {
           this.anndata = res.data
-          this.AnnualStatus
           if (this.anndata) {
-            this.entrydetail.business = this.anndata[0].BusinessKey + ''
-            this.entrydetail.instance = this.anndata[0].WorkFlowId + ''
-            this.entrydetail.Status = this.anndata[0].Status + ''
-            this.AnnualStatus = this.anndata[0].Status + ''
-            if (this.anndata[0].Status === '1') {
+            console.log("--------",this.anndata)
+            this.entrydetail.business = this.anndata.BusinessKey + ''
+            this.entrydetail.instance = this.anndata.WorkflowId + ''
+            this.entrydetail.Status = this.anndata.Status + ''
+            this.AnnualStatus = this.anndata.Status + ''
+            if (this.anndata.Status === '1') {
               this.auditstepcode = 'FIRST_TRIAL'
-            } else if (this.anndata[0].Status === '2') {
+            } else if (this.anndata.Status === '2') {
               this.auditstepcode = 'SECOND_TRIAL'
-            } else if (this.anndata[0].Status === '3') {
+            } else if (this.anndata.Status === '3') {
               this.auditstepcode = 'PROF_RECE'
-            } else if (this.anndata[0].Status === '4') {
+            } else if (this.anndata.Status === '4') {
               this.auditstepcode = 'PROF_AUDIT'
             }
           }

+ 2 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/bassicoperation.vue

@@ -37,7 +37,7 @@
         <el-step title="完成"></el-step>
       </el-steps> -->
 
-      <el-tabs tab-position="top" style="margin-top: 20px" v-model="activeName">
+      <el-tabs tab-position="top" style="margin-top: 20px" v-model="activeName" size="mini">
         <el-tab-pane label="企业信息">
           <el-card class="box-card">
             <div slot="header" class="clearfix">
@@ -500,6 +500,7 @@
             this.Status = this.formannData.Status
             this.entrydetail.business = this.formannData.BusinessKey
             this.entrydetail.instance = this.formannData.WorkflowId
+            this.entrydetail.Status = this.formannData.Status
           })
           .catch(err => {
             console.error(err);

+ 2 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/goodsoperation.vue

@@ -38,7 +38,7 @@
         <el-step title="完成"></el-step>
       </el-steps> -->
 
-      <el-tabs tab-position="top" style="margin-top: 20px" v-model="activeName">
+      <el-tabs tab-position="top" style="margin-top: 20px" v-model="activeName" size="mini">
         <el-tab-pane label="企业信息">
           <el-card class="box-card">
             <div slot="header" class="clearfix">
@@ -506,6 +506,7 @@
             this.Status = this.formannData.Status
             this.entrydetail.business = this.formannData.BusinessKey
             this.entrydetail.instance = this.formannData.WorkflowId
+            this.entrydetail.Status = this.formannData.Status
           })
           .catch(err => {
             console.error(err);

+ 2 - 1
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/operation.vue

@@ -38,7 +38,7 @@
         <el-step title="完成"></el-step>
       </el-steps> -->
 
-      <el-tabs tab-position="top" style="margin-top: 20px" v-model="activeName">
+      <el-tabs tab-position="top" style="margin-top: 20px" v-model="activeName" size="mini">
         <el-tab-pane label="企业信息">
           <el-card class="box-card">
             <div slot="header" class="clearfix">
@@ -503,6 +503,7 @@
             this.Status = this.formannData.Status
             this.entrydetail.business = this.formannData.BusinessKey
             this.entrydetail.instance = this.formannData.WorkflowId
+            this.entrydetail.Status = this.formannData.Status
           })
           .catch(err => {
             console.error(err);

+ 7 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/_opera/auditoperation.vue

@@ -847,6 +847,7 @@
         butnab: false,
         infoId: '',
         SuppId: '',
+        copyformdata: '',
         Infomain: {
           BusinessKey: '',
           WorkFlowId: '',
@@ -874,10 +875,14 @@
     methods: {
       initDatas() {
         this.getMainInfo()
+        let params = {
+          InfomainId : this.infoId
+        }
         if (this.SuppId) {
-          api.GetChangeEntity(this.SuppId, this.$axios)
+          api.GetChangeEntity(this.SuppId, params, this.$axios)
             .then(res => {
-              this.formData = res.data;
+              this.copyformdata = _.cloneDeep(res.data[0])
+              this.formData = res.data[1]
               this.CityAry = []
               this.CityAry.push(this.formData.Province)
               this.CityAry.push(this.formData.City)

+ 70 - 21
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/_opera/operation.vue

@@ -150,7 +150,7 @@
                 <el-form-item label="注册地址" prop="Province">
                   <el-row>
                     <el-col :span="10">
-                      <el-cascader :options="countryoptions" :props="countryprops" maxlength="20"
+                      <el-cascader ref="cascaderAdd" :options="countryoptions" :props="countryprops" maxlength="20"
                         :class="changedForm['Province'] || changedForm['City'] || changedForm['Street'] ? 'modified-form-input' : ''"
                         placeholder="省市区" v-model="CityAry" style="width: 100%" @change="handleAreaChange">
                       </el-cascader>
@@ -175,7 +175,7 @@
                 <el-form-item label="通信地址" prop="LinkProvince">
                   <el-row>
                     <el-col :span="10">
-                      <el-cascader :options="countryoptions" :props="countryprops"
+                      <el-cascader ref="cascaderAddrLink" :options="countryoptions" :props="countryprops"
                         :class="changedForm['LinkProvince'] || changedForm['LinkCity'] || changedForm['LinkStreet'] ? 'modified-form-input' : ''"
                         placeholder="省市区" v-model="LinkCityAry" maxlength="20" style="width: 100%"
                         @change="handleLinkAreaChange">
@@ -604,13 +604,13 @@
         <el-button type="primary" @click="makesure()">确 定</el-button>
       </div>
     </el-dialog>
-    <el-dialog title="变更项查看" :visible.sync="myitemsshow" width="360px">
+    <el-dialog title="变更项查看" :visible.sync="myitemsshow" width="500px">
       <el-table :data="InfoData" border style="width: 100%">
         <el-table-column align="center" prop="SelectItemName" label="变更项目">
         </el-table-column>
         <el-table-column align="center" prop="BeChangeInfo" label="变更前内容">
           <template slot-scope="scope">
-            {{ dataformat(scope.row) }}
+            {{ bfdataformat(scope.row) }}
           </template>
         </el-table-column>
         <el-table-column prop="ChangeInfo" align="center" label="变更后内容">
@@ -1197,11 +1197,13 @@
     methods: {
       initDatas() {
         this.getMainInfo()
+        let params = {
+          InfomainId : this.MInfoId
+        }
         if (this.formData.Id) {
-          api.GetChangeEntity(this.formData.Id, this.$axios)
+          api.GetChangeEntity(this.formData.Id, params, this.$axios)
             .then(res => {
               this.copyformdata = _.cloneDeep(res.data[0])
-
               this.formData = res.data[1]
               this.CityAry = []
               this.CityAry.push(this.formData.Province)
@@ -1426,40 +1428,85 @@
         if (val === '2') {
           this.formData.MgrUnit = '中国石油天然气股份有限公司'
         }
+      },
+       bfdataformat(val) {
+        //debugger
+        if (val.SelectItem == "SpecTypeCode") {
+          if (val.BeChangeInfo == "1"){
+            return "一般外部"
+          }else if (val.BeChangeInfo == "2") {
+            return "多元内部"
+          }
+        }else if (val.SelectItem == "InStyle") {
+          if (val.BeChangeInfo == "1"){
+            return "评审准入"
+          }else if (val.BeChangeInfo == "2") {
+            return "一级物资备案准入"
+          }else if (val.BeChangeInfo == "3") {
+            return "二级物资备案准入"
+          }else if (val.BeChangeInfo == "4") {
+            return "战略合作准入"
+          }else if (val.BeChangeInfo == "5") {
+            return "内部多元准入"
+          }
+        }else if (val.SelectItem == "CredentialFlag") {
+          if (val.BeChangeInfo == "1"){
+            return "三证合一"
+          }else if (val.BeChangeInfo == "2") {
+            return "五证合一"
+          }else if (val.BeChangeInfo == "3") {
+            return "常规"
+          }
+        }else if (val.SelectItem == "SetupTime") {
+          if (val.BeChangeInfo === '') {
+            return '----'
+          } else if (val.BeChangeInfo === '0001-01-01T08:00:00+08:00') {
+            return '----'
+          } else if (val.BeChangeInfo === '5000-01-01T23:59:59+08:00') {
+            return '永久'
+          } else {
+            val = val.replace('T', ' ')
+            return val.substring(0, 10)
+          }
+        }
+        else {
+          return val.BeChangeInfo
+        }
       },
       dataformat(val) {
+        //debugger
         if (val.SelectItem == "SpecTypeCode") {
-          if (val.BeChangeInfo == "1"||val.ChangeInfo == "1"){
+          if (val.ChangeInfo == "1"){
             return "一般外部"
-          }else if (val.BeChangeInfo == "2"||val.ChangeInfo == "2") {
+          }else if (val.ChangeInfo == "2") {
             return "多元内部"
           }
         }else if (val.SelectItem == "InStyle") {
-          if (val.BeChangeInfo == "1"||val.ChangeInfo == "1"){
+          if (val.ChangeInfo == "1"){
             return "评审准入"
-          }else if (val.BeChangeInfo == "2"||val.ChangeInfo == "2") {
+          }else if (val.ChangeInfo == "2") {
             return "一级物资备案准入"
-          }else if (val.BeChangeInfo == "3"||val.ChangeInfo == "3") {
+          }else if (val.ChangeInfo == "3") {
             return "二级物资备案准入"
-          }else if (val.BeChangeInfo == "4"||val.ChangeInfo == "4") {
+          }else if (val.ChangeInfo == "4") {
             return "战略合作准入"
-          }else if (val.BeChangeInfo == "5"||val.ChangeInfo == "5") {
+          }else if (val.ChangeInfo == "5") {
             return "内部多元准入"
           }
         }else if (val.SelectItem == "CredentialFlag") {
-          if (val.BeChangeInfo == "1"||val.ChangeInfo == "1"){
+          if (val.ChangeInfo == "1"){
             return "三证合一"
-          }else if (val.BeChangeInfo == "2"||val.ChangeInfo == "2") {
+          }else if (val.ChangeInfo == "2") {
             return "五证合一"
-          }else if (val.BeChangeInfo == "3"||val.ChangeInfo == "3") {
+          }else if (val.ChangeInfo == "3") {
             return "常规"
           }
         }else if (val.SelectItem == "SetupTime") {
-          if (val.BeChangeInfo === ''||val.ChangeInfo == "") {
+          if (val.ChangeInfo == "") {
             return '----'
-          } else if (val.BeChangeInfo === '0001-01-01T08:00:00+08:00'||val.ChangeInfo == "0001-01-01T08:00:00+08:00") {
+          } else if (val.ChangeInfo == "0001-01-01T08:00:00+08:00") {
             return '----'
-          } else if (val.BeChangeInfo === '5000-01-01T23:59:59+08:00'||val.ChangeInfo == "5000-01-01T23:59:59+08:00") {
+          } else if (val.ChangeInfo == "5000-01-01T23:59:59+08:00") {
             return '永久'
           } else {
             val = val.replace('T', ' ')
@@ -1467,7 +1514,7 @@
           }
         }
         else {
-          return
+          return val.ChangeInfo
         }
       },
       comparevalue(newValue) {
@@ -1793,7 +1840,9 @@
       },
       //保存信息变更数据
       saveinfochange() {
-        console.log("----",this.CityAry)
+        this.address = this.$refs['cascaderAdd'].currentLabels
+        this.linkaddress = this.$refs['cascaderAddrLink'].currentLabels
+        console.log("----",this.CityAry,this.address,this.linkaddress)
         let AllInfochangeItemList = {
           SupplierId: this.serviceId,
           MInfoId: this.MInfoId,

+ 1 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/index.vue

@@ -55,6 +55,7 @@
           </el-table-column>
           <el-table-column sortable min-width="110" align="center" prop="Status" label="审核状态">
             <template slot-scope="scope">
+              <span v-if="scope.row.Status=='0'" style="color:#E6A23C">待提交</span>
               <span v-if="scope.row.Status=='1'" style="color:#E6A23C">待初审</span>
               <span v-if="scope.row.Status=='-1'" style="color:#F56C6C">初审未通过</span>
               <span v-if="scope.row.Status=='2'" style="color:#E6A23C">待复审</span>

+ 1 - 0
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/infoaudit.vue

@@ -51,6 +51,7 @@
         </el-table-column>
         <el-table-column sortable min-width="110" align="center" prop="Status" label="审核状态">
           <template slot-scope="scope">
+            <span v-if="scope.row.Status=='0'" style="color:#E6A23C">待提交</span>
             <span v-if="scope.row.Status=='1'" style="color:#E6A23C">待初审</span>
             <span v-if="scope.row.Status=='-1'" style="color:#F56C6C">初审未通过</span>
             <span v-if="scope.row.Status=='2'" style="color:#E6A23C">待复审</span>