Browse Source

内贸审批增加查询审批详情

lichao 3 years ago
parent
commit
2f5c166275

+ 72 - 1
src/views/businessManagement/purchaseOrder/detailsPageEdit.vue

@@ -24,7 +24,7 @@
           </el-button>
           <el-dropdown-menu slot="dropdown">
             <el-dropdown-item :disabled="!form.id || form.status > 0" @click.native="pleaseCheck">请核数据</el-dropdown-item>
-            <el-dropdown-item v-if="false">审核进度</el-dropdown-item>
+            <el-dropdown-item v-if="form.status > 0" @click.native="checkScheduleDialog = true,checkId=form.id">审核进度</el-dropdown-item>
             <el-dropdown-item v-if="false">撤销请核</el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
@@ -72,6 +72,14 @@
           :loading="saveLoading"
         >保 存
         </el-button>
+        <div v-if="checkDisabled" style="float: right;margin-left: 8px">
+          <el-button type="primary"
+                     size="small"
+                     class="el-button--small-yh"
+                     @click.stop="openCheckDialog">
+            审批
+          </el-button>
+        </div>
       </div>
     </div>
     <div class="customer-main">
@@ -513,6 +521,43 @@
       reportName="发货通知单"
       @onClose="onClose()"
     ></report-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>
+    <el-dialog
+      append-to-body
+      title="审批进度"
+      class="el-dialogDeep"
+      :visible.sync="checkScheduleDialog"
+      width="40%"
+      :close-on-click-modal="false"
+      :destroy-on-close="true"
+      :close-on-press-escape="false"
+      v-dialog-drag
+    >
+      <check-schedule
+        :checkId="checkId"
+        :batchNo="batchNo"
+        @choceScheduleFun="choceScheduleFun"
+      >
+      </check-schedule>
+    </el-dialog>
   </div>
 </template>
 
@@ -550,6 +595,8 @@ import {
 } from "@/util/validate";
 import financialAccount from "../../../components/finance/financialAccount";
 import reportDialog from "@/components/report-dialog/main";
+import check from "@/components/check/check";
+import checkSchedule from "@/components/check/checkSchedule";
 
 export default {
   name: "detailsPage",
@@ -567,6 +614,8 @@ export default {
     feeInfo,
     financialAccount,
     reportDialog,
+    check,
+    checkSchedule,
   },
   data() {
     return {
@@ -834,6 +883,12 @@ export default {
       switchDialog: false,
       // 请核状态禁用
       browse: false,
+      checkDisabled: false,
+      checkData: {},
+      checkDialog: false,
+      checkScheduleDialog: false,
+      checkId: '',
+      batchNo:'',
     }
   },
   mounted() {
@@ -862,6 +917,10 @@ export default {
     this.getWorkDicts("packageRemarks").then(res => {
       this.packageOptions = res.data.data;
     });
+    if (this.detailData.check) {
+      this.checkDisabled = true
+      this.batchNo = this.detailData.check.batchNo
+    }
     if (this.detailData.id) {
       this.queryData(this.detailData.id)
     } else if(this.detailData.copyId) {
@@ -1707,6 +1766,18 @@ export default {
         return true;  //没有动过数据
       }
     },
+    //打开审核
+    openCheckDialog(){
+      this.checkData  = this.detailData.check
+      this.checkDialog = true;
+    },
+    //关闭审核
+    choceCheckFun(){
+      this.checkDialog = false;
+    },
+    choceScheduleFun(){
+      this.checkScheduleDialog = false
+    },
   }
 }
 </script>

+ 12 - 0
src/views/businessManagement/purchaseOrder/index.vue

@@ -222,6 +222,18 @@ export default {
       }
     })
   },
+  activated() {
+    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,
+      };
+      this.isShow = false;
+      this.$store.commit("DOMCG_IN_DETAIL");
+    }
+  },
   methods: {
     //删除列表后面的删除按钮触发触发(row, index, done)
     rowDel(row, index, done) {

+ 75 - 4
src/views/businessManagement/salesOrder/detailsPageEdit.vue

@@ -24,7 +24,7 @@
           </el-button>
           <el-dropdown-menu slot="dropdown">
             <el-dropdown-item :disabled="browse" @click.native="pleaseCheck">请核数据</el-dropdown-item>
-            <el-dropdown-item v-if="false">审核进度</el-dropdown-item>
+            <el-dropdown-item v-if="form.status > 0" @click.native="checkScheduleDialog = true,checkId=form.id">审核进度</el-dropdown-item>
             <el-dropdown-item v-if="false">撤销请核</el-dropdown-item>
           </el-dropdown-menu>
         </el-dropdown>
@@ -60,7 +60,7 @@
           </el-button>
           <el-dropdown-menu slot="dropdown">
             <el-dropdown-item
-              :disabled="detailData.seeDisabled"
+              :disabled="detailData.seeDisabled || form.status == 3"
               @click.native="saveSell">生成采购
             </el-dropdown-item>
             <el-dropdown-item
@@ -78,6 +78,14 @@
           @click="editCustomer(false)"
         >保 存
         </el-button>
+        <div v-if="checkDisabled" style="float: right;margin-left: 8px">
+          <el-button type="primary"
+                     size="small"
+                     class="el-button--small-yh"
+                     @click.stop="openCheckDialog">
+            审批
+          </el-button>
+        </div>
       </div>
     </div>
     <div class="customer-main">
@@ -735,6 +743,43 @@
       >
       </bill-application>
     </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>
+    <el-dialog
+      append-to-body
+      title="审批进度"
+      class="el-dialogDeep"
+      :visible.sync="checkScheduleDialog"
+      width="40%"
+      :close-on-click-modal="false"
+      :destroy-on-close="true"
+      :close-on-press-escape="false"
+      v-dialog-drag
+    >
+      <check-schedule
+        :checkId="checkId"
+        :batchNo="batchNo"
+        @choceScheduleFun="choceScheduleFun"
+      >
+      </check-schedule>
+    </el-dialog>
   </div>
 </template>
 
@@ -793,6 +838,8 @@ import {
 } from "@/util/validate";
 import financialAccount from "../../../components/finance/financialAccount";
 import { gainUser } from "@/api/basicData/customerInquiry";
+import check from "@/components/check/check";
+import checkSchedule from "@/components/check/checkSchedule";
 
 export default {
   name: "detailsPage",
@@ -807,7 +854,9 @@ export default {
     reportDialog,
     feeInfo,
     billApplication,
-    financialAccount
+    financialAccount,
+    check,
+    checkSchedule,
   },
   data() {
     return {
@@ -1522,6 +1571,12 @@ export default {
       browse: false,
       roleName: '',
       userList: [],
+      checkDisabled: false,
+      checkData: {},
+      checkDialog: false,
+      checkScheduleDialog: false,
+      checkId: '',
+      batchNo:'',
     }
   },
   mounted() {
@@ -1563,9 +1618,12 @@ export default {
     if (this.detailData.id) {
       this.queryData(this.detailData.id)
     }
+    if (this.detailData.check) {
+      this.checkDisabled = true
+      this.batchNo = this.detailData.check.batchNo
+    }
     gainUser().then(res => {
       this.userList = res.data.data;
-      console.log(this.userList)
     });
     if (this.detailData.seeDisabled) {
       // this.bankOfDeposit.column.forEach(item => {
@@ -2041,6 +2099,7 @@ export default {
         tradeType: 'GN',
         optionType: 'GN',
         chargeMember: this.form.chargeMember,
+        amount: this.form.orderAmount
       }
       if(bool){ //申请货款
         this.billData.srcId = -1
@@ -3184,6 +3243,18 @@ export default {
         return true;  //没有动过数据
       }
     },
+    //打开审核
+    openCheckDialog(){
+      this.checkData  = this.detailData.check
+      this.checkDialog = true;
+    },
+    //关闭审核
+    choceCheckFun(){
+      this.checkDialog = false;
+    },
+    choceScheduleFun(){
+      this.checkScheduleDialog = false
+    },
   },
 }
 </script>

+ 10 - 0
src/views/businessManagement/salesOrder/index.vue

@@ -191,6 +191,16 @@ export default {
       this.isShow = true
       this.beforeOpenPage({id: this.$route.query.id})
     }
+    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,
+      };
+      this.isShow = false;
+      this.$store.commit("DOMXS_IN_DETAIL");
+    }
   },
   methods: {
     tableRowClassName({row, column, rowIndex, columnIndex}) {