wangyingjie %!s(int64=2) %!d(string=hai) anos
pai
achega
6384fc3dc2

+ 2 - 1
app.js

@@ -56,10 +56,11 @@ const intoReturnItem = require('./api/pages/ivt/intoReturnItem.js');
 const cusFollow = require('./api/pages/mst/cusFollow.js');
 const transfer = require('./api/pages/mac/transfer.js');
 const order = require('./api/pages/sale/order.js');
+const income = require('./api/pages/mac/income.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,
-  receiptPayment,inbound,inboundOther,inboundProcessing,inboundPurchaseReturn,outbound,outboundOther,outboundProcessing,outboundSaleReturn,inventory,moneyAccount,intoReturn,intoReturnItem,cusFollow,order,transfer]
+  receiptPayment,inbound,inboundOther,inboundProcessing,inboundPurchaseReturn,outbound,outboundOther,outboundProcessing,outboundSaleReturn,inventory,moneyAccount,intoReturn,intoReturnItem,cusFollow,order,transfer,income]
 
 const util = require('./utils/util.js')
 const baseMethod = require('./api/pages/baseMethod.js')

+ 168 - 154
package-accounts-manage/pages/other-receipt/other-receipt.js

@@ -1,5 +1,12 @@
+/*******************************************************************************
+ * Copyright(c) 2022 dongke All rights reserved. / Confidential
+ * 类的信息:
+ *		1.程序名称:  其他收款单
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		姜永辉      2024-03-22    1.00		   	    
+ *******************************************************************************/
 const Constants = require('@/utils/Constants.js');
