chenhaozhe
6 天以前 a0e47a942040bd0f3ad73d8115e3ad0eafccdf9d
新增 器具点检记录单 器具维护记录单 在库检验单列表
3个文件已修改
3个文件已添加
421 ■■■■■ 已修改文件
pages.json 21 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill.vue 19 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/ZLGL/zaikujianyandan/InStockCheckBillList.vue 331 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/tab3.vue 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/tab4.vue 16 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json
@@ -1397,6 +1397,27 @@
            {
                "navigationBarTitleText" : "在库检验单"
            }
        },
        {
            "path" : "pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill",
            "style" :
            {
                "navigationBarTitleText" : "设备保养记录单"
            }
        },
        {
            "path" : "pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill",
            "style" :
            {
                "navigationBarTitleText" : "设备点检记录单"
            }
        },
        {
            "path" : "pages/ZLGL/zaikujianyandan/InStockCheckBillList",
            "style" :
            {
                "navigationBarTitleText" : "在库检验单列表"
            }
        }
        
    ],
pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill.vue
New file
@@ -0,0 +1,19 @@
<template>
    <view>
    </view>
</template>
<script>
    export default {
        data() {
            return {
            };
        }
    }
</script>
<style lang="scss">
</style>
pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill.vue
New file
@@ -0,0 +1,19 @@
<template>
    <view>
    </view>
</template>
<script>
    export default {
        data() {
            return {
            };
        }
    }
</script>
<style lang="scss">
</style>
pages/ZLGL/zaikujianyandan/InStockCheckBillList.vue
New file
@@ -0,0 +1,331 @@
<template>
    <view>
        <view class="header" id="list_header">
            <view class="form">
                <view class="form-item">
                    <view class="title">单据号:</view>
                    <view class="right">
                        <input name="HBillNo" v-model="hform.HBillNo" placeholder="请输入单据号" />
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">开始时间:</view>
                    <view class="right">
                        <picker mode="date" :value="hform.HBeginDate" @change="HBeginDateChange">
                            <view class="picker-overlay"></view>
                            <input name="HBeginDate" disabled :value="hform.HBeginDate" placeholder="请选择" />
                        </picker>
                    </view>
                </view>
                <view class="form-item">
                    <view class="title">结束时间:</view>
                    <view class="right">
                        <picker mode="date" :value="hform.HEndDate" @change="HEndDateChange">
                            <view class="picker-overlay"></view>
                            <input name="HEndDate" disabled :value="hform.HEndDate" placeholder="请选择" />
                        </picker>
                    </view>
                </view>
            </view>
            <view class="buttons">
                <button class="btn-a" size="mini" type="default" @tap="clear">重置</button>
                <button class="btn-b" size="mini" type="default" @tap="creat">新增</button>
                <button class="btn-c" size="mini" type="default" @tap="search">查询</button>
            </view>
        </view>
        <scroll-view scroll-y="true" @scroll="scrollHandler" :scroll-top="contentScrollTop"
            :style="{height: calcHeight + 'px'}" class="content">
            <view class="over" v-if="billList.length == 0">
                暂无数据
            </view>
            <view v-else  class="list" v-for="(item,index) in billList" :key="index">
                <uni-card style="margin: 10px;">
                    <view class="card-detail">
                        <view class="detail">
                            <text>单据号:</text>{{item["单据号"]}}
                        </view>
                        <view class="detail">
                            <text>物料代码:</text>{{item["物料代码"]}}
                        </view>
                        <view class="detail">
                            <text>物料名称:</text>{{item["物料名称"]}}
                        </view>
                        <view class="detail">
                            <text>规格型号:</text>{{item["规格型号"]}}
                        </view>
                        <view class="detail">
                            <text>计量单位:</text>{{item["计量单位"]}}
                        </view>
                        <view class="detail">
                            <text>合格数量:</text>{{item["合格数量"]}}
                        </view>
                        <view class="detail">
                            <text>不合格数量:</text>{{item["不合格数量"]}}
                        </view>
                    </view>
                </uni-card>
            </view>
        </scroll-view>
        <uni-pagination id="pagination" v-model="curPage" :pageSize="size" :total="length"></uni-pagination>
    </view>
