소스 검색

审批数据跳转问题

caojunjie 2 년 전
부모
커밋
5cfc4f6b52

+ 3 - 0
src/page/index/tags.vue

@@ -264,6 +264,9 @@ export default {
     menuTag(value, action) {
       if (action === "remove") {
         let { tag, key } = this.findTag(value);
+          if (tag.label == "销售政策") {
+              this.$store.commit("XIAO_SHO_ZHENG_CEGUAN");  // 审批数据里加的
+          }
         if (tag.label == "报价(E)") {
           this.$store.commit("OUT_BJ_STATUS");
         }

+ 15 - 1
src/router/views/index.js

@@ -2708,5 +2708,19 @@ export default [{
     },
     component: () => import( /* webpackChunkName: "views" */ '@/views/tirePartsMall/statisticAnalysis/supplierTransactions/index')
   }]
-}
+},
+  //生产模拟
+  {
+    path: '/ProductionManagement/index',
+    component: Layout,
+    hidden: true,
+    children: [{
+      path: '/ProductionManagement/index',
+      name: '生产模拟',
+      meta: {
+        keepAlive: true,
+      },
+      component: () => import( /* webpackChunkName: "views" */ '@/views/ProductionManagement/index')
+    }]
+  },
 ]

+ 1 - 0
src/store/getters.js