-const util = require('@/utils/util.js')
 const mixins = require('@/mixins/index.js')
 Page({
   mixins: [mixins],
@@ -8,171 +15,178 @@ Page({
    */
   data: {
     // 查询条件
-    searchContent: [{ code: 'createtime', title: '本月', defaultValue: 3, searchType: Constants.searchType.date },
-    { code: 'staff', title: '业务员', dropType: 'staff' },
-    { code: 'org', title: '业务部门', dropType: 'org' }, { code: 'choose', title: '筛选', searchType: Constants.searchType.pick }],
+    searchContent: [
+      { code: 'createtime', title: mixins.$t('pastThirthtyDays'),
+       defaultValue: 5, searchType: Constants.searchType.date },
+      { code: 'staff', title: mixins.$t('staffId'), dropType: 'staff' },
+      { code: 'org', title: mixins.$t('orgId'), dropType: 'org' },
+      { code: 'choose', title: mixins.$t('choose'), searchType: Constants.searchType.pick }],
     // 查询条件-筛选
-    pullMenuList: [{ code: 'purchaseStatus', pullType: 'mSelect', typeName: 'purchaseStatus' },
-    { code: 'contactName', dataType: '' },
-    { code: 'deliveryPhone', dataType: '' },
-    { code: 'addressFull', dataType: '' },
-    { code: 'makingTime', dataType: 'date' }, { code: 'deliveryTime', dataType: 'date' }],
+    pullMenuList: [       
+      {
+        code: 'rpNo', 
+      },
+      {
+        code: 'cusName',
+      },
+      {
+        code: 'cusPhone',
+      },
+      {
+        code: 'accDate',
+        title: 'accDate',
+        dataType: 'date'
+      },
+
+      {
+        code: 'staffName',
+      },
+      {
+        code: 'orgName',
+      },
+    ],
     // 列表区(内容)
-    contentList: [{ name: 'orderNo', title: '收款单号' },
-    { name: [{ name: 'orgName', title: '' },{ name: 'staffName', title: '' }, ], title: '门店/业务员' },
-    { name: 'makingTime', title: '收款日期' }, {name: [{ name: 'number1', title: '' }, { name: 'number2', title: '' }], title: '占用/使用金额' }],
+    contentList: [
+      { name: 'rpNo', title: mixins.$t('receiptOrderNo') },
+      {
+        name: [{ name: 'orgName', title: '' },
+        { name: 'staffName', title: '' },],
+        title: mixins.$t('receiptInfo')
+      },
+      { name: 'sumAmtReceivableHandle', title: mixins.$t('sumAmtReceivableHandle') },
+    ],
     // 弹出按钮
-    buttonList: [{ name: 'follow', title: '采购作废' }, { name: 'followTask', title: '冲正重开' }, { name: 'purchase-return-repla-sup', title: '采购退货' },
-    { name: 'collection', title: '采购退货冲正' }, { name: 'merge', title: '打印票据' }],
-    totallength: 234999, //视图下方提醒数量
-    selectTotallength: 12,
+    buttonList: [
+      {
+        name: 'customerRefundList',
+        title: '客户退款',
+      },
+      {
+        name: 'customerRefundList',
+        title: '取消收款',
+      }, {
+        name: 'customerRefundList',
+        title: mixins.$t('ticketPirnt'),
+      }
+    ],
     selectlength: 5,
-    // 路由
-    routeObjName: 'other-receipt',
-    tableData: [],
-    active: 0,
-  },
-  getData() {
-    this.setData({
-      totallength: 6000,
-      tableData: [
-        {
-          supplierName: '张先生',
-          displayStatus: '其他收款',
-          makingTime: '2022-04-04',
-          orderNo: 'FQ202207061423001',
-          backgroundColor: '#95A8CB',
-          staffName:'王丽丽',
-          orgName:'佛山居然店',
-          number2:'900.00',
-          number1:'100.00',
-          sumAccount: 2000,
-          collectStatus:'availableBalance',
-          collectStatusAmount:1000,
-        },
-        {
-          supplierName: '张先生',
-          displayStatus: '其他收款',
-          makingTime: '2022-04-04',
-          orderNo: 'FQ202207061423001',
-          backgroundColor: '#95A8CB',
-          staffName:'王丽丽',
-          orgName:'佛山居然店',
-          number2:'900',
-          number1:'100',
-          sumAccount: 2000,
-          collectStatus:'availableBalance',
-          collectStatusAmount:1000,
-        },
-        {
-          supplierName: '张先生',
-          displayStatus: '其他收款',
-          makingTime: '2022-04-04',
-          orderNo: 'FQ202207061423001',
-          backgroundColor: '#95A8CB',
-          staffName:'王丽丽',
-          orgName:'佛山居然店',
-          number2:'900.00',
-          number1:'100.00',
-          sumAccount: 2000,
-          collectStatus:'availableBalance',
-          collectStatusAmount:1000,
-        }
-      ]
-    })
-  },
-  //抽屉打开
-  openSearchPop() {
-    this.setData({
-      show: true,
-    })
-  },
-  onclik(e) {
-    this.setData({
-      showShare: true,
-    })
-  },
-
-  onCloseShare(){
-    this.setData({
-      showShare: false,
-    })
-  },
-    /**
-   * @desc : 抽屉离焦关闭
-   * @author : 于继渤
-   * @date : 2022/5/27 12:16
-   */
-  onClose() {
-    this.setData({
-      show: false
-    })
-    this.selectComponent("#pick").toggle(false) //取消选中样式
-  },
-
-  toAdd(){
-    wx.navigateTo({
-      url: './add/add',
-    })
-  },
-  toDetail(){
-    wx.navigateTo({
-      url: './detail/detail',
-    })
-  },
-  /**
-   * 生命周期函数--监听页面加载
-   */
-  onLoad(options) {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面初次渲染完成
-   */
-  onReady() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面显示
-   */
-  onShow() {
-
-  },
-
-  /**
-   * 生命周期函数--监听页面隐藏
-   */
-  onHide() {
 
+    // 底部保存按钮
+    buttonFootList: [{
+      name: 'add',
+      title: mixins.$t('add'),
+    }],
+    contentnFootList: [
+      {
+        title:  mixins.$t('totalAmount'),
+        code: 'totalAmount',
+        content: 0,
+        type: 'number'
+      }, {
+        type: 'count',
+        code: 'count',
+        bill: 1,
+        quantity: 2
+      }
+    ], 
+    btnFormData: null,
+    // 路由
+    routeObjName: 'receiptPayment',
+    // 主键Id
+    primaryKey: 'rpId',
+    tableData: [
+      {
+        "accDate": "2024-03-21",
+        "addressFull": "北京北京市西城区新街口街道第四微型消防站222",
+        "annexPaths": null,
+        "biznisId": null,
+        "biznisNo": null,
+        "biznisType": null,
+        "collectStatus": " ",
+        "contractAssets": null,
+        "cpId": 1,
+        "currentPage": null,
+        "cusCode": "A01903FX",
+        "cusName": "13898887602客户",
+        "cusPhone": "13898887602",
+        "end": null,
+        "flgLock": false,
+        "flgValid": true,
+        "makeStaff": "10112024-0315-0000-0000-000012079511",
+        "makeStaffName": "付斌",
+        "makeTime": "2024-03-21",
+        "objectId": "10112024-0314-0000-0000-0000116d4880",
+        "opDbUser": null,
+        "orgId": "10112024-0221-0000-0000-000000011b47",
+        "orgName": "东科",
+        "pageSize": null,
+        "receipt": null,
+        "receiptLock": null,
+        "receiptResidue": null,
+        "receivable": null,
+        "receivableHandle": null,
+        "receivableResidue": null,
+        "receivableWaive": null,
+        "remarks": null,
+        "rpId": "10112024-0321-0000-0000-00001875c52b",
+        "rpNo": "AA24032104TXC52B",
+        "rpType": "收付款类型-收款",
+        "rpTypeName": "收款",
+        "staffId": "10112024-0315-0000-0000-000012079511",
+        "staffName": "付斌",
+        "start": null,
+        "sumAmtPay": 0,
+        "sumAmtPayableHandle": 0,
+        "sumAmtRec": 104,
+        "sumAmtReceivableHandle": 0,
+        "sumWaiveAmt": 0
+      }
+    ],
   },
 
   /**
-   * 生命周期函数--监听页面卸载
-   */
-  onUnload() {
-
+  * @desc : 设置查询参数
+  * @date : 2024年3月8日
+  * @author : 姜永辉
+  */
+  setSearchParams(params) {
+    //收付款类型-收款的查询参数
+    params.rpType = Constants.rpType.receipt
+    return params;
   },
 
-  /**
-   * 页面相关事件处理函数--监听用户下拉动作
+  /** 
+   * @desc : 查询 入库单
+   * @date : 2024年3月8日
+   * @author : 姜永辉
    */
-  onPullDownRefresh() {
-
+  getData(params) {
+    return this.excute(this.data.service, this.data.service.selectByCond, params);    
   },
-
   /**
-   * 页面上拉触底事件的处理函数
-   */
-  onReachBottom() {
-
+     * @desc :   处理接口返回数据
+     * @date : 2024年3月8日
+     * @author : 姜永辉
+     */
+  handleSearchData(tableData) {
+    let temp = tableData
+    console.log("tableData", tableData);
+    temp.forEach(it => {
+      it.makeTime = it.makeTime.substring(0, 10)
+      // 不加这个字段不显示收款字样
+      it.collectStatus = ' '      
+    })
+    let sumAmount = 0 //总的 合计金额
+    let sumNumber = 0 // 单数
+    let sumQty = 0 //总的 合集数量
+    sumAmount = tableData.sum('sumAmtRec')
+    sumNumber = tableData.length
+    sumQty = tableData.sum('sumAmtReceivableHandle')
+    this.setData({
+      tableData: temp,
+      sumAmount,
+      sumNumber,
+      sumQty
+    })
   },
-
-  /**
-   * 用户点击右上角分享
-   */
-  onShareAppMessage() {
-
-  }
 })

+ 8 - 14
package-accounts-manage/pages/other-receipt/other-receipt.wxml

@@ -1,24 +1,18 @@
 <!-- 前台导入wxmlUtil.wxs -->
 <wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
-<loading wx:if="{{loading}}" loadingName="加载中" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
+<loading wx:if="{{loading}}"></loading>
 <van-sticky scroll-top="0">
   <!-- 查询条件 -->
-  <dk-dropdown-menu model:searchForm="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['customerName','telephone'])}}">
+  <dk-dropdown-menu model:searchForm="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['cusName','orderNo'])}}">
   </dk-dropdown-menu>
-</van-sticky>
+</van-sticky> 
 <!-- 暂无数据 -->
-<van-empty wx:if="{{tableData.length<=0}}" description="暂无数据" />
+<van-empty wx:if="{{tableData.length<=0}}" description="{{$t['nodata']}}" />
 <!-- 列表区 -->
-<dk-list list="{{tableData}}" titleCorner="" title="supplierName" status="displayStatus" content="{{contentList}}" collectCol="sumAccount" collectName="收款" contentObj="{{contentObj}}" contentCol="" footerAmount="{{footerAmount}}" footerInfo="{{footerInfo}}" bind:toDetail="toDetail" bind:toTitle="toTitle" bind:toStatus="toStatus" bind:toPoint="toPoint" routeObjName="{{routeObjName}}" buttonList="{{buttonList}}" bind:open="open"></dk-list>
+<dk-list list="{{tableData}}" title="cusName" subTitle="makeTime"   content="{{contentList}}" collectCol="sumAmtRec" collectName="收款" contentObj="{{contentObj}}" contentCol="" footerAmount="{{footerAmount}}" footerInfo="{{footerInfo}}" bind:toDetail="toDetail" bind:toTitle="toTitle"  routeObjName="{{routeObjName}}" buttonList="{{buttonList}}" bind:open="open"></dk-list>
 
-<van-divider wx:if="{{noMore}}" contentPosition="center" borderColor="#DCDCDC">到底了~</van-divider>
+<van-divider wx:if="{{noMore}}" contentPosition="center" borderColor="#DCDCDC">{{$t['noMore']}}~</van-divider>
 
 <view style="height: 200rpx;"></view>
-
-
-
-
-
-<!-- 新建按钮 -->
-<dk-save-bottom purchasePriceFlag="{{false}}" flagTypeName="order-add" selectTotallength="{{selectTotallength}}" selectlength="{{selectlength}}" totallength="{{totallength}}" bind:submit="toAdd" submitFlag="{{true}}" />
-
+<!-- 新建按钮 --> 
+<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{false}}" btnRightFlag="{{true}}" buttonList="{{buttonFootList}}" contentList="{{contentnFootList}}" bind:open="open"></dk-save-button>