dongke 1 год назад
Родитель
Сommit
f89d6d71ec
28 измененных файлов с 701 добавлено и 4 удалено
  1. 21 0
      api/pages/oa/trade.js
  2. 2 1
      app.js
  3. 5 1
      app.json
  4. 14 1
      i18n/zh-CN.js
  5. 16 0
      mixins/index.js
  6. 1 1
      package-accounts-manage/pages/fund-account/add/add.js
  7. 66 0
      package-basic-data/invoice-header/invoice-header.js
  8. 3 0
      package-basic-data/invoice-header/invoice-header.json
  9. 2 0
      package-basic-data/invoice-header/invoice-header.wxml
  10. 1 0
      package-basic-data/invoice-header/invoice-header.wxss
  11. 112 0
      package-basic-data/pages/draw-bill/add/add.js
  12. 4 0
      package-basic-data/pages/draw-bill/add/add.json
  13. 9 0
      package-basic-data/pages/draw-bill/add/add.wxml
  14. 1 0
      package-basic-data/pages/draw-bill/add/add.wxss
  15. 166 0
      package-basic-data/pages/draw-bill/draw-bill.js
  16. 4 0
      package-basic-data/pages/draw-bill/draw-bill.json
  17. 14 0
      package-basic-data/pages/draw-bill/draw-bill.wxml
  18. 1 0
      package-basic-data/pages/draw-bill/draw-bill.wxss
  19. 138 0
      package-basic-data/pages/historical-purchase-history/historical-purchase-history.js
  20. 4 0
      package-basic-data/pages/historical-purchase-history/historical-purchase-history.json
  21. 14 0
      package-basic-data/pages/historical-purchase-history/historical-purchase-history.wxml
  22. 1 0
      package-basic-data/pages/historical-purchase-history/historical-purchase-history.wxss
  23. 66 0
      package-basic-data/pages/invoice-header/invoice-header.js
  24. 4 0
      package-basic-data/pages/invoice-header/invoice-header.json
  25. 2 0
      package-basic-data/pages/invoice-header/invoice-header.wxml
  26. 1 0
      package-basic-data/pages/invoice-header/invoice-header.wxss
  27. 21 0
      pages/mine/mine.js
  28. 8 0
      pages/mine/mine.wxml

+ 21 - 0
api/pages/oa/trade.js

@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright(c) 2024 dongke All rights reserved. / Confidential
+ * 类的信息:
+ *		1.程序名称:
+ *		2.功能描述:oa  交易记录
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		王英杰		  	     2024-1-19       			1.00		       	新建
+ *******************************************************************************/
+module.exports = {
+    tradeService: {
+        // 前缀
+        prefix: 'oauth-server/trade/',
+    },
+
+    routeUrl: {
+        trade: {
+
+        }
+    }
+};

+ 2 - 1
app.js

@@ -87,10 +87,11 @@ const couponReceive = require('./api/pages/sharesign/couponReceive.js');
 const couponSend = require('./api/pages/sharesign/couponSend.js');
 const couponUse = require('./api/pages/sharesign/couponUse.js');
 const sign = require('./api/pages/sharesign/sign.js'); 
