Просмотр исходного кода

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

# Conflicts:
#	components/dkbase/dk-form-bill/dk-form-bill.js
于继渤 2 лет назад
Родитель
Сommit
dc7f6aab26

+ 1 - 0
api/pages/ivt/outbound.js

@@ -15,6 +15,7 @@ module.exports = {
 
   routeUrl: {
     outbound: { 
+      add: { key: 'add', url: '/package-sales/pages/sales-outbound/add/add'  },
       edit: { key: 'edit', url: '/package-inventory/pages/outbound-processing/detail/detail' },
       addOther: { key: 'addOther', url: '/package-inventory/pages/other-outbound/other-outbound' },
       chooseSupplier: { key: 'chooseSupplier', url: '/package-base-select/pages/select-data/select-data',type:'supplier'  },

+ 1 - 0
api/pages/ivt/outboundOther.js

@@ -12,6 +12,7 @@ module.exports = {
     // 前缀
     prefix: 'mdm-server/ivt/outbound_other/',
     otheroutBoundInsert: 'outbound_insert', 
+    otheroutBoundUpdate: 'outbound_update',
     outBoundHandle:'outbound_handle',
   },
 

+ 21 - 0
api/pages/mst/comMenu.js

@@ -0,0 +1,21 @@
+/*******************************************************************************
+ * Copyright(c) 2024 dongke All rights reserved. / Confidential
+ * 类的信息:
+ *		1.程序名称:
+ *		2.功能描述:常用功能查询方法
+ * 编辑履历:
+ *		作者				日期					版本				修改内容
+ *		周兴		    2024-3-28     1.00		       	新建
+ *******************************************************************************/
+module.exports = {
+
+  comMenuService: {
+    // 前缀
+    prefix: 'mdm-server/mst/comMenu/',
+  },
+
+  routeUrl: {
+    comMenu: {
+    }
+  }
+};

+ 2 - 1
app.js

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

+ 1 - 1
config/config.js

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

+ 79 - 7
package-inventory/pages/other-outbound/other-outbound.js

@@ -144,13 +144,83 @@ Page({
         routeObjName: 'outboundOther',
         table: Constants.tables.t_psi_outbound,
     },
+
+    /**
+  * @desc : 给表单赋值
+  * @date : 2024/2/1 15:49
+  * @author : 姜永辉
+  */
+    setValuesByEdit(data) {
+        console.log("setValuesByEdit", data);
+        let cardList_ = this.data.cardList
+        let contentList_ = this.data.contentList
+        let sumitemAmt = 0
+        let formType = this.data.formType
+        //  出库状态-已出库
+        if (data.outStatus == Constants.outStatus.unOutBound) {
+            //查询采购订单表 未出库的 详细 
+            this.setData({
+                buttonList: [{
+                    name: 'merge',
+                    title: mixins.$t("close")
+                }],
+            })
+        } else {
+            this.setData({
+                buttonList: [{
+                    name: 'merge',
+                    title: mixins.$t("outProcessing")
+                }],
+            })
+        }
+
+        sumitemAmt = Number(data.outingQty) * Number(data.outingAmt)
+        cardList_.forEach(card => {
+            if (card.name === 'items') {
+                if (formType == 1) {
+                    card.info = "(" + mixins.$t("outboundProcessing") + ")"
+                    card.color = "#E4002B"
+                } else {
+                    card.info = "(" + mixins.$t("checkouted") + ")"
+                    card.color = "#1B365D"
+                }
+                card.itemAmt = sumitemAmt
+            }
+        })
+        contentList_[1].content = sumitemAmt
+
+        // 明细的最大出库办理的量
+        data.goodsList.forEach(element => {
+            if (this.data.item.outType == Constants.outType.purReturn) {
+                element['outingQty_max'] = -1
+                element['outingQty_min'] = -1 * Math.abs(element.outingQty)
+            } else {
+                element['outingQty_max'] = element.outingQty
+                element['outingQty_min'] = 1
+            }
+            // 显示库区和可售量开关
+            element.usableQtyInsufficientFlag = true
+        })
+
+        // 刷新商品明细 显示 查看更多
+        let card = this.data.cardList.filter(it => it.name == 'items');
+        this.selectComponent('#' + this.data.formName).handleContentObj(card[0])
+
+        this.setData({
+            itemData: data,
+            cardList: cardList_,
+            contentList: contentList_,
+            formData: JSON.stringify(data),
+            sumitemAmt
+        })
+
+    },
     /**
      * @desc   : 绑定数据-选择页面返回的逻辑处理
      * @author : 姜永辉
      * @date   : 2024年3月12日
      */
     chooseData(e) {
-        console.log("t", e, this.data.formData);
         let formData = JSON.parse(this.data.formData)
         let cardList_ = this.data.cardList
         let code = e.detail.code
@@ -182,7 +252,6 @@ Page({
         })
     },
 
-
     /**
     * @desc : 外露设置产品方法 
     * @date : 2024/2/1 15:49
@@ -217,7 +286,6 @@ Page({
                 card.itemAmt = totalAmout
             }
         })
-        console.log(formData.goodsList);
         this.setData({
             contentList: contentList_,
             cardList,
@@ -231,7 +299,6 @@ Page({
      * @author : 姜永辉
      */
     validData() {
-        console.log("validData");
         let formData = JSON.parse(this.data.formData)
         if (formData.goodsList == null || formData.goodsList.length == 0) {
             wx.showToast({
@@ -258,7 +325,6 @@ Page({
                 return false
             }
         }
-        console.log("validData-true");
         return true
     },
 
@@ -270,6 +336,8 @@ Page({
     setParams(params) {
         let btnFormData = this.data.btnFormData ? JSON.parse(this.data.btnFormData) : ''
         let formData = JSON.parse(this.data.formData)
+        // 新增编辑的
+        params.outId = formData.outId
         // 总单的 出库中数量和金额合计
         params.outingAmt = formData.goodsList.sum("outingAmt")   //金额
         params.outingQty = formData.goodsList.sum("outingQty")     //一共的商品数量
@@ -296,7 +364,7 @@ Page({
             it.itemIndex = (i++)
         })
         params.itemList = formData.goodsList //商品明细
-        console.log("setParams", params);
+        params.annexPaths = formData.annexPaths || [] //附件 
         return params
     },
 
@@ -306,6 +374,10 @@ Page({
     * @author : 姜永辉
     */
     saveData() {
-        return this.excute(this.data.service, this.data.service.otheroutBoundInsert, this.data.params)
+        if (this.data.formMode == Constants.formMode.edit) {
+            return this.excute(this.data.service, this.data.service.otheroutBoundUpdate, this.data.params)
+        } else {
+            return this.excute(this.data.service, this.data.service.otheroutBoundInsert, this.data.params)
+        }
     },
 })

+ 61 - 4
package-inventory/pages/outbound-processing/detail/detail.js

@@ -151,14 +151,14 @@ Page({
     contentList_[1].content = sumitemAmt
 
     // 明细的最大出库办理的量
-    data.goodsList.forEach(element => { 
+    data.goodsList.forEach(element => {
       if (this.data.item.outType == Constants.outType.purReturn) {
         element['outingQty_max'] = -1
         element['outingQty_min'] = -1 * Math.abs(element.outingQty)
-    } else {
+      } else {
         element['outingQty_max'] = element.outingQty
         element['outingQty_min'] = 1
-    }
+      }
       // 显示库区和可售量开关
       element.usableQtyInsufficientFlag = true
     })
@@ -271,7 +271,7 @@ Page({
     let formData = JSON.parse(this.data.formData)
     params.allEdit = true //大编辑
     // 由于办理后直接生成出库单,将画面的删除的数据放入deleteItemList数组中
-    params.deleteItemList = formData.deleteList  || []
+    params.deleteItemList = formData.deleteList || []
 
     params.fromId = formData.fromId  //来源id
     params.fromNo = formData.fromNo  //来源单号
@@ -565,4 +565,61 @@ Page({
       })
     }
   },
+
+  /**
+ * @desc : (编辑)
+ * @date : 2024/2/1 15:49
+ * @author : 姜永辉
+ */
+  toEdit(e) {
+    let id = e.currentTarget.dataset.item.outId
+    // 销售出库
+    if (this.data.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,
+            formMode: Constants.formMode.edit
+          })
+        }
+      })
+    }
+    // 其他出库
+    else if (this.data.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,
+            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,
+            formMode: Constants.formMode.edit
+          })
+        }
+      })
+    }
+
+  },
 })

