Browse Source

Finish Hotfix-zh-270

howie 2 years ago
parent
commit
5fdd5088da
2 changed files with 23 additions and 9 deletions
  1. 1 1
      src/utils/panel.js
  2. 22 8
      src/views/finance/receipt_list.vue

+ 1 - 1
src/utils/panel.js

@@ -94,7 +94,7 @@ export default {
         "left": 40,
         "top": 90,
         "height": 13,
-        "width": 328,
+        "width": 633,
         "fontSize": 12.5,
         "title": "备注",
         "fontFamily": '黑体',

+ 22 - 8
src/views/finance/receipt_list.vue

@@ -408,8 +408,8 @@
 import { disAutoConnect, hiprint } from "vue-plugin-hiprint";
 disAutoConnect();
 import printPreview from "./components/design/preview.vue";
-import { getCustomerList } from "@/api/finance/wallet";
 import { getCompanyList } from "@/api/user";
+import { getCustomerList } from "@/api/finance/wallet";
 import {
   getK3ReceiptList,
   getK3ReceiptDetail,
@@ -417,7 +417,7 @@ import {
 } from "@/api/finance/receipt_list";
 import ReceiptListDetail from "./components/receipt_list-detail";
 import ReceiptPrint from "@/views/finance/components/receipt_print.vue";
-import { changeNumberMoneyToChinese } from "@/utils/util";
+import { changeNumberMoneyToChinese,dateFormat } from "@/utils/util";
 import { numToFixed } from "@/filters";
 export default {
   components: {
@@ -567,7 +567,23 @@ export default {
       this.queryItem = {};
       this.isShowPrint = false;
     },
-
+  // 获取当前时间
+  nowDate() {
+      var date = new Date();
+      var seperator1 = "-";
+      var year = date.getFullYear();
+      var month = date.getMonth() + 1;
+      var strDate = date.getDate();
+      if (month >= 1 && month <= 9) {
+        month = "0" + month;
+      }
+      if (strDate >= 0 && strDate <= 9) {
+        strDate = "0" + strDate;
+      }
+      var currentdate = year + seperator1 + month + seperator1 + strDate;
+      console.log(currentdate);
+      return currentdate;
+    },
     // 点击打印
     async toPrint(row, type) {
       // 初始化模板,否则生成的模板叠加
@@ -626,7 +642,7 @@ export default {
     setTableDom(data) {
       return `
        <div style="font-family:'黑体';">
-          <h1 style="text-align:center">${this.company}其他收款单</h1>
+          <h1 style="text-align:center">${this.company}收款单</h1>
           <div >
             <table border=".5" cellspacing="0" width="856" height="250"
              style="border-color: rgb(0,0,0);
@@ -650,13 +666,11 @@ export default {
                   <td>业务日期</td>
                   <td>${data.theTime}</td>
                   <td>打印日期</td>
-                  <td>${data.createTime}</td>
+                  <td>${this.nowDate()}</td>
                 </tr>
                 <tr>
                   <td>付款单位</td>
-                  <td colspan="3">${data.customerName}</td>
-                  <td>项目费用名称</td>
-                  <td>${data.customerType}</td>
+                  <td colspan="5">${data.customerName}</td>
                 </tr>
                 <tr>
                   <td>钱包</td>