| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495 |
- const Constants = require('@/utils/Constants.js');
- const util = require('@/utils/util.js')
- const mixins = require('@/mixins/index.js')
- Page({
- mixins: [mixins],
- /**
- * 页面的初始数据
- */
- data: {
- // 列表区(内容)
- contentList: [{ name: 'sysCode', title: '角色编码' },
- { name: 'remarks', title: '角色说明' }],
- // 弹出按钮
- buttonList: [{ name: 'follow', title: '采购作废' }, { name: 'followTask', title: '冲正重开' }, { name: 'purchase-return-repla-sup', title: '采购退货' },
- { name: 'collection', title: '采购退货冲正' }, { name: 'merge', title: '打印票据' }],
- totallength: 234999, //视图下方提醒数量
- selectTotallength: 12,
- selectlength: 5,
- // 路由
- routeObjName: 'role',
- tableData: [],
- },
- toAdd() {
- wx.navigateTo({
- url: this.data.route.add.url,
- events: function (e) {
- // 回调后,在这里给页面赋值
- },
- success: function (res) {
- // 通过eventChannel向被打开页面传送数据 TODO 测试例子url是写死的,实际中,需要从route中读取
- res.eventChannel.emit('params', {})
- }
- })
- },
- getData(params) {
- return this.excute(this.data.service, this.data.service.selectByCond, params);
- },
- /**
- * 生命周期函数--监听页面加载
- */
- onLoad(options) {
- console.log('routeUrl', this.data.route)
- },
- /**
- * 生命周期函数--监听页面初次渲染完成
- */
- onReady() {
- },
- /**
- * 生命周期函数--监听页面显示
- */
- onShow() {
- },
- /**
- * 生命周期函数--监听页面隐藏
- */
- onHide() {
- },
- /**
- * 生命周期函数--监听页面卸载
- */
- onUnload() {
- },
- /**
- * 页面相关事件处理函数--监听用户下拉动作
- */
- onPullDownRefresh() {
- },
- /**
- * 页面上拉触底事件的处理函数
- */
- onReachBottom() {
- },
- /**
- * 用户点击右上角分享
- */
- onShareAppMessage() {
- }
- })
|