+ 5 - 9
package-inventory/pages/outbound-processing/detail/detail.wxml

@@ -17,7 +17,9 @@
       <view style="padding-left: 14rpx;padding-top: 19rpx;font-size: 26rpx;line-height: 36rpx;color: #FFFFFF;">
         {{item.outType == $t['saleOutType']?itemData.cusName:itemData.supplierName}}
       </view>
-
+      <view data-item="{{item}}" bind:tap="toEdit">
+        <van-image custom-class="image-class" src="/static/img/edit.png" />
+      </view>
     </view>
     <!-- 收货人 -->
     <view style="display: flex;padding-right: 32rpx;">
@@ -44,7 +46,7 @@
     <view style="display: flex;padding-left: 32rpx;padding-top: 16rpx;padding-bottom: 15rpx;padding-right: 32rpx;">
       <view style="display: flex; width: 50%;line-height: 36rpx;" data-type='deliveryType'>
         <view style="font-size: 24rpx;line-height: 36rpx;color: #FFFFFF;">
-           仓库配送>
+          仓库配送>
         </view>
       </view>
       <view style="display: flex; width: 50%;line-height: 36rpx;" data-key="DeliveryFlag" catchtap="openData">
@@ -56,13 +58,7 @@
   </view>
 </view>
 
-<dk-form-bill id="{{formName}}" type="out" routeObjName="{{routeObjName}}" readonly="{{formType==2}}" cardList="{{cardList}}" titleTagCol="shortName" titleCol="skuCode" descCol="skuModel" priceCol="outingAmt" quantityCol="outingQty" sumAmountCol="itemAmt" contentObj="{{contentObj}}" model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" popType="sale" table="{{table}}"
-bind:editItems="setGoods" bind:delItem="setGoods" bind:setGoods="setGoods"
-cardContentList="{{cardContentList}}"
-quantityRedTitle="可售量:"
-quantityRedCol="usableQty"
-quantityRedColFlagKey="usableQtyInsufficientFlag"
->
+<dk-form-bill id="{{formName}}" type="out" routeObjName="{{routeObjName}}" readonly="{{formType==2}}" cardList="{{cardList}}" titleTagCol="shortName" titleCol="skuCode" descCol="skuModel" priceCol="outingAmt" quantityCol="outingQty" sumAmountCol="itemAmt" contentObj="{{contentObj}}" model:value="{{formData}}" popContent="{{popContent}}" bind:chooseData="chooseData" popType="sale" table="{{table}}" bind:editItems="setGoods" bind:delItem="setGoods" bind:setGoods="setGoods" cardContentList="{{cardContentList}}" quantityRedTitle="可售量:" quantityRedCol="usableQty" quantityRedColFlagKey="usableQtyInsufficientFlag">
 </dk-form-bill>
 
 <view style="height: 200rpx;"></view>