+const trade = require('./api/pages/oa/trade.js'); 
 
 // api服务路由文件
 var apiList = [common, oauth,setting, company, wechatPay,user, staff, staffRight, staffPurview, settingValue, customer, role, roleFun, org, roleSensitive, goodsBrand, goodsCategory, goodsSeries, unit, supplier, warehouse, saleChannel, goodsSku, basicData,customerMst,purchase,account,payment,
-  receiptPayment,inbound,inboundOther,inboundProcessing,inboundPurchaseReturn,outbound,outboundOther,outboundProcessing,outboundSaleReturn,inventory,moneyAccount,intoReturn,intoReturnItem,cusFollow,order,transfer,saleOutBound,inboundReturn,cusReceiptPayment,menuFrequency,userMenuFrequency,comMenu,saleOutBoundReturn,activity,check,freeze,otherReceivable,otherPayable,inventoryAdjustment,report,saleReport,printLayout,exportPage,inboundItem,accReceiptPayment,supReceiptPayment,followPlan,share,coupon,integral,integralShare,integralItem,integralTactic,sign,couponReceive,couponSend,couponUse]
+  receiptPayment,inbound,inboundOther,inboundProcessing,inboundPurchaseReturn,outbound,outboundOther,outboundProcessing,outboundSaleReturn,inventory,moneyAccount,intoReturn,intoReturnItem,cusFollow,order,transfer,saleOutBound,inboundReturn,cusReceiptPayment,menuFrequency,userMenuFrequency,comMenu,saleOutBoundReturn,activity,check,freeze,otherReceivable,otherPayable,inventoryAdjustment,report,saleReport,printLayout,exportPage,inboundItem,accReceiptPayment,supReceiptPayment,followPlan,share,coupon,integral,integralShare,integralItem,integralTactic,sign,couponReceive,couponSend,couponUse,trade]
 
 const util = require('./utils/util.js')
 const baseMethod = require('./api/pages/baseMethod.js')

+ 5 - 1
app.json

@@ -70,7 +70,11 @@
                 "pages/activity/detail/detail",
                 "pages/print-layout/print-layout",
                 "pages/beginner-guide/beginner-guide",
