Browse Source

年审增项修改

huahaiyan 6 years ago
parent
commit
80532dbf4a

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

@@ -337,7 +337,7 @@ func (this *AnnualAuditController) AddEntity() {
 	subtime := this.getTimeSub(aplytime, time.Now())
 	lefttime := subtime - 3
 	if subtime > 3 {
-		errinfo.Message = "还不到年审时间!请" + utils.ToStr(lefttime) + "月后再来申请"
+		errinfo.Message = "还不到年审时间!请" + utils.ToStr(lefttime) + "月后再来申请"
 		errinfo.Code = -1
 		this.Data["json"] = &errinfo
 		this.ServeJSON()

+ 1 - 3
src/dashoo.cn/frontend_web/src/pages/oilsupplier/annualaudit/_opera/auditoperation.vue

@@ -243,7 +243,6 @@
   import api from '@/api/oilsupplier/supplier'
   import apiCert from '@/api/oilsupplier/suppliercert'
   import SupplierFileTable from '@/pages/oilsupplier/supplierfile/table.vue'
-  import WfHistory from '@/components/workflow/wfmultihistory.vue'
   import SupplierCertEdit from '@/components/oilsupplier/suppliercertedit.vue'
 
   import EquipmentList from '@/components/oilsupplier/equipmentlist'
@@ -254,6 +253,7 @@
   import TechInfo from '@/components/oilsupplier/techinfo'
   import AuditbusList from '@/components/oilsupplier/auditbuslist'
   import SubfileList from '@/components/oilsupplier/subfilelist'
+  import WfHistory from '@/components/workflow/wfmultihistory.vue'
 
 
   export default {
@@ -437,8 +437,6 @@
       //this.getDictOptions()
       this.formData.Id = this.serviceId
       this.initDatas()
-      this.backhistroy.certId = this.annualId
-      this.backhistroy.workflowId = this.WorkflowId
 
       this.getorgtreelist()
       //this.getorgtreelistbydeptid()

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

@@ -303,12 +303,13 @@
         savebtn: true,
         visbtn: '1',
         fushenauditer: '', //复审人员
-        majorDept: [],
+        majorDept: [100000000, 100000128, 100000151],
         secauditerOptions: [],
         audithistoryshow: false,
         chooseAuditorVisible: false,
         activeName: '0',
         orgtreelist: [],
+        formannData: {},
         orgtreeprops: {
           value: 'id',
           label: 'name',
@@ -493,8 +494,10 @@
         annualapi.getEntity(annid, this.$axios)
           .then(res => {
             this.formannData = res.data;
-            console.log("--forann-", this.formannData.Status)
+            console.log("--forann-", this.formannData)
             this.Status = this.formannData.Status
+            this.entrydetail.business = this.formannData.BusinessKey
+            this.entrydetail.instance = this.formannData.WorkflowId
           })
           .catch(err => {
             console.error(err);
@@ -642,9 +645,6 @@
             this.$refs['winningList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['businessList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['subfileList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
-            this.entrydetail.business = this.annualId
-            this.entrydetail.instance = this.WorkflowId
-            this.backhistroy.classId = this.formData.SupplierTypeCode
             if (this.certId && this.WorkflowId) {
               this.$refs['WfHistory'].getHistoryTask() /*刷新工作流*/
             }

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

@@ -309,8 +309,9 @@
         savebtn: true,
         visbtn: '1',
         fushenauditer: '', //复审人员
-        majorDept: [],
+        majorDept: [100000000, 100000001, 100000071], //专业可是
         secauditerOptions: [],
+        formannData: {},
         audithistoryshow: false,
         chooseAuditorVisible: false,
         activeName: '0',
@@ -501,8 +502,10 @@
         annualapi.getEntity(annid, this.$axios)
           .then(res => {
             this.formannData = res.data;
-            console.log("--forann-", this.formannData.Status)
+            console.log("--forann-", this.formannData)
             this.Status = this.formannData.Status
+            this.entrydetail.business = this.formannData.BusinessKey
+            this.entrydetail.instance = this.formannData.WorkflowId
           })
           .catch(err => {
             console.error(err);
@@ -669,9 +672,6 @@
             this.$refs['winningList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['businessList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['subfileList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
-            this.entrydetail.business = this.annualId
-            this.entrydetail.instance = this.WorkflowId
-            this.backhistroy.classId = this.formData.SupplierTypeCode
             if (this.certId && this.WorkflowId) {
               this.$refs['WfHistory'].getHistoryTask() /*刷新工作流*/
             }

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

@@ -203,7 +203,7 @@
                 </el-button>
               </span> -->
             </div>
-            <wf-multi-history ref="WfHistory" :entryinfo="entrydetail"></wf-multi-history>
+            <wf-history ref="WfHistory" :entryinfo="entrydetail"></wf-history>
           </el-card>
         </el-tab-pane>
       </el-tabs>
@@ -266,6 +266,7 @@
   import apiCert from '@/api/oilsupplier/suppliercert'
   import SupplierFileTable from '@/pages/oilsupplier/supplierfile/table.vue'
   import SupplierCertEdit from '@/components/oilsupplier/suppliercertedit.vue'
+  import WfHistory from '@/components/workflow/wfmultihistory.vue'
 
   import EquipmentList from '@/components/oilsupplier/equipmentlist'
   import PerformanceList from '@/components/oilsupplier/performancelist'
@@ -287,7 +288,7 @@
     },
     components: {
       SupplierFileTable,
-      WfMultiHistory,
+      WfHistory,
       SupplierCertEdit,
       SubfileList, // 选择企业资质
       EquipmentList, //企业主要设备
@@ -498,6 +499,8 @@
           .then(res => {
             this.formannData = res.data;
             this.Status = this.formannData.Status
+            this.entrydetail.business = this.formannData.BusinessKey
+            this.entrydetail.instance = this.formannData.WorkflowId
           })
           .catch(err => {
             console.error(err);
@@ -645,9 +648,6 @@
             this.$refs['winningList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['businessList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['subfileList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
-            this.entrydetail.business = this.annualId
-            this.entrydetail.instance = this.WorkflowId
-            this.backhistroy.classId = this.formData.SupplierTypeCode
             if (this.certId && this.WorkflowId) {
               this.$refs['WfHistory'].getHistoryTask() /*刷新工作流*/
             }

+ 3 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/basisedit.vue

@@ -35,10 +35,10 @@
             </el-steps>
             <el-button slot="reference" plain size="mini" style="margin-right: 5px">查看进度</el-button>
           </el-popover>
-          <el-button type="primary" plain size="mini" style="margin-right:3px" :disabled="formDataCert.Status == 0"
+          <el-button type="primary" plain size="mini" style="margin-right:3px" :disabled="formDataCert.Status != 8"
             @click="annaudit">
             年审申请</el-button>
-          <el-button type="primary" plain size="mini" :disabled="formDataCert.Status == 0" @click="qppend">增项申请
+          <el-button type="primary" plain size="mini" :disabled="formDataCert.Status != 8" @click="qppend">增项申请
           </el-button>
           <router-link :to="'/oilsupplier/supplier/basislist'">
             <el-button type="primary" size="mini" style="margin-left: 8px" v-if="showReturn">返回
@@ -614,6 +614,7 @@
     methods: {
       annaudit() {
         this.annentityForm.supplierId = parseInt(this.serviceId)
+        this.annentityForm.SupplierName = this.formData.SupplierName
         annapi.addEntity(this.annentityForm, this.annentityForm.auditer, this.$axios).then(res => {
           if (res.data.code === 0) {
             //保存成功后,初始化数据,变成修改

+ 3 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/goodsedit.vue

@@ -41,10 +41,10 @@
             </el-steps>
             <el-button slot="reference" plain size="mini" style="margin-right: 5px">查看进度</el-button>
           </el-popover>
-          <el-button type="primary" plain size="mini" style="margin-right:3px" :disabled="formDataCert.Status == 0"
+          <el-button type="primary" plain size="mini" style="margin-right:3px" :disabled="formDataCert.Status != 8"
             @click="annaudit">
             年审申请</el-button>
-          <el-button type="primary" plain size="mini" :disabled="formDataCert.Status == 0" @click="qppend">增项申请
+          <el-button type="primary" plain size="mini" :disabled="formDataCert.Status != 8" @click="qppend">增项申请
           </el-button>
           <router-link :to="'/oilsupplier/supplier/goodslist'">
             <el-button type="primary" size="mini" style="margin-left: 8px" v-if="showReturn">返回</el-button>
@@ -624,6 +624,7 @@
     methods: {
       annaudit() {
         this.annentityForm.supplierId = parseInt(this.serviceId)
+        this.annentityForm.SupplierName = this.formData.SupplierName
         console.log("----this.ann",this.annentityForm)
         annapi.addEntity(this.annentityForm, this.annentityForm.auditer, this.$axios).then(res => {
           if (res.data.code === 0) {

+ 3 - 2
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplier/_opera/techedit.vue

@@ -36,10 +36,10 @@
             <el-button slot="reference" plain size="mini" style="margin-right: 5px">查看进度</el-button>
           </el-popover>
 
-          <el-button type="primary" plain size="mini" style="margin-right:3px" :disabled="formDataCert.Status == 0"
+          <el-button type="primary" plain size="mini" style="margin-right:3px" :disabled="formDataCert.Status != 8"
             @click="annaudit">
             年审申请</el-button>
-          <el-button type="primary" plain size="mini" :disabled="formDataCert.Status == 0" @click="qppend">增项申请
+          <el-button type="primary" plain size="mini" :disabled="formDataCert.Status != 8" @click="qppend">增项申请
           </el-button>
           <router-link :to="'/oilsupplier/supplier/techlist'">
             <el-button type="primary" size="mini" style="margin-left: 8px" v-if="showReturn">返回
@@ -607,6 +607,7 @@
     methods: {
       annaudit() {
         this.annentityForm.supplierId = parseInt(this.serviceId)
+        this.annentityForm.SupplierName = this.formData.SupplierName
         console.log("----this.ann",this.annentityForm)
         annapi.addEntity(this.annentityForm, this.annentityForm.auditer, this.$axios).then(res => {
           if (res.data.code === 0) {