lilei 7 hours ago
parent
commit
786f20d16b

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1758675905165
+  "version": 1758788485709
 }

+ 8 - 8
src/config/router.config.js

@@ -1503,7 +1503,7 @@ export const asyncRouterMap = [
             name: 'companyReceivablePayable',
             component: BlankLayout,
             meta: {
-              title: '单位付管理',
+              title: '单位收付管理',
               icon: 'transaction',
               permission: 'M_companyReceivablePayableList'
             },
@@ -1514,7 +1514,7 @@ export const asyncRouterMap = [
                 name: 'companyReceivablePayableList',
                 component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/companyReceivablePayable/list.vue'),
                 meta: {
-                  title: '单位付列表',
+                  title: '单位收付列表',
                   icon: 'transaction',
                   hidden: true,
                   permission: 'M_companyReceivablePayableList'
@@ -1525,7 +1525,7 @@ export const asyncRouterMap = [
                 name: 'companyReceivablePayableCollectionPayment',
                 component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/companyReceivablePayable/collectionPayment.vue'),
                 meta: {
-                  title: '编辑单位付',
+                  title: '编辑单位收付',
                   icon: 'transaction',
                   hidden: true,
                   permission: 'M_collectionPayment'
@@ -1536,7 +1536,7 @@ export const asyncRouterMap = [
                 name: 'companyReceivablePayableDetail',
                 component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/companyReceivablePayable/detail.vue'),
                 meta: {
-                  title: '单位付详情',
+                  title: '单位收付详情',
                   icon: 'transaction',
                   hidden: true,
                   permission: 'M_companyReceivablePayable_detail'
@@ -1550,7 +1550,7 @@ export const asyncRouterMap = [
             name: 'companyReceivablePayableNew',
             component: BlankLayout,
             meta: {
-              title: '单位付管理(新版)',
+              title: '单位收付管理(新版)',
               icon: 'transaction',
               permission: 'M_companyReceivablePayableList'
             },
@@ -1561,7 +1561,7 @@ export const asyncRouterMap = [
                 name: 'companyReceivablePayableNewList',
                 component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/companyReceivablePayableNew/list.vue'),
                 meta: {
-                  title: '单位付列表(新版)',
+                  title: '单位收付列表(新版)',
                   icon: 'transaction',
                   hidden: true,
                   permission: 'M_companyReceivablePayableList'
@@ -1572,7 +1572,7 @@ export const asyncRouterMap = [
                 name: 'companyReceivablePayableNewCollectionPayment',
                 component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/companyReceivablePayableNew/collectionPayment.vue'),
                 meta: {
-                  title: '编辑单位付(新版)',
+                  title: '编辑单位收付(新版)',
                   icon: 'transaction',
                   hidden: true,
                   permission: 'M_collectionPayment'
@@ -1583,7 +1583,7 @@ export const asyncRouterMap = [
                 name: 'companyReceivablePayableNewDetail',
                 component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/companyReceivablePayableNew/detail.vue'),
                 meta: {
-                  title: '单位付详情(新版)',
+                  title: '单位收付详情(新版)',
                   icon: 'transaction',
                   hidden: true,
                   permission: 'M_companyReceivablePayable_detail'

+ 53 - 8
src/views/financialManagement/companyCollectionPayment/detail.vue

@@ -7,6 +7,18 @@
           <a id="companyCollectionPaymentDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
           <p style=" display: inline-block;margin: 0 0 0 20px;color: #000;font-size: 14px;font-weight: 600;">单号:{{ (basicInfoData&&basicInfoData.unitSettleNo) || '--' }}</p>
         </template>
+        <!-- 操作区,位于 title 行的行尾 -->
+        <template slot="extra">
+          <div style="margin-top: 5px;">
+            <PrintPanel ref="printBox" position="bottomRight" @handlePrint="handlePrint">
+              <div style="padding:10px;line-height: 30px;" slot="extendCons">
+                <div>打印内容(多选)</div>
+                <a-checkbox v-model="printNo" :checked="printNo" id="companyCollectionPaymentDetail-printNo">结算单号</a-checkbox>
+                <a-checkbox v-model="printDate" :checked="printDate" id="companyCollectionPaymentDetail-printDate">打印时间</a-checkbox>
+              </div>
+            </PrintPanel>
+          </div>
+        </template>
       </a-page-header>
       <!-- 基础信息 -->
       <a-card size="small" :bordered="false" class="companyCollectionPaymentDetail-cont" v-if="basicInfoData">
@@ -57,10 +69,12 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
+import PrintPanel from '@/views/common/printPanel.vue'
+import { hdPrint } from '@/libs/JGPrint'
 import { settleUnitDetailList, settleUnitDetail } from '@/api/settle'
 export default {
   name: 'CompanyCollectionPaymentDetail',
-  components: { STable, VSelect },
+  components: { STable, VSelect, PrintPanel },
   mixins: [commonMixin],
   data () {
     const _this = this
@@ -69,12 +83,13 @@ export default {
       // 表头
       columns: [
         { title: '序号', dataIndex: 'no', align: 'center', width: '5%' },
-        { title: '单据号', dataIndex: 'bizNo', align: 'center', width: '30%', customRender: function (text) { return text || '--' } },
-        { title: '类型', dataIndex: 'bizTypeDictValue', align: 'center', width: '25%', customRender: function (text) { return text || '--' } },
-        // { title: '总款数', dataIndex: 'totalTypeNum', align: 'center', width: '10%', customRender: function (text) { return (text || text == 0)?text: '--' } },
-        // { title: '总数量', dataIndex: 'totalNum', align: 'center', width: '10%', customRender: function (text) { return (text || text == 0)?text: '--'  } },
-        { title: '金额', dataIndex: 'totalAmount', align: 'right', width: '20%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
-        { title: '结算金额', dataIndex: 'settleAmount', align: 'right', width: '20%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
+        { title: '单据号', dataIndex: 'bizNo', align: 'center', width: '20%', customRender: function (text) { return text || '--' } },
+        { title: '单据类型', dataIndex: 'bizTypeDictValue', align: 'center', width: '15%', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'creatDate', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '总款数', dataIndex: 'bizTotalCategory', align: 'center', width: '10%', customRender: function (text) { return (text || text == 0) ? text : '--' } },
+        { title: '总数量', dataIndex: 'bizTotalQty', align: 'center', width: '10%', customRender: function (text) { return (text || text == 0) ? text : '--' } },
+        { title: '金额', dataIndex: 'totalAmount', align: 'right', width: '10%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } },
+        { title: '结算金额', dataIndex: 'settleAmount', align: 'right', width: '10%', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text) : '--') } }
       ],
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
@@ -96,7 +111,9 @@ export default {
         })
       },
       total: 0, //  总条数
-      basicInfoData: null //  基本信息
+      basicInfoData: null, //  基本信息
+      printNo: false, // 是否打印销售单号
+      printDate: false // 是否打印日期
     }
   },
   computed: {
@@ -114,6 +131,24 @@ export default {
     handleBack () {
       this.$router.push({ name: 'companyCollectionPaymentList' })
     },
+    // 打印预览/快捷打印
+    handlePrint (type, printerType) {
+      const _this = this
+      _this.spinning = true
+      let url = salesDetailPrint
+      const params = {
+        sn: this.$route.params.id,
+        printNo: this.printNo ? 1 : 0,
+        printDate: this.printDate ? 1 : 0
+      }
+      if (type == 'export') { //  导出
+        url = salesDetailExport
+      }
+      // 打印或导出
+      hdPrint(printerType, type, url, params, '销售单', function () {
+        _this.spinning = false
+      })
+    },
     // 详情
     getDetail () {
       settleUnitDetail({ id: this.$route.params.id }).then(res => {
@@ -128,9 +163,19 @@ export default {
       })
     }
   },
+  watch: {
+    printDate (newValue, oldValue) {
+      localStorage.setItem('printDate-ccp-' + this.$store.state.user.info.orgId, newValue)
+    },
+    printNo (newValue, oldValue) {
+      localStorage.setItem('printNo-ccp-' + this.$store.state.user.info.orgId, newValue)
+    }
+  },
   activated () {
     // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
     if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.printDate = localStorage.getItem('printDate-ccp-' + this.$store.state.user.info.orgId) == 'true'
+      this.printNo = localStorage.getItem('printNo-ccp-' + this.$store.state.user.info.orgId) == 'true'
       this.getDetail()
     }
   },