-                "pages/beginner-guide/demo-tutorial/demo-tutorial"
+                "pages/beginner-guide/demo-tutorial/demo-tutorial",
+                "pages/historical-purchase-history/historical-purchase-history",
+                "pages/draw-bill/draw-bill",
+                "pages/draw-bill/add/add",
+                "pages/invoice-header/invoice-header"
             ]
         },
         {

+ 14 - 1
i18n/zh-CN.js

@@ -68,6 +68,7 @@ const mac = {
   refundDetail: '退款详情',
 
   accDate: '账务日期',
+  orderDate: '订单日期',
   receiptDate: '收款日期',
   paymentDate: '付款日期',
   receiptInfo: '收款信息',
@@ -257,6 +258,7 @@ const home = {
   buyHistory:'已购记录',
   buyUpgrade:'升级更便宜',
   buyNow:'购买',
+  paidInAmount:'实付金额',
 }
 
 //  基础数据
@@ -431,7 +433,9 @@ const saleOrder = {
   saleOutBoundInfo: '取消自动库存办理,需要在“出库办理”功能进行手工出货办理。',
   goodsBox: '箱',
   goodsPiece: '片',
-  usePlace: '使用位置'
+  usePlace: '使用位置',
+  usingCloudCoins: '使用云币',
+  totalInvoicedAmount: '开票总额',
 }
 //资金管理
 const accountsManage = {
@@ -454,6 +458,7 @@ const accountsManage = {
   freeze: '冻结',
   freezeInfo: '冻结信息',
   rpType:'收付款类型',
+  useDiscountCoupons:'使用优惠卷',
 }
 // 客户
 const customer = {
@@ -696,6 +701,14 @@ const pur = {
   createTime: '创建日期',
   refundSave:  "退款并保存",
   paySave:  "收款并保存",
+  headUpType:'抬头类型',
+  buyerName:'购方名称',
+  BuyerTaxNumber:'购方税号',
+  invoiceType:'发票类型',
+  receivingEmail:'接收邮箱',
+  invoiceContent:'发票内容',
+  invoicingParty:'开票方',
+  totalInvoiceAmount:'发票总额',
 }
 const otherAccounts = {
   amountReceivable: "应收金额",

+ 16 - 0
mixins/index.js

@@ -500,6 +500,22 @@ module.exports = {
     })
   },
   /**
+   * @desc : 格式化日期
+   * @date : 2024/7/5 13:22
+   * @author : 王英杰
+   */
+  formatDateOnly(datetime) {  
+    // 创建Date对象  
+    var date = new Date(datetime);  
+    // 提取年、月、日  
+    var year = date.getFullYear();  
+    var month = (date.getMonth() + 1).toString().padStart(2, '0'); // 月份加1,并使用padStart确保为两位数  
+    var day = date.getDate().toString().padStart(2, '0'); // 使用padStart确保为两位数  
+      
+    // 拼接年月日  
+    return year + '-' + month + '-' + day;  
+  },
+  /**
    * @desc : 执行保存方法
    * @author : 周兴
    * @date : 2024/1/22

+ 1 - 1
package-accounts-manage/pages/fund-account/add/add.js

@@ -117,7 +117,7 @@ Page({
     let formData = JSON.parse(this.data.formData)
     params = formData
     params.balance = params.balance || 0
-    params.initBalance = params.balance
+    params.initBalance = params.initBalance
     params.makeStaff = app.globalData.user.staffId
     params.orgId = app.globalData.user.orgId
     params.staffId = app.globalData.user.staffId

+ 66 - 0
package-basic-data/invoice-header/invoice-header.js

@@ -0,0 +1,66 @@
+// package-basic-data/Invoice-header/Invoice-header.js
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad(options) {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload() {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh() {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom() {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage() {
+
+    }
+})

+ 3 - 0
package-basic-data/invoice-header/invoice-header.json

@@ -0,0 +1,3 @@
+{
+    "usingComponents": {}
+}

+ 2 - 0
package-basic-data/invoice-header/invoice-header.wxml

@@ -0,0 +1,2 @@
+<!--package-basic-data/Invoice-header/Invoice-header.wxml-->
+<text>package-basic-data/Invoice-header/Invoice-header.wxml</text>

+ 1 - 0
package-basic-data/invoice-header/invoice-header.wxss

@@ -0,0 +1 @@
+/* package-basic-data/Invoice-header/Invoice-header.wxss */

+ 112 - 0
package-basic-data/pages/draw-bill/add/add.js

@@ -0,0 +1,112 @@
+/*******************************************************************************
+ * Copyright(c) 2022 dongke All rights reserved. / Confidential
+ * 类的信息:
+ *		1.程序名称:
+ *		2.功能描述:开具发票
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		王英杰		  	2022-11-22			1.00		   	新建
+ *******************************************************************************/
+const mixins = require('@/mixins/index.js')
+const util = require('@/utils/util.js')
+const Constants = require('@/utils/Constants.js');
+
+const api = require('@/utils/api.js');
+const config = require('@/config/config.js');
+
+const app = getApp()
+
+Page({
+    mixins: [mixins],
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        cardList: ['main', 'other'],
+        contentObj: {
+            main: [{ //抬头类型
+                    code: 'headType',
+                    type: 'str',
+                    readonly: true,
+                    title: mixins.$t('headUpType')
+                },
+                { //购方名称
+                    code: 'buyerId',
+                    name: 'buyerName',
+                    title: mixins.$t("buyerName"),
+                    type: 'choose',
+                    urlKey: 'accountCategory',
+                    required: true,
+                },
+                { //购方税号
+                    code: 'BuyerTaxNumber',
+                    type: 'str',
+                    required: true,
+                    title: mixins.$t('BuyerTaxNumber')
+                },
+                { //发票类型
+                    code: 'invoiceTypeId',
+                    name: 'invoiceTypeName',
+                    title: mixins.$t("invoiceType"),
+                    type: 'choose',
+                    urlKey: 'accountCategory',
+                    required: true,
+                },
+                { //接收邮箱
+                    code: 'receivingEmail',
+                    type: 'str',
+                    required: true,
+                    title: mixins.$t('receivingEmail')
+                },
+                { //备注
+                    code: 'remarks',
+                    type: 'str',
+                    title: mixins.$t('remarks')
+                },
+            ],
+
+            other: [ //备注
+                {
+                    code: 'invoiceContent',
+                    type: 'textarea',
+                    title: mixins.$t('invoiceContent')
+                },
+                {
+                    code: 'invoicingParty',
+                    type: 'textarea',
+                    title: mixins.$t('invoicingParty')
+                },
+                {
+                    code: 'totalInvoiceAmount',
+                    type: 'textarea',
+                    title: mixins.$t('totalInvoiceAmount')
+                }
+            ],
+        },
+        buttonSaveList: [{
+            code: 'preview',
+            title: '预览', 
+            width: '120rpx',
+        }, {
+            code: 'submit',
+            title: '提交',
+            width: '120rpx',
+        }],
+        // 路由
+        routeObjName: 'moneyAccount',
+    },
+    /**
+     * @desc : 页面加载数据方法
+     * @date : 2024/2/1 15:49
+     * @author : 王英杰
+     */
+    loadInit() {
+        let formData = this.data.formData ? JSON.parse(this.data.formData) : {}
+        formData.headType = "企业单位"
+        this.setData({
+            formData: JSON.stringify(formData)
+        })
+    },
+
+})

+ 4 - 0
package-basic-data/pages/draw-bill/add/add.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "开具发票"
+}

+ 9 - 0
package-basic-data/pages/draw-bill/add/add.wxml

@@ -0,0 +1,9 @@
+<!-- 加载图层 -->
+<loading wx:if="{{loading}}"></loading>
+<!-- 列表区 -->
+<dk-form id="{{formName}}"  routeObjName="{{routeObjName}}"  cardList="{{cardList}}" contentObj="{{contentObj}}" model:value="{{formData}}" table="{{table}}"bind:chooseData="chooseData"  bindtap="handleTap"  >
+</dk-form>
+ 
+
+<!-- 新建按钮 -->
+<dk-save-button   btnAutoWidthFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}"   bind:open="saveButton"></dk-save-button>

