Browse Source

信息变更流程查看

huahaiyan 6 years ago
parent
commit
01c6bdaadb

+ 16 - 0
src/dashoo.cn/backend/api/controllers/oilsupplier/infochange.go

@@ -61,6 +61,22 @@ func (this *InfoChangeController) GetEntity() {
 	this.ServeJSON()
 }
 
+// @Title 获取实体
+// @Description 获取实体
+// @Success 200 {object} annualaudit.OilAnnualAudit
+// @router /getmain/:id [get]
+func (this *InfoChangeController) GetMainEntity() {
+	Id := this.Ctx.Input.Param(":id")
+	var model []infochange.OilInfoChange
+	svc := infochange.GetInfoChangeService(utils.DBE)
+	where := " Id = " + Id
+	svc.GetEntitysByWhere(OilInfoChangeName, where, &model)
+	var datainfo DataInfo
+	datainfo.Items = model
+	this.Data["json"] = &datainfo
+	this.ServeJSON()
+}
+
 // @Title 获取实体
 // @Description 获取实体
 // @Success 200 {object} annualaudit.OilAnnualAudit

+ 6 - 0
src/dashoo.cn/frontend_web/src/api/oilsupplier/infochange.js

@@ -37,6 +37,12 @@ export default {
       method: 'GET'
     })
   },
