Bladeren bron

Merge branch 'master' of http://git.dongkesoft.com:9001/iBOSS-2.0-Mini/iboss_wx_app

# Conflicts:
#	package-inventory/pages/inventory-check/add/add.js
wangyingjie 2 jaren geleden
bovenliggende
commit
249d10c22b
48 gewijzigde bestanden met toevoegingen van 354 en 525 verwijderingen
  1. 28 0
      api/pages/ivt/freeze.js
  2. 2 1
      app.js
  3. 9 0
      components/dkbase/dk-drag/index.js
  4. 4 0
      components/dkbase/dk-drag/item/index.js
  5. 1 1
      components/dkbase/dk-drag/item/index.wxml
  6. 2 10
      components/dkbase/dk-form-bill/dk-form-bill.js
  7. 2 10
      components/dkbase/dk-form-more-items/dk-form-more-items.js
  8. 6 24
      components/dkbase/dk-multi-owner/dk-multi-owner.js
  9. 2 2
      config/config.js
  10. 5 5
      mixins/index.js
  11. 2 5
      package-accounts-manage/pages/other-receipt/add/add.js
  12. 2 4
      package-accounts-manage/pages/payment-order/add/add.js
  13. 2 4
      package-accounts-manage/pages/receipt/add-return/add-return.js
  14. 2 4
      package-accounts-manage/pages/receipt/add/add.js
  15. 2 8
      package-base-select/pages/select-collection_confirm/select-collection_confirm.js
  16. 30 16
      package-base-select/pages/select-source-sale-order/select-source-sale-order.js
  17. 1 1
      package-basic-data/pages/customer-follow-up/detail/detail.js
  18. 1 1
      package-basic-data/pages/product-attribute/product-attribute.js
  19. 1 4
      package-basic-data/pages/register/company-register/company-register.js
  20. 4 9
      package-inventory/pages/choose-product/choose-product.js
  21. 3 12
      package-inventory/pages/inventory-adjustment/add/add.js
  22. 47 71
      package-inventory/pages/inventory-check/add/add.js
  23. 24 1
      package-inventory/pages/inventory-check/inventory-check.js
  24. 3 12
      package-inventory/pages/inventory-freeze/add/add.js
  25. 4 12
      package-inventory/pages/other-outbound/other-outbound.js
  26. 4 12
      package-inventory/pages/other-warehousing/other-warehousing.js
  27. 3 12
      package-inventory/pages/outbound-processing/add/add.js
  28. 3 11
      package-inventory/pages/outbound-processing/choose-product/choose-product.js
  29. 5 16
      package-inventory/pages/outbound-processing/detail/detail.js
  30. 1 0
      package-inventory/pages/warehousing-processing/add/add.js
  31. 5 16
      package-inventory/pages/warehousing-processing/detail/detail.js
  32. 3 4
      package-purchase/pages/purchase-based-sales/purchase-based-sales.js
  33. 3 8
      package-purchase/pages/purchase-order/add/add.js
  34. 4 15
      package-purchase/pages/purchase-receipt/add/add.js
  35. 2 10
      package-purchase/pages/purchase-receipt/choose-purchase-order/choose-purchase-order.js
  36. 4 20
      package-sales/pages/choose-sale-man/choose-sale-man.js
  37. 5 0
      package-sales/pages/sales-outbound/add/add.js
  38. 17 91
      pages/home-page/home-page.js
  39. 6 5
      pages/home-page/home-page.wxml
  40. 10 12
      pages/index/index.js
  41. 2 1
      pages/index/index.wxml
  42. 2 1
      pages/index/index.wxss
  43. 2 4
      pages/login/login.js
  44. 33 12
      pages/mine/mine.js
  45. 13 38
      pages/mine/mine.wxml
  46. 7 6
      pages/welcome/welcome.js
  47. 1 1
      utils/common.js
  48. 30 13
      utils/util.js

+ 28 - 0
api/pages/ivt/freeze.js

@@ -0,0 +1,28 @@
+/*******************************************************************************
+ * Copyright(c) 2024 dongke All rights reserved. / Confidential
+ * 类的信息:
+ *		1.程序名称:
+ *		2.功能描述:冻结
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		王英杰		  	     2024-1-19       			1.00		       	新建
+ *******************************************************************************/
+module.exports = {
+  freezeService: {
+      // 前缀
+      prefix: 'mdm-server/ivt/freeze/', 
+     
+
+  },
+
+  routeUrl: {
+    freeze: {
+      add:{
+        key:'add',url:'/package-inventory/pages/inventory-freeze/add/add'
+      },
+      chooseStaff: { key: 'chooseStaff', url: '/package-base-select/pages/select-data/select-data',type:'staff'  },
+      chooseOrg: { key: 'chooseOrg',url: '/package-base-select/pages/select-data/select-data',type:'org' }, 
+      selectCustomers: { key: 'selectCustomers', url: '/package-base-select/pages/select-customers/select-customers' },
+    } 
+  } 
+};

+ 2 - 1
app.js

@@ -66,10 +66,11 @@ const comMenu = require('./api/pages/mst/comMenu.js');
 const saleOutBoundReturn = require('./api/pages/ivt/saleOutBoundReturn.js');
 const advertisement = require('./api/pages/mst/advertisement.js');
 const check = require('./api/pages/ivt/check.js');
+const freeze = require('./api/pages/ivt/freeze.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,income,saleOutBound,inboundReturn,cusReceiptPayment,menuFrequency,userMenuFrequency,comMenu,saleOutBoundReturn,advertisement,check]
+  receiptPayment,inbound,inboundOther,inboundProcessing,inboundPurchaseReturn,outbound,outboundOther,outboundProcessing,outboundSaleReturn,inventory,moneyAccount,intoReturn,intoReturnItem,cusFollow,order,transfer,income,saleOutBound,inboundReturn,cusReceiptPayment,menuFrequency,userMenuFrequency,comMenu,saleOutBoundReturn,advertisement,check,freeze]
 
 const util = require('./utils/util.js')
 const baseMethod = require('./api/pages/baseMethod.js')

+ 9 - 0
components/dkbase/dk-drag/index.js