+ 7 - 0
package-inventory/pages/outbound-processing/detail/detail.wxss

@@ -0,0 +1,7 @@
+/*图标显示*/
+.image-class {
+	width: 39rpx;
+	height: 39rpx;
+	left: 459rpx;
+	top: calc((100% - 28rpx)/2);
+  }

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

@@ -37,11 +37,11 @@ Page({
         pullType: 'mSelect',
         typeName: 'outType'
       },
-      {
-        code: 'outReason',
-        pullType: 'mSelect',
-        typeName: 'outReason'
-      },
+      // {
+      //   code: 'outReason',
+      //   pullType: 'mSelect',
+      //   typeName: 'outReason'
+      // },
       {
         code: 'cusName',
       },

+ 9 - 9
package-inventory/pages/warehousing-processing/detail/detail.js

@@ -106,7 +106,7 @@ Page({
      * @date : 2024/2/1 15:49
      * @author : 姜永辉
      */
-    setValuesByEdit(data) { 
+    setValuesByEdit(data) {
         let cardList_ = this.data.cardList
         let contentList_ = this.data.contentList
         let sumitemAmt = 0
@@ -155,7 +155,7 @@ Page({
         })
 
         // 刷新商品明细 显示 查看更多
-        let card = this.data.cardList.filter(it => it.name == 'items'); 
+        let card = this.data.cardList.filter(it => it.name == 'items');
         this.selectComponent('#' + this.data.formName).handleContentObj(card[0])
 
         this.setData({
@@ -176,7 +176,7 @@ Page({
     setGoods(e) {
         let contentList_ = this.data.contentList
         let cardList = this.data.cardList
-        let formData = JSON.parse(this.data.formData) 
+        let formData = JSON.parse(this.data.formData)
         let totalAmout = Number(0)
         // 各个明细的金额数量
         formData.goodsList.forEach(element => {  //循环出商品总共价格   
@@ -294,7 +294,7 @@ Page({
             params.intoQty = 0     //  已入库数量          
         }
         params.itemList = formData.goodsList //商品明细
-        params.annexPaths = formData.annexPaths|| [] //附件 
+        params.annexPaths = formData.annexPaths || [] //附件 
         return params
     },
     /**
@@ -302,7 +302,7 @@ Page({
      * @date : 2024/2/1 15:49
      * @author : 姜永辉
      */
-    saveData() { 
+    saveData() {
         if (this.data.itemData.intoStatus == Constants.intoStatus.inBounding) {
             if (this.data.item.intoType == Constants.intoType.pur) {
                 return this.excute(this.data.service, this.data.service.inBoundHandle, this.data.params)
@@ -531,10 +531,10 @@ Page({
     },
 
     /**
-  * @desc : (编辑)
-  * @date : 2024/2/1 15:49
-  * @author : 姜永辉
-  */
+     * @desc : (编辑)
+     * @date : 2024/2/1 15:49
+     * @author : 姜永辉
+     */
     toEdit(e) {
         let id = e.currentTarget.dataset.item.intoId
         // 采购入库

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

@@ -39,11 +39,11 @@ Page({
         pullType: 'mSelect',
         typeName: 'intoType'
       },
-      {
-        code: 'inReason',
-        pullType: 'mSelect',
-        typeName: 'intoReason'
-      },
+      // {
+      //   code: 'inReason',
+      //   pullType: 'mSelect',
+      //   typeName: 'intoReason'
+      // },
       {
         code: 'cusName',
       },

+ 122 - 7
pages/index/index.js

@@ -19,6 +19,10 @@ Page({
    * 页面的初始数据
    */
   data: {
+    showMore: false,
+    editFlag: false, // 编辑模式
+    comMenuList: [], // 常用功能
+    comMenuListForCheck:[] ,// 常用功能(简单数组)用于判断
     allCondition: '',//搜索菜单
     noticeShowFlag: true,// 是否显示通知的
     loadingShow: false,
@@ -341,8 +345,8 @@ Page({
         ImageUri: '/static/img/collection.png',
         PFunctionCode: '05',
         FunctionCode: '0509'
-      }, 
-      { 
+      },
+      {
         FunctionName: '资金账户',
         FormName: '/package-accounts-manage/pages/fund-account/fund-account',
         ImageUri: '/static/img/collection.png',
@@ -459,7 +463,56 @@ Page({
 
     ],
   },
-
+  /**
+   * @desc   : 展开收缩
+   * @author : 周兴
+   * @date   : 2024/1/26 11:46
+   */
+  expand() {
+    let showMore = this.data.showMore;
+    this.setData({
+      showMore: !showMore
+    })
+  },
+  /**
+  * @desc : 进入编辑模式
+  * @author : 周兴
+  * @date : 2024/3/29
+  */
+  toEdit() {
+    let editFlag = this.data.editFlag
+    editFlag = !editFlag;
+    let showMore = this.data.showMore
+    if (editFlag) {
+      showMore = true;
+    }
+    this.setData({
+      showMore: showMore,
+      editFlag: editFlag
+    })
+  },
+  /**
+  * @desc : 查询常用应用
+  * @author : 周兴
+  * @date : 2024/3/29
+  */
+  getComMenu() {
+    let params = {
+      staffId: app.globalData.user.staffId,
+      appCode: Constants.APP_CODE,
+    }
+    let service = app.globalData['comMenuService']
+    api.request(service.prefix + service.selectByCond, 'POST', params).then(res => {
+      if (res.data.code == Constants.SUCESS_CODE) {
+        let comMenuList = res.data.data
+        let comMenuListForCheck = comMenuList.map(it=>it.menuUuid)
+        this.setData({
+          comMenuList: comMenuList,
+          comMenuListForCheck:comMenuListForCheck
+        })
+      }
+    });
+  },
   /**
  * 过滤菜单
  */
@@ -636,11 +689,25 @@ Page({
    */
   onLoad: function (options) {
     // 调用权限时候放开
-    this.filterFunction()
+    this.filterFunction();
+    // 查询常用功能
+    this.getComMenu();
   },
 
   /* 点击icon事件 */
   toApp(e) {
+    // 编辑模式不跳页
+    if (this.data.editFlag) {
+      let comFlag = e.currentTarget.dataset.com
+      // 删除常用功能
+      if(comFlag){
+        this.delCom(e.currentTarget.dataset.item);
+      }else{
+        // 增加到常用功能
+        this.addToCom(e.currentTarget.dataset.item);
+      }
+      return;
+    }
     let url = e.currentTarget.dataset.url
     let code = e.currentTarget.dataset.code
     if (!url) {
@@ -655,12 +722,60 @@ Page({
     // 调转页面
     wx.navigateTo({
       url: url,
-      success: function(res) {
-        res.eventChannel.emit('params', { formMode:'index',functionCode:e.currentTarget.dataset.code })
+      success: function (res) {
+        res.eventChannel.emit('params', { formMode: 'index', menuUuid: code })
       }
     })
   },
-
+  /**
+   * @desc : 删除常用应用
+   * @author : 周兴
+   * @date : 2024/3/29 9:16
+   */
+  delCom(item){
+    let comMenuList = this.data.comMenuList
+    let comMenuListForCheck = this.data.comMenuListForCheck
+    comMenuList = comMenuList.filter(it=>it.menuUuid != item.menuUuid)
+    comMenuListForCheck.filter(it=>it != item.menuUuid)
+    this.setData({
+      comMenuList:comMenuList,
+      comMenuListForCheck:comMenuListForCheck
+    })
+  },
+  /**
+   * @desc : 添加到常用应用中
+   * @author : 周兴
+   * @date : 2024/3/29 9:16
+   */
+  addToCom(item) {
+    let comMenuList = this.data.comMenuList
+    let comMenuListForCheck = this.data.comMenuListForCheck
+    let it = {}
+    it.menuUuid = item.FunctionCode
+    it.objectPath = item.FormName
+    let imageUri = item.ImageUri + ''
+    it.objectIcon = imageUri ? (imageUri.substring(imageUri.lastIndexOf('/') + 1)) : ''
+    it.menuName = item.FunctionName
+
+    console.log('er', it, comMenuList);
+    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
+        })
+        return
+      }
+      comMenuList.push(it);
+      comMenuListForCheck.push(it.menuUuid)
+    }
+    this.setData({
+      comMenuList: comMenuList,
+      comMenuListForCheck:comMenuListForCheck
+    })
+  },
 
   /**
      * 页面相关事件处理函数--监听用户下拉动作

+ 1 - 1
pages/index/index.json

@@ -1,6 +1,6 @@
 {
   "usingComponents": {},
-  "navigationBarTitleText":"应用",
+  "navigationBarTitleText":"应用中心",
   "enablePullDownRefresh": true,
   "backgroundColor": "#F8F9FD"
 }

+ 87 - 44
pages/index/index.wxml

@@ -1,58 +1,101 @@
 <wxs module="m1">
-	var hasAuth = function (array, auth) {
-		return array.indexOf(auth) !== -1;
-	}
-	module.exports.hasAuth = hasAuth;
+  var hasAuth = function (array, auth) {
+    return array.indexOf(auth) !== -1;
+  }
+  module.exports.hasAuth = hasAuth;
 
-	var defineIndexOf = function (str, val) {
-		if (str != null) {
-			return str.indexOf(val);
-		}
-	}
-	module.exports.defineIndexOf = defineIndexOf;
+  var defineIndexOf = function (str, val) {
+    if (str != null) {
+      return str.indexOf(val);
+    }
+  }
+  module.exports.defineIndexOf = defineIndexOf;
 
-	var getInfoNum = function (array, infos, val) {
-		var num;
-		if (array.indexOf(val) >= 0) {
-			for (var i = 0; i < infos.length; i++) { if (infos[i].code === val) { num = infos[i].num; break; } }
-		} return num
-	}
-	module.exports.getInfoNum = getInfoNum; 
+  var getInfoNum = function (array, infos, val) {
+    var num;
+    if (array.indexOf(val) >= 0) {
+      for (var i = 0; i < infos.length; i++) { if (infos[i].code === val) { num = infos[i].num; break; } }
+    } return num
+  }
+  module.exports.getInfoNum = getInfoNum; 
 </wxs>
-
+<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
 <!-- loading -->
 <van-notify id="van-notify" />
 <loading wx:if="{{loadingShow}}" loadingName="加载中" backgroundColor="#f2f2f2;" opacity="0.8"></loading>
 <!--选择功能分区-->
 <van-sticky scroll-top="0">
-	<view class="menu-box">
-		<view style="width:32%;background:white;">
-			<van-dropdown-menu>
-				<van-dropdown-item id="functionItem" title-class="title-class" title="{{ functionItem.text }}">
-					<dk-dropdown-switch dataList="{{functionRegion}}" bind:commit='dropdowncommit'></dk-dropdown-switch>
-				</van-dropdown-item>
-			</van-dropdown-menu>
-		</view>
-		<view style="width:69%;background:white;display:flex; align-items: center;">
-			<van-search field-class="field-class" custom-class="custom-class" model:value="{{ allCondition }}" bind:change="filterFunction" use-action-slot input-align="center" placeholder="搜索菜单" />
-		</view>
-	</view>
-
+  <view class="menu-box">
+    <view style="width:32%;background:white;">
+      <van-dropdown-menu>
+        <van-dropdown-item id="functionItem" title-class="title-class" title="{{ functionItem.text }}">
+          <dk-dropdown-switch dataList="{{functionRegion}}" bind:commit='dropdowncommit'></dk-dropdown-switch>
+        </van-dropdown-item>
+      </van-dropdown-menu>
+    </view>
+    <view style="width:69%;background:white;display:flex; align-items: center;">
+      <van-search field-class="field-class" custom-class="custom-class" model:value="{{ allCondition }}" bind:change="filterFunction" use-action-slot input-align="center" placeholder="搜索菜单" />
+    </view>
+  </view>
 </van-sticky>
 
+<!-- 常用应用 -->
+<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>常用应用 </view>
+        <!--图标-->
+        <view style="display: flex;width: 75%;" bindtap='expand'>
+          <view wx:if="{{!showMore}}" style="display: flex;margin-left: 10rpx;">
+            <view style="margin-left: 2rpx;" wx:for="{{comMenuList}}" wx:for-item="item" data-code="{{item.menuUuid}}" data-url="{{item.objectPath}}" wx:key="i">
+              <image src="{{item.objectIcon?('/static/img/' + item.objectIcon):''}}" style="height: 30rpx;width:30rpx;"></image>
+            </view>
+          </view>
+          <view wx:if="{{showMore}}" class="expand-class">
+            <van-icon size="12px" name="arrow-up" />
+          </view>
+          <view wx:else class="expand-class">
+            <van-icon size="12px" name="arrow-down" />
+          </view>
+        </view>
+      </view>
+      <dk-tag type="primary" padding="0 20rpx" height="40rpx" color="#1E90FF" textColor="#FFFFFF" radius="5rpx" roundFlag="{{true}}" value="{{editFlag?'保存':'编辑'}}" catchtap="toEdit"></dk-tag>
+    </view>
+    <view wx:if="{{showMore}}" style="background: #fff;border-radius: 15rpx;">
+      <view style="display: flex;flex-wrap: wrap;padding: 43rpx 0;align-items: center;">
+        <view class="app-item" style="width:25%;text-align: center;" icon-class="index-grid-item-icon-class" text-class="index-grid-item-text-class" content-class="index-grid-item-class" wx:for="{{comMenuList}}" wx:for-item="item" data-item="{{item}}" data-code="{{item.menuUuid}}" data-url="{{item.objectPath}}" data-com="{{true}}" bindtap="toApp" wx:key="i">
+          <view style="display: flex;justify-content: center;">
+            <image src="{{item.objectIcon?('/static/img/' + item.objectIcon):''}}" style="height: 80rpx;width:80rpx;margin-bottom: 11rpx;"></image>
+            <view style="margin-left: -6rpx; margin-top: -20rpx" wx:if="{{editFlag  }}">
+              <van-icon size="15px" name="clear" color="#D3D3D3" />
+            </view>
+          </view>
+          <view class="index-grid-item-text-class">{{item.menuName}}</view>
+        </view>
+      </view>
+    </view>
+  </view>
+</view>
+
 <!-- 应用集合 -->
 <view wx:if="{{bingFlag == 0 }}">
-	<view class="panel-class" wx:for="{{regions}}" data-item="{{item}}" wx:key="index" title="{{item.FunctionName}}" wx:if="{{m1.hasAuth(functionRegions,item.FunctionName)}}">
-		<view class="app-name">{{item.FunctionName}}
-			<image wx:if="{{item.FunctionName == '资金管理' || item.FunctionName == '经营分析'}}" src="/static/img/diamond.png" class="icon-title_diamond" />
-		</view>
-		<view style="background: #fff;border-radius: 15rpx;">
-			<view style="display: flex;flex-wrap: wrap;padding: 43rpx 0;align-items: center;">
-				<view class="app-item" style="width:25%;text-align: center;" icon-class="index-grid-item-icon-class" text-class="index-grid-item-text-class" content-class="index-grid-item-class" wx:for="{{functionItems}}" wx:for-item="item2" data-code="{{item2.FunctionCode}}" wx:if="{{item.FunctionCodeOrder==item2.PFunctionCode}}" data-url="{{item2.FormName}}" bindtap="toApp" wx:key="i" info="{{m1.getInfoNum(infocodes,infos,item2.FunctionCode)}}">
-					<image src="{{item2.ImageUri}}" style="height: 80rpx;width:80rpx;margin-bottom: 11rpx;"></image>
-					<view class="index-grid-item-text-class">{{item2.FunctionName}}</view>
-				</view>
-			</view>
-		</view>
-	</view>
+  <view class="panel-class" wx:for="{{regions}}" data-item="{{item}}" wx:key="index" title="{{item.FunctionName}}" wx:if="{{m1.hasAuth(functionRegions,item.FunctionName)}}">
+    <view class="app-name">{{item.FunctionName}}
+      <image wx:if="{{item.FunctionName == '资金管理' || item.FunctionName == '经营分析'}}" src="/static/img/diamond.png" class="icon-title_diamond" />
+    </view>
+    <view style="background: #fff;border-radius: 15rpx;">
+      <view style="display: flex;flex-wrap: wrap;padding: 43rpx 0;align-items: center;">
+        <view class="app-item" style="width:25%;text-align: center;" icon-class="index-grid-item-icon-class" text-class="index-grid-item-text-class" content-class="index-grid-item-class" wx:for="{{functionItems}}" wx:for-item="item2" data-code="{{item2.FunctionCode}}" wx:if="{{item.FunctionCodeOrder==item2.PFunctionCode}}" data-url="{{item2.FormName}}" data-item="{{item2}}" bindtap="toApp" wx:key="i" info="{{m1.getInfoNum(infocodes,infos,item2.FunctionCode)}}">
+          <view style="display: flex;justify-content: center;">
+            <image src="{{item2.ImageUri}}" style="height: 80rpx;width:80rpx;margin-bottom: 11rpx;"></image>
+            <view style="margin-left: -6rpx; margin-top: -20rpx" wx:if="{{editFlag && !m1.hasAuth(comMenuListForCheck,item2.FunctionCode) }}">
+              <van-icon size="15px" name="add" color="#1E90FF" />
+            </view>
+          </view>
+          <view class="index-grid-item-text-class" style="margin-left: -28rpx;">{{item2.FunctionName}}</view>
+        </view>
+      </view>
+    </view>
+  </view>
 </view>

+ 8 - 1
pages/index/index.wxss

@@ -17,7 +17,9 @@ page {
   display: flex;
 }
 
-
+.expand-class{
+  margin-left: 10rpx;
+}
 
 .panel-class {
   margin-top: 44rpx;
@@ -104,6 +106,11 @@ page {
   margin-bottom: 21rpx;
 }
 
+/* .app-item{
+  display: flex;
+  justify-content: center;
+} */
+
 .app-item:nth-child(n+5) {
   margin-top: 50rpx;
 }