zhaoxiaohai hace 2 años
padre
commit
fc823f5fb2

+ 66 - 0
packageA/forecast/detail.js

@@ -0,0 +1,66 @@
+// packageA/forecast/detail.js
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad(options) {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload() {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh() {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom() {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage() {
+
+    }
+})

+ 4 - 0
packageA/forecast/detail.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "创建提报"
+}

+ 1 - 0
packageA/forecast/detail.scss

@@ -0,0 +1 @@
+/* packageA/forecast/detail.wxss */

+ 2 - 0
packageA/forecast/detail.wxml

@@ -0,0 +1,2 @@
+<!--packageA/forecast/detail.wxml-->
+<text>packageA/forecast/detail.wxml</text>

+ 100 - 0
packageA/forecast/index.js

@@ -0,0 +1,100 @@
+const _Http = getApp().globalData.http,
+    getHeight = require("../../utils/getRheRemainingHeight");
+
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+        listHeight: null,
+        list: [],
+        "content": {
+            pageNumber: 1,
+            pageTotal: 1,
+            pageSize: 20,
+            "where": {
+                "condition": ""
+            }
+        }
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad(options) {
+        this.getList()
+    },
+    getList(init = false) {
+        //init 用于初始化分页
+        if (init.detail != undefined) init = init.detail;
+        if (init) this.setData({
+            ['content.pageNumber']: 1
+        })
+        if (this.data.content.pageNumber > this.data.content.pageTotal) return;
+        _Http.basic({
+            "id": 20220906154403,
+            "version": 1,
+            content: this.data.content
+        }).then(res => {
+            console.log(res)
+            this.selectComponent('#ListBox').RefreshToComplete();
+            this.setData({
+                'content.pageNumber': res.pageNumber + 1,
+                'content.pageTotal': res.pageTotal,
+                list: res.pageNumber == 1 ? res.data : this.data.list.concat(res.data)
+            })
+        })
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady() {
+        getHeight.getHeight('#placeholder', this).then(res => this.setData({
+            listHeight: res
+        }));
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload() {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh() {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom() {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage() {
+
+    }
+})

+ 4 - 0
packageA/forecast/index.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "销售预测"
+}

+ 72 - 0
packageA/forecast/index.scss

@@ -0,0 +1,72 @@
+page {
+    overflow: hidden;
+}
+
+.header {
+    height: 102rpx;
+    line-height: 102rpx;
+    font-size: 30rpx;
+    font-family: PingFang SC-Bold, PingFang SC;
+    font-weight: bold;
+    color: #000000;
+    padding-left: 30rpx;
+}
+
+.item {
+    width: 696rpx;
+    margin: 10rpx auto 20rpx;
+    background-color: #fff;
+    border-radius: 16rpx;
+    overflow: hidden;
+
+    .introduce {
+        position: relative;
+        width: 100%;
+        height: 178rpx;
+        box-sizing: border-box;
+        padding-left: 158rpx;
+        border-bottom: 1px solid #DDDDDD;
+
+        .title {
+            height: 44rpx;
+            line-height: 44rpx;
+            font-size: 32rpx;
+            font-family: PingFang SC-Bold, PingFang SC;
+            font-weight: bold;
+            color: #333333;
+            padding-top: 20rpx;
+            margin-bottom: 15rpx;
+        }
+
+        .explain {
+            font-size: 24rpx;
+            line-height: 44rpx;
+            font-family: PingFang SC-Medium, PingFang SC;
+            color: #999999;
+        }
+    }
+
+    .handle {
+        display: flex;
+        width: 100%;
+
+        navigator {
+            flex: 1;
+            height: 88rpx;
+            line-height: 88rpx;
+            text-align: center;
+            width: 156px;
+            font-size: 24rpx;
+            font-family: PingFang SC-Regular, PingFang SC;
+            color: #333333;
+            box-sizing: border-box;
+        }
+
+        navigator:nth-child(2) {
+            border-left: 1px solid #DDDDDD;
+        }
+
+    }
+
+
+}

+ 18 - 0
packageA/forecast/index.wxml

@@ -0,0 +1,18 @@
+<view id="placeholder" />
+<My_listBox id='ListBox' height="{{listHeight}}" bind:getlist='getList'>
+    <view class="header">
+        提报任务
+    </view>
+    <view class="item" wx:for="{{list}}" wx:key="item.sa_salesforecastmodelid">
+        <view class="introduce">
+            <view class="title line-1">{{item.title}}</view>
+            <view class="explain line-1">提报周期:每{{item.periodtype}}{{item.periodpoint}}{{item.periodtype=='月'?'号':''}}</view>
+            <view class="explain line-1">提报要求:{{item.baseonproject}}</view>
+        </view>
+        <view class="handle">
+            <navigator url="./detail?id={{item.sa_salesforecastmodelid}}">创建/编辑提报</navigator>
+            <navigator url="./record?id={{item.sa_salesforecastmodelid}}">提报记录</navigator>
+        </view>
+    </view>
+    <view style="height:30px;" />
+</My_listBox>

+ 66 - 0
packageA/forecast/record.js

@@ -0,0 +1,66 @@
+// packageA/forecast/record.js
+Page({
+
+    /**
+     * 页面的初始数据
+     */
+    data: {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面加载
+     */
+    onLoad(options) {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面初次渲染完成
+     */
+    onReady() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面显示
+     */
+    onShow() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面隐藏
+     */
+    onHide() {
+
+    },
+
+    /**
+     * 生命周期函数--监听页面卸载
+     */
+    onUnload() {
+
+    },
+
+    /**
+     * 页面相关事件处理函数--监听用户下拉动作
+     */
+    onPullDownRefresh() {
+
+    },
+
+    /**
+     * 页面上拉触底事件的处理函数
+     */
+    onReachBottom() {
+
+    },
+
+    /**
+     * 用户点击右上角分享
+     */
+    onShareAppMessage() {
+
+    }
+})

+ 4 - 0
packageA/forecast/record.json

@@ -0,0 +1,4 @@
+{
+    "usingComponents": {},
+    "navigationBarTitleText": "销售记录"
+}

+ 1 - 0
packageA/forecast/record.scss

@@ -0,0 +1 @@
+/* packageA/forecast/record.wxss */

+ 2 - 0
packageA/forecast/record.wxml

@@ -0,0 +1,2 @@
+<!--packageA/forecast/record.wxml-->
+<text>packageA/forecast/record.wxml</text>