+ 1 - 0
package-basic-data/pages/draw-bill/add/add.wxss

@@ -0,0 +1 @@
+/* package-basic-data/pages/draw-bill/add/add.wxss */

+ 166 - 0
package-basic-data/pages/draw-bill/draw-bill.js

@@ -0,0 +1,166 @@
+/*******************************************************************************
+ * Copyright(c) 2024 dongke All rights reserved. / Confidential
+ * 类的信息:
+ *		1.程序名称:
+ *		2.功能描述:oa  开发票
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		王英杰		  	     2024-1-19       			1.00		       	列表查询
+ *******************************************************************************/
+const Constants = require('@/utils/Constants.js');
+const util = require('@/utils/util.js')
+const mixins = require('@/mixins/index.js')
+Page({
+    mixins: [mixins],
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        pageFlag: false,
+        searchContent: [{
+                code: 'tradeTime',
+                title: mixins.$t("pastThirthtyDays"),
+                defaultValue: 5,
+                searchType: Constants.searchType.date
+            }, 
+
+        ],
+        // 列表区(内容)
+        contentList: [{
+                name: 'tradeTime',
+                title: mixins.$t('orderDate')
+            },
+            {
+                name: 'tradeAmount', // todo 颜色 先不用变
+                title: mixins.$t('paidInAmount'),
+            },
+            {
+                name: 'tradeAmount', //todo  目前表还没有这个字段
+                title: mixins.$t('usingCloudCoins')
+            },
+            {
+                name: 'tradeAmount', //todo  目前表还没有这个字段
+                title: mixins.$t('useDiscountCoupons')
+            },
+
+        ],
+        buttonSaveList: [{
+            code: 'drawBill',
+            title: '开发票',
+            width: '120rpx',
+        }, ],
+        contentSaveList: [{
+            code: 'flag',
+            title: mixins.$t("allChoose"),
+            type: 'checkbox'
+          }, 
+          {
+            code: 'totalInvoicedAmount',
+            content: 0,
+            type: 'number',
+            title: mixins.$t("totalInvoicedAmount")
+          }, 
+          ],
+        routeObjName: 'trade',
+    },
+    /**
+     * @desc : 设置查询参数
+     * @date : 2024年3月8日
+     * @author : 王英杰
+     */
+    setSearchParams(params) {
+        params.tradeStatus = '交易状态-生效'
+        params.receiptStatus =  '开票状态-未开票'
+        params.buyEndDate = params.createtimeEnd
+        return params;
+    },
+
+    /** 
+     * @desc : 查询 入库单
+     * @date : 2024年3月8日
+     * @author : 王英杰
+     */
+    getData(params) {
+        return this.excute(this.data.service, this.data.service.selectByCond, params);
+    },
+    /**
+     * @desc :   处理接口返回数据
+     * @date : 2024年3月8日
+     * @author : 王英杰
+     */
+    handleSearchData(tableData) {
+        let temp = tableData
+        temp.forEach(it => {
+            it.tradeTime = this.formatDateOnly(it.tradeTime)
+        })
+        this.setData({
+            tableData: temp,
+        })
+    },
+    /**
+     * @desc : 选择事件
+     * @date : 2024/2/1 15:49
+     * @author : 王英杰
+     */
+    listChoose(e) {
+        let temp = this.data.tableData
+        temp[e.detail.index].checked = e.detail.checked
+        let contentSaveList = this.data.contentSaveList
+        let totalInvoicedAmount_index = contentSaveList.findIndex(it=>it.code=="totalInvoicedAmount")
+        let amountNmber = Number(0)
+        temp.forEach(it => {
+            it.tradeTime = this.formatDateOnly(it.tradeTime)
+            if(it.checked){
+                amountNmber= amountNmber + Number(it.tradeAmount)
+            } 
+        })
+        contentSaveList[totalInvoicedAmount_index].content = amountNmber
+        this.setData({
+            tableData: temp,
+            contentSaveList:contentSaveList
+        })  
+    },
+    /**
+     * @desc : 底部按钮事件
+     * @date : 2024/2/1 15:49
+     * @author : 王英杰
+     */
+    saveButton(e) { 
+
+        wx.navigateTo({
+            url: '/package-basic-data/pages/draw-bill/add/add',
+            events: {
+                // 回调后,在这里给页面赋值
+                refresh: function (e) {}
+            },
+            success: function (res) {
+                // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
+                res.eventChannel.emit('params', {})
+            }
+        })
+    },
+    /**
+   * @desc : 底部 新建按钮旁 启用回调事件
+   * @date : 2024/2/1 15:49
+   * @author : 王英杰
+   */
+  cke_change(e) {
+     
+    let btnFormData = JSON.parse(this.data.btnFormData)
+    let temp = this.data.tableData
+    let contentSaveList = this.data.contentSaveList
+    let totalInvoicedAmount_index = contentSaveList.findIndex(it=>it.code=="totalInvoicedAmount")
+    let amountNmber = Number(0)
+    temp.forEach(element => {
+        element.checked = btnFormData.flag
+        if(element.checked){
+            amountNmber= amountNmber + Number(element.tradeAmount)
+        } 
+    });
+    contentSaveList[totalInvoicedAmount_index].content = amountNmber
+    this.setData({
+        tableData: temp,
+        contentSaveList:contentSaveList
+    })  
+  },
+})