</template>
<script>
    import dayjs from 'dayjs';
    import {
        CommonUtils
    } from '../../../utils/common';
    import {
        getUserInfo
    } from '../../../utils/auth';
    export default {
        name: "InStockCheckBillList",
        data() {
            return {
                contentScrollTop: 0,
                contentScrollTopOld: 0,
                headerHeight: 0,
                paginationHeight: 0,
                curPage: 1,
                size: 50,
                length: 0,
                hform: {
                    HBillNo: "",
                    HBeginDate: dayjs(new Date()).subtract(30, "d").format("YYYY-MM-DD"),
                    HEndDate: dayjs(new Date()).format("YYYY-MM-DD")
                },
                billList: [],
            };
        },
        computed: {
            calcHeight: {
                get() {
                    console.log('this.paginationHeight - this.headerHeight: ', this.paginationHeight - this
                        .headerHeight);
                    return this.paginationHeight - this.headerHeight
                }
            }
        },
        onLoad() {
            this.getDisplayPage()
        },
        onReady() {
            this.getScrollHeight()
        },
        methods: {
            getScrollHeight() {
                const query = uni.createSelectorQuery().in(this)
                query
                    .select("#list_header")
                    .boundingClientRect()
                    .select("#pagination")
                    .boundingClientRect()
                    .exec(res => {
                        this.headerHeight = Math.ceil(res[0].bottom)
                        this.paginationHeight = Math.floor(res[1].top)
                    })
            },
            scrollToTop() {
                this.contentScrollTop = this.contentScrollTopOld;
                this.$nextTick(() => {
                    this.contentScrollTop = 0
                });
            },
            scrollHandler(e) {
                this.contentScrollTopOld = e.detail.scrollTop
            },
            creat() {
                uni.navigateTo({
                    url: "/pages/ZLGL/zaikujianyandan/InStockCheckBill?operationType=1"
                })
            },
            search() {
                getDisplayPage()
            },
            clear() {
                this.hform.HBillNo = ""
                this.hform.HBeginDate = dayjs(new Date()).subtract(7, 'd').format("YYYY-MM-DD")
                this.hform.HEndDate = dayjs(new Date()).format("YYYY-MM-DD")
            },
            async getDisplayPage() {
                let sWhere = ` and 日期
                  BETWEEN  CAST('${this.hform.HBeginDate}' AS DATE)
                  AND CAST('${this.hform.HEndDate}' AS DATE)
                `
                if(this.hform.HBillNo){
                    sWhere += ` and 单据号 like '${this.hform.HBillNo}'`
                }
                try {
                    let res = await CommonUtils.doRequest2Async({
                        url: 'QC_InStockCheckBillController/getListPage',
                        data: {
                            sWhere: sWhere,
                            user: getUserInfo()['Czymc'],
                            page: this.curPage,
                            size: this.size
                        }
                    })
                    let {
                        count,
                        data,
                        Message
                    } = res.data
                    if (count >= 0) {
                        console.log('data: ',data);
                        this.length = count
                        this.billList = data
                    } else {
                        CommonUtils.showTips({
                            title: '温馨提示',
                            message: '获取在库检验单失败: ' + Message
                        })
                    }
                } catch (err) {
                    CommonUtils.showTips({
                        title: '温馨提示',
                        message: '获取在库检验单失败: ' + err
                    })
                }
            }
        }
    }
</script>
<style lang="scss">
    .header {
        padding: 20rpx 20rpx;
    }
    .form {
        width: 640rpx;
    }
    .form-item {
        display: flex;
        align-items: center;
        font-size: 28rpx;
        padding: 6rpx 0;
        .title {
            width: 180rpx;
            text {
                color: red;
                font-weight: bold;
            }
        }
        .right {
            width: 450rpx;
            border-radius: 22rpx;
            border: 1px solid #acacac;
            position: relative;
        }
        .righton {
            width: 450rpx;
            border-radius: 22rpx;
            border: 1px solid #e4e4e4;
            background-color: #e4e4e4;
        }
        input {
            width: 100%;
            padding: 8rpx 20rpx;
            font-size: 30rpx;
        }
    }
    .buttons {
        width: 100%;
        display: flex;
        justify-content: center;
        padding-top: 20rpx;
        button {
            border-radius: 50rpx;
            width: 180rpx;
            height: 66rpx;
            line-height: 66rpx;
            font-size: 28rpx;
        }
        .btn-a {
            background-color: #acacac;
            color: #fff;
        }
        .btn-b {
            background-color: #41a863;
            color: #fff;
        }
        .btn-c {
            background-color: #3a78ff;
            color: #fff;
        }
    }
    #pagination {
        position: fixed;
        bottom: 0;
        width: 100%;
        padding: 20rpx 0;
    }
    .list {
        width: 100%;
        .card-detail {
            width: 100%;
            display: flex;
            flex-wrap: wrap;
            justify-content: space-between;
            align-items: center;
            line-height: 120%;
            gap: 10rpx 0;
            input {
                font-size: 26rpx;
            }
            .detail {
                // width: 50%;
                box-sizing: border-box;
                font-size: 26rpx;
                color: #555;
                padding-right: 20rpx;
                text {
                    color: #999;
                    font-size: 26rpx;
                }
            }
            .editable {
                width: 50%;
                display: inline-flex;
                flex-direction: row;
                align-items: center;
                text {
                    flex-shrink: 0;
                }
                .sampleDestory {
                    border: 1px solid #acacac;
                    border-radius: 5rpx;
                    padding: 0 12rpx;
                }
            }
        }
    }
</style>
pages/index/tab3.vue
@@ -138,7 +138,20 @@
                        "id": 51,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "设备保养记录单",
                        "url": "/pages/MJGL/Sb_EquipMaintainBill/Sb_EquipMaintainBill",
                        "id": 53,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "设备点检记录单",
                        "url": "/pages/MJGL/Sb_EquipDotCheckBill/Sb_EquipDotCheckBill",
                        "id": 55,
                        "hidden": false
                    }
                ]
            }
        },
pages/index/tab4.vue
@@ -134,7 +134,21 @@
                        "url": "/pages/ZLGL/QualityReportStep/QualityReportStepBillList",
                        "id": 55,
                        "hidden": false
                    }
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "在库检验单",
                        "url": "/pages/ZLGL/zaikujianyandan/InStockCheckBill",
                        "id": 57,
                        "hidden": false
                    },
                    {
                        "img": "../../static/icon/icon8.png",
                        "text": "在库检验单缓存",
                        "url": "/pages/ZLGL/zaikujianyandan/InStockCheckBillList",
                        "id": 57,
                        "hidden": false
                    }
                    
                ]
            }