|
|
@@ -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'),
|
|
|
+ })
|
|
|
}
|
|
|
+ },
|
|
|
})
|