@@ -39,6 +39,7 @@ const getters = {
   mainItemStatus: state => state.ifdetail.mainItemStatus,
   settleStatus: state => state.ifdetail.settleStatus,
   domSaleStatus: state => state.ifdetail.domSaleStatus,
+  xiaoShoZhengce:state => state.ifdetail.xiaoshozhengce,// 销售政策 审批数据里加的
   inventoryAccount:state => state.ifdetail.inventoryAccount,
   inboundAndOutbound:state => state.ifdetail.inboundAndOutbound,
   domStockDetail: state => state.ifdetail.domStockDetail,

+ 11 - 1
src/store/modules/ifdetail.js

@@ -37,10 +37,20 @@ const ifdetail = {
     pjxsStatusTwo: false,
     pjcgStatus: false,
     maritimeExport: false,
-    collectionSettlement: false
+    collectionSettlement: false,
+    // 销售政策
+    xiaoshozhengce:false,
   },
   actions: {},
   mutations: {
+    // 审批数据里加的 销售政策开
+    XIAO_SHO_ZHENG_CEKAI(state) {
+      state.xiaoshozhengce = true
+    },
+    // 审批数据里加的 销售政策关
+    XIAO_SHO_ZHENG_CEGUAN(state) {
+      state.xiaoshozhengce = false
+    },
     // 海运出口打开
     DOMXS_OPEN_EXPORT_DETAIL(state) {
       state.maritimeExport = true;

+ 72 - 29
src/views/maintenance/salesPolicy/detailsPageEdit.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="borderless">
-    <div class="customer-head">
+    <div class="customer-head" style="display: flex;align-items: center">
       <div class="customer-back">
         <!--        <i class="back-icon el-icon-arrow-left"></i><i style="font-style:normal">返回管理列表</i>-->
         <el-button
@@ -11,26 +11,37 @@
           >返回列表
         </el-button>
       </div>
-      <el-button
-        style="margin-right: 110px"
-        class="add-customer-btn"
-        type="primary"
-        :disabled="disabled"
-        size="small"
-        @click="editCustomer"
-        >{{ form.id ? "确认修改" : "确认新增" }}
-      </el-button>
-      <el-dropdown class="add-customer-btn">
-        <el-button type="primary" size="small">
-          审核处理<i class="el-icon-arrow-down el-icon--right"></i>
-        </el-button>
-        <el-dropdown-menu slot="dropdown">
-          <el-dropdown-item @click.native="pleaseCheck" :disabled="form.auditStatus != 2">请核数据</el-dropdown-item>
-          <el-dropdown-item @click.native="checkScheduleDialog = true,checkId=form.id" :disabled="form.auditStatus === 1 || form.auditStatus === 2">审核进度</el-dropdown-item>
-<!--          <el-dropdown-item>撤销请核</el-dropdown-item>-->
-<!--          <el-dropdown-item>审批数据</el-dropdown-item>-->
-        </el-dropdown-menu>
-      </el-dropdown>
+        <div style="position: fixed;right: 0">
+            <el-button
+                style="margin-right: 20px"
+                type="primary"
+                :disabled="disabled"
+                size="small"
+                @click="editCustomer"
+            >{{ form.id ? "确认修改" : "确认新增" }}
+            </el-button>
+            <el-dropdown style="margin-right: 20px">
+                <el-button type="primary" size="small">
+                    审核处理<i class="el-icon-arrow-down el-icon--right"></i>
+                </el-button>
+                <el-dropdown-menu slot="dropdown">
+                    <el-dropdown-item @click.native="pleaseCheck" :disabled="form.auditStatus != 2">请核数据</el-dropdown-item>
+                    <el-dropdown-item @click.native="checkScheduleDialog = true,checkId=form.id" :disabled="form.auditStatus === 1 || form.auditStatus === 2">审核进度</el-dropdown-item>
+                    <!--          <el-dropdown-item>撤销请核</el-dropdown-item>-->
+                    <!--          <el-dropdown-item>审批数据</el-dropdown-item>-->
+                </el-dropdown-menu>
+            </el-dropdown>
+
+            <el-button
+                v-if="checkDisabled"
+                style="margin-right: 20px"
+                type="primary"
+                size="small"
+                @click="openCheckDialog"
+            >审批
+            </el-button>
+        </div>
+
     </div>
     <div style="margin-top: 60px">
       <el-form
@@ -337,6 +348,12 @@
           @choceScheduleFun="choceScheduleFun">
       </check-schedule>
     </el-dialog>
+
+      <el-dialog append-to-body title="审批" class="el-dialogDeep" :visible.sync="checkDialog" width="50%"
+                 :close-on-click-modal="false" :destroy-on-close="true" :close-on-press-escape="false" v-dialog-drag>
+          <check :checkData="checkData" :checkDetail="false" :idList="[]" @choceCheckFun="choceCheckFun">
+          </check>
+      </el-dialog>
   </div>
 </template>
 
@@ -369,15 +386,22 @@ import { getToken } from "@/util/auth";
 import { getPurchasePrice } from "@/api/basicData/fees"
 
 import checkSchedule from "@/components/check/checkSchedule";
+import check from "@/components/check/check.vue";
 export default {
   props: {
     detailData: Object
   },
   components:{
+      check,
     checkSchedule,
   },
   data() {
     return {
+        // 审批
+        checkData:{},
+        checkDialog:false,
+        checkDisabled:false,
+
       cname: '',
       configuration: {
         multipleChoices: true,
@@ -596,10 +620,21 @@ export default {
       this.contactsData = [];
     }
     if (this.detailData.check) {
+        this.checkDisabled = true
       this.batchNo = this.detailData.check.batchNo
     }
   },
   methods: {
+      //打开审核
+      openCheckDialog() {
+          this.checkData = this.detailData.check
+          this.checkDialog = true;
+      },
+      //关闭审核
+      choceCheckFun() {
+          this.checkDialog = false;
+      },
+
     onSubmit(type) {
       if (!type) this.cname = ''
       let name = this.cname
@@ -944,14 +979,22 @@ export default {
         this.form.presentItemList = this.contactsDataBuyFree;
         this.openFullScreen(false, "正在努力的加载...");
         typeSave(this.form).then(res => {
-          const data = {
-            id : this.form.id,
-            checkType: 'xszc',
-            url: '/maintenance/salesPolicy/index',
-            pageStatus:"this.$store.getters.domSaleStatus",
-            pageLabel:"销售政策",
-            checkFlag: 2,
-          }
+          // const data = {
+          //   id : this.form.id,
+          //   checkType: 'xszc',
+          //   url: '/maintenance/salesPolicy/index',
+          //   pageStatus:"this.$store.getters.domSaleStatus",
+          //   pageLabel:"销售政策",
+          //   checkFlag: 2,
+          // }
+            const data = {
+                id : this.form.id,
+                checkType: 'xszc',
+                url: '/maintenance/salesPolicy/index',
+                pageStatus:"this.$store.getters.xiaoShoZhengce",
+                pageLabel:"销售政策",
+                checkFlag: 2,
+            }
           pleaseCheck(data).then(res=>{
             this.$message({
               type: "success",

+ 15 - 0
src/views/maintenance/salesPolicy/index.vue

@@ -114,6 +114,21 @@ export default {
       this.option.searchMenuPosition = "right";
     }
   },
+    activated() {
+        setTimeout(() => {
+            if (this.$route.query.check) {
+                this.isShow = true;
+                // this.beforeOpenPage({id: this.$route.query.check.billId})
+                this.detailData = {
+                    id: this.$route.query.check.billId,
+                    check: this.$route.query.check,
+                    auditId: this.$route.query.check.id
+                };
+                this.isShow = false;
+                this.$store.commit("XIAO_SHO_ZHENG_CEKAI");
+            }
+        }, 100);
+    },
   methods: {
     searchCriteriaSwitch(type){
       if (type){