+  GetMainInfo (entityId, myAxios) {
+    return myAxios({
+      url: '/infochange/getmain/' + entityId,
+      method: 'GET'
+    })
+  },
   getEntityThen (entityId, myAxios) {
     return myAxios({
       url: '/infochange/auditget/' + entityId,

+ 43 - 3
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/_opera/auditoperation.vue

@@ -11,6 +11,7 @@
           <i class="icon icon-table2"></i> 编辑
         </span>
         <span style="float: right;">
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批流程</el-button>
           <el-button type="primary" size="mini" @click="submitInfoChange" v-if="InfoStatus > 0">审核</el-button>
           <router-link :to="'/oilsupplier/infochangech/infoaudit'">
             <el-button type="primary" size="mini" style="margin-left: 8px">返回</el-button>
@@ -23,10 +24,10 @@
 
             <el-col :span="16">
               <el-form-item label="供方名称" prop="SupplierName" style="color:red;">
-                <el-autocomplete class="inline-input" v-model="formData.SupplierName" :readonly="true"
+                <!-- <el-autocomplete class="inline-input" v-model="formData.SupplierName" :readonly="true"
                   :fetch-suggestions="querySearch" :maxlength="255" placeholder="请输入内容" style="width: 100%"
                   @select="handleSelect" v-if="authUser && authUser.Profile.IsCompanyUser == 1">
-                </el-autocomplete>
+                </el-autocomplete> -->
                 <el-input v-model="formData.SupplierName" :maxlength="255" :readonly="true" placeholder="请输入"
                   style="width: 100%" :class="getchange('SupplierName') ? 'modified-form-input' : ''"
                   v-if="!authUser || authUser.Profile.IsCompanyUser == 0">
@@ -410,6 +411,9 @@
       </span>
       <br>
     </el-dialog>
+    <el-dialog title="审批流程" :visible.sync="audithistoryshow" width="1200px">
+      <wf-multi-history ref="WfHistory" :entryinfo="entrydetail"></wf-multi-history>
+    </el-dialog>
 
   </div>
 </template>
@@ -421,7 +425,11 @@
   import _ from 'lodash';
   import supplierapi from '@/api/oilsupplier/supplier';
   import api from '@/api/oilsupplier/infochange';
+  import WfMultiHistory from "@/components/workflow/wfmultihistory.vue";
   export default {
+    components: {
+      WfMultiHistory,
+    },
     computed: {
       ...mapGetters({
         authUser: 'authUser'
@@ -431,6 +439,12 @@
 
     data() {
       return {
+        entrydetail: {
+          process: "oil_info_change",
+          business: "",
+          instance: "",
+          Status: '',
+        },
         textplaceholder: '审核意见须具体、明确(含企业资质、资信、能力等内容,不少于20字)',
         secauditerOptions: [],
         infochangedata: [],
@@ -628,6 +642,11 @@
         butnab: false,
         infoId: '',
         SuppId: '',
+        Infomain: {
+          BusinessKey: '',
+          WorkFlowId: '',
+          Status: '',
+        },
       }
     },
     created() {
@@ -639,9 +658,11 @@
       this.auditget()
       this.GetItemsDatas()
       this.getDictOptions()
+      
     },
     methods: {
       initDatas() {
+        this.getMainInfo()
         if (this.SuppId) {
           api.GetChangeEntity(this.SuppId, this.$axios)
             .then(res => {
@@ -654,13 +675,28 @@
               this.LinkCityAry.push(this.formData.LinkProvince)
               this.LinkCityAry.push(this.formData.LinkCity)
               this.LinkCityAry.push(this.formData.LinkStreet)
-              console.log("this.formData", this.formData)
             })
             .catch(err => {
               console.error(err);
             });
         }
       },
+      getMainInfo() {
+        api.GetMainInfo(this.infoId, this.$axios)
+          .then(res => {
+            this.Infomain = res.data.items;
+            console.log("this.Infomain", this.Infomain)
+            if (this.Infomain.length > 0) {
+              this.entrydetail.business = this.Infomain[0].BusinessKey + ''
+              this.entrydetail.instance = this.Infomain[0].WorkFlowId + ''
+              this.entrydetail.Status = this.Infomain[0].Status + ''
+            }
+            console.log("---ent",this.entrydetail)
+          })
+          .catch(err => {
+            console.error(err);
+          });
+      },
       getchange(key) {
         if (this.infochangedata) {
           for (var i = 0; i < this.infochangedata.length; i++) {
@@ -750,6 +786,10 @@
       submitInfoChange() {
         this.commitshow = true
       },
+      //审批历史
+      auhistory() {
+        this.audithistoryshow = true
+      },
       //审核通过
       makeSure() {
         if (this.shenheForm.SuccessStatus === 1) {

+ 40 - 20
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/_opera/operation.vue

@@ -11,6 +11,7 @@
           <i class="icon icon-table2"></i> 编辑
         </span>
         <span style="float: right;">
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批流程</el-button>
           <el-button type="primary" size="mini" style="margin-left: 8px" @click="saveinfochange">保存</el-button>
           <!-- <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批历史</el-button> -->
           <el-button type="primary" size="mini" @click="submitInfoChange"
@@ -27,14 +28,15 @@
           <el-row>
 
             <el-col :span="16">
-              <el-form-item label="供方名称" prop="SupplierName" style="color:red;">
-                <el-autocomplete class="inline-input" v-model="formData.SupplierName" :readonly="companyReadonly"
-                  :fetch-suggestions="querySearch" :maxlength="255" placeholder="请输入内容" style="width: 100%"
-                  @select="handleSelect" v-if="authUser && authUser.Profile.IsCompanyUser == 1">
-                </el-autocomplete>
+              <el-form-item label="供方名称" prop="SupplierName">
+                <!-- <el-autocomplete class="inline-input" v-model="formData.SupplierName" :readonly="companyReadonly" :fetch-suggestions="querySearch"
+                             :maxlength="255" placeholder="请输入内容" style="width: 100%"  @select="handleSelect" v-if="authUser && authUser.Profile.IsCompanyUser == 1">
+            </el-autocomplete> -->
+                <el-input v-model="formData.SupplierName" :maxlength="255" :readonly="!canUpdateSupplier"
+                  placeholder="请输入" style="width: 100%" v-if="authUser && authUser.Profile.IsCompanyUser == 1">
+                </el-input>
                 <el-input v-model="formData.SupplierName" :maxlength="255" @change="inputCompanyName"
                   :readonly="!canUpdateSupplier" placeholder="请输入" style="width: 100%"
-                  :class="getchange('SupplierName') ? 'modified-form-input' : ''"
                   v-if="!authUser || authUser.Profile.IsCompanyUser == 0">
                 </el-input>
               </el-form-item>
@@ -425,8 +427,8 @@
     </el-dialog>
     <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
       :visible="chooseAuditorVisible"></choose-auditor>
-    <el-dialog title="审批历史" :visible.sync="audithistoryshow" width="1200px">
-      <wf-back-history ref="WfBackHistory" :entryinfo="backhistroy"></wf-back-history>
+    <el-dialog title="审批流程" :visible.sync="audithistoryshow" width="1200px">
+      <wf-multi-history ref="WfHistory" :entryinfo="entrydetail"></wf-multi-history>
     </el-dialog>
   </div>
 </template>
@@ -438,11 +440,11 @@
   import _ from 'lodash';
   import supplierapi from '@/api/oilsupplier/supplier';
   import api from '@/api/oilsupplier/infochange';
-  import WfBackHistory from '@/components/workflow/wfbackhistory.vue'
+  import WfMultiHistory from "@/components/workflow/wfmultihistory.vue";
   import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
   export default {
     components: {
-      WfBackHistory,
+      WfMultiHistory,
       ChooseAuditor
     },
     computed: {
@@ -451,12 +453,6 @@
       })
     },
     name: 'oilinfochangeEdit',
-    props: {
-      formData: {
-        type: Object,
-        default: {}
-      },
-    },
     watch: {
       formData: {
         handler(newValue) {
@@ -564,6 +560,12 @@
           value: '3',
           label: '常规'
         }],
+        entrydetail: {
+          process: "oil_info_change",
+          business: "",
+          instance: "",
+          Status: '',
+        },
         disabled: false,
         canUpdateSupplier: true,
         audithistoryshow: false,
@@ -709,6 +711,11 @@
           AuditIndex: 0,
           PACNumber: ""
         },
+        Infomain: {
+          BusinessKey: '',
+          WorkFlowId: '',
+          Status: '',
+        },
         chooseAuditorVisible: false,
         fushenauditer: '', //复审人员
         auditer: '',
@@ -873,6 +880,7 @@
     },
     methods: {
       initDatas() {
+        this.getMainInfo()
         if (this.formData.Id) {
           api.GetChangeEntity(this.formData.Id, this.$axios)
             .then(res => {
@@ -886,13 +894,28 @@
               this.LinkCityAry.push(this.formData.LinkProvince)
               this.LinkCityAry.push(this.formData.LinkCity)
               this.LinkCityAry.push(this.formData.LinkStreet)
-              console.log("this.formData", this.formData)
             })
             .catch(err => {
               console.error(err);
             });
         }
       },
+      getMainInfo() {
+        api.GetMainInfo(this.MInfoId, this.$axios)
+          .then(res => {
+            this.Infomain = res.data.items;
+            console.log("this.Infomain", this.Infomain)
+            if (this.Infomain.length > 0) {
+              this.entrydetail.business = this.Infomain[0].BusinessKey + ''
+              this.entrydetail.instance = this.Infomain[0].WorkFlowId + ''
+              this.entrydetail.Status = this.Infomain[0].Status + ''
+            }
+            console.log("---ent", this.entrydetail)
+          })
+          .catch(err => {
+            console.error(err);
+          });
+      },
       getchange(key) {
         if (this.infochangedata) {
           for (var i = 0; i < this.infochangedata.length; i++) {
@@ -909,7 +932,6 @@
           api.getEntityThen(this.MInfoId, this.$axios)
             .then(res => {
               this.infochangedata = res.data.items;
-              console.log("this.infochangedata", this.infochangedata)
             })
             .catch(err => {
               console.error(err);
@@ -928,7 +950,6 @@
             _this.infochangeItemList.push(_this.infochangeForm)
           }
         })
-        console.log("-3--", _this.infochangeItemList)
       },
       showorhid(val) {
         console.log(val)
@@ -1076,7 +1097,6 @@
         this.entityForm.fushenauditer = this.fushenauditer
         this.entityForm.auditer = this.auditer
         this.entityForm.MInfoId = this.MInfoId + ""
-        console.log("==this.entityForm====", this.entityForm)
         api.commitAuditEntity(this.supplierId, this.entityForm, this.$axios).then(res => {
           if (res.data.code === 0) {
             // 保存成功后,初始化数据,变成修改

+ 40 - 18
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/_opera/operationbasic.vue

@@ -11,6 +11,7 @@
           <i class="icon icon-table2"></i> 编辑
         </span>
         <span style="float: right;">
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批流程</el-button>
           <!-- <el-button type="primary" size="mini" style="margin-left: 8px" @click="historychange">历史变更</el-button> -->
           <!-- <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批历史</el-button> -->
           <el-button type="primary" size="mini" @click="submitInfoChange"
@@ -26,14 +27,13 @@
       <el-row>
 
         <el-col :span="16">
-          <el-form-item label="供方名称" prop="SupplierName">
-            <el-autocomplete class="inline-input" v-model="formData.SupplierName" :readonly="companyReadonly"
-              :fetch-suggestions="querySearch" :maxlength="255" placeholder="请输入内容" style="width: 100%"
-              @select="handleSelect" v-if="authUser && authUser.Profile.IsCompanyUser == 1">
-            </el-autocomplete>
-            <el-input v-model="formData.SupplierName" :maxlength="255" @change="inputCompanyName"
-              :readonly="!canUpdateSupplier" placeholder="请输入" style="width: 100%"
-              v-if="!authUser || authUser.Profile.IsCompanyUser == 0">
+          <el-form-item label="供方名称" prop="SupplierName" >
+            <!-- <el-autocomplete class="inline-input" v-model="formData.SupplierName" :readonly="companyReadonly" :fetch-suggestions="querySearch"
+                             :maxlength="255" placeholder="请输入内容" style="width: 100%"  @select="handleSelect" v-if="authUser && authUser.Profile.IsCompanyUser == 1">
+            </el-autocomplete> -->
+            <el-input v-model="formData.SupplierName" :maxlength="255"  :readonly="!canUpdateSupplier" placeholder="请输入" style="width: 100%" v-if="authUser && authUser.Profile.IsCompanyUser == 1">
+            </el-input>
+            <el-input v-model="formData.SupplierName" :maxlength="255" @change="inputCompanyName" :readonly="!canUpdateSupplier" placeholder="请输入" style="width: 100%" v-if="!authUser || authUser.Profile.IsCompanyUser == 0">
             </el-input>
           </el-form-item>
         </el-col>
@@ -343,8 +343,8 @@
     </el-dialog>
     <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
       :visible="chooseAuditorVisible"></choose-auditor>
-      <el-dialog title="审批历史" :visible.sync="audithistoryshow" width="1200px">
-      <wf-back-history ref="WfBackHistory" :entryinfo="backhistroy"></wf-back-history>
+      <el-dialog title="审批流程" :visible.sync="audithistoryshow" width="1200px">
+      <wf-multi-history ref="WfHistory" :entryinfo="entrydetail"></wf-multi-history>
     </el-dialog>
   </div>
 </template>
@@ -355,11 +355,11 @@
   } from 'vuex'
   import supplierapi from '@/api/oilsupplier/supplier';
   import api from '@/api/oilsupplier/infochange';
-  import WfBackHistory from '@/components/workflow/wfbackhistory.vue'
+  import WfMultiHistory from "@/components/workflow/wfmultihistory.vue";
   import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
   export default {
     components: {
-      WfBackHistory,
+      WfMultiHistory,
       ChooseAuditor
     },
     computed: {
@@ -371,6 +371,12 @@
 
     data() {
       return {
+        entrydetail: {
+          process: "oil_info_change",
+          business: "",
+          instance: "",
+          Status: '',
+        },
         audithistoryshow: false,
         backhistroy: {
           certId: '',
@@ -440,6 +446,11 @@
         InfoStatus: '',
         butnab: false,
         MInfoId:'',
+        Infomain:{
+          BusinessKey: '',
+          WorkFlowId: '',
+          Status: '',
+        },
       }
     },
     created() {
@@ -448,25 +459,36 @@
       this.InfoStatus = this.$route.query.InfoStatus
       this.MInfoId = this.$route.query.infoId
       this.backhistroy.certId = this.MInfoId
-      // if (this.QualStatus > 0) {
-      //   this.butnab = true
-      // }
-      console.log("----this.InfoStatus---",this.InfoStatus)
       this.initDatas()
     },
     methods: {
       initDatas() {
-        console.log("----this.formData.Id---", this.serviceId)
+        this.getMainInfo()
         if (this.serviceId) {
           api.getEntity(this.serviceId, this.$axios).then(res => {
             this.InfoData = res.data.items
             this.itemsfilter()
-            console.log("---res.data.items---", res.data.items)
           }).catch(err => {
             console.error(err)
           });
         }
       },
+      getMainInfo() {
+        api.GetMainInfo(this.MInfoId, this.$axios)
+          .then(res => {
+            this.Infomain = res.data.items;
+            console.log("this.formData", this.Infomain)
+            if (this.Infomain.length > 0) {
+              this.entrydetail.business = this.Infomain[0].BusinessKey + ''
+              this.entrydetail.instance = this.Infomain[0].WorkFlowId + ''
+              this.entrydetail.Status = this.Infomain[0].Status + ''
+            }
+            console.log("---ent",this.entrydetail)
+          })
+          .catch(err => {
+            console.error(err);
+          });
+      },
       addchange() {
         this.AddChangeShow = true
         this.infochangeForm.Id = ''

+ 42 - 20
src/dashoo.cn/frontend_web/src/pages/oilsupplier/infochangech/_opera/operationgoods.vue

@@ -11,6 +11,7 @@
           <i class="icon icon-table2"></i> 编辑
         </span>
         <span style="float: right;">
+          <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批流程</el-button>
           <!-- <el-button type="primary" size="mini" style="margin-left: 8px" @click="historychange">历史变更</el-button> -->
           <!-- <el-button type="primary" size="mini" style="margin-left: 8px" @click="auhistory">审批历史</el-button> -->
           <el-button type="primary" size="mini" @click="submitInfoChange"
@@ -27,16 +28,15 @@
           <el-row>
 
             <el-col :span="16">
-              <el-form-item label="供方名称" prop="SupplierName">
-                <el-autocomplete class="inline-input" v-model="formData.SupplierName" :readonly="companyReadonly"
-                  :fetch-suggestions="querySearch" :maxlength="255" placeholder="请输入内容" style="width: 100%"
-                  @select="handleSelect" v-if="authUser && authUser.Profile.IsCompanyUser == 1">
-                </el-autocomplete>
-                <el-input v-model="formData.SupplierName" :maxlength="255" @change="inputCompanyName"
-                  :readonly="!canUpdateSupplier" placeholder="请输入" style="width: 100%"
-                  v-if="!authUser || authUser.Profile.IsCompanyUser == 0">
-                </el-input>
-              </el-form-item>
+              <el-form-item label="供方名称" prop="SupplierName" >
+            <!-- <el-autocomplete class="inline-input" v-model="formData.SupplierName" :readonly="companyReadonly" :fetch-suggestions="querySearch"
+                             :maxlength="255" placeholder="请输入内容" style="width: 100%"  @select="handleSelect" v-if="authUser && authUser.Profile.IsCompanyUser == 1">
+            </el-autocomplete> -->
+            <el-input v-model="formData.SupplierName" :maxlength="255"  :readonly="!canUpdateSupplier" placeholder="请输入" style="width: 100%" v-if="authUser && authUser.Profile.IsCompanyUser == 1">
+            </el-input>
+            <el-input v-model="formData.SupplierName" :maxlength="255" @change="inputCompanyName" :readonly="!canUpdateSupplier" placeholder="请输入" style="width: 100%" v-if="!authUser || authUser.Profile.IsCompanyUser == 0">
+            </el-input>
+          </el-form-item>
             </el-col>
 
             <el-col :span="8">
@@ -399,8 +399,8 @@
     </el-dialog>
     <choose-auditor ref="chooseAuditor" @close="setAuditer" @hideChooseAuditer="chooseAuditorVisible=false"
       :visible="chooseAuditorVisible"></choose-auditor>
-    <el-dialog title="审批历史" :visible.sync="audithistoryshow" width="1200px">
-      <wf-back-history ref="WfBackHistory" :entryinfo="backhistroy"></wf-back-history>
+    <el-dialog title="审批流程" :visible.sync="audithistoryshow" width="1200px">
+      <wf-multi-history ref="WfHistory" :entryinfo="entrydetail"></wf-multi-history>
     </el-dialog>
   </div>
 </template>
@@ -411,11 +411,11 @@
   } from 'vuex'
   import supplierapi from '@/api/oilsupplier/supplier';
   import api from '@/api/oilsupplier/infochange';
-  import WfBackHistory from '@/components/workflow/wfbackhistory.vue'
+  import WfMultiHistory from "@/components/workflow/wfmultihistory.vue";
   import ChooseAuditor from '@/components/oilsupplier/chooseauditor'
   export default {
     components: {
-      WfBackHistory,
+      WfMultiHistory,
       ChooseAuditor
     },
     computed: {
@@ -427,6 +427,12 @@
 
     data() {
       return {
+        entrydetail: {
+          process: "oil_info_change",
+          business: "",
+          instance: "",
+          Status: '',
+        },
         audithistoryshow: false,
         backhistroy: {
           certId: '',
@@ -496,6 +502,11 @@
         InfoStatus: '',
         butnab: false,
         MInfoId: '',
+        Infomain: {
+          BusinessKey: '',
+          WorkFlowId: '',
+          Status: '',
+        }
       }
     },
     created() {
@@ -504,25 +515,36 @@
       this.InfoStatus = this.$route.query.InfoStatus
       this.MInfoId = this.$route.query.infoId
       this.backhistroy.certId = this.MInfoId
-      // if (this.QualStatus > 0) {
-      //   this.butnab = true
-      // }
-      console.log("----this.InfoStatus---", this.InfoStatus)
       this.initDatas()
     },
     methods: {
       initDatas() {
-        console.log("----this.formData.Id---", this.serviceId)
+        this.getMainInfo()
         if (this.serviceId) {
           api.getEntity(this.serviceId, this.$axios).then(res => {
             this.InfoData = res.data.items
             this.itemsfilter()
-            console.log("---res.data.items---", res.data.items)
           }).catch(err => {
             console.error(err)
           });
         }
       },
+      getMainInfo() {
+        api.GetMainInfo(this.MInfoId, this.$axios)
+          .then(res => {
+            this.Infomain = res.data.items;
+            console.log("this.Infomain", this.Infomain)
+            if (this.Infomain.length > 0) {
+              this.entrydetail.business = this.Infomain[0].BusinessKey + ''
+              this.entrydetail.instance = this.Infomain[0].WorkFlowId + ''
+              this.entrydetail.Status = this.Infomain[0].Status + ''
+            }
+            console.log("---ent",this.entrydetail)
+          })
+          .catch(err => {
+            console.error(err);
+          });
+      },
       addchange() {
         this.AddChangeShow = true
         this.infochangeForm.Id = ''