Browse Source

收款打印

lilei 2 years ago
parent
commit
6f931c0376

+ 4 - 0
src/libs/JGPrint.js

@@ -118,6 +118,8 @@ export const jGPrint = function (data, type, callback, printLogParams) {
        if(Value&&printLogParams){
        if(Value&&printLogParams){
          console.log('已打印,统计打印次数')
          console.log('已打印,统计打印次数')
          printLog(printLogParams,callback)
          printLog(printLogParams,callback)
+       }else{
+         callback()
        }
        }
     };
     };
     LODOP.ADD_PRINT_HTM(0, 0, '100%', '100%', data)
     LODOP.ADD_PRINT_HTM(0, 0, '100%', '100%', data)
@@ -201,6 +203,8 @@ export const jGPrintPdf = function (data, type, taskName, printLogParams,callbac
          if(Value&&printLogParams){
          if(Value&&printLogParams){
            console.log('已打印,统计打印次数')
            console.log('已打印,统计打印次数')
            printLog(printLogParams,callback)
            printLog(printLogParams,callback)
+         }else{
+           callback()
          }
          }
       };
       };
       LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', dataurl.replace('data:application/pdf;base64,', ''))
       LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', dataurl.replace('data:application/pdf;base64,', ''))

+ 10 - 2
src/views/common/commonModal.vue

@@ -6,13 +6,13 @@
     :maskClosable="false"
     :maskClosable="false"
     v-model="isShow"
     v-model="isShow"
     :title="modalTit"
     :title="modalTit"
-    :bodyStyle="{padding: modalTit?'25px 32px 20px':'50px 32px 15px'}"
+    :bodyStyle="bodyPadding?{padding:bodyPadding}:{padding: modalTit?'25px 32px 20px':'50px 32px 15px'}"
     @cancle="isShow=false"
     @cancle="isShow=false"
     :width="width">
     :width="width">
     <a-spin :spinning="spinning" tip="Loading...">
     <a-spin :spinning="spinning" tip="Loading...">
       <div class="common-main" v-html="modalHtml"></div>
       <div class="common-main" v-html="modalHtml"></div>
       <slot></slot>
       <slot></slot>
-      <div class="btn-box">
+      <div class="btn-box" v-if="showFooter">
         <a-button @click="handleCommonCancel" v-if="isCancel">{{ cancelText }}</a-button>
         <a-button @click="handleCommonCancel" v-if="isCancel">{{ cancelText }}</a-button>
         <a-button type="primary" @click="handleCommonOk">{{ okText }}</a-button>
         <a-button type="primary" @click="handleCommonOk">{{ okText }}</a-button>
       </div>
       </div>
