Jelajahi Sumber

其他出入库

姜永辉 1 tahun lalu
induk
melakukan
b38e42a939

+ 1 - 1
config/config.js

@@ -3,7 +3,7 @@ const profiles = 'dev';
 const configListObj = {
   // 北京东科企信软件有限公司 本地开发
   dev: {
-    server_add: 'http://192.168.0.55',     server_port: '7001',
+    server_add: 'http://192.168.0.84',     server_port: '7001',
     upload_url:'https://s.dev01.dkiboss.com:7000/api/mdm-server/file/upload',
     image_url:'https://s.dev01.dkiboss.com:7000/file',
     corpid: 'ww796c5d1684937b2f', //企业微信corpid

+ 13 - 7
package-basic-data/pages/activity/activity.js

@@ -179,7 +179,7 @@ Page({
             // vip报表
             if(this.data.chooseVipFlag && vipTable && vipTable.length > 0){
                 let vipItem = vipTable[0]
-                summaryInfo.amountInfo += + ' + ' +vipItem.wxPrice + '(元/VIP) ';
+                summaryInfo.amountInfo +=  ' + ' +vipItem.wxPrice + '(元/VIP) ';
                 amount +=  vipItem.wxPrice;
             }
             if (summaryInfo.amountInfo) {
@@ -419,10 +419,14 @@ Page({
                     let currentUserCount = res.data.data;
                     console.log('currentUserCount', currentUserCount);
                     this.setData({
-                        currentUserCount: currentUserCount
+                        currentUserCount: currentUserCount,
+                        //服务器的时间 
+                         currentDate : new Date(currentUserCount.currentDate)
                     })
                 }
             }
+            // 获取活动
+            this.getActivity()
             this.setData({
                 loadFlag:true
             })
@@ -436,7 +440,8 @@ Page({
     getActivity() {
         let params = {
             appCode: Constants.APP_CODE,
-
+            activityStatus:Constants.kindCode.activityStatus,
+            cpId : app.globalData.company.cpId,
             gradeCode: this.data.gradeCode
         }
         // 标准版
@@ -480,7 +485,8 @@ Page({
             })
             let summaryInfo = this.data.summaryInfo
             let months = item.validLong + item.extraLong
-            let endDate = new Date().addMonths(months).addDays(-1)
+            //服务器的时间  
+            let endDate = this.data.currentDate.addMonths(months).addDays(-1)
             let dayDiffs = null;
             if (summaryInfo.userEndDate) {
                 dayDiffs = new Date(summaryInfo.userEndDate).dayDiff(new Date(new Date().toDateStr()))
@@ -502,7 +508,7 @@ Page({
                     })
                 }
             }
-            summaryInfo.buyBeginDate = new Date().toDateStr();
+            summaryInfo.buyBeginDate = this.data.currentDate.toDateStr();
             console.log('summaryInfo', summaryInfo.userEndDate, endDate, months);
 
             this.setData({
@@ -516,7 +522,7 @@ Page({
      * 生命周期函数--监听页面加载
      */
     onLoad(options) {
-        console.log('options', options);
+        console.log('options', options,app.globalData);
         // 升级
         if (options && options.upgrade) {
             wx.setNavigationBarTitle({
@@ -553,7 +559,7 @@ Page({
             summaryInfo: summaryInfo
         })
         // 获取活动
-        this.getActivity();
+        // this.getActivity();
         // 获取当前用户授权数
         this.getStaffCount();
     },

+ 689 - 0
package-inventory/pages/other-inbound-std/other-inbound.js

@@ -0,0 +1,689 @@
+/*******************************************************************************
+ * Copyright(c) 2022 dongke All rights reserved. / Confidential
+ * 类的信息:
+ *		1.程序名称: 其他入库-标准版
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		姜永辉      2024-03-12   1.00		   	    
+ *******************************************************************************/
+const Constants = require('@/utils/Constants.js');
+const mixins = require('@/mixins/index.js')
+
+const app = getApp()
+Page({
+  mixins: [mixins],
+  /**
+   * 页面的初始数据 
+   */
+  data: {
+    // 待入库 已入库的taglist
+    tagList: [
+      { title: mixins.$t('warehousingProcessing') },
+      { title: mixins.$t('checkined') }],
+    // 查询条件
+    searchContent: [{
+      code: 'makeTime',
+      title: mixins.$t('pastThirthtyDays'),
+      defaultValue: 5,
+      searchType: Constants.searchType.date
+    }, {
+      code: 'choose',
+      title: mixins.$t('choose'),
+      searchType: Constants.searchType.pick
+    }],
+
+    // 查询条件-筛选
+    pullMenuList: (app.globalData.company.gradeCode == Constants.gradeCode.PRO) ? [
+       
+      {
+        code: 'cusName',
+      },
+      {
+        code: 'cusPhone',
+      },
+      {
+        code: 'addressFull',
+      },
+      {
+        code: 'supName',
+      },
+      {
+        code: 'whName',
+        title: mixins.$t('reservoirArea')
+      },
+      {
+        code: 'staffName',
+      },
+      {
+        code: 'orgName',
+      },
+      {
+        code: 'flgValid',
+        title: mixins.$t('flgValid'),
+        dataType: 'checkbox'
+      },
+    ] : [
+         
+        {
+          code: 'cusName',
+        },
+        {
+          code: 'cusPhone',
+        },
+        {
+          code: 'addressFull',
+        },
+        {
+          code: 'whName',
+          title: mixins.$t('reservoirArea')
+        },
+        {
+          code: 'staffName',
+        },
+        {
+          code: 'orgName',
+        },
+        {
+          code: 'flgValid',
+          title: mixins.$t('flgValid'),
+          dataType: 'checkbox'
+        },
+      ],
+
+    // 列表区(脚部金额)
+    footerAmount: {
+      name: 'intoingAmt',
+      title: mixins.$t('totalAmount')
+    },
+    // 列表区(脚部信息)
+    footerInfo: [{ prefix: mixins.$t('together'), name: 'intoQty', title: mixins.$t('piece') }],
+    // 列表区(内容)
+    contentList: [],
+    // 列表的显示字段
+    contentObj: {
+      [mixins.$t('purInBound')]: [{
+        name: 'intoNo',
+        title: mixins.$t('orderNo')
+      }, {
+        name: 'whName',
+        title: mixins.$t('eiWhName')
+      }, {
+        name: [{
+          name: 'orgName',
+          title: ''
+        }, {
+          name: 'staffName',
+          title: mixins.$t('staffId')
+        }],
+        title: mixins.$t('purInfo')
+      }, {
+        name: 'intoDate',
+        title: mixins.$t('intoDate')
+      }],
+      [mixins.$t('saleReturnInBound')]: [{
+        name: 'intoNo',
+        title: mixins.$t('orderNo')
+      }, {
+        name: 'cusPhone',
+        title: mixins.$t('cusPhone')
+      }, {
+        name: 'addressFull',
+        title: mixins.$t('addressFull')
+      }, {
+        name: [{
+          name: 'orgName',
+          title: ''
+        }, {
+          name: 'staffName',
+          title: mixins.$t('staffId')
+        }],
+        title: mixins.$t('storeInformation')
+      }, {
+        name: 'intoDate',
+        title: mixins.$t('intoDate')
+      }],
+      [mixins.$t('otherInWh')]: [{
+        name: 'intoNo',
+        title: mixins.$t('inOrderNo')
+      }, {
+        name: 'intoReasonName',
+        title: mixins.$t('intoReason')
+      }, {
+        name: [{
+          name: 'orgName',
+          title: ''
+        }, {
+          name: 'staffName',
+          title: mixins.$t('staffId')
+        }],
+        title: mixins.$t('cpManager')
+      }, {
+        name: 'intoDate',
+        title: mixins.$t('intoDate')
+      }],
+      [mixins.$t('firstInWh')]: [{
+        name: 'intoNo',
+        title: mixins.$t('inOrderNo')
+      },
+      {
+        name: [{
+          name: 'orgName',
+          title: ''
+        }, {
+          name: 'staffName',
+          title: mixins.$t('staffId')
+        }],
+        title: mixins.$t('cpManager')
+      }, {
+        name: 'intoDate',
+        title: mixins.$t('intoDate')
+      }],
+    },
+    // 弹出按钮
+    buttonList: [
+      {
+        name: 'editOrder',
+        title: mixins.$t('edit'),
+      },
+      {
+        name: 'invaidOrder',
+        title: mixins.$t('invaidOrder'),
+
+      }, {
+        name: 'ticketPirnt',
+        title: mixins.$t('ticketPirnt'),
+      }
+      ,
+    ],
+    // 底部保存按钮
+    buttonFootList: [{
+      name: 'addOther',
+      title: mixins.$t('otherInWh'),
+    }],
+    // 底部左侧合计金额及数量
+    contentnFootList: [
+      {
+        title: mixins.$t('totalAmount'),
+        code: 'intoingAmt',
+        content: 10,
+        type: 'number'
+      }, {
+        type: 'count',
+        code: 'count',
+        bill: 1,
+        quantity: 1
+      }
+    ],
+    // 底部的按钮数据
+    btnFormData: null,
+    // 路由
+    routeObjName: 'inboundProcessing',
+    inboundOtherService: app.globalData['inboundOtherService'],
+    outboundSaleReturnService: app.globalData['outboundSaleReturnService'],
+    // active
+    active: 0,
+    // 主键Id
+    primaryKey: 'intoId',
+    // 系统参数
+    flgHandleSetting: app.globalData.setting[Constants.settingCode.IVT001] == "true" ? true : false,
+  },
+
+  /**
+   * @desc : 切换 待入库 已出库
+   * @date : 2024年3月8日
+   * @author : 姜永辉
+   */
+  onChangeTabs(e) {
+    let index = e.detail.detail.index
+    this.setData({
+      active: index,
+    })
+
+    this.searchData()
+  },
+
+  /**
+   * @desc : addOther
+   * @date : 2024年3月8日
+   * @author : 姜永辉
+   */
+  addOther() {
+    let that = this
+
+    wx.navigateTo({
+      url: this.data.route.addOther.url,
+      events: {
+        // 回调后,在这里给页面赋值
+        refresh: function (e) {
+          that.searchData()
+        }
+      },
+      success: function (res) {
+        // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
+        res.eventChannel.emit('params', {})
+      }
+    })
+  },
+
+  /**
+   * @desc : 跳转明细
+   * @author : 周兴
+   * @date : 2024/1/22
+   */
+  toDetail(e) {
+    if (e) {
+      let item = e.detail.item;
+      if (e.detail.item) {
+        let button = {
+          formMode: Constants.formMode.edit
+        }
+        e.detail.item.button = button
+      }
+      // 如果name不传递,默认为edit
+      if (item.intoType == Constants.intoType.pur
+        || item.intoType == Constants.intoType.other
+        || item.intoType == Constants.intoType.first) {
+        e.detail.name = 'edit'
+      } else {
+        e.detail.name = 'editReturn'
+      }
+    }
+    this.open(e);
+  },
+
+  /**
+   * @desc : 设置查询参数
+   * @date : 2024年3月8日
+   * @author : 姜永辉
+   */
+  setSearchParams(params) {
+    if (this.data.active == 0  ) {
+      //待入库的查询参数
+      params.intoStatus = Constants.intoStatus.inBounding
+      params.outStatus = Constants.outStatus.outBounding
+    }
+    else {
+      //已入库的查询参数 
+      params.intoStatus = Constants.intoStatus.inBounded
+      params.outStatus = Constants.outStatus.outBounded
+    }
+    if (app.globalData.company.gradeCode == Constants.gradeCode.PRO) {
+      params.intoTypes = [Constants.intoType.other]
+    } else {
+      params.intoTypes = [Constants.intoType.other]
+    }
+    if (!params.flgValid){
+      params.flgValidList = [true]
+    }else{
+      params.flgValidList = [true,false]
+    }
+    
+    return params;
+  },
+  /** 
+   * @desc : 查询 入库单
+   * @date : 2024年3月8日
+   * @author : 姜永辉
+   */
+  getData(params) {
+    return this.excute(this.data.inboundOtherService, this.data.inboundOtherService.selectInbound, params);
+  },
+  /**
+   * @desc : 处理接口返回数据
+   * @date : 2024年3月8日
+   * @author : 姜永辉
+   */
+  handleSearchData(tableData) {
+    let temp = tableData
+    temp.forEach(it => {
+      // 入库对象  - 出库类型-销退回库
+      if (it.intoType == Constants.outType.purReturn) {
+        it.supplierName = it.cusName
+      }
+    })
+    let contentnFootList = this.data.contentnFootList
+    let footerAmount = this.data.footerAmount
+    let footerInfo = this.data.footerInfo
+    let intoingQty = Number(0)
+    let intoingAmt = Number(0)
+    if (this.data.active == 0  ) {
+      // 列表区(脚部金额)
+      footerAmount.name = 'intoingAmt'
+      // 列表区(脚部信息)
+      footerInfo[0].name = 'intoingQty'
+      temp.forEach(it => {
+        it.makeTime = it.makeTime.substring(0, 10)
+        intoingQty += Math.abs(Number(it.intoingQty))
+        intoingAmt += Math.abs(Number(it.intoingAmt))
+        // 入库对象
+        if (it.intoType == Constants.intoType.other) {
+          it.intoObject = it.cusName != null ? it.cusName : it.supplierName
+        }
+      })
+    } else {
+      // 列表区(脚部金额)
+      footerAmount.name = 'intoAmt'
+      // 列表区(脚部信息)
+      footerInfo[0].name = 'intoQty'
+      temp.forEach(it => {
+        it.makeTime = it.makeTime.substring(0, 10)
+        intoingQty += Math.abs(Number(it.intoQty))
+        intoingAmt += Math.abs(Number(it.intoAmt))
+        // 入库对象
+        if (it.intoType == Constants.intoType.other) {
+          it.intoObject = it.cusName != null ? it.cusName : it.supplierName
+        }
+      })
+    }
+
+    contentnFootList.forEach(it => {
+      if (it.type == 'count') {
+        it.bill = tableData.length
+        it.quantity = intoingQty
+      }
+      if (it.type == 'number') {
+        it.content = intoingAmt
+      }
+    })
+    this.setData({
+      tableData: temp,
+      footerInfo,
+      footerAmount,
+      contentnFootList,
+    })
+  },
+
+  /**
+  * @desc : 三个小点点击回调
+  * @date : 2024年3月8日
+  * @author : 姜永辉
+  */
+  toPoint(e) {
+    let item = e.detail.item
+    if (item.flgValid && item.intoType != Constants.intoType.first) {
+      // 待入库
+      if (this.data.active == 0  ) {
+        this.setData({
+          buttonList: [
+            {
+              name: 'editOrder',
+              title: mixins.$t('edit'),
+            },
+            {
+              name: 'invaidOrder',
+              title: mixins.$t('invaidOrder'),
+
+            }, {
+              name: 'ticketPirnt',
+              title: mixins.$t('ticketPirnt'),
+            }
+          ],
+        })
+      } else {
+        // 参数自动出入库:作废显示没有撤回
+        if (item.flgHandleSetting == true || item.flgHandleSetting == "true") {
+          this.setData({
+            buttonList: [
+              {
+                name: 'editOrder',
+                title: mixins.$t('edit'),
+              },
+              {
+                name: 'invaidOrder',
+                title: mixins.$t('invaidOrder'),
+
+              }, {
+                name: 'ticketPirnt',
+                title: mixins.$t('ticketPirnt'),
+              }
+            ],
+          })
+        } else {
+          // 参数手动出入库:撤回显示没有作废
+          this.setData({
+            buttonList: [
+              {
+                name: 'editOrder',
+                title: mixins.$t('edit'),
+              },
+              {
+                name: 'ticketPirnt',
+                title: mixins.$t('ticketPirnt'),
+              },
+              {
+                name: 'returnCancel',
+                title: mixins.$t('returnCancel'),
+              },
+              {
+                name: 'invaidOrder',
+                title: mixins.$t('invaidOrder'),
+
+              },
+            ],
+          })
+        }
+
+      }
+    } else {
+      this.setData({
+        // 弹出按钮
+        buttonList: [{
+          name: 'ticketPirnt',
+          title: mixins.$t('ticketPirnt') //打印票据
+        }],
+      })
+    }
+  },
+
+  /**
+    * @desc : (撤销)
+    * @date : 2024/2/1 15:49
+    * @author : 姜永辉
+    */
+  returnCancel(e) {
+    let item = e
+    let id = item.intoId
+    // 采购入库
+    if (item.intoType == Constants.intoType.pur) {
+      this.excute(this.data.service, this.data.service.inBoundCancel, { intoId: id }).then(res => {
+        if (res.data.code == Constants.SUCESS_CODE) {
+          // 重新查询
+          this.searchData()
+        }
+      })
+    }
+    // 其他入库
+    else if (item.intoType == Constants.intoType.other) {
+      this.excute(this.data.inboundOtherService, this.data.inboundOtherService.inBoundCancel, { intoId: id }).then(res => {
+        if (res.data.code == Constants.SUCESS_CODE) {
+          // 重新查询
+          this.searchData()
+        }
+      })
+      // 销售退货
+    } else {
+      this.excute(this.data.outboundSaleReturnService, this.data.outboundSaleReturnService.cancel, { outId: id }).then(res => {
+        if (res.data.code == Constants.SUCESS_CODE) {
+          // 重新查询
+          this.searchData()
+        }
+      })
+    }
+  },
+
+  /**
+  * @desc : (编辑)
+  * @date : 2024/2/1 15:49
+  * @author : 姜永辉
+  */
+  editOrder(e) {
+    let item = e
+    let id = item.intoId
+    // 采购入库
+    if (item.intoType == Constants.intoType.pur) {
+      wx.navigateTo({
+        url: this.data.route.add.url,
+        events: {
+          // 回调后,在这里给页面赋值
+          bandData: function (e) { }
+        },
+        success: function (res) {
+          res.eventChannel.emit('params', {
+            id: id,
+            item: item,
+            formMode: Constants.formMode.edit
+          })
+        }
+      })
+    }
+    // 其他入库
+    else if (item.intoType == Constants.intoType.other) {
+      wx.navigateTo({
+        url: this.data.route.addOther.url,
+        events: {
+          // 回调后,在这里给页面赋值
+          bandData: function (e) { }
+        },
+        success: function (res) {
+          res.eventChannel.emit('params', {
+            id: id,
+            item: item,
+            formMode: Constants.formMode.edit
+          })
+        }
+      })
+      // 销售退货
+    } else {
+      wx.navigateTo({
+        url: this.data.route.addReturn.url,
+        events: {
+          // 回调后,在这里给页面赋值
+          bandData: function (e) { }
+        },
+        success: function (res) {
+          res.eventChannel.emit('params', {
+            id: id,
+            item: item,
+            formType: Constants.formMode.detail,
+            formMode: Constants.formMode.detail,
+          })
+        }
+      })
+    }
+
+  },
+
+  /**
+    * @desc : 作废
+    * @date : 2024/2/1 15:49
+    * @author : 姜永辉
+    */
+  invaidOrder(e) {
+    let item = e
+    let id = item.intoId
+    // 采购入库
+    if (item.intoType == Constants.intoType.pur) {
+      this.excute(this.data.service, this.data.service.inboundRepeal + id, null).then(res => {
+        if (res.data.code == Constants.SUCESS_CODE) {
+          // 重新查询
+          this.searchData()
+        }
+      })
+    }
+    // 其他入库
+    else if (item.intoType == Constants.intoType.other) {
+      this.excute(this.data.inboundOtherService, this.data.inboundOtherService.inboundRepeal + id, null).then(res => {
+        if (res.data.code == Constants.SUCESS_CODE) {
+          // 重新查询
+          this.searchData()
+        }
+      })
+      // 销售退货
+    } else {
+      this.excute(this.data.outboundSaleReturnService, this.data.outboundSaleReturnService.outboundRepeal + id, null).then(res => {
+        if (res.data.code == Constants.SUCESS_CODE) {
+          // 重新查询
+          this.searchData()
+        }
+      })
+    }
+
+  },
+
+  /**
+   * @desc : 加载数据
+   * @date : 2024/2/1 15:49
+   * @author : 姜永辉
+   */
+  loadInit() {
+    let pullMenuList = []
+    if (app.globalData.company.gradeCode == Constants.gradeCode.PRO) {
+      //专业
+      pullMenuList = [
+        {
+          code: 'intoType',
+          pullType: 'mSelect',
+          typeName: 'intoType'
+        },
+        {
+          code: 'cusName',
+        },
+        {
+          code: 'cusPhone',
+        },
+        {
+          code: 'addressFull',
+        },
+        {
+          code: 'supName',
+        },
+        {
+          code: 'staffName',
+        },
+        {
+          code: 'orgName',
+        },
+        {
+          code: 'flgValid',
+          title: mixins.$t('flgValid'),
+          dataType: 'checkbox'
+        },
+      ]
+    } else {
+      pullMenuList = [
+        {
+          code: 'intoType',
+          pullType: 'mSelect',
+          typeName: 'intoTypeSt'
+        },
+        {
+          code: 'cusName',
+        },
+        {
+          code: 'cusPhone',
+        },
+        {
+          code: 'addressFull',
+        },
+        {
+          code: 'supName',
+        },
+        {
+          code: 'staffName',
+        },
+        {
+          code: 'orgName',
+        },
+        {
+          code: 'flgValid',
+          title: mixins.$t('flgValid'),
+          dataType: 'checkbox'
+        },
+      ]
+    }
+    this.setData({
+      pullMenuList,
+    })
+  },
+
+})

+ 6 - 0
package-inventory/pages/other-inbound-std/other-inbound.json

@@ -0,0 +1,6 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "其他入库",
+    "enablePullDownRefresh": true,
+    "navigationStyle": "custom"
+}

+ 23 - 0
package-inventory/pages/other-inbound-std/other-inbound.wxml

@@ -0,0 +1,23 @@
+<!-- 前台导入wxmlUtil.wxs -->
+<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
+<van-dialog id="van-dialog" />
+<loading wx:if="{{loading}}"></loading>
+<dk-navbar titleFontColor="#000000" navbarTitle="其他入库" bind:clickBack="handleNavBack" operateShow="{{ guideUrl ? true: false}}" operateUrl="{{guideUrl}}" bind:getNavbarHeight="getNavbarHeight"/>
+<van-sticky scroll-top="0">
+  <!-- 查询条件 -->
+  <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" navBarHeight="{{navBarHeight}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['orderNo','telephone','adddress'])}}">
+  </dk-dropdown-menu>
+
+  <dk-tabs  active="{{active}}" list="{{tagList}}" bind:onChange="onChangeTabs"> </dk-tabs>
+</van-sticky>
+
+<!-- 暂无数据 -->
+<van-empty wx:if="{{tableData.length<=0}}" description="{{$t['nodata']}}" />
+
+<!-- 列表区 -->
+<dk-list list="{{tableData}}" contentCol="intoTypeName"  title="supplierName"   status="intoTypeName" content="{{contentList}}" contentObj="{{contentObj}}" footerAmount="{{footerAmount}}" footerInfo="{{footerInfo}}" bind:toDetail="toDetail" routeObjName="{{routeObjName}}" buttonList="{{buttonList}}" bind:toPoint="toPoint"  bind:open="open"></dk-list>
+
+<van-divider wx:if="{{noMore}}" contentPosition="center" borderColor="#DCDCDC">{{$t['noMore']}}~</van-divider>
+<view style="height: 180rpx;"></view>
+<!-- 新建按钮 --> 
+<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{false}}" btnRightFlag="{{true}}" buttonList="{{buttonFootList}}" contentList="{{contentnFootList}}" bind:open="addOther"></dk-save-button>

+ 4 - 0
package-inventory/pages/other-inbound-std/other-inbound.wxss

@@ -0,0 +1,4 @@
+.van-tabs__scroll{
+    background-color: #F5F5F5 !important;
+  }
+  

+ 583 - 0
package-inventory/pages/other-outbound-std/other-outbound.js

@@ -0,0 +1,583 @@
+/*******************************************************************************
+ * Copyright(c) 2022 dongke All rights reserved. / Confidential
+ * 类的信息:
+ *		1.程序名称: 出库办理列表
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		jyh 		  2024-03-12	            1.00		   	    
+ *******************************************************************************/
+const Constants = require('@/utils/Constants.js');
+const mixins = require('@/mixins/index.js');
+const app = getApp()
+Page({
+    mixins: [mixins],
+    /**
+     * 页面的初始数据 
+     */
+    data: {
+        isfirst: true,
+        tagList: [{
+            title: mixins.$t('outboundProcessing')
+        },
+        {
+            title: mixins.$t('checkouted')
+        }
+        ],
+        // 查询条件
+        searchContent: [{
+            code: 'makeTime',
+            title: mixins.$t('pastThirthtyDays'),
+            defaultValue: 5,
+            searchType: Constants.searchType.date
+        }, {
+            code: 'choose',
+            title: mixins.$t('choose'),
+            searchType: Constants.searchType.pick
+        }],
+
+        // 查询条件-筛选 
+        pullMenuList: [
+            {
+                code: 'cusName',
+            },
+            {
+                code: 'cusPhone',
+            },
+            {
+                code: 'addressFull',
+            },
+
+            {
+                code: 'staffName',
+            },
+            {
+                code: 'orgName',
+            },
+            {
+                code: 'supName',
+            },
+            {
+                code: 'flgValid',
+                title: mixins.$t('flgValid'),
+                dataType: 'checkbox'
+            },
+        ],
+
+        // 列表区(脚部金额)
+        footerAmount: {
+            name: 'outingAmt',
+            title: mixins.$t('totalAmount')
+        },
+        // 列表区(脚部信息)
+        footerInfo: [{
+            prefix: mixins.$t('together'),
+            name: 'outQty',
+            title: mixins.$t('piece')
+        }],
+        // 列表区(内容)
+        contentList: [],
+        // 列表的显示字段
+        contentObj: {
+            [mixins.$t('saleOutBound')]: [{
+                name: 'outNo',
+                title: mixins.$t('outOrderNo')
+            }, {
+                name: 'cusPhone',
+                title: mixins.$t('cusPhone')
+            }, {
+                name: 'addressFull',
+                title: mixins.$t('addressFull')
+            }, {
+                name: [{
+                    name: 'orgName',
+                    title: ''
+                }, {
+                    name: 'staffName',
+                    title: mixins.$t('staffId')
+                }],
+                title: mixins.$t('storeInformation')
+            }, {
+                name: 'outDate',
+                title: mixins.$t('outDate')
+            }],
+            [mixins.$t('purchaseReturnOutBound')]: [{
+                name: 'outNo',
+                title: mixins.$t('outOrderNo')
+            }, {
+                name: 'addressFull',
+                title: mixins.$t('returnAddress')
+            }, {
+                name: [{
+                    name: 'orgName',
+                    title: ''
+                }, {
+                    name: 'staffName',
+                    title: mixins.$t('staffId')
+                }],
+                title: mixins.$t('returnInfo')
+            }, {
+                name: 'outDate',
+                title: mixins.$t('outDate')
+            }],
+            [mixins.$t('otherOutWh')]: [{
+                name: 'outNo',
+                title: mixins.$t('outOrderNo')
+            }, {
+                name: 'outReasonName',
+                title: mixins.$t('reasonOutbound')
+            }, {
+                name: [{
+                    name: 'orgName',
+                    title: ''
+                }, {
+                    name: 'staffName',
+                    title: mixins.$t('staffId')
+                }],
+                title: mixins.$t('cpManager')
+            }, {
+                name: 'outDate',
+                title: mixins.$t('outDate')
+            }],
+        },
+
+        // 弹出按钮
+        buttonList: [
+            {
+                name: 'editOrder',
+                title: mixins.$t('edit'),
+            },
+            {
+                name: 'invaidOrder',
+                title: mixins.$t('invaidOrder'),
+
+            },
+            {
+                name: 'ticketPirnt',
+                title: mixins.$t('ticketPirnt'),
+            }
+        ],
+
+        // 底部保存按钮
+        buttonFootList: [{
+            name: 'addOther',
+            title: mixins.$t('otherOutWh'),
+        }],
+        contentnFootList: [{
+            title: mixins.$t('totalAmount'),
+            code: 'intoingAmt',
+            content: 0,
+            type: 'number'
+        }, {
+            type: 'count',
+            code: 'count',
+            bill: 1,
+            quantity: 2
+        }],
+        btnFormData: null,
+
+        // 路由
+        routeObjName: 'outbound',
+        outboundOtherService: app.globalData['outboundOtherService'],
+        outboundProcessingService: app.globalData['outboundProcessingService'],
+        outboundSaleReturnService: app.globalData['outboundSaleReturnService'],
+        inboundReturnService: app.globalData['inboundReturnService'],
+        active: 0,
+        // 主键Id
+        primaryKey: 'outId',
+        // 系统参数
+        flgHandleSetting: app.globalData.setting[Constants.settingCode.IVT001] == "true" ? true : false,
+    },
+    /**
+     *  @desc :切换 已出库 未出库
+     *  @date : 2024年3月8日
+     *  @author : 姜永辉
+     */
+    onChangeTabs(e) {
+        let index = e.detail.detail.index
+        this.setData({
+            active: index,
+        })
+
+        this.searchData()
+    },
+    /**
+     * @desc : addOther
+     * @date : 2024年3月8日
+     * @author : 姜永辉
+     */
+    addOther() {
+        let that = this
+        wx.navigateTo({
+            url: this.data.route.addOther.url,
+            events: {
+                // 回调后,在这里给页面赋值
+                refresh: function (e) {
+                    that.searchData()
+                }
+            },
+            success: function (res) {
+                // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
+                res.eventChannel.emit('params', {})
+            }
+        })
+    },
+    /**
+     * @desc : 跳转明细
+     * @author : 周兴
+     * @date : 2024/1/22
+     */
+    toDetail(e) {
+        if (e) {
+            let item = e.detail.item;
+            if (e.detail.item) {
+                let button = {
+                    formMode: Constants.formMode.edit
+                }
+                e.detail.item.button = button
+            }
+            // 如果name不传递,默认为edit
+            if (item.outType == Constants.outType.sale || item.outType == Constants.outType.other) {
+                e.detail.name = 'edit'
+            } else {
+                e.detail.name = 'editReturn'
+            }
+        }
+        this.open(e);
+    },
+    /**
+     *  @desc : 设置查询参数
+    * @date : 2024年3月8日
+    * @author : 姜永辉
+    */
+    setSearchParams(params) {
+        if (this.data.active == 0) {
+            //待出库的查询参数
+            params.intoStatus = Constants.intoStatus.inBounding
+            params.outStatus = Constants.outStatus.outBounding
+        }
+        else {
+            //已出库的查询参数 
+            params.intoStatus = Constants.intoStatus.inBounded
+            params.outStatus = Constants.outStatus.outBounded
+        }
+        params.outTypes = [Constants.outType.other]
+        if (!params.flgValid) {
+            params.flgValidList = [true]
+        } else {
+            params.flgValidList = [true, false]
+        }
+        //采购订单明细 跳转到出库办理  
+        let isfirst = this.data.isfirst
+        let purNo = this.data.item ? this.data.item.purNo : null
+        if (isfirst && purNo) { //第一次进入 取传过来的  
+            let searchForm = this.data.searchForm ? JSON.parse(this.data.searchForm) : {}
+            searchForm.searchText = purNo || ''
+            this.setData({
+                searchForm: JSON.stringify(searchForm),
+                searchText: purNo || '',
+            })
+            params.searchForm = JSON.stringify(searchForm)
+            params.searchText = purNo
+        }
+        this.setData({
+            isfirst: false
+        })
+        return params;
+    },
+    /** 
+     * @desc : 查询 出库单
+     * @date : 2024年3月8日
+     * @author : 姜永辉
+     */
+    getData(params) {
+        return this.excute(this.data.outboundOtherService, this.data.outboundOtherService.selectOutbound, params);
+    },
+
+    /**
+     * @desc :   处理接口返回数据
+     * @date : 2024年3月8日
+     * @author : 姜永辉
+     */
+    handleSearchData(tableData) {
+        let temp = tableData
+        temp.forEach(it => {
+            // 入库对象  - 出库类型-销退回库
+            if (it.outType == Constants.intoType.saleReturn) {
+                it.cusName = it.supplierName
+            }
+        })
+        let contentnFootList = this.data.contentnFootList
+        let footerAmount = this.data.footerAmount
+        let footerInfo = this.data.footerInfo
+        let outingQty = Number(0)
+        let outingAmt = Number(0)
+        if (this.data.active == 0) {
+            // 列表区(脚部金额)
+            footerAmount.name = 'outingAmt'
+            // 列表区(脚部信息)
+            footerInfo[0].name = 'outingQty'
+            temp.forEach(it => {
+                it.makeTime = it.makeTime.substring(0, 10)
+                outingQty += Math.abs(Number(it.outingQty))
+                outingAmt += Math.abs(Number(it.outingAmt))
+                // 出库对象
+                if (it.outType == Constants.outType.other) {
+                    it.outObject = it.cusName != null ? it.cusName : it.supplierName
+                }
+            })
+        } else {
+            // 列表区(脚部金额)
+            footerAmount.name = 'outAmt'
+            // 列表区(脚部信息)
+            footerInfo[0].name = 'outQty'
+            temp.forEach(it => {
+                it.makeTime = it.makeTime.substring(0, 10)
+                outingQty += Math.abs(Number(it.outQty))
+                outingAmt += Math.abs(Number(it.outAmt))
+                // 出库对象
+                if (it.outType == Constants.outType.other) {
+                    it.outObject = it.cusName != null ? it.cusName : it.supplierName
+                }
+            })
+        }
+
+        contentnFootList.forEach(it => {
+            if (it.type == 'count') {
+                it.bill = tableData.length
+                it.quantity = outingQty
+            }
+            if (it.type == 'number') {
+                it.content = outingAmt
+            }
+        })
+        this.setData({
+            tableData: temp,
+            footerInfo,
+            footerAmount,
+            contentnFootList,
+        })
+
+    },
+
+    /**
+  * @desc : 三个小点点击回调
+  * @date : 2024年3月8日
+  * @author : 姜永辉
+  */
+    toPoint(e) {
+        let item = e.detail.item
+        if (item.flgValid) {
+            // 待入库
+            if (this.data.active == 0) {
+                this.setData({
+                    buttonList: [
+                        {
+                            name: 'editOrder',
+                            title: mixins.$t('edit'),
+                        },
+                        {
+                            name: 'invaidOrder',
+                            title: mixins.$t('invaidOrder'),
+
+                        }, {
+                            name: 'ticketPirnt',
+                            title: mixins.$t('ticketPirnt'),
+                        }
+                    ],
+                })
+            } else {
+                // 参数自动出入库:作废显示没有撤回
+                if (item.flgHandleSetting == true || item.flgHandleSetting == "true") {
+                    this.setData({
+                        buttonList: [
+                            {
+                                name: 'editOrder',
+                                title: mixins.$t('edit'),
+                            },
+                            {
+                                name: 'invaidOrder',
+                                title: mixins.$t('invaidOrder'),
+
+                            }, {
+                                name: 'ticketPirnt',
+                                title: mixins.$t('ticketPirnt'),
+                            }
+                        ],
+                    })
+                } else {
+                    // 参数手动出入库:撤回显示没有作废
+                    this.setData({
+                        buttonList: [
+                            {
+                                name: 'editOrder',
+                                title: mixins.$t('edit'),
+                            },
+                            {
+                                name: 'ticketPirnt',
+                                title: mixins.$t('ticketPirnt'),
+                            },
+                            {
+                                name: 'returnCancel',
+                                title: mixins.$t('returnCancel'),
+                            },
+                            {
+                                name: 'invaidOrder',
+                                title: mixins.$t('invaidOrder'),
+
+                            },
+                        ],
+                    })
+                }
+
+            }
+        } else {
+            this.setData({
+                // 弹出按钮
+                buttonList: [{
+                    name: 'ticketPirnt',
+                    title: mixins.$t('ticketPirnt') //打印票据
+                }],
+            })
+        }
+    },
+
+    /**
+     * @desc : (撤销)
+     * @date : 2024/2/1 15:49
+     * @author : 姜永辉
+     */
+    returnCancel(e) {
+        let item = e
+        let id = item.outId
+        // 销售出库
+        if (item.outType == Constants.outType.sale) {
+            this.excute(this.data.outboundProcessingService, this.data.outboundProcessingService.outBoundCancel, item).then(res => {
+                if (res.data.code == Constants.SUCESS_CODE) {
+                    // 重新查询
+                    this.searchData()
+                }
+            })
+        }
+        // 其他出库
+        else if (item.outType == Constants.outType.other) {
+            this.excute(this.data.outboundOtherService, this.data.outboundOtherService.outBoundCancel, item).then(res => {
+                if (res.data.code == Constants.SUCESS_CODE) {
+                    // 重新查询
+                    this.searchData()
+                }
+            })
+            // 采购退货
+        } else {
+            this.excute(this.data.inboundReturnService, this.data.inboundReturnService.inboundReturnCancel, {
+                intoId: id
+            }).then(res => {
+                if (res.data.code == Constants.SUCESS_CODE) {
+                    // 重新查询
+                    this.searchData()
+                }
+            })
+        }
+    },
+
+
+    /**
+     * @desc : (编辑)
+     * @date : 2024/2/1 15:49
+     * @author : 姜永辉
+     */
+    editOrder(e) {
+        let item = e
+        let id = item.outId
+        // 销售出库
+        if (item.outType == Constants.outType.sale) {
+            wx.navigateTo({
+                url: this.data.route.add.url,
+                events: {
+                    // 回调后,在这里给页面赋值
+                    bandData: function (e) { }
+                },
+                success: function (res) {
+                    res.eventChannel.emit('params', {
+                        id: id,
+                        item: item,
+                        formMode: Constants.formMode.edit
+                    })
+                }
+            })
+        }
+        // 其他出库
+        else if (item.outType == Constants.outType.other) {
+            wx.navigateTo({
+                url: this.data.route.addOther.url,
+                events: {
+                    // 回调后,在这里给页面赋值
+                    bandData: function (e) { }
+                },
+                success: function (res) {
+                    res.eventChannel.emit('params', {
+                        id: id,
+                        item: item,
+                        formMode: Constants.formMode.edit
+                    })
+                }
+            })
+            // 销售退货
+        } else {
+            wx.navigateTo({
+                url: this.data.route.addReturn.url,
+                events: {
+                    // 回调后,在这里给页面赋值
+                    bandData: function (e) { }
+                },
+                success: function (res) {
+                    res.eventChannel.emit('params', {
+                        id: id,
+                        item: item,
+                        formMode: Constants.formMode.edit
+                    })
+                }
+            })
+        }
+
+    },
+
+    /**
+     * @desc : 作废
+     * @date : 2024/2/1 15:49
+     * @author : 姜永辉
+     */
+    invaidOrder(e) {
+        let item = e
+        let id = item.outId
+        // 销售出库
+        if (item.outType == Constants.outType.sale) {
+            this.excute(this.data.outboundProcessingService, this.data.outboundProcessingService.outboundRepeal + id, null).then(res => {
+                if (res.data.code == Constants.SUCESS_CODE) {
+                    // 重新查询
+                    this.searchData()
+                }
+            })
+        }
+        // 其他出库
+        else if (item.outType == Constants.outType.other) {
+            this.excute(this.data.outboundOtherService, this.data.outboundOtherService.outboundRepeal + id, null).then(res => {
+                if (res.data.code == Constants.SUCESS_CODE) {
+                    // 重新查询
+                    this.searchData()
+                }
+            })
+            // 采购退货
+        } else {
+            this.excute(this.data.inboundReturnService, this.data.inboundReturnService.cancel, {
+                intoId: id
+            }).then(res => {
+                if (res.data.code == Constants.SUCESS_CODE) {
+                    // 重新查询
+                    this.searchData()
+                }
+            })
+        }
+
+    },
+
+})

+ 5 - 0
package-inventory/pages/other-outbound-std/other-outbound.json

@@ -0,0 +1,5 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "其他出库",
+    "enablePullDownRefresh": true
+  }

+ 22 - 0
package-inventory/pages/other-outbound-std/other-outbound.wxml

@@ -0,0 +1,22 @@
+<!-- 前台导入wxmlUtil.wxs -->
+<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
+<van-dialog id="van-dialog" />
+<loading wx:if="{{loading}}"></loading>
+<van-sticky scroll-top="0">
+  <!-- 查询条件 -->
+  <dk-dropdown-menu model:value="{{searchForm}}" menuList="{{searchContent}}" pullMenuList="{{pullMenuList}}" bind:search="searchData" searchTextPlaceholder="{{wxmlUtil.setSearchPlaceholder($t,['orderNo','customerName','telephone','adddress'])}}">
+  </dk-dropdown-menu>
+
+  <dk-tabs  active="{{active}}" list="{{tagList}}" bind:onChange="onChangeTabs"> </dk-tabs>
+</van-sticky>
+
+<!-- 暂无数据 -->
+<van-empty wx:if="{{dataList.length<=0}}" description="{{$t['nodata']}}" />
+
+<!-- 列表区 -->
+<dk-list list="{{tableData}}" contentCol="outTypeName" title="cusName" status="outTypeName" content="{{contentList}}" contentObj="{{contentObj}}" footerAmount="{{footerAmount}}" footerInfo="{{footerInfo}}" bind:toDetail="toDetail" bind:toPoint="toPoint" routeObjName="{{routeObjName}}" buttonList="{{buttonList}}" bind:open="open"></dk-list>
+
+<van-divider wx:if="{{noMore}}" contentPosition="center" borderColor="#DCDCDC">{{$t['noMore']}}~</van-divider>
+<view style="height: 180rpx;"></view>
+<!-- 新建按钮 -->
+<dk-save-button model:value="{{btnFormData}}" btnAutoWidthFlag="{{false}}" btnRightFlag="{{true}}" buttonList="{{buttonFootList}}" contentList="{{contentnFootList}}" bind:open="addOther"></dk-save-button>

+ 0 - 0
package-inventory/pages/other-outbound-std/other-outbound.wxss


+ 1 - 0
utils/Constants.js

@@ -496,6 +496,7 @@ module.exports = {
     activityAd: '活动分类-广告',
     activityMenu: '活动分类-功能',
     activityVip: '活动分类-VIP',
+    activityStatus: '活动状态-发布',
   },
 
   // 收款进度