Browse Source

数据字典

姜永辉 2 năm trước cách đây
mục cha
commit
a6a9d26920

+ 2 - 4
api/pages/ivt/outboundOther.js

@@ -16,16 +16,14 @@ module.exports = {
   },
 
   routeUrl: {
-    outBounddOther: {
-      detail: { key: 'detail', url: '/package-purchase/pages/purchase-receipt/detail/detail' },
-      add: { key: 'add', url: '/package-inventory/pages/other-warehousing/other-warehousing' },
+    outboundOther: { 
       chooseSupplier: { key: 'chooseSupplier', url: '/package-base-select/pages/select-suppliers/select-suppliers'  },
       chooseStaff: { key: 'chooseStaff', url: '/package-base-select/pages/select-choose-staff/select-choose-staff'  },
       staffadd: { key: 'staffadd', url: '/package-basic-data/pages/staff/add/add'  },
       chooseOrg: { key: 'chooseOrg',url: '/package-base-select/pages/select-choose-org/select-choose-org' }, 
       chooseWh: { key: 'chooseWh', url: '/package-base-select/pages/select-warehouse/select-warehouse'  },      
       chooseStorageObject: { key: 'chooseStorageObject', url: '/package-base-select/pages/select-storage-object/select-storage-object'  },
-      chooseStorageOutReason: { key: 'chooseStorageOutReason', url: '/package-base-select/pages/select-storage-out-reason/select-storage-out-reason'  },
+      chooseStorageOutReason: { key: 'chooseStorageOutReason', url: '/package-base-select/pages/select-data-dictionary/select-data-dictionary'  },
 
     }
   }

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

@@ -376,7 +376,7 @@ Component({
               },
               success: function (res) {
                 // 通过eventChannel向被打开页面传送数据
-                res.eventChannel.emit('params', { data: 'test' })
+                res.eventChannel.emit('params', { item: item.item })
               }
             })
           }
@@ -404,7 +404,7 @@ Component({
               },
               success: function (res) {
                 // 通过eventChannel向被打开页面传送数据
-                res.eventChannel.emit('params', { data: 'test' })
+                res.eventChannel.emit('params', { data: item.item.urlKeyParam })
               }
             })
           }

+ 64 - 52
package-base-select/pages/select-data-dictionary/select-data-dictionary.js

@@ -1,66 +1,78 @@
-// package-base-select/pages/select-data-dictionary/select-data-dictionary.js
-Page({
+const Constants = require('@/utils/Constants.js')
+const mixins = require('@/mixins/index.js')
 
+Page({
+    mixins: [mixins],
     /**
      * 页面的初始数据
      */
     data: {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面加载
-     */
-    onLoad(options) {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面初次渲染完成
-     */
-    onReady() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面显示
-     */
-    onShow() {
-
+        // 路由
+        routeObjName: 'common',
+        // 列表区(内容)
+        contentList: [
+            { name: 'dataCode', title: '数据编码' },
+            { name: 'dictCode', title: '字典项目' },
+        ],
     },
 
     /**
-     * 生命周期函数--监听页面隐藏
+     * @desc : 点击事件-返回数据
+     * @author : 姜永辉
+     * @date : 2022/5/23 15:16
      */
-    onHide() {
-
-    },
-
-    /**
-     * 生命周期函数--监听页面卸载
-     */
-    onUnload() {
-
-    },
-
-    /**
-     * 页面相关事件处理函数--监听用户下拉动作
-     */
-    onPullDownRefresh() {
-
+    toDetail(e) {
+        let item = e.detail.item
+        const eventChannel = this.getOpenerEventChannel();
+        eventChannel.emit('bindData', {
+            data: {
+                id: item.dataId,
+                name: item.dataValue,
+                dictCode: item.dictCode,
+                dataCode: item.dataCode,
+                flgDefault: item.flgDefault,
+            }
+        })
+        wx.navigateBack({
+            delta: 1
+        })
     },
 
-    /**
-     * 页面上拉触底事件的处理函数
-     */
-    onReachBottom() {
-
+    /** 
+   * @desc : 查询 入库单
+   * @date : 2024年3月8日
+   * @author : 姜永辉
+   */
+    getData(params) { 
+        // 从上一个页面的urlkeypara传入
+        params.dictCode = this.data.item.urlKeyParam
+        return this.excute(this.data.service, this.data.service.getDictionaryData, params);
     },
-
-    /**
-     * 用户点击右上角分享
-     */
-    onShareAppMessage() {
-
+ 
+ /**
+   * @desc : 加载数据
+   * @date : 2024/2/1 15:49
+   * @author : 姜永辉
+   */
+  loadInit() { 
+    // 销售出库
+    if (this.data.item.outType == Constants.outType.sale) {
+      wx.setNavigationBarTitle({
+        title: mixins.$t('saleOutBound'),
+      })
+      
+
+    } else if (this.data.item.outType == Constants.outType.other) {
+      // 其他出库
+      wx.setNavigationBarTitle({
+        title: mixins.$t('otherOutWh'),
+      })
+     
+    } else {
+      
+      wx.setNavigationBarTitle({
+        title: mixins.$t('purReturnOutBound'),
+      })
     }
+  },
 })

+ 3 - 2
package-base-select/pages/select-data-dictionary/select-data-dictionary.json

@@ -1,3 +1,4 @@
 {
-    "usingComponents": {}
-}
+    "usingComponents": {},
+    "navigationBarTitleText":""
+  }

+ 11 - 2
package-base-select/pages/select-data-dictionary/select-data-dictionary.wxml

@@ -1,2 +1,11 @@
-<!--package-base-select/pages/select-data-dictionary/select-data-dictionary.wxml-->
-<text>package-base-select/pages/select-data-dictionary/select-data-dictionary.wxml</text>
+<loading wx:if="{{loading}}"></loading>
+<wxs src='/utils/wxmlUtil.wxs' module="wxmlUtil"></wxs>
+
+<!-- 暂无数据 -->
+<van-empty wx:if="{{tableData.length<=0}}" description="{{$t['nodata']}}" />
+
+<!-- 列表区 -->
+<dk-list list="{{tableData}}"   title="dataValue"  flgPoint = "{{false}}"  titleImageFlag= "{{false}}" content="{{contentList}}"   bind:toDetail="toDetail"  ></dk-list>
+
+<van-divider wx:if="{{noMore}}" contentPosition="center" borderColor="#DCDCDC">{{$t['noMore']}}~</van-divider> 
+  

+ 0 - 1
package-base-select/pages/select-storage-in-reason/select-storage-in-reason.wxss

@@ -1 +0,0 @@
-/* package-base-select/pages/select-storage-in-reason/select-storage-in-reason.wxss */

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

@@ -7,7 +7,8 @@
  *		作者				日期					版本				修改内容
  *		姜永辉	 2024年3月22日		     1.00		   	    一览
  *******************************************************************************/
-const mixins = require('@/mixins/index.js')
+const mixins = require('@/mixins/index.js');
+const Constants = require('@/utils/Constants');
 const app = getApp()
 Page({
     mixins: [mixins],
@@ -80,7 +81,8 @@ Page({
                     name: 'outReasonName',
                     type: 'choose',
                     required: true,
-                    urlKey: 'chooseStorageInReason'
+                    urlKey: 'chooseStorageOutReason',
+                    urlKeyParam: Constants.kindCode.basicOut
                 },
                 {
                     code: 'staffId',

+ 3 - 1
package-inventory/pages/other-warehousing/other-warehousing.js

@@ -8,6 +8,7 @@
  *		姜永辉	        2024年3月22日		     1.00		   	    一览
  *******************************************************************************/
 const mixins = require('@/mixins/index.js')
+const Constants = require('@/utils/Constants');
 const app = getApp()
 Page({
     mixins: [mixins],
@@ -86,7 +87,8 @@ Page({
                     name: 'intoReasonName',
                     type: 'choose',
                     required: true,
-                    urlKey: 'chooseStorageInReason'
+                    urlKey: 'chooseStorageInReason',
+                    urlKeyParam: Constants.kindCode.basicEnter
                 },
                 {
                     code: 'staffId',