Browse Source

准入申请-入库页面 审批按钮权限

baichengfei 5 years ago
parent
commit
cde171285b

+ 2 - 64
src/dashoo.cn/frontend_web/src/pages/index.vue

@@ -167,7 +167,7 @@
 
             <el-table-column label="操作" width="130" align="center" fixed="right">
               <template slot-scope="scope">
-                <el-button type="text" title="打开"  icon="el-icon-edit" size="mini" @click="rowClickHaveDone(scope.row)">打开</el-button>
+                <el-button type="text" title="打开"  icon="el-icon-edit" size="mini" @click="rowClick(scope.row)">打开</el-button>
                 <!--<el-button type="text" title="编辑"  icon="el-icon-s-promotion" size="mini">跟踪</el-button>-->
               </template>
             </el-table-column>
@@ -585,6 +585,7 @@
         }
       },
       rowClick (val) {
+        console.log('分流路由')
         let SupplierType = ''
         if (val.Status === '7' && val.Type === '1') {
           // 待入库状态时直接跳转单独的入库审批页面,.信息变更入库不需要区分类型, 直接审批。
@@ -659,69 +660,6 @@
           }
         }
       },
-      rowClickHaveDone (val) {
-        let SupplierType = ''
-        if (val.Type === '1') {
-          if (val.SupplierTypeCode === '01') {
-            SupplierType = 'goodsedit'
-          } else if (val.SupplierTypeCode === '02') {
-            SupplierType = 'basisedit'
-          } else {
-            SupplierType = 'techedit'
-          }
-          // 准入 且审批未通过之后 创建人中的待办按钮
-          if (Number(val.Status) <= 0) {
-            this.$router.push('oilsupplier/supplier/' + val.Id + '/' + SupplierType + '?certid=' + val.CertId)
-          } else {
-            this.$router.push('oilsupplier/supplieraudit/' + val.Id + '/' + SupplierType + '?certid=' + val.CertId)
-          }
-        } else if (val.Type === '2') {
-          let appendId = ''
-          if (val.SupplierTypeCode === '01') {
-            SupplierType = 'goodsdataopera'
-            appendId = '1'
-          } else if (val.SupplierTypeCode === '02') {
-            appendId = '2'
-            SupplierType = 'basisdataopera'
-          } else {
-            appendId = '3'
-            SupplierType = 'techdataopera'
-          }
-          if (Number(val.Status) <= 0) {
-            this.$router.push('oilsupplier/supplierappend/' + appendId + '/' + SupplierType + '?Id=' + val.Id + '&editFlag=1&sId=' + val.SupplierId)
-          }
-          this.$router.push('oilsupplier/addtionaudit/' + val.Id + '/' + SupplierType)
-        } else if (val.Type === '3') {
-          if (val.SupplierTypeCode === '01') {
-            SupplierType = 'auditoperation'
-          } else if (val.SupplierTypeCode === '02') {
-            SupplierType = 'basicauditoperation'
-          } else {
-            SupplierType = 'techoperation'
-          }
-          if (Number(val.Status) <= 0) {
-            this.$router.push('oilsupplier/annualaudit/' + val.SupplierId + '/' + SupplierType + '?certid=' + val.CertId + '&WorkflowId=' + val.WorkflowId + '&Status=' + val.Status + '&Step=' + val.Step + '&annualId=' + val.Id)
-          } else {
-            this.$router.push('oilsupplier/annualaudit/' + val.SupplierId + '/' + SupplierType + '?certid=' + val.CertId + '&WorkflowId=' + val.WorkflowId + '&AnnualStatus=' + val.Status + '&annualId=' + val.Id + '&Step=' + val.Step)
-          }
-          // /oilsupplier/annualaudit/' + scope.row.SupplierId + '/auditoperation?certid=' + scope.row.CerId +'&WorkflowId='+scope.row.WorkflowId+'&AnnualStatus='+scope.row.Status+'&annualId='+scope.row.Id+'&Step='+scope.row.Step
-        } else if (val.Type === '4') {
-          this.$router.push('/oilsupplier/infochangech/' + val.Id + '/auditoperation?InfoStatus=' + val.Status + '&SupId=' + val.SupplierId)
-        } else if (val.Type === '5') {
-          this.initDataregister(val.Id)
-        } else if (val.Type === '8') {
-          if (val.Status === '未开') {
-            this.invoicetitle = '待开发票'
-          } else {
-            this.invoicetitle = '已开发票'
-          }
-          this.initInvoiceDatas(val.Id)
-          this.invoiceVisible = true
-        } else if (val.Type === '9') {
-          // /oilsupplier/oilcatalogsub/2/incomeedit
-          this.$router.push('/oilsupplier/oilcatalogsub/' + val.Id + '/incomeedit')
-        }
-      },
       initInvoiceDatas (Id) {
         let params = {
           Id: Id

+ 6 - 5
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstorage/_opera/basisedit.vue

@@ -24,10 +24,10 @@
             <!--</el-steps>-->
             <!--&lt;!&ndash; <el-button slot="reference" plain size="mini" style="margin-right: 5px">查看进度</el-button> &ndash;&gt;-->
           <!--</el-popover>-->
-          <el-button type="primary" size="mini" style="margin-right: 5px" v-if="formData.Status == '7'" @click="createWZAccessCardNo">生成准入编码</el-button>
-          <el-button type="primary" size="mini" style="margin-right: 5px" v-if="formData.Status == '7'" @click="saveAccessCardNo">保存准入编码</el-button>
-          <el-button type="primary" size="mini" style="margin-right: 5px" v-if="formData.Status == '7'" @click="confirm" :loading="btnLoading">确认入库</el-button>
-          <el-button type="warning" size="mini" style="margin-right: 5px" v-if="formData.Status == '7'" @click="backStatus" :loading="btnLoading">退回</el-button>
+          <el-button type="primary" size="mini" style="margin-right: 5px" v-if="auditBtn && formData.Status == '7'" @click="createWZAccessCardNo">生成准入编码</el-button>
+          <el-button type="primary" size="mini" style="margin-right: 5px" v-if="auditBtn && formData.Status == '7'" @click="saveAccessCardNo">保存准入编码</el-button>
+          <el-button type="primary" size="mini" style="margin-right: 5px" v-if="auditBtn && formData.Status == '7'" @click="confirm" :loading="btnLoading">确认入库</el-button>
+          <el-button type="warning" size="mini" style="margin-right: 5px" v-if="auditBtn && formData.Status == '7'" @click="backStatus" :loading="btnLoading">退回</el-button>
           <router-link :to="'/oilsupplier/supplierstorage/basislist'">
             <el-button type="primary" size="mini" style="margin-left: 8px" v-if="showReturn">返回
             </el-button>
@@ -511,6 +511,7 @@
           BackRemark: this.backRemark,
           SupplierId: this.formData.Id
         }
+        console.log('入库审批驳回参数:', params)
         this.btnLoading = true
         apiCert.updateIsStorage(this.certId, params, this.$axios).then(res => {
           this.dialogVisibleBack = false
@@ -761,7 +762,7 @@
             if (this.certId && this.formDataCert.WorkflowId) {
               // this.$refs['WfHistory'].getHistoryTask() /* 刷新工作流 */
             }
-            // this.isAccess()
+            this.isAccess()
             this.$refs['equipmentList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['performanceList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['patentList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)

+ 5 - 5
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstorage/_opera/goodsedit.vue

@@ -24,10 +24,10 @@
             </el-steps>
             <el-button slot="reference" plain size="mini" style="margin-right: 5px">查看进度</el-button>
           </el-popover>-->
-          <el-button type="primary" size="mini" style="margin-right: 5px" v-if="formData.Status == '7'" @click="createWZAccessCardNo">生成准入编码</el-button>
-          <el-button type="primary" size="mini" style="margin-right: 5px" v-if="formData.Status == '7'" @click="saveAccessCardNo">保存准入编码</el-button>
-          <el-button type="primary" size="mini" style="margin-right: 5px" v-if="formData.Status == '7'" @click="confirm" :loading="btnLoading">确认入库</el-button>
-          <el-button type="warning" size="mini" style="margin-right: 5px" v-if="formData.Status == '7'" @click="backStatus" :loading="btnLoading">退回</el-button>
+          <el-button type="primary" size="mini" style="margin-right: 5px" v-if="auditBtn && formData.Status == '7'" @click="createWZAccessCardNo">生成准入编码</el-button>
+          <el-button type="primary" size="mini" style="margin-right: 5px" v-if="auditBtn && formData.Status == '7'" @click="saveAccessCardNo">保存准入编码</el-button>
+          <el-button type="primary" size="mini" style="margin-right: 5px" v-if="auditBtn && formData.Status == '7'" @click="confirm" :loading="btnLoading">确认入库</el-button>
+          <el-button type="warning" size="mini" style="margin-right: 5px" v-if="auditBtn && formData.Status == '7'" @click="backStatus" :loading="btnLoading">退回</el-button>
           <!-- <router-link :to="'/oilsupplier/supplierstorage/goodslist'"> -->
             <el-button type="primary" size="mini" style="margin-left: 8px" v-if="showReturn" @click="$router.back(-1)">返回
             </el-button>
@@ -763,7 +763,7 @@
             if (this.certId && this.formDataCert.WorkflowId) {
               // this.$refs['WfHistory'].getHistoryTask() /* 刷新工作流 */
             }
-            // this.isAccess()
+            this.isAccess()
             this.$refs['equipmentList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['performanceList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['patentList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)

+ 5 - 5
src/dashoo.cn/frontend_web/src/pages/oilsupplier/supplierstorage/_opera/techedit.vue

@@ -24,10 +24,10 @@
             <!--</el-steps>-->
             <!--&lt;!&ndash; <el-button slot="reference" plain size="mini" style="margin-right: 5px">查看进度</el-button> &ndash;&gt;-->
           <!--</el-popover>-->
-          <el-button type="primary" size="mini" style="margin-right: 5px" v-if="formData.Status == '7'" @click="createJFAccessCardNo">生成准入编码</el-button>
-          <el-button type="primary" size="mini" style="margin-right: 5px" v-if="formData.Status == '7'" @click="saveAccessCardNo">保存准入编码</el-button>
-          <el-button type="primary" size="mini" style="margin-right: 5px" v-if="formData.Status == '7'" @click="confirm" :loading="btnLoading">确认入库</el-button>
-          <el-button type="warning" size="mini" style="margin-right: 5px" v-if="formData.Status == '7'" @click="backStatus" :loading="btnLoading">退回</el-button>
+          <el-button type="primary" size="mini" style="margin-right: 5px" v-if="auditBtn && formData.Status == '7'" @click="createJFAccessCardNo">生成准入编码</el-button>
+          <el-button type="primary" size="mini" style="margin-right: 5px" v-if="auditBtn && formData.Status == '7'" @click="saveAccessCardNo">保存准入编码</el-button>
+          <el-button type="primary" size="mini" style="margin-right: 5px" v-if="auditBtn && formData.Status == '7'" @click="confirm" :loading="btnLoading">确认入库</el-button>
+          <el-button type="warning" size="mini" style="margin-right: 5px" v-if="auditBtn && formData.Status == '7'" @click="backStatus" :loading="btnLoading">退回</el-button>
           <router-link :to="'/oilsupplier/supplierstorage/techlist'">
             <el-button type="primary" size="mini" style="margin-left: 8px" v-if="showReturn">返回
             </el-button>
@@ -771,7 +771,7 @@
             /*if (this.certId && this.formDataCert.WorkflowId) {
               this.$refs['WfHistory'].getHistoryTask() /!* 刷新工作流 *!/
             } */
-            // this.isAccess()
+            this.isAccess()
             this.$refs['equipmentList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['performanceList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)
             this.$refs['patentList'].getvalue(this.formData.Id, this.formData.SupplierTypeCode, this.certId)