+ 4 - 0
package-basic-data/pages/draw-bill/draw-bill.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "开发票"
+}

+ 14 - 0
package-basic-data/pages/draw-bill/draw-bill.wxml

@@ -0,0 +1,14 @@
+<van-sticky scroll-top="0"> 
+  <!-- 查询条件 -->
+  <dk-dropdown-menu id="searchMenu" model:value="{{searchForm}}" menuList="{{searchContent}}"  navBarHeight="{{navBarHeight}}" bind:search="searchData" flgSearchText="{{false}}">
+  </dk-dropdown-menu> 
+</van-sticky>
+
+<!-- 列表区 -->
+
+<dk-list id="dk-list" list="{{tableData}}" titleImageFlag="{{false}}" flgPoint="{{false}}"  chooseFlag="{{true}}"  title="tradeTypeName" status="receiptStatusName"  content="{{contentList}}"  bind:toDetail="toDetail" bind:toTitle="toTitle"   routeObjName="{{routeObjName}}"  bind:open="open" bind:choose="listChoose"></dk-list>
+
+<view style="height: 200rpx;" ></view>
+
+<!-- 新建按钮 -->
+<dk-save-button  model:value="{{btnFormData}}" btnAutoWidthFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}"  contentList="{{contentSaveList}}" bind:open="saveButton" bind:change="cke_change"></dk-save-button>

+ 1 - 0
package-basic-data/pages/draw-bill/draw-bill.wxss