@@ -55,6 +55,14 @@ export default {
     spinning: { // 加载中
     spinning: { // 加载中
       type: Boolean,
       type: Boolean,
       default: false
       default: false
+    },
+    bodyPadding: {
+      type: String,
+      default: ''
+    },
+    showFooter: {
+      type: Boolean,
+      default: true
     }
     }
   },
   },
   data () {
   data () {

+ 17 - 16
src/views/salesManagement/receiptPrint/list.vue

@@ -146,19 +146,18 @@
           </template>
           </template>
         </s-table>
         </s-table>
 
 
-        <!-- 操作提示 -->
-        <<!-- commonModal modalTit="收款打印" :openModal="showTipModal" @cancel="showTipModal=false">
-          <div style="line-height: 30px;" v-if="tipData">
-            <div>销售单号:{{ tipData&&tipData.buyerName }}</div>
-            <div>备货单号:{{ tipData&&tipData.dispatchBillNo }}</div>
-            <div>发货编号:{{ tipData&&tipData.buyerName }}</div>
-            <div>客户名称:{{ tipData&&tipData.buyerName }}</div>
-            <div>收货客户名称:{{ tipData&&tipData.buyerName }}</div>
-            <div>产品分类:{{ tipData&&tipData.buyerName }}</div>
-          </div>
-        </commonModal> -->
+        <!-- 收款打印 -->
+        <commonModal
+          modalTit="收款打印"
+          bodyPadding="10px"
+          width="1024px"
+          :showFooter="false"
+          :openModal="showTipModal"
+          @cancel="showTipModal=false">
+          <printModel ref="printModel" @cancel="showTipModal=false"></printModel>
+        </commonModal>
 
 
-        !-- 打印记录 -->
+        <!-- 打印记录 -->
         <recordModal ref="recordModal" modalTit="打印记录" :openModal="showRecordModal" @cancel="showRecordModal=false"></recordModal>
         <recordModal ref="recordModal" modalTit="打印记录" :openModal="showRecordModal" @cancel="showRecordModal=false"></recordModal>
       </a-spin>
       </a-spin>
     </a-card>
     </a-card>
@@ -175,11 +174,12 @@ import Area from '@/views/common/area.js'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import commonModal from '@/views/common/commonModal.vue'
 import commonModal from '@/views/common/commonModal.vue'
 import recordModal from './recordModal.vue'
 import recordModal from './recordModal.vue'
+import printModel from './printModel.vue'
 import { settleReceiptList } from '@/api/settleReceipt'
 import { settleReceiptList } from '@/api/settleReceipt'
 export default {
 export default {
   name: 'PushOrderManagementList',
   name: 'PushOrderManagementList',
   mixins: [commonMixin],
   mixins: [commonMixin],
-  components: { STable, VSelect, dealerSubareaScopeList, rangeDate, subarea, commonModal, recordModal, Area },
+  components: { STable, VSelect, dealerSubareaScopeList, rangeDate, subarea, commonModal, recordModal, Area, printModel },
   data () {
   data () {
     return {
     return {
       spinning: false,
       spinning: false,
@@ -208,7 +208,6 @@ export default {
         totalRecord: 0
         totalRecord: 0
       },
       },
       showTipModal: false,
       showTipModal: false,
-      tipData: null,
       showRecordModal: false,
       showRecordModal: false,
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
@@ -282,14 +281,16 @@ export default {
     },
     },
     // 收款打印
     // 收款打印
     handlePrint (row) {
     handlePrint (row) {
-      this.tipData = row
       this.showTipModal = true
       this.showTipModal = true
+      this.$nextTick(() => {
+        this.$refs.printModel.getData(row)
+      })
     },
     },
     // 打印记录
     // 打印记录
     viewPrint (row) {
     viewPrint (row) {
       this.showRecordModal = true
       this.showRecordModal = true
       this.$refs.recordModal.setData(row, {
       this.$refs.recordModal.setData(row, {
-        billType: 'ALLOCATE',
+        billType: 'SETTLE_RECEIPT',
         billSn: row.accountReceiptSn
         billSn: row.accountReceiptSn
       })
       })
     },
     },

+ 125 - 0
src/views/salesManagement/receiptPrint/printModel.vue

@@ -0,0 +1,125 @@
+<template>
+  <!-- 发货打印 -->
+  <div>
+    <a-spin :spinning="spinning" tip="Loading..." id="sendGood-print" style="height: 70vh;overflow: auto;width: 100%;">
+      <div class="print-box" style="width: 100%;font-size: 10pt;" v-if="detail">
+        <h1 style="text-align:center;">销 售 收 款 凭 证</h1>
+        <div style="display:flex;align-item:center;justify-content: space-between;flex-wrap: wrap;line-height: 20pt;">
+          <div style="width: 50%;">客户名称:{{ detail.settleClientName||'--' }}</div>
+          <div style="width: 50%;">支付方式:{{ detail.settleStyleDictValue||'--' }}</div>
+          <div style="width: 50%;">收货客户名称:{{ detail.receiverName||'--' }}</div>
+          <div style="width: 50%;">发货编号:{{ detail.sendNo||'--' }}</div>
+          <div style="width: 50%;">销售单号:{{ detail.bizNo||'--' }}</div>
+          <div style="width: 50%;">下推单号:{{ detail.dispatchBillNo||'--' }}</div>
+          <div style="width: 50%;">收款类型:{{ detail.keepTypeDictValue||'--' }}</div>
+          <div style="width: 50%;">收款时间:{{ detail.settleTime||'--' }}</div>
+          <div style="width: 50%;">收款人:{{ detail.settlePersonName||'--' }}</div>
+        </div>
+        <!-- 财务收款单 -->
+        <div>
+          <div style="line-height: 30pt;">共 2 个财务收款单,以下是第 1 个</div>
+          <div>
+            <table border="1" style="width: 100%;border-collapse: collapse;text-align: center;">
+              <tr>
+                <th style="line-height: 24pt;width: 6%;">序号</th>
+                <th style="line-height: 24pt;width: 10%;">日期</th>
+                <th style="line-height: 24pt;width: 20%;">客户信息</th>
+                <th style="line-height: 24pt;width: 20%;">收款信息</th>
+                <th style="line-height: 24pt;width: 20%;">汇入银行</th>
+                <th style="line-height: 24pt;width: 10%;">足额打款</th>
+                <th style="line-height: 24pt;width: 14%;">备注</th>
+              </tr>
+              <tr v-for="(item,index) in 5">
+                <td style="padding:7px;width: 60px;">{{ index+1 }}</td>
+                <td style="padding:7px;width:120px">6月15日</td>
+                <td style="padding:7px;width: 240px;">
+                  箭冠汽配西安大兴店<br>
+                  CUST1547<br>
+                  东台宇新汽车配件有限公司
+                </td>
+                <td style="padding:7px;width: 150px;">
+                  订单金额:60553<br>
+                  收款金额:60553<br>
+                  使用授信:0<br>
+                  授信还款:0<br>
+                  余款抵扣:0<br>
+                  跨月打款:0
+                </td>
+                <td style="padding:7px;width: 200px;">
+                  东莞箭冠<br>
+                  东莞银行<br>
+                </td>
+                <td style="padding:7px;width: 80px;">是</td>
+                <td style="padding:7px;">备注撒打发</td>
+              </tr>
+            </table>
+            <div style="line-height: 30pt;">附:钉钉审批明细</div>
+            <table border="1" style="width: 100%;border-collapse: collapse;text-align: center;">
+              <tr>
+                <th style="line-height: 24pt;width: 20%;">人员姓名</th>
+                <th style="line-height: 24pt;width: 20%;">人员类型</th>
+                <th style="line-height: 24pt;width: 20%;">状态</th>
+                <th style="line-height: 24pt;width: 20%;">审批意见</th>
+                <th style="line-height: 24pt;width: 20%;">操作时间</th>
+              </tr>
+              <tr>
+                <td style="padding:7px;">王明</td>
+                <td style="padding:7px;">审批人</td>
+                <td style="padding:7px;">已同意</td>
+                <td style="padding:7px;">--</td>
+                <td style="padding:7px;">2022-06-13 09:59:10</td>
+              </tr>
+            </table>
+          </div>
+        </div>
+      </div>
+    </a-spin>
+    <div class="btn-box" style="display:flex;align-item:center;justify-content: center;" v-if="detail">
+      <a-button @click="handleCommonCancel">取消</a-button>
+      <a-button :loading="spinning" type="primary" @click="handleCommonOk">立即打印</a-button>
+    </div>
+  </div>
+</template>
+
+<script>
+import { jGPrint } from '@/libs/JGPrint.js'
+import { settleReceiptFindBySn } from '@/api/settleReceipt.js'
+export default {
+  data () {
+    return {
+      spinning: false,
+      detail: null
+    }
+  },
+  methods: {
+    handleCommonOk () {
+      const _this = this
+      const html = document.getElementById('sendGood-print').innerHTML
+      _this.spinning = true
+      // html, type, callback, printLogParams
+      jGPrint(html, 'print', function (res) {
+        _this.spinning = false
+      }, {
+        billType: 'SETTLE_RECEIPT',
+        billSn: this.detail.accountReceiptSn,
+        billNo: this.detail.accountReceiptNo,
+        printType: '收款打印'
+      })
+    },
+    getData (data) {
+      this.spinning = true
+      settleReceiptFindBySn({ sn: data.accountReceiptSn }).then(res => {
+        this.detail = res.data || null
+        this.spinning = false
+      })
+    },
+    handleCommonCancel () {
+      this.$emit('cancel')
+      this.detail = null
+    }
+  }
+}
+</script>
+
+<style>
+</style>

+ 7 - 7
src/views/salesManagement/receiptPrint/recordModal.vue

@@ -11,17 +11,17 @@
     <a-spin :spinning="spinning" tip="Loading...">
     <a-spin :spinning="spinning" tip="Loading...">
       <div class="common-main">
       <div class="common-main">
         <a-descriptions :column="2">
         <a-descriptions :column="2">
-          <a-descriptions-item label="调拨单号">
-            {{ tipData&&tipData.allocateNo }}
+          <a-descriptions-item label="销售单号">
+            {{ tipData&&tipData.bizNo }}
           </a-descriptions-item>
           </a-descriptions-item>
-          <a-descriptions-item label="调拨类型">
-            {{ tipData&&tipData.allocateTypeName }}
+          <a-descriptions-item label="备货单号">
+            {{ tipData&&tipData.dispatchBillNo }}
           </a-descriptions-item>
           </a-descriptions-item>
-          <a-descriptions-item label="调往对象">
-            {{ tipData&&tipData.targetName }}
+          <a-descriptions-item label="客户名称">
+            {{ tipData&&tipData.settleClientName }}
           </a-descriptions-item>
           </a-descriptions-item>
           <a-descriptions-item label="收货客户名称">
           <a-descriptions-item label="收货客户名称">
-            {{ tipData&&tipData.receiverName }}
+            {{ tipData&&tipData.receiverName||'--' }}
           </a-descriptions-item>
           </a-descriptions-item>
         </a-descriptions>
         </a-descriptions>
         <div>
         <div>

+ 0 - 1
src/views/salesManagement/salesCollection/voucherModal.vue

@@ -123,7 +123,6 @@ export default {
       this.spinning = true
       this.spinning = true
       settleReceiptFindBySn({ sn: data.accountReceiptSn }).then(res => {
       settleReceiptFindBySn({ sn: data.accountReceiptSn }).then(res => {
         this.detail = res.data || null
         this.detail = res.data || null
-        this.$message.info(res.message)
         this.spinning = false
         this.spinning = false
       })
       })
     },
     },