@@ -89,6 +89,9 @@ Component({
 	},
 	methods: {
 		vibrate() {
+			if(!this.data.editFlag){
+				return;
+			}
 			if (this.data.platform !== "devtools") wx.vibrateShort();
 		},
 		pageScroll(e) {
@@ -104,6 +107,9 @@ Component({
 			}
 		},
 		drag(e) {
+			if(!this.data.editFlag){
+				return;
+			}
 			this.setData({
 				dragging: e.dragging
 			})
@@ -142,6 +148,9 @@ Component({
 			query.select(".item").boundingClientRect();
 			query.select(".item-wrap").boundingClientRect();
 			query.exec((res) => {
+				if(!this.data.editFlag){
+					return;
+				}
 				baseData.itemWidth = res[0].width;
 				baseData.itemHeight = res[0].height;
 				baseData.wrapLeft = res[1].left;

+ 4 - 0
components/dkbase/dk-drag/item/index.js

@@ -1,3 +1,4 @@
+const config = require('@/config/config.js');
 Component({
 	properties: {
 		imageCol: {
@@ -21,6 +22,9 @@ Component({
 			value: {}
 		}
 	},
+	data:{
+		imageUrl:config.image_url + '/static/img/',
+	},
 	methods: {
 		itemClick(e) {
 			this.triggerEvent('click', {

+ 1 - 1
components/dkbase/dk-drag/item/index.wxml

@@ -12,7 +12,7 @@
 	<view wx:else class="info">
 		<view class="info__item">
 			<view style="display: flex;justify-content: center;margin-left: 20rpx;margin-top: 10rpx;">
-				<image class="image" style="height: 80rpx;width:80rpx;margin-bottom: 11rpx;" src="{{itemData[imageCol]?('/static/img/' +itemData[imageCol]):''}}"></image>
+				<image class="image" style="height: 80rpx;width:80rpx;margin-bottom: 11rpx;" src="{{itemData[imageCol]?(imageUrl +itemData[imageCol]):''}}"></image>
 				<view style="margin-left: -6rpx; margin-top: -20rpx" wx:if="{{editFlag}}">
 					<van-icon size="15px" name="clear" color="#D3D3D3" />
 				</view>

+ 2 - 10
components/dkbase/dk-form-bill/dk-form-bill.js

@@ -1094,11 +1094,7 @@ Component({
       }
       // 不允许删除给出提示信息
       if (!deleteFlag) {
-        wx.showToast({
-          title: item.message ? item.message : '不满足删除条件',
-          image: '/static/image/warning.png',
-          duration: 2000
-        })
+        util.showToast(item.message ? item.message : '不满足删除条件');
       } else {
         const { instance } = e.detail;
         let index = e.currentTarget.dataset.index
@@ -1335,11 +1331,7 @@ Component({
      * @date : 2024/3/27 16:16
      */
     overSize(e) {
-      wx.showToast({
-        title: '文件超出' + Constants.uploadFileConfig.maxSizeMB,
-        image: '/static/image/warning.png',
-        duration: 1000
-      })
+      util.showToast('文件超出' + Constants.uploadFileConfig.maxSizeMB);
     },
     /**
      * @desc : 上传附件

+ 2 - 10
components/dkbase/dk-form-more-items/dk-form-more-items.js

@@ -286,11 +286,7 @@ Component({
       }
       // 不允许删除给出提示信息
       if (!deleteFlag) {
-        wx.showToast({
-          title: item.message ? item.message : '不满足删除条件',
-          image: '/static/image/warning.png',
-          duration: 2000
-        })
+        util.showToast(item.message ? item.message : '不满足删除条件');
       } else {
         const { instance } = e.detail;
         let index = e.currentTarget.dataset.index
@@ -620,11 +616,7 @@ Component({
      * @date : 2024/3/27 16:16
      */
     overSize(e) {
-      wx.showToast({
-        title: '文件超出' + Constants.uploadFileConfig.maxSizeMB,
-        image: '/static/image/warning.png',
-        duration: 1000
-      })
+      util.showToast('文件超出' + Constants.uploadFileConfig.maxSizeMB);
     },
     /**
      * @desc : 上传附件

+ 6 - 24
components/dkbase/dk-multi-owner/dk-multi-owner.js

@@ -7,7 +7,8 @@
  *		作者				日期					版本				修改内容
  *		于继渤		  	2024-03-20    1.00		   	  新建
  *******************************************************************************/
-Component({
+const util = require('@/utils/util.js')
+ Component({
   /**
    * 组件的属性列表
    */
@@ -366,11 +367,7 @@ Component({
       }
       // 校验
       if (!allcheck) {
-        wx.showToast({
-          title: '请至少选择一条数据',
-          icon: 'none',
-          duration: 2000
-        })
+        util.showToast('请至少选择一条数据');
         return;
       }
 
@@ -384,11 +381,7 @@ Component({
         }
         // 校验
         if (!allswitch) {
-          wx.showToast({
-            title: '请选择' + colSwitchList[0].title,
-            icon: 'none',
-            duration: 2000
-          })
+          util.showToast('请选择' + colSwitchList[0].title);
           return;
         }
       }
@@ -402,11 +395,7 @@ Component({
           }
         }
         if (commission !== 100) {
-          wx.showToast({
-            title: '提成比例不足 100',
-            icon: 'none',
-            duration: 2000
-          })
+          util.showToast('提成比例不足 100');
           return;
         }
         let sum = 0
@@ -416,18 +405,11 @@ Component({
           }
         })
         if (sum > 100 || sum < 100) {
-          wx.showToast({
-            title: '提成比率不正确',
-            icon: 'none',
-            duration: 2000
-          })
+          util.showToast('提成比率不正确');
           return;
         }
       }
 
-
-
-
       let nameKey = this.data.nameKey
       let idKey = this.data.idKey
       let typeKey = this.data.typeKey

+ 2 - 2
config/config.js

@@ -1,9 +1,9 @@
-const profiles = 'test';
+const profiles = 'dev';
 
 const configListObj = {
   // 北京东科企信软件有限公司 本地开发
   dev: {
-    server_add: 'http://192.168.0.57',     server_port: '7001',
+    server_add: 'http://192.168.0.55',     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

+ 5 - 5
mixins/index.js

@@ -395,7 +395,7 @@ module.exports = {
         wx.showToast({
           title: '保存成功',
           image: '/static/image/success.png',
-          duration: 1000
+          duration: 2000
         })
         // 如果页面需要后续处理,再进行处理
         if (this.handleData) {
@@ -581,7 +581,7 @@ module.exports = {
               wx.showToast({
                 title: button,
                 image: '/static/image/success.png',
-                duration: 1000
+                duration: 2000
               })
               // if (searchFlag) {
               //   this.searchData();
@@ -591,7 +591,7 @@ module.exports = {
                 wx.showToast({
                   title: t.message,
                   image: '/static/image/warning.png',
-                  duration: 1000
+                  duration: 2000
                 })
               }
             }
@@ -617,7 +617,7 @@ module.exports = {
           wx.showToast({
             title: '操作成功',
             image: '/static/image/success.png',
-            duration: 1000
+            duration: 2000
           })
           // 重新查询
           this.searchData()
@@ -638,7 +638,7 @@ module.exports = {
           wx.showToast({
             title: '操作成功',
             image: '/static/image/success.png',
-            duration: 1000
+            duration: 2000
           })
           // 重新查询
           this.searchData()

+ 2 - 5
package-accounts-manage/pages/other-receipt/add/add.js

@@ -1,5 +1,6 @@
 const mixins = require('@/mixins/index.js')
 const Constants = require('@/utils/Constants.js');
+const util = require('@/utils/util.js')
 
 Page({
   mixins: [mixins],
@@ -111,7 +112,6 @@ Page({
   },
 
 
-
   /**
    * @desc : 保存数据服务--校验
    * @date : 2024/2/1 15:49
@@ -120,10 +120,7 @@ Page({
   validData() {
     let formData = JSON.parse(this.data.formData)
     if (formData.goodsList == null || formData.goodsList.length == 0) {
-      wx.showToast({
-        title: mixins.$t("chooseGoodsInfo"),
-        icon: 'none'
-      })
+      util.showToast(mixins.$t("chooseGoodsInfo"));
       return false
     }
     return true

+ 2 - 4
package-accounts-manage/pages/payment-order/add/add.js

@@ -8,6 +8,7 @@
  *******************************************************************************/
 const mixins = require('@/mixins/index.js')
 const Constants = require('@/utils/Constants.js');
+const util = require('@/utils/util.js')
 const app = getApp();
 Page({
   mixins: [mixins],
@@ -279,10 +280,7 @@ Page({
     }
 
     if (msgError != null) {
-      wx.showToast({
-        title: msgError,
-        icon: 'none'
-      })
+      util.showToast(msgError);
       return false
     }
 

+ 2 - 4
package-accounts-manage/pages/receipt/add-return/add-return.js

@@ -8,6 +8,7 @@
  *******************************************************************************/
 const mixins = require('@/mixins/index.js')
 const Constants = require('@/utils/Constants.js');
+const util = require('@/utils/util.js')
 const app = getApp();
 Page({
   mixins: [mixins],
@@ -316,10 +317,7 @@ Page({
     }
 
     if (msgError != null) {
-      wx.showToast({
-        title: msgError,
-        icon: 'none'
-      })
+      util.showToast(msgError);
       return false
     }
 

+ 2 - 4
package-accounts-manage/pages/receipt/add/add.js

@@ -8,6 +8,7 @@
  *******************************************************************************/
 const mixins = require('@/mixins/index.js')
 const Constants = require('@/utils/Constants.js');
+const util = require('@/utils/util.js')
 const app = getApp();
 Page({
   mixins: [mixins],
@@ -316,10 +317,7 @@ Page({
     }
 
     if (msgError != null) {
-      wx.showToast({
-        title: msgError,
-        icon: 'none'
-      })
+      util.showToast(msgError);
       return false
     }
 

+ 2 - 8
package-base-select/pages/select-collection_confirm/select-collection_confirm.js

@@ -86,17 +86,11 @@ mixins: [mixins],
       })
 
       if (msgError != null) {
-        wx.showToast({
-          title: msgError,
-          icon: 'none'
-        })
+        util.showToast(msgError);
         return false
       }
       if (sumAmount != form.sumAmount) {
-        wx.showToast({
-          title: '输入收款金额不正确',
-          icon: 'none'
-        })
+        util.showToast('输入收款金额不正确');
         return false
       }
 

+ 30 - 16
package-base-select/pages/select-source-sale-order/select-source-sale-order.js

@@ -26,8 +26,17 @@ Page({
   getData(params) {
     return this.excute(this.data.orderService, this.data.orderService.selectTotalSingleTapeDetailPage, params);
   },
-
-
+  /**
+ * @desc : 设置查询参数
+ * @date : 2024/2/1 15:49
+ * @author : 于继渤
+ */
+setSearchParams(params) {
+  //销售状态
+  params.outStatusList = [Constants.outStatus.outBounding,Constants.outStatus.unOutBound]
+  return params
+},
+  
   /**
    * @desc :   父级商品信息选择
    * @date : 2024/2/1 15:49
@@ -36,6 +45,12 @@ Page({
   onListItemChange(e) {
     let tableData = this.data.tableData
     let index = e.currentTarget.dataset.index
+    tableData.forEach(res=>{
+      res.checked =  false
+      res.orderItemResponseList.forEach(item=>{
+        item.checked = false
+      })
+    })
     tableData[index].checked = !tableData[index].checked
     let orderItemResponseList = tableData[index].orderItemResponseList
     if (orderItemResponseList && orderItemResponseList.length > 0) {
@@ -59,6 +74,12 @@ Page({
     let index = e.currentTarget.dataset.index
     let index_ = e.currentTarget.dataset.index_
     console.log(index, index_)
+    tableData.forEach(res=>{
+      res.checked =  false
+      // res.orderItemResponseList.forEach(item=>{
+      //   item.checked = false
+      // })
+    })
     tableData[index].orderItemResponseList[index_].checked = !tableData[index].orderItemResponseList[index_].checked
 
     this.setData({
@@ -106,10 +127,12 @@ Page({
       if (res.orderItemResponseList && res.orderItemResponseList.length > 0) {
         res.orderItemResponseList.forEach(item => {
           if (item.checked) {
-            // item.itemQty = Number(item.rejectQty * -1)
-            // item.itemQtyMax = Number(item.rejectQty * -1)
-            // item.priceReturn = Number(item.priceInto * -1)
-            // item.itemAmt = Number(item.rejectQty * item.priceInto * -1)
+            item.priceOut = item.priceStandard
+            item.outQty = item.itemQty 
+            item.outAmt = item.priceOut * item.itemQty
+            delete item['priceLimited']
+            delete item['pricePurchase']
+            delete item['priceWholesale']
             choooseInboundItemList.push(item)
           }
         })
@@ -135,17 +158,8 @@ Page({
   */
   toAdd() {
     let itemList = this.data.choooseInboundItemList
-    let fromNoList = []
-    let fromNo = []
-    itemList.forEach(it => {
-      fromNoList.push(it.orderNo)
-    })
-    if(fromNoList.length > 0){
-      fromNo = fromNoList.join(',')
-    }
-   
     const eventChannel = this.getOpenerEventChannel();
-    eventChannel.emit('bindData', { itemList: itemList,fromNo: fromNo})
+    eventChannel.emit('bindData', { itemList: itemList,fromNo: itemList[0].orderNo})
     wx.navigateBack({
       data: 1
     })

+ 1 - 1
package-basic-data/pages/customer-follow-up/detail/detail.js

@@ -133,7 +133,7 @@ Page({
         wx.showToast({
           title: '操作成功',
           image: '/static/image/success.png',
-          duration: 1000
+          duration: 2000
         })
         var pages = getCurrentPages();
         var prevPage = pages[pages.length -2];

+ 1 - 1
package-basic-data/pages/product-attribute/product-attribute.js

@@ -146,7 +146,7 @@ Page({
       wx.showToast({
         title: '无法停用',
         image: '/static/image/warning.png',
-        duration: 1000
+        duration: 2000
       })
     }
  

+ 1 - 4
package-basic-data/pages/register/company-register/company-register.js

@@ -118,10 +118,7 @@ Page({
   */
   validData() {
     if (!this.data.flgPrimary) {
-      wx.showToast({
-        title: '请勾选条款',
-        icon: 'none'
-      })
+      util.showToast('请勾选条款');
       return false
     }
     return true

+ 4 - 9
package-inventory/pages/choose-product/choose-product.js

@@ -1,7 +1,8 @@
 const api = require('@/utils/api.js');
 const Constants = require('@/utils/Constants.js');
 const common = require('@/utils/common.js');
-const chooseGoodsCommon = require('@/utils/chooseGoodsCommon.js');
+const chooseGoodsCommon = require('@/utils/chooseGoodsCommon.js')
+const utils = require('@/utils/util');
 const app = getApp()
 Page({
   /**a
@@ -1628,19 +1629,13 @@ Page({
   chooseSkuInfo() {
     if (this.data.sourcePage == "sales-outbound-detail") { //新建或编辑销售出库进来的
       if (this.data.choosedGoodsList.length > 1) {
-        wx.showToast({
-          title: "只能选择一个商品哦",
-          icon: 'none'
-        })
+        util.showToast('只能选择一个商品');
         return
       }
     }
     let currentChoosedItem = this.data.currentChoosedItem
     if (currentChoosedItem.usableQty < currentChoosedItem.itemQuantity) {
-      wx.showToast({
-        title: "当前商品库存可售量不足,无法出库",
-        icon: 'none'
-      })
+      util.showToast('当前商品库存可售量不足,无法出库');
       return
     }
     let currentChoosedItemTemp = {

+ 3 - 12
package-inventory/pages/inventory-adjustment/add/add.js

@@ -642,26 +642,17 @@ Page({
 
     //校验商品数量
     if (currentChoosedItem.outGoingQuantity <= 0) {
-      wx.showToast({
-        title: '待出库数量不能为0',
-        icon: 'none'
-      })
+      util.showToast('待出库数量不能为0');
       return
     }
     if (currentChoosedItem.outQuantity > currentChoosedItem.outGoingQuantity) {
-      wx.showToast({
-        title: '本次出库量不能大于待出库量',
-        icon: 'none'
-      })
+      util.showToast('本次出库量不能大于待出库量');
       return
     }
 
     if (this.data.form.sale2OpeMode != "分销模式-代送") {
       if (currentChoosedItem.usableQty < currentChoosedItem.outGoingQuantity) {
-        wx.showToast({
-          title: "当前商品库存可售量不足,无法出库",
-          icon: 'none'
-        })
+        util.showToast('当前商品库存可售量不足,无法出库');
         return
       }
     }

+ 47 - 71
package-inventory/pages/inventory-check/add/add.js

@@ -1,5 +1,6 @@
 // package-basic-data/pages/test/add/add.js
 const mixins = require('@/mixins/index.js')
+const utils = require('@/utils/util');
 const app = getApp()
 const Constants = require('@/utils/Constants');
 Page({
@@ -25,7 +26,7 @@ Page({
         btnFormData: null,
         popupTopObj: [{ leftTitle: '库存量', leftCode: 'usableQty', rightTitle: '可售量', rightCode: 'invQty' }],
         popContent: [{
-                code: 'itemQty',
+                 code: 'itemQty',
                 type: 'step',
                 title: '盘点数量', //'数量',
                 required: true
@@ -55,24 +56,24 @@ Page({
                 type: 'str',
                 readonly: true,
               },
-        ],
+         ],
 
-        cardList: [{
-                name: 'main',
-                title: '盘点信息', //'商品明细',
-            },
-            {
-                name: 'items',
-                title: mixins.$t("goodsDetail"), //'商品明细',
-                info: '(' + mixins.$t("warehousingProcessing") + ')',
-                color: '#E4002B',
-                displayNum: 2
-            }, {
-                name: 'other',
-                title: mixins.$t("otherInfo"), // '其他信息'
-            }
-        ],
-        contentObj: {
+         cardList: [{
+            name: 'main',
+            title: '盘点信息', //'商品明细',
+        },
+        {
+            name: 'items',
+            title: mixins.$t("goodsDetail"), //'商品明细',
+            info: '(' + mixins.$t("warehousingProcessing") + ')',
+            color: '#E4002B',
+            displayNum: 2
+        }, {
+            name: 'other',
+            title: mixins.$t("otherInfo"), // '其他信息'
+        }
+    ],
+        contentObj:  {
             main: [{
                     code: 'staffId',
                     name: 'staffName',
@@ -89,6 +90,7 @@ Page({
                     urlKey: 'chooseOrg'
                 },
                 {
+                  
                     code: 'whId',
                     name: 'whName',
                     type: 'choose',
@@ -96,7 +98,7 @@ Page({
                     urlKey: 'chooseWh'
                 }
             ],
-
+          
             items: [],
             other: [{
                 code: 'remarks',
@@ -111,11 +113,12 @@ Page({
         },
         // 路由
         routeObjName: 'check',
+ 
 
         // inboundProcessingService: app.globalData['inboundProcessingService'],
     },
     
-    /**
+   /*
      * @desc   : 绑定数据
      * @author : 王英杰
      * @date   : 2024年3月12日
@@ -125,7 +128,7 @@ Page({
         let formData = JSON.parse(this.data.formData)
         let code = e.detail.code
         let data = e.detail.data.data
-
+     
         if (code == "staffId") { //员工
             formData.staffId = data.id
             formData.staffName = data.name
@@ -137,54 +140,31 @@ Page({
         if (code == "whId") { //仓库
             formData.whId = data.id
             formData.whName = data.name
+         
             if (formData.goodsList) {
                 formData.goodsList.forEach(element => { //总单的入库仓库 作为一个总开关 直接改变 所以品的仓库
                     element.whId = data.id
+                   
                     element.whName = data.name
                 });
-            }
-
-        }
-        if (code == "lossReason") { //盘亏原因
-            formData.lossReason = data.id
-            formData.lossReasonName = data.name
-        }
-
+            } 
+        } 
         this.setData({
             formData: JSON.stringify(formData)
         })
     },
+  
     /**
-     * @desc : 按钮点击事件回调
-     * @date : 2024/2/1 15:49
-     * @author : 王英杰
-     */
-    open(e) {
-        console.log('ee', e);
-        let that = this
-        let code = e.detail.name
-
-        let draftFlag = false;
-        if (code == 'draft') { //暂存
-            draftFlag = true;
-            this.setData({
-                validFlag:false
-            })
-        }
-        this.setData({
-            draftFlag: draftFlag
-        })
-        this.save({});
-    },
-
-    /**
-     * @desc : 外露设置产品方法 
+       * @desc : 外露设置产品方法 
      * @date : 2024/2/1 15:49
      * @author : 王英杰
      */
     setGoods(e) {
+     
   
         let formData = JSON.parse(this.data.formData)
+       
+ 
         formData.goodsList.forEach(element => {
             element.balanceQty = element.itemQty - element.invQty
         });
@@ -197,6 +177,7 @@ Page({
      * @date : 2024/2/1 15:49
      * @author : 王英杰
      */
+ 
     validData() {
         if (this.data.draftFlag) {
             return true;
@@ -205,23 +186,20 @@ Page({
         let that = this
         
         if (formData.goodsList == null || formData.goodsList.length == 0) {
-            wx.showToast({
-                title: "请选择商品明细",
-                icon: 'none'
-            }) 
-            return false
+           util.showToast('请选择商品明细');
+             return false
         }
+       
        for(let i=0 ; i<formData.goodsList.length; i++){
            if(formData.goodsList[i].balanceQty<0){ //盘亏需要盘亏原因
               if(  !formData.goodsList[i].lossReason){
-                wx.showToast({
-                    title: "请输入盘亏原因",
-                    icon: 'none'
-                }) 
-                return false
-              }
+                     util.showToast("请输入盘亏原因");
+                 return false 
+ }
            }
        }
+ 
+ 
         return true
     },
     /**
@@ -230,7 +208,7 @@ Page({
      * @author : 王英杰
      */
     setParams(params) {
-        let formData = JSON.parse(this.data.formData)
+    let formData = JSON.parse(this.data.formData)
         let draftFlag = this.data.draftFlag
         let itemList = []
         formData.goodsList.forEach((element, index) => {
@@ -255,8 +233,7 @@ Page({
             params.checkStatus = draftFlag?'盘点状态-暂存':'盘点状态-完成'
             params.makeStaff = app.globalData.user.staffId
             params.itemList = itemList 
-            
-        return params;
+          return params;
     },
 
     /**
@@ -273,15 +250,14 @@ Page({
      * @date : 2024/2/1 15:49
      * @author : 王英杰
      */
-    loadInit() {
+    loadInit() { 
         let formData = JSON.parse(this.data.formData)
         let item = this.data.item
-        formData.goodsList = item
-        formData.goodsList.forEach(element => {
+       formData.goodsList.forEach(element => {
             element.balanceQty = element.itemQty - element.invQty
         });
         this.setData({
             formData: JSON.stringify(formData)
         })
-    },
+     },
 })

+ 24 - 1
package-inventory/pages/inventory-check/inventory-check.js

@@ -111,7 +111,30 @@ Page({
     active:0
   },
   
- 
+  /**
+   * @desc : 详细页面 (编辑)
+   * @date : 2024/2/1 15:49
+   * @author : 王英杰
+   */
+  toDetail(e) {
+    let checkId = e.detail.item.checkId
+    let displayedStatus = e.detail.item.displayedStatus
+    wx.navigateTo({  //STAGING  ==  暂存
+      url: (displayedStatus == Constants.orderStatus.STAGING) ? this.data.route.add.url : this.data.route.detail.url,
+      events: {
+        // 回调后,在这里给页面赋值
+        bandData: function (e) {
+          console.log("toDetail", e);
+        }
+      },
+      success: function (res) {
+        res.eventChannel.emit('params', {
+          id: purId,
+          formMode: Constants.formMode.edit
+        })
+      }
+    })
+  },
   toPoint(e) {
     console.log('t3', e);
     this.setData({

+ 3 - 12
package-inventory/pages/inventory-freeze/add/add.js

@@ -642,26 +642,17 @@ Page({
 
     //校验商品数量
     if (currentChoosedItem.outGoingQuantity <= 0) {
-      wx.showToast({
-        title: '待出库数量不能为0',
-        icon: 'none'
-      })
+      util.showToast( '待出库数量不能为0');
       return
     }
     if (currentChoosedItem.outQuantity > currentChoosedItem.outGoingQuantity) {
-      wx.showToast({
-        title: '本次出库量不能大于待出库量',
-        icon: 'none'
-      })
+      util.showToast( '本次出库量不能大于待出库量');
       return
     }
 
     if (this.data.form.sale2OpeMode != "分销模式-代送") {
       if (currentChoosedItem.usableQty < currentChoosedItem.outGoingQuantity) {
-        wx.showToast({
-          title: "当前商品库存可售量不足,无法出库",
-          icon: 'none'
-        })
+        util.showToast( '当前商品库存可售量不足,无法出库');
         return
       }
     }

+ 4 - 12
package-inventory/pages/other-outbound/other-outbound.js

@@ -9,6 +9,7 @@
  *******************************************************************************/
 const mixins = require('@/mixins/index.js');
 const Constants = require('@/utils/Constants');
+const util = require('@/utils/util.js')
 const app = getApp()
 Page({
     mixins: [mixins],
@@ -326,27 +327,18 @@ Page({
     validData() {
         let formData = JSON.parse(this.data.formData)
         if (formData.goodsList == null || formData.goodsList.length == 0) {
-            wx.showToast({
-                title: mixins.$t("chooseGoodsInfo"),
-                icon: 'none'
-            })
+            util.showToast(mixins.$t("chooseGoodsInfo"));
             return false
         }
         // 明细的数量和仓库不能为空
         for (let index = 0; index < formData.goodsList.length; index++) {
             const element = formData.goodsList[index];
             if (element.whId == null) {
-                wx.showToast({
-                    title: mixins.$t("chooseWh"),
-                    icon: 'none'
-                })
+                util.showToast(mixins.$t("chooseWh"));
                 return false
             }
             if (element.itemQty == null || element.itemQty == '' || element.itemQty == 0) {
-                wx.showToast({
-                    title: mixins.$t("inputWords") + "[" + element.skuCode + "]" + mixins.$t("count"),
-                    icon: 'none'
-                })
+                util.showToast(mixins.$t("inputWords") + "[" + element.skuCode + "]" + mixins.$t("count"));
                 return false
             }
         }

+ 4 - 12
package-inventory/pages/other-warehousing/other-warehousing.js

@@ -9,6 +9,7 @@
  *******************************************************************************/
 const mixins = require('@/mixins/index.js')
 const Constants = require('@/utils/Constants');
+const util = require('@/utils/util.js')
 const app = getApp()
 Page({
     mixins: [mixins],
@@ -320,27 +321,18 @@ Page({
     validData() {
         let formData = JSON.parse(this.data.formData)
         if (formData.goodsList == null || formData.goodsList.length == 0) {
-            wx.showToast({
-                title: mixins.$t("chooseGoodsInfo"),
-                icon: 'none'
-            })
+            util.showToast(mixins.$t("chooseGoodsInfo"));
             return false
         }
         // 明细的数量和仓库不能为空
         for (let index = 0; index < formData.goodsList.length; index++) {
             const element = formData.goodsList[index];
             if (element.whId == null) {
-                wx.showToast({
-                    title: mixins.$t("chooseWh"),
-                    icon: 'none'
-                })
+                util.showToast(mixins.$t("chooseWh"));
                 return false
             }
             if (element.itemQty == null || element.itemQty == '' || element.itemQty == 0) {
-                wx.showToast({
-                    title: mixins.$t("inputWords") + "[" + element.skuCode + "]" + mixins.$t("count"),
-                    icon: 'none'
-                })
+                util.showToast(mixins.$t("inputWords") + "[" + element.skuCode + "]" + mixins.$t("count"));
                 return false
             }
         }

+ 3 - 12
package-inventory/pages/outbound-processing/add/add.js

@@ -643,26 +643,17 @@ Page({
 
     //校验商品数量
     if (currentChoosedItem.outGoingQuantity <= 0) {
-      wx.showToast({
-        title: '待出库数量不能为0',
-        icon: 'none'
-      })
+      util.showToast('待出库数量不能为0');
       return
     }
     if (currentChoosedItem.outQuantity > currentChoosedItem.outGoingQuantity) {
-      wx.showToast({
-        title: '本次出库量不能大于待出库量',
-        icon: 'none'
-      })
+      util.showToast('本次出库量不能大于待出库量');
       return
     }
 
     if (this.data.form.sale2OpeMode != "分销模式-代送") {
       if (currentChoosedItem.usableQty < currentChoosedItem.outGoingQuantity) {
-        wx.showToast({
-          title: "当前商品库存可售量不足,无法出库",
-          icon: 'none'
-        })
+        util.showToast('当前商品库存可售量不足,无法出库');
         return
       }
     }

+ 3 - 11
package-inventory/pages/outbound-processing/choose-product/choose-product.js

@@ -1,6 +1,7 @@
 const api = require('@/utils/api.js');
 const Constants = require('@/utils/Constants.js');
 const common = require('@/utils/common.js');
+const util = require('@/utils/util.js')
 const chooseGoodsCommon = require('@/utils/chooseGoodsCommon.js');
 const app = getApp()
 // --可能废弃
@@ -1617,19 +1618,13 @@ Page({
   chooseSkuInfo() {
     if (this.data.sourcePage == "sales-outbound-detail") { //新建或编辑销售出库进来的
       if (this.data.choosedGoodsList.length > 1) {
-        wx.showToast({
-          title: "只能选择一个商品哦",
-          icon: 'none'
-        })
+        util.showToast('只能选择一个商品');
         return
       }
     }
     let currentChoosedItem = this.data.currentChoosedItem
     if (currentChoosedItem.usableQty < currentChoosedItem.itemQuantity) {
-      wx.showToast({
-        title: "当前商品库存可售量不足,无法出库",
-        icon: 'none'
-      })
+      util.showToast('当前商品库存可售量不足,无法出库');
       return
     }
     let currentChoosedItemTemp = {
@@ -1641,9 +1636,6 @@ Page({
       choosedGoodsList,
       showAdd: false
     })
-
-
-
   },
   /**
    * @desc : 清空default

+ 5 - 16
package-inventory/pages/outbound-processing/detail/detail.js

@@ -8,6 +8,7 @@
  *		姜永辉	2024年3月22日		  1.00		   	    一览
  *******************************************************************************/
 const mixins = require('@/mixins/index.js')
+const util = require('@/utils/util.js')
 const Constants = require('@/utils/Constants.js');
 const app = getApp()
 Page({
@@ -228,34 +229,22 @@ Page({
     // 出库中
     let formData = JSON.parse(this.data.formData)
     if (formData.goodsList == null || formData.goodsList.length == 0) {
-      wx.showToast({
-        title: mixins.$t("chooseGoodsInfo"),
-        icon: 'none'
-      })
+      util.showToast(mixins.$t("chooseGoodsInfo"));
       return false
     }
     // 明细的数量和仓库不能为空
     for (let index = 0; index < formData.goodsList.length; index++) {
       const element = formData.goodsList[index];
       if (element.whId == null) {
-        wx.showToast({
-          title: mixins.$t("chooseWh"),
-          icon: 'none'
-        })
+        util.showToast(mixins.$t("chooseWh"));
         return false
       }
       if (element.outingQty == null || element.outingQty == '' || element.outingQty == 0) {
-        wx.showToast({
-          title: mixins.$t("inputWords") + "[" + element.skuCode + "]" + mixins.$t("count"),
-          icon: 'none'
-        })
+        util.showToast(mixins.$t("inputWords") + "[" + element.skuCode + "]" + mixins.$t("count"));
         return false
       }
       if (element.outingQty > element.outingQty_max) {
-        wx.showToast({
-          title: "[" + element.skuCode + "]" + mixins.$t("maxCount") + element.outingQty_max,
-          icon: 'none'
-        })
+        util.showToast("[" + element.skuCode + "]" + mixins.$t("maxCount") + element.outingQty_max);
         return false
       }
     }

+ 1 - 0
package-inventory/pages/warehousing-processing/add/add.js

@@ -5,6 +5,7 @@ import Dialog from '@/dist/dialog/dialog.js'
 const util = require('@/utils/util.js')
 const common = require('@/utils/common.js')
 const config = require('@/config/config.js')
+const util = require('@/utils/util.js')
 // --可能废弃
 Page({
 

+ 5 - 16
package-inventory/pages/warehousing-processing/detail/detail.js

@@ -8,6 +8,7 @@
  *		姜永辉	        2024年3月22日		     1.00		   	    一览
  *******************************************************************************/
 const mixins = require('@/mixins/index.js')
+const util = require('@/utils/util.js')
 const Constants = require('@/utils/Constants.js');
 const app = getApp()
 Page({
@@ -219,34 +220,22 @@ Page({
         // 入库中
         let formData = JSON.parse(this.data.formData)
         if (formData.goodsList == null || formData.goodsList.length == 0) {
-            wx.showToast({
-                title: mixins.$t("chooseGoodsInfo"),
-                icon: 'none'
-            })
+            util.showToast(mixins.$t("chooseGoodsInfo"));
             return false
         }
         // 明细的数量和仓库不能为空
         for (let index = 0; index < formData.goodsList.length; index++) {
             const element = formData.goodsList[index];
             if (element.whId == null) {
-                wx.showToast({
-                    title: mixins.$t("chooseWh"),
-                    icon: 'none'
-                })
+                util.showToast(mixins.$t("chooseWh"));
                 return false
             }
             if (element.intoingQty == null || element.intoingQty == '' || element.intoingQty == 0) {
-                wx.showToast({
-                    title: mixins.$t("inputWords") + "[" + element.skuCode + "]" + mixins.$t("count"),
-                    icon: 'none'
-                })
+                util.showToast(mixins.$t("inputWords") + "[" + element.skuCode + "]" + mixins.$t("count"));
                 return false
             }
             if (element.intoingQty > element.intoingQty_max) {
-                wx.showToast({
-                    title: "[" + element.skuCode + "]" + mixins.$t("maxCount") + element.intoingQty_max,
-                    icon: 'none'
-                })
+                util.showToast("[" + element.skuCode + "]" + mixins.$t("maxCount") + element.intoingQty_max);
                 return false
             }
         }

+ 3 - 4
package-purchase/pages/purchase-based-sales/purchase-based-sales.js

@@ -9,6 +9,7 @@
  *******************************************************************************/
 const mixins = require('@/mixins/index.js')
 const common = require('@/utils/common.js')
+const util = require('@/utils/util.js')
 const Constants = require('@/utils/Constants.js');
 Page({
   mixins: [mixins],
@@ -201,10 +202,8 @@ Page({
         }
       })
       if (!(chooseList && chooseList.length > 0)) {
-        wx.showToast({
-          title: mixins.$t('pleaseChoose'),//"请至少选择一件商品" ,
-          icon: 'none'
-        })
+        //"请至少选择一件商品" ,
+        util.showToast(mixins.$t('pleaseChoose'));
       }
       if (that.data.isSourceOrderFlag) {
         const eventChannel = that.getOpenerEventChannel();

+ 3 - 8
package-purchase/pages/purchase-order/add/add.js

@@ -1,5 +1,6 @@
 // package-basic-data/pages/test/add/add.js
 const mixins = require('@/mixins/index.js')
+const util = require('@/utils/util.js')
 const app = getApp()
 const Constants = require('@/utils/Constants');
 Page({
@@ -398,20 +399,14 @@ Page({
         let formData = JSON.parse(this.data.formData)
         let that = this
         if (formData.goodsList == null || formData.goodsList.length == 0) {
-            wx.showToast({
-                title: "请选择商品明细",
-                icon: 'none'
-            })
+            util.showToast('请选择商品明细');
             return false
         }
         // 明细的数量不能为空
         for (let index = 0; index < formData.goodsList.length; index++) {
             const element = formData.goodsList[index];
             if (element.itemQty == null || element.itemQty == '' || element.itemQty == 0) {
-                wx.showToast({
-                    title: mixins.$t("inputWords") + "[" + element.skuCode + "]" + mixins.$t("count"),
-                    icon: 'none'
-                })
+                util.showToast(mixins.$t("inputWords") + "[" + element.skuCode + "]" + mixins.$t("count"));
                 return false
             }
         }

+ 4 - 15
package-purchase/pages/purchase-receipt/add/add.js

@@ -1,5 +1,6 @@
 // package-basic-data/pages/test/add/add.js
 const mixins = require('@/mixins/index.js')
+const util = require('@/utils/util.js')
 const app = getApp()
 const Constants = require('@/utils/Constants');
 Page({
@@ -416,22 +417,14 @@ Page({
         let formData = JSON.parse(this.data.formData)
         let that = this
         if (formData.goodsList == null || formData.goodsList.length == 0) {
-            wx.showToast({
-                title: "请选择商品明细",
-                icon: 'none'
-            })
-             
+            util.showToast('请选择商品明细');
             return false
         }
         // 明细的数量和仓库不能为空
         for (let index = 0; index < formData.goodsList.length; index++) {
             const element = formData.goodsList[index];
             if (element.whId == null) {
-                wx.showToast({
-                    title: mixins.$t("chooseWh"),
-                    icon: 'none'
-                })
-                 
+                util.showToast(mixins.$t("chooseWh"));
                 return false
             }
             //如果 设置了总单的仓库 然后又进行选品 没设置一样的仓库 那就把总单上的仓库清空
@@ -445,11 +438,7 @@ Page({
                 }
             }
             if (element.itemQty == null || element.itemQty == '' || element.itemQty == 0) {
-                wx.showToast({
-                    title: mixins.$t("inputWords") + "[" + element.skuCode + "]" + mixins.$t("count"),
-                    icon: 'none'
-                })
-                 
+                util.showToast(mixins.$t("inputWords") + "[" + element.skuCode + "]" + mixins.$t("count"));
                 return false
             }
         }  

+ 2 - 10
package-purchase/pages/purchase-receipt/choose-purchase-order/choose-purchase-order.js

@@ -59,11 +59,7 @@ Page({
           chooseList  =  tableData[index].purchaseItemResponseList 
 
         }else{ //不相等 那就说明选择了其他的单据 弹出消息提示
-          wx.showToast({
-            title: '已经选了单据【'+chooseList.purNo+"】,请先勾掉已选单据",
-            icon: 'none',
-            duration: 2000
-          })
+          util.showToast('已经选了单据【'+chooseList.purNo+"】,请先勾掉已选单据");
           return
         } 
       }else{ //没选的话 直接把单据数据赋给已选list
@@ -109,11 +105,7 @@ Page({
           chooseList.push(tableData[index].purchaseItemResponseList[index_]) 
 
         }else{ //不相等 那就说明选择了其他的单据 弹出消息提示
-          wx.showToast({
-            title: '已经选了单据【'+chooseList.purNo+"】,请先勾掉已选单据",
-            icon: 'none',
-            duration: 2000
-          })
+          util.showToast('已经选了单据【'+chooseList.purNo+"】,请先勾掉已选单据");
           return
         } 
       }else{ //没选的话 直接把单据数据赋给已选list

+ 4 - 20
package-sales/pages/choose-sale-man/choose-sale-man.js

@@ -63,29 +63,17 @@ Page({
 
     // 校验
     if (!allcheck) {
-      wx.showToast({
-        title: '请至少选择一条业务员',
-        icon: 'none',
-        duration: 2000
-      })
+      util.showToast('请至少选择一条业务员');
       return;
     }
 
     // 校验
     if (!allswitch) {
-      wx.showToast({
-        title: '请选择主业务员',
-        icon: 'none',
-        duration: 2000
-      })
+      util.showToast('请选择主业务员');
       return;
     }
     if (commission !== 100) {
-      wx.showToast({
-        title: '提成比例不足 100',
-        icon: 'none',
-        duration: 2000
-      })
+      util.showToast('提成比例不足 100');
       return;
     }
 
@@ -96,11 +84,7 @@ Page({
       }
     })
     if (sum > 100 || sum < 100) {
-      wx.showToast({
-        title: '提成比率不正确',
-        icon: 'none',
-        duration: 2000
-      })
+      util.showToast('提成比率不正确');
       return;
     }
     let tempNames = []

+ 5 - 0
package-sales/pages/sales-outbound/add/add.js

@@ -271,9 +271,14 @@ Page({
     //设置需收款
     let contentSaveList = this.data.contentSaveList
     let formData = JSON.parse(this.data.formData)
+    let itemIndex = 0
+    formData.goodsList.forEach(res=>{
+      res.itemIndex = itemIndex++
+    })
     //组件显示 需收款
     contentSaveList[2]['content'] = Number(formData.sumAmount)
     this.setData({
+      formData:JSON.stringify(formData),
       contentSaveList: contentSaveList
     })
 

+ 17 - 91
pages/home-page/home-page.js

@@ -27,85 +27,9 @@ Page({
     // 分页flg
     pageFlag: false,
     comMenuList: [],// 常用功能
-    companyName: '沈阳东科软件有限公司',
+    companyName: null,
     transactionAmount: '¥11,850.00',
     collectionAmount: '¥10,850.00',
-    combinedList: [
-      {
-        activityId: 99,
-        activityNames: "分销",
-        desc: "分销",
-        id: "c236e07b-67b3-4a02-821a-a6314e2b8890",
-        imageInfo: [
-          {
-            path:
-              'https://hegii-hap.oss-cn-shenzhen.aliyuncs.com/haip/2022-08-31/f90219c4ee614fa9bf1c6e786973ea7a.jpg?Expires=1708309258&OSSAccessKeyId=LTAI5tDd2DXPjsSr4ta5fGp3&Signature=xngklbQK3Kze2v7eT3Xh1IsYB6k%3D'
-          }],
-        orderItemQuantity: 1,
-        pathType: 1,
-        priceId: 272,
-        priceName: "花洒",
-        pricePromotion: 5000,
-        promotionId: 272,
-        promotionPriceType: 73,
-        promotionPriceTypeName: "特供产品",
-        promotionType: 2,
-        promotionTypeName: "组合促销",
-        seq: 1,
-        spuModel: "花洒",
-        standardId: 262,
-        sumPrice: 5000,
-        title: "花洒",
-        titleTag: "组合促销",
-      },
-      {
-        activityId: 98,
-        activityNames: "SS",
-        desc: "SS",
-        id: "f0136f7f-610a-4f9e-ac32-2a4dd214b3a3",
-        imageInfo: [],
-        orderItemQuantity: 1,
-        pathType: 1,
-        priceId: 272,
-        priceName: "花洒",
-        pricePromotion: 5000,
-        promotionId: 272,
-        promotionPriceType: 73,
-        promotionPriceTypeName: "特供产品",
-        promotionType: 2,
-        promotionTypeName: "组合促销",
-        seq: 2,
-        spuModel: "花洒",
-        standardId: 262,
-        sumPrice: 5000,
-        title: "花洒",
-        titleTag: "组合促销",
-      },
-
-      {
-        activityId: 98,
-        activityNames: "SS",
-        desc: "SS",
-        id: "2e74bb18-db63-413e-9b43-dee8e3015870",
-        imageInfo: [],
-        orderItemQuantity: 1,
-        pathType: 1,
-        priceId: 256,
-        priceName: "赠送产品",
-        pricePromotion: 0,
-        promotionId: 256,
-        promotionPriceType: 78,
-        promotionPriceTypeName: "赠送产品",
-        promotionType: 2,
-        promotionTypeName: "组合促销",
-        seq: 4,
-        spuModel: "123123",
-        standardId: 262,
-        sumPrice: 0,
-        title: "123123",
-        titleTag: "组合促销",
-      }
-    ],
     //功能分类-大功能模块-页面
     functionItems: [
       {
@@ -148,7 +72,7 @@ Page({
     //  模块名称
     functionRegionItems: [
       {
-        diamondflg: true,
+        diamondflg: false,
         titlesrc: 'home-add-order.png',
         cardname: '采购管理',
         items: [
@@ -157,7 +81,7 @@ Page({
         ],
       },
       {
-        diamondflg: false,
+        diamondflg: true,
         titlesrc: 'home-customer-data.png',
         cardname: '销售管理',
         items: [
@@ -193,7 +117,7 @@ Page({
         ],
       },
       {
-        diamondflg: true,
+        diamondflg: false,
         titlesrc: 'home-customer-payment.png',
         cardname: '系统管理',
         items: [
@@ -203,10 +127,14 @@ Page({
       },
     ],
   },
-  // 轮播特效果一
-  swiperChange(e) {
-    this.setData({
-      swiperIndex: e.detail.current
+  /**
+  * @desc : 切换公司
+  * @author : 周兴
+  * @date : 2024/4/1
+  */
+  changeCp(){
+    wx.navigateTo({
+      url: '/pages/company/company',
     })
   },
   /**
@@ -215,7 +143,6 @@ Page({
   * @date : 2024/4/1
   */
   getAdvertisement() {
-    console.log('eeee',app.globalData.company);
     let params = {
       appCode: Constants.APP_CODE,
       gradeCode:app.globalData.company.gradeCode
@@ -293,11 +220,7 @@ Page({
       }
     }
     if (!hasRightFlag) {
-      wx.showToast({
-        title: "没有该功能权限",
-        image: '/static/image/warning.png',
-        duration: 2000
-      })
+      util.showToast('没有该功能权限');
       return;
     }
     // 打开页面
@@ -321,6 +244,7 @@ Page({
    * 生命周期函数--监听页面加载
    */
   onLoad: function (options) {
+    util.showToast('我打客服寄快递甲方是达到了放假了附件第三方大数据量');
     let _this = this;
     wx.getSystemInfo({
       success: function (res) {
@@ -330,9 +254,11 @@ Page({
         })
       }
     })
+    this.setData({
+      companyName:app.globalData.company.cpName
+    })
     // 查询广告数据
     this.getAdvertisement();
-    console.log("homepage", options);
     // options 中的 scene  
     if (options.scene) {
       // var scene = options.scene

+ 6 - 5
pages/home-page/home-page.wxml

@@ -5,9 +5,11 @@
 <!-- 顶部 -->
 <view class="head">
   <!-- 公司 -->
-  <view class="company">
-    <view>
-      {{companyName}}
+  <view class="company" catchtap="changeCp">
+    <view style="display: flex;align-items: center;">
+      <view style="margin-right: 10rpx;">
+        {{companyName?companyName:''}}
+      </view>
       <image src="/static/image/triangle.png" style="width: 28rpx;height:28rpx;"></image>
     </view>
     <!-- 本月本周 -->
@@ -40,7 +42,7 @@
 
   <!--广告-->
   <view wx:if="{{advertisementList && advertisementList.length > 0}}">
-    <swiper indicator-dots="{{true}}" autoplay="true" interval="3000" bindchange="swiperChange">
+    <swiper indicator-dots="{{true}}" autoplay="true" interval="3000">
       <block wx:for="{{advertisementList}}" wx:key="{{index}}" wx:for-item="item">
         <swiper-item>
           <image src="{{item.adPath}}" mode="aspectFill" />
@@ -49,7 +51,6 @@
     </swiper>
   </view>
 
-
   <view wx:if="{{advertisementList && advertisementList.length == 0}}" style="margin-top: 50rpx;"></view>
 
   <!-- 功能卡片 -->

+ 10 - 12
pages/index/index.js

@@ -11,6 +11,7 @@ const app = getApp()
 
 const api = require('@/utils/api.js');
 const config = require('@/config/config.js');
+const util = require('@/utils/util.js')
 const Constants = require('@/utils/Constants');
 
 Page({
@@ -20,6 +21,7 @@ Page({
    */
   data: {
     imageUrl:config.image_url + '/static/img/',
+    editTip:'长按拖动可以调整应用位置',
     size: 4,
     showMore: false,
     editFlag: false, // 编辑模式
@@ -111,9 +113,9 @@ Page({
     let editFlag = this.data.editFlag
     // 变为编辑模式
     if (!editFlag) {
-      // wx.setNavigationBarTitle({
-      //   title: mixins.$t('管理应用'),
-      // })
+      wx.setNavigationBarTitle({
+        title: '管理应用',
+      })
       editFlag = !editFlag;
       let showMore = this.data.showMore
       if (editFlag) {
@@ -138,9 +140,9 @@ Page({
   * @date : 2024/3/29
   */
   cancel() {
-    // wx.setNavigationBarTitle({
-    //   title: mixins.$t('menuCenter'),
-    // })
+    wx.setNavigationBarTitle({
+      title: '应用中心',
+    })
     this.setData({
       editFlag: false,
       showMore: false
@@ -404,7 +406,7 @@ Page({
       wx.showToast({
         title: '功能开发中',
         image: '/static/image/warning.png',
-        duration: 1000
+        duration: 2000
       })
       return
     }
@@ -450,11 +452,7 @@ Page({
     let filters = comMenuList.filter(t => t.menuUuid == it.menuUuid);
     if (!filters || filters.length == 0) {
       if (comMenuList && comMenuList.length >= 9) {
-        wx.showToast({
-          title: '常用应用不超过9个',
-          image: '/static/image/warning.png',
-          duration: 1000
-        })
+        util.showToast('常用应用不能超过9个');
         return
       }
       comMenuList.push(it);

+ 2 - 1
pages/index/index.wxml

@@ -52,7 +52,7 @@
 <view wx:if="{{bingFlag == 0 }}">
   <view class="panel-class">
     <view class="app-name" style="display: flex;justify-content: space-between;line-height: 30rpx;">
-      <view style="display: flex;width: 100%;">
+      <view style="display: flex;width: 100%;align-items: center;">
         <view>常用应用 </view>
         <!--图标-->
         <view style="display: flex;width: 75%;" bindtap='expand'>
@@ -62,6 +62,7 @@
             </view>
           </view>
           <view wx:if="{{showMore}}" class="expand-class">
+            <dk-text  bindtap='expand'  fontSize="12px" color="#95A8CB" fontWeight="nomal" value="{{editTip}}"></dk-text>
             <van-icon size="12px" name="arrow-up" />
           </view>
           <view wx:else class="expand-class">

+ 2 - 1
pages/index/index.wxss

@@ -18,7 +18,8 @@ page {
 }
 
 .expand-class{
-  margin-left: 10rpx;
+  margin-left: 20rpx;
+  display: flex;
 }
 
 .panel-class {

+ 2 - 4
pages/login/login.js

@@ -12,6 +12,7 @@ const app = getApp()
 const api = require('@/utils/api.js');
 const config = require('@/config/config.js');
 const Constants = require('@/utils/Constants.js');
+const util = require('@/utils/util.js')
 Page({
 
   /**
@@ -75,10 +76,7 @@ Page({
   */
   addCompany(e) {
     if (!this.data.agreementPrivacy) {
-      wx.showToast({
-        title: this.data.$t['checkPrivacy'],
-        duration: 1000
-      })
+      util.showToast(this.data.$t['checkPrivacy']);
     }
   },
 

+ 33 - 12
pages/mine/mine.js

@@ -23,9 +23,9 @@ Page({
    */
   data: {
     imageUrl:config.image_url + '/static/img/',
-    companyName: '沈阳东科软件有限公司',
-    staffName: '王暖暖',
-    orgName: '沈阳浑南红心美凯龙店',
+    companyName: null,
+    staffName: 'null',
+    orgName: null,
     // 路由
     routeObjName: 'setting',
     wechatPayService: app.globalData['wechatPayService'],
@@ -62,6 +62,29 @@ Page({
     showStoreFlag: true,
 
     menuBtnInfo: null,
+    // 待办工作
+    waitMenu:[
+      {
+        title: '待成交',
+        path: '/package4/pages/order-billing/order-billing',
+        icon: 'order-billing.png',
+      },
+      {
+        title: '待收款',
+        path: '/package4/pages/order-billing/order-billing',
+        icon: 'order-billing.png',
+      },
+      {
+        title: '待发货',
+        path: '/package4/pages/order-billing/order-billing',
+        icon: 'order-billing.png',
+      },
+      {
+        title: '待出库',
+        path: '/package4/pages/order-billing/order-billing',
+        icon: 'order-billing.png',
+      },
+    ],
     functionItems_mine: [
       {
         FunctionName: '我的开单',
@@ -121,8 +144,8 @@ Page({
     if (!url) {
       wx.showToast({
         title: '功能开发中',
-        image: '@/static/image/warning.png',
-        duration: 1000
+        image: '/static/image/warning.png',
+        duration: 2000
       })
       return
     }
@@ -422,6 +445,9 @@ Page({
     // let waitApprovalflg = common.hasPageUUidRight(Constants.PAGE_RIGHT.WAITAPPROVAL)
     // let storeManagerFlg = common.hasPageUUidRight(Constants.PAGE_RIGHT.STORE_MANAGER)
     this.setData({
+      companyName:app.globalData.company.cpName,
+      staffName:app.globalData.user.staffName,
+      orgName:app.globalData.user.orgName,
       storeManagerFlg: false,
       customerflg: false,
       orderflg: false,
@@ -514,13 +540,8 @@ Page({
   */
   getAccountInfoSync() {
     const accountInfo = wx.getAccountInfoSync();
-    wx.showToast({
-      title: '当前版本号:' + accountInfo.miniProgram.version,
-      icon: 'none',
-    })
-  },
-
-
+    util.showToast('当前版本号:' + accountInfo.miniProgram.version);
 
+  },
 
 })

+ 13 - 38
pages/mine/mine.wxml

@@ -4,9 +4,11 @@
 <loading wx:if="{{loading}}"></loading>
 <view class="head">
   <view class="company">
-    <view>
-      {{companyName}}
-      <image src="{{imageUrl + 'triangle.png'}}" style="width: 28rpx;height:28rpx;"></image>
+    <view style="display: flex;align-items: center;">
+      <view style="margin-right: 10rpx;">
+        {{companyName?companyName:''}}
+      </view>
+      <image src="/static/image/triangle.png" style="width: 28rpx;height:28rpx;"></image>
     </view>
     <!-- 头像 -->
     <view style="margin-top: 40rpx;" catchtap="openCode">
@@ -15,7 +17,7 @@
     <!-- 昵称 -->
     <view class="nick-name" style="display: flex;width: 100%;">
       <view style="width: 99%;">
-        你好 {{staffName}}
+        你好 {{staffName?staffName:''}}
       </view>
       <view style="text-align: right;margin-right: 10rpx;" bindtap="toNotice">
         <view class="notice-view">
@@ -27,7 +29,7 @@
     <!-- 门店 -->
     <view class="store">
       <view>
-        <view> {{orgName}}</view>
+        <view> {{orgName?orgName:''}}</view>
         <view wx:if="{{version}}" style="width:77vw;text-align-last: right;font-size: 11px;display: flex; justify-content: flex-end;"> 当前版本号: {{version}}
           <van-icon name="upgrade" size="20px" bind:click="checkHasManualUpdate" />
         </view>
@@ -35,48 +37,21 @@
     </view>
   </view>
 </view>
-<!-- 待办 -->
 
+<!-- 待办 -->
 <view style="background-color:#f8f9fd;border-radius:40rpx 40rpx 0rpx 0rpx;margin-top: -57rpx;">
   <view style="height: 35rpx;"></view>
   <view class="todo-view">
 
     <view class="todo-view-title">待办工作</view>
     <view class="todo-view-app">
-
-      <view class="todo-view-app-item">
+      <view class="todo-view-app-item" wx:for="{{waitMenu}}" wx:for-item="item" data-item="{{item}}">
         <view class="todo-view-app-item-icon" catchtap="toApprove">
           <!-- 待办角标提醒 -->
-          <view class="todo-view-app-item-icon-tip">{{appCount}}</view>
-          <image src="{{imageUrl + 'spzx.png'}}" style="width:100%;height:100%;" />
-        </view>
-        <view class="todo-view-app-item-name">待审中心</view>
-      </view>
-      <!-- 20220820加入和客户列表的权限 -->
-      <view class="todo-view-app-item" catchtap="toOtherPage" data-type="{{10}}" data-jumptype="{{1}}" data-datevalue="{{storeHelperValue}}">
-        <view class="todo-view-app-item-icon">
-          <!-- 待办角标提醒 -->
-          <view class="todo-view-app-item-icon-tip" wx:if="{{staffHelper.publicCustomerCount}}">{{staffHelper.publicCustomerCount}}</view>
-          <image src="{{imageUrl + 'order.png'}}" style="width:100%;height:100%;" />
-        </view>
-        <view class="todo-view-app-item-name">待成交</view>
-      </view>
-
-      <view class="todo-view-app-item" catchtap="toOtherPage" data-type="{{10}}" data-jumptype="{{1}}" data-datevalue="{{storeHelperValue}}">
-        <view class="todo-view-app-item-icon">
-          <!-- 待办角标提醒 -->
-          <view class="todo-view-app-item-icon-tip" wx:if="{{staffHelper.publicCustomerCount}}">{{staffHelper.publicCustomerCount}}</view>
-          <image src="{{imageUrl + 'ghxk.png'}}" style="width:100%;height:100%;" />
-        </view>
-        <view class="todo-view-app-item-name">公海新客</view>
-      </view>
-      <view class="todo-view-app-item" catchtap="toTestExample" data-type="{{10}}" data-jumptype="{{1}}" data-datevalue="{{storeHelperValue}}">
-        <view class="todo-view-app-item-icon">
-          <!-- 待办角标提醒 -->
-          <view class="todo-view-app-item-icon-tip" wx:if="{{staffHelper.publicCustomerCount}}">{{staffHelper.publicCustomerCount}}</view>
-          <image src="{{imageUrl + 'ghxk.png'}}" style="width:100%;height:100%;" />
+          <view class="todo-view-app-item-icon-tip" wx:if="{{item.count}}">{{item.count?item.count:0}}</view>
+          <image src="{{imageUrl + item.icon}}" style="width:100%;height:100%;" />
         </view>
-        <view class="todo-view-app-item-name">测试例子</view>
+        <view class="todo-view-app-item-name">{{item.title}}</view>
       </view>
     </view>
   </view>
@@ -432,7 +407,7 @@
     <view class="todo-view-title">{{$t['recommendedGifts']}}</view>
     <view style="font-size: 12px;color: grey;">积分:3500</view>
   </view>
-  <view style="height: 59rpx;"></view> 
+  <view style="height: 59rpx;"></view>
   <view style="padding: 30rpx;">
     <dk-button style="width: 100%; background: red;" size="large" type="danger" bind:tap="logout">退出 </dk-button>
   </view>

+ 7 - 6
pages/welcome/welcome.js

@@ -18,7 +18,7 @@ Page({
      * 页面的初始数据
      */
     data: {
-        imageUrl:config.image_url + '/static/img/',
+        imageUrl: config.image_url + '/static/img/',
     },
 
     /**
@@ -136,19 +136,19 @@ Page({
                 if (data.company && data.company.svcIp && data.company.svcPort) {
                     app.globalData.URI = data.company.svcIp + ':' + data.company.svcPort
                 }
-                if (res.data.data.company == undefined
-                ) {
+                if (data.company == undefined && data.joinedCps != undefined && data.joinedCps.length > 0 ) {
                     // 调转加入企业
                     wx.reLaunch({
-                        url: '../../pages/login/login',
+                        url: '../../pages/company/company',
                     })
                 }
-                else if (res.data.data.company.cpId == null
+                else if (data.company == undefined
+                    || res.data.data.company.cpId == null
                     || res.data.data.company.cpId == ''
                     || res.data.data.company.cpId == undefined) {
                     // 调转选择公司
                     wx.reLaunch({
-                        url: '../../pages/company/company',
+                        url: '../../pages/login/login',
                     })
                 }
                 else {
@@ -187,6 +187,7 @@ Page({
                         app.globalData.user.staffName = staff.staffName
                         app.globalData.user.roleIds = staff.roleIds
                         app.globalData.user.orgId = staff.orgId
+                        app.globalData.user.orgName = staff.orgName
                         app.globalData.user.defaultWhName = staff.defaultWhName
                         app.globalData.user.defaultWhId = staff.defaultWhId
 

+ 1 - 1
utils/common.js

@@ -131,7 +131,7 @@ function navigate(address) {
             wx.showToast({
                 title: '地址无法导航',
                 image: '/static/image/warning.png',
-                duration: 1000
+                duration: 2000
             })
         },
         complete: function (res) {

+ 30 - 13
utils/util.js

@@ -726,9 +726,9 @@ function _convertToChildren(item, arr, idValue, pId, id, path = null) {
  */
 function getKeyByValue(enumObj, value) {
   for (let key in enumObj) {
-      if (enumObj[key] === value) {
-          return key;
-      }
+    if (enumObj[key] === value) {
+      return key;
+    }
   }
   return null;
 }
@@ -744,32 +744,49 @@ function isEmpty(obj) {
  * @author : 周兴
  * @date   : 2024/1/26 11:46
  */
-function filterArrayEmpty(table){
-  if(!table || table.length == 0)return table;
+function filterArrayEmpty(table) {
+  if (!table || table.length == 0) return table;
   let keys = Object.keys(table[0]);
   let returnTable = []
-  table.forEach(row=>{
+  table.forEach(row => {
     let flag = true
-    keys.forEach(k=>{
-      console.log('r',row,k,isEmpty(row[k]));
-      if(!isEmpty(row[k])){
+    keys.forEach(k => {
+      if (!isEmpty(row[k])) {
         flag = false;
       }
     })
-    if(!flag){
+    if (!flag) {
       returnTable.push(row)
     }
   })
   return returnTable;
 }
 
+/**
+ * @desc   : 提示信息
+ * @author : 周兴
+ * @date   : 2024/1/26 11:46
+ */
+function showToast(info) {
+  if (info) {
+    // 默认2s
+    let duration = 2000
+    wx.showToast({
+      title: info,
+      icon: 'none',
+      duration: duration
+    })
+  }
+}
+
 
 
 
 module.exports = {
-  filterArrayEmpty:filterArrayEmpty,
-  getKeyByValue:getKeyByValue,
-  convertToChildren:convertToChildren,
+  showToast:showToast,
+  filterArrayEmpty: filterArrayEmpty,
+  getKeyByValue: getKeyByValue,
+  convertToChildren: convertToChildren,
   objectMergeByMainJs: objectMergeByMainJs,
   updateProvince: updateProvince,
   isPoneAvailable: isPoneAvailable,