@@ -0,0 +1 @@
+/* package-basic-data/pages/draw-bill/draw-bill.wxss */

+ 138 - 0
package-basic-data/pages/historical-purchase-history/historical-purchase-history.js

@@ -0,0 +1,138 @@
+/*******************************************************************************
+ * Copyright(c) 2024 dongke All rights reserved. / Confidential
+ * 类的信息:
+ *		1.程序名称:
+ *		2.功能描述:oa  交易记录
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		王英杰		  	     2024-1-19       			1.00		       	列表查询
+ *******************************************************************************/
+const Constants = require('@/utils/Constants.js');
+const util = require('@/utils/util.js')
+const mixins = require('@/mixins/index.js')
+Page({
+    mixins: [mixins],
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        pageFlag: false,
+        searchContent: [{
+                code: 'tradeTime',
+                title: mixins.$t("pastThirthtyDays"),
+                defaultValue: 5,
+                searchType: Constants.searchType.date
+            },
+            {
+                code: 'sort',
+                title: '开票状态',
+                searchType: Constants.searchType.radio,
+                value: 1,
+                options: [{
+                        "text": "未开票",
+                        "value": 1
+                    },
+                    {
+                        "text": "开票中",
+                        "value": 2
+                    },
+                    {
+                        "text": "已开票",
+                        "value": 3
+                    }
+                ],
+            },
+
+        ],
+        // 列表区(内容)
+        contentList: [{
+                name: 'tradeTime',
+                title: mixins.$t('orderDate')
+            },
+            {
+                name: 'tradeAmount', // todo 颜色 先不用变
+                title: mixins.$t('paidInAmount'),
+            },
+            {
+                name: 'tradeAmount', //todo  目前表还没有这个字段
+                title: mixins.$t('usingCloudCoins')
+            },
+            {
+                name: 'tradeAmount', //todo  目前表还没有这个字段
+                title: mixins.$t('useDiscountCoupons')
+            },
+
+        ],
+        buttonSaveList: [{
+            code: 'drawBill',
+            title: '开发票',
+            width: '120rpx',
+        }, {
+            code: 'commonInvoiceHeader',
+            title: '常用发票抬头',
+            width: '120rpx',
+        }],
+        routeObjName: 'trade',
+    },
+    /**
+     * @desc : 设置查询参数
+     * @date : 2024年3月8日
+     * @author : 王英杰
+     */
+    setSearchParams(params) {
+        params.tradeStatus = '交易状态-生效'
+        params.receiptStatus = params.sort ? (params.sort == 1 ? '开票状态-未开票' : (params.sort == 2) ? '开票状态-开票中' : '开票状态-已开票') : '开票状态-未开票'
+        params.buyEndDate = params.createtimeEnd
+        return params;
+    },
+
+    /** 
+     * @desc : 查询 入库单
+     * @date : 2024年3月8日
+     * @author : 王英杰
+     */
+    getData(params) {
+        return this.excute(this.data.service, this.data.service.selectByCond, params);
+    },
+    /**
+     * @desc :   处理接口返回数据
+     * @date : 2024年3月8日
+     * @author : 王英杰
+     */
+    handleSearchData(tableData) {
+        let temp = tableData
+        temp.forEach(it => {
+            it.tradeTime = this.formatDateOnly(it.tradeTime)
+        })
+        this.setData({
+            tableData: temp,
+        })
+    },
+    /**
+     * @desc : 底部按钮事件
+     * @date : 2024/2/1 15:49
+     * @author : 王英杰
+     */
+    saveButton(e) {
+        let name = e.detail.name
+        let url = ""
+        if (name == 'drawBill') { //开发票 
+            url= '/package-basic-data/pages/draw-bill/draw-bill'
+        } else if (name == 'commonInvoiceHeader') { //常用发票抬头 
+            url= '/package-basic-data/pages/invoice-header/invoice-header'
+        }
+        let _this = this
+        wx.navigateTo({
+            url: url,
+            events: {
+                // 回调后,在这里给页面赋值
+                refresh: function (e) { 
+                }
+            },
+            success: function (res) {
+                // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
+                res.eventChannel.emit('params', {})
+            }
+        })
+    },
+})

+ 4 - 0
package-basic-data/pages/historical-purchase-history/historical-purchase-history.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "历史购买记录"
+}

+ 14 - 0
package-basic-data/pages/historical-purchase-history/historical-purchase-history.wxml

@@ -0,0 +1,14 @@
+<van-sticky scroll-top="0"> 
+  <!-- 查询条件 -->
+  <dk-dropdown-menu id="searchMenu" model:value="{{searchForm}}" menuList="{{searchContent}}"  navBarHeight="{{navBarHeight}}" bind:search="searchData" flgSearchText="{{false}}">
+  </dk-dropdown-menu> 
+</van-sticky>
+
+<!-- 列表区 -->
+
+<dk-list id="dk-list" list="{{tableData}}" titleImageFlag="{{false}}" flgPoint="{{false}}"   title="tradeTypeName" status="receiptStatusName"  content="{{contentList}}"  bind:toDetail="toDetail" bind:toTitle="toTitle"   routeObjName="{{routeObjName}}"  bind:open="open" ></dk-list>
+
+<view style="height: 200rpx;" ></view>
+
+<!-- 新建按钮 -->
+<dk-save-button   btnAutoWidthFlag="{{true}}" btnRightFlag="{{true}}" buttonList="{{buttonSaveList}}"   bind:open="saveButton"></dk-save-button>

+ 1 - 0
package-basic-data/pages/historical-purchase-history/historical-purchase-history.wxss

@@ -0,0 +1 @@
+/* package-basic-data/pages/historical-purchase-history/historical-purchase-history.wxss */

+ 66 - 0
package-basic-data/pages/invoice-header/invoice-header.js

@@ -0,0 +1,66 @@
+// package-basic-data/pages/invoice-header/invoice-header.js
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad(options) {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload() {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh() {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom() {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage() {
+
+    }
+})

+ 4 - 0
package-basic-data/pages/invoice-header/invoice-header.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "常用发票抬头"
+}

+ 2 - 0
package-basic-data/pages/invoice-header/invoice-header.wxml

@@ -0,0 +1,2 @@
+<!--package-basic-data/pages/invoice-header/invoice-header.wxml-->
+<text>package-basic-data/pages/invoice-header/invoice-header.wxml</text>

+ 1 - 0
package-basic-data/pages/invoice-header/invoice-header.wxss

@@ -0,0 +1 @@
+/* package-basic-data/pages/invoice-header/invoice-header.wxss */

+ 21 - 0
pages/mine/mine.js

@@ -569,6 +569,27 @@ Page({
       }
     })
   },
+    /**
+   * @desc : 跳转 开具发票
+   * @date : 2022/5/12 13:49
+   * @author : 王英杰
+   */
+  toInvoicing() {
+    let _this = this
+    wx.navigateTo({   
+      url: '/package-basic-data/pages/historical-purchase-history/historical-purchase-history',
+      events: {
+        // 回调后,在这里给页面赋值
+        refresh: function (e) { 
+          
+        }
+      },
+      success: function (res) {
+        // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
+        res.eventChannel.emit('params', {})
+      }
+    })
+  },
   /**
    * @desc : 新手引导
    * @date : 2022/5/12 13:49

+ 8 - 0
pages/mine/mine.wxml

@@ -162,6 +162,14 @@
         <view style="color: coral;">{{integral}}</view>
       </view>
     </view>
+    
+     <!--历史购买记录-->
+     <view class="todo-view" style="display: flex;justify-content:space-between;align-items: center;margin-bottom: 4rpx;" catch:tap="toInvoicing">
+      <view class="todo-view-title">历史购买记录</view>
+      <view style="display: flex;justify-content:center;align-items: center;">
+        <view style="font-size: 11px;">开具发票</view> 
+      </view>
+    </view>
 
     <view class="todo-view" style="display: flex;justify-content:space-between;align-items: center;margin-bottom: 4rpx;" wx:if="{{gradeCode == 'STD'}}" catchtap="handleUpgrade">
       <view class="todo-view-title">标准版</view>