From 754b3824cdbb3c530ca6858db3fcce113b0e66c3 Mon Sep 17 00:00:00 2001
From: liuyg <376836862@qq.com>
Date: Fri, 13 Aug 2021 21:03:42 +0800
Subject: [PATCH] 冲突

---
 src/views/record/record.vue |  142 +++++++++++++++++++++++++++++++++++++++++++++-
 1 files changed, 137 insertions(+), 5 deletions(-)

diff --git a/src/views/record/record.vue b/src/views/record/record.vue
index 338a461..05eb135 100644
--- a/src/views/record/record.vue
+++ b/src/views/record/record.vue
@@ -44,8 +44,17 @@
           icon="el-icon-edit"
           :size="size"
           :type="type"
+          v-show="row.type != 0 && row.type != 1"
           @click.stop="rowDel(row)"
           >审批
+        </el-button>
+        <el-button
+          icon="el-icon-edit"
+          :size="size"
+          :type="type"
+          v-show="row.type == 0"
+          @click.stop="rowPrint(row)"
+          >回执打印
         </el-button>
       </template>
       <template class="tdtype" slot-scope="{ row }" slot="type">
@@ -57,9 +66,42 @@
         </el-tag>
       </template>
     </avue-crud>
+
+    <el-dialog
+      :visible.sync="dialogVisible"
+      :modal-append-to-body="false"
+      width="920px"
+      top="15vh"
+    >
+      <div id="examine_box" v-if="dialogVisible">
+        <div class="exam-box">
+          <h3>回执单</h3>
+          <p>
+            南昌市公安局已收到
+            <span>{{ rowData == null ? "" : rowData.enterprisename }}</span>
+            的相关备案申请!
+          </p>
+
+          <div class="examine-bottom">
+            <ul>
+              <li>审批单位:<span>南昌市公安局</span></li>
+              <li>
+                日期:<span>{{
+                  rowData == null ? "" : rowData.examinetime
+                }}</span>
+              </li>
+            </ul>
+          </div>
+        </div>
+      </div>
+
+      <span slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="Print">打 印</el-button>
+      </span>
+    </el-dialog>
   </basic-container>
 </template>
-
+ 
 <script>
 import { getList, getDetail, add, update, remove } from "@/api/record/record";
 import { mapGetters } from "vuex";
@@ -67,6 +109,7 @@
 export default {
   data() {
     return {
+      dialogVisible: false, // 备案审批打印的
       form: {},
       query: {},
       loading: true,
@@ -337,6 +380,7 @@
         ],
       },
       data: [],
+      rowData: null,
     };
   },
   computed: {
@@ -358,6 +402,16 @@
     },
   },
   methods: {
+    Print() {
+      //打印
+      let subOutputRankPrint = document.getElementById("examine_box");
+      let newContent = subOutputRankPrint.innerHTML;
+      let oldContent = document.body.innerHTML;
+      document.body.innerHTML = newContent;
+      window.print();
+      window.location.reload();
+      document.body.innerHTML = oldContent;
+    },
     handleCredentialsr(row) {
       this.$router.push({
         path: "/attach/index",
@@ -402,7 +456,7 @@
     },
     rowDel(row) {
       this.$confirm("是否通过?", {
-        confirmButtonText: " 是 ",
+        confirmButtonText: "是",
         cancelButtonText: "否",
         type: "warning",
       })
@@ -421,6 +475,43 @@
           row.type = "1";
           return update(row);
         });
+    },
+    // 审批打印
+    rowPrint(row) {
+      this.rowData = null;
+      this.rowData = row;
+      this.dialogVisible = true;
+    },
+    getCurrentTime() {
+      let date = new Date();
+      let dateYear = date.getFullYear(); //获取年
+      let dateMonth =
+        date.getMonth() + 1 < 10
+          ? "0" + (date.getMonth() + 1)
+          : date.getMonth() + 1; //获取月
+      let dateDate =
+        date.getDate() < 10 ? "0" + date.getDate() : date.getDate(); //获取当日
+
+      let dateHours =
+        date.getHours() < 10 ? "0" + date.getHours() : date.getHours(); //获取小时
+      let dateMinutes =
+        date.getMinutes() < 10 ? "0" + date.getMinutes() : date.getMinutes(); //获取分钟
+      let dateSeconds =
+        date.getSeconds() < 10 ? "0" + date.getSeconds() : date.getSeconds(); //获取秒
+
+      return (
+        dateYear +
+        "-" +
+        dateMonth +
+        "-" +
+        dateDate +
+        " " +
+        dateHours +
+        ":" +
+        dateMinutes +
+        ":" +
+        dateSeconds
+      );
     },
     handleDelete() {
       if (this.selectionList.length === 0) {
@@ -492,7 +583,7 @@
         this.selectionClear();
       });
     },
-    rowStyle({ row, column, rowIndex }) {
+    rowStyle({ row }) {
       if (row.dtype != null && row.dtype != "") {
         if (row.dtype == "2") {
           return {
@@ -509,7 +600,7 @@
   },
 };
 </script>
-
+ 
 <style scoped>
 .dtype {
   width: 80px;
@@ -561,4 +652,45 @@
   width: 80px;
   /*padding-right: 40px !important;*/
 }
-</style>
+
+.exam-box {
+  width: 100%;
+  height: 360px;
+
+  position: relative;
+  padding: 10px;
+  background: #fff !important;
+  color: #000;
+
+  box-sizing: border-box;
+}
+
+.exam-box h3 {
+  margin: 0;
+  text-align: center;
+  font-size: 28px;
+  letter-spacing: 10px;
+  line-height: 46px;
+}
+
+.exam-box p {
+  text-indent: 2em;
+  font-size: 18px;
+}
+
+.exam-box .examine-bottom {
+  position: absolute;
+  bottom: 10px;
+  right: 10px;
+}
+
+.exam-box li {
+  list-style: none;
+  font-size: 18px;
+  line-height: 32px;
+}
+
+.exam-box span {
+  text-decoration: underline;
+}
+</style>
\ No newline at end of file

--
Gitblit v1.9.3