工序出站汇报单 添加 合格数量/不良数量/报废数量判空验证
工序出站汇报单 添加 计时条件下 工时 判空和判0验证
新增 实时库存查询 页面
4个文件已修改
1个文件已添加
415 ■■■■■ 已修改文件
manifest.json 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages.json 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/gongxuOut/form.vue 34 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/index/tab2.vue 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/jishikucunchaxun/table.vue 362 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
manifest.json
@@ -2,8 +2,8 @@
    "name" : "智云LMES",
    "appid" : "__UNI__B002F49",
    "description" : "",
    "versionName" : "1.0.60",
    "versionCode" : 160,
    "versionName" : "1.0.61",
    "versionCode" : 161,
    "transformPx" : false,
    /* 5+App特有相关 */
    "app-plus" : {
pages.json
@@ -732,6 +732,14 @@
            {
                "navigationBarTitleText" : "修改密码"
            }
        },
        {
            "path" : "pages/jishikucunchaxun/table",
            "style" :
            {
                "navigationBarTitleText" : "ERP及时库存查询"
                // "enablePullDownRefresh": true
            }
        }
    ],
    "tabBar": {
pages/gongxuOut/form.vue
@@ -500,6 +500,7 @@
    import {
        getUserInfo
    } from "@/utils/auth.js";
import { CommonUtils } from '../../utils/common';
    export default {
        data() {
            return {
@@ -1295,8 +1296,31 @@
                    },
                });
            },
            preEditOrAddCheck() {
                if(CommonUtils.isEmpty(this.hform.HQty) == true){
                    return {pass: false, message: '提交失败: 合格数量为空'}
                }
                if(CommonUtils.isEmpty(this.hform.HBadCount) == true){
                    return {pass: false, message: '提交失败: 不良数量为空'}
                }
                if(CommonUtils.isEmpty(this.hform.HQty) == true){
                    return {pass: false, message: '提交失败: 报废数量为空'}
                }
                if(this.hform.HIsTimeFlag == 1 && CommonUtils.isEmpty(this.hform.HWorkTimes, true, true)) {
                    return {pass: false, message: '提交失败: 开启计时,但工时为0或空'}
                }
                return {pass: true, message: ''}
            },
            //编辑
            ifEdit() {
                let {pass, message} = this.preEditOrAddCheck()
                if(pass == false) {
                    return uni.showToast({
                        icon: 'none',
                        title: message
                    })
                }
                //是否编辑
                uni.request({
                    url: this.serverUrl + '/Cj_StationOutBill/set_ShowBillJudge',
@@ -1614,6 +1638,7 @@
            },
            //新增
            getNewData() {
                uni.request({
                    url: this.serverUrl + '/Web/GetMAXNum',
                    data: {
@@ -1670,6 +1695,15 @@
                        icon: 'none'
                    })
                } else {
                    let {pass, message} = this.preEditOrAddCheck()
                    if(pass == false) {
                        return uni.showToast({
                            icon: 'none',
                            title: message
                        })
                    }
                    uni.showLoading({
                        title: '请稍候'
                    })
pages/index/tab2.vue
@@ -195,6 +195,13 @@
                    id: 26,
                    hidden: false,
                },
                {
                    img: '../../static/icon/icon18.png',
                    text: 'ERP及时库存查询',
                    url: '/pages/jishikucunchaxun/table',
                    id: 27,
                    hidden: false,
                },
                // , {
                //     img: '../../static/icon/icon1.png',
                //     text: '设备档案查询',
pages/jishikucunchaxun/table.vue
New file
@@ -0,0 +1,362 @@
<template>
    <view class="page" id="pageContent">
        <view class="search-condition-zone">
            <view class="form-item">
                <view class="left">
                    条码:
                </view>
                <view class="right general">
                    <input type="text" v-model="hform.HBarCode" />
                </view>
            </view>
            <view class="form-item">
                <view class="left">
                    仓库:
                </view>
                <view class="right general">
                    <uni-combox :candidates="arrayHWHName" placeholder="请输入(或扫描)仓库" v-model="hform.HWHName"
                        @input="onArrayHWHNameChangeHandler"></uni-combox>
                </view>
            </view>
            <view class="form-item">
                <view class="left">
                    仓位:
                </view>
                <view class="right general" v-show="HIsStockMgr">
                    <uni-combox :candidates="arrayHStockPlaceName" placeholder="请输入(或扫描)仓位"
                        v-model="hform.HStockPlaceName" @input="onArrayHStockPlaceNameChangeHandler"></uni-combox>
                </view>
                <view class="right disabled" v-show="!HIsStockMgr">
                    <input v-model="hform.HStockPlaceName" :disabled="!HIsStockMgr" placeholder="不可操作" />
                </view>
            </view>
        </view>
        <view class="button-zone">
            <button type="default" class="btn-a" size="mini" @tap="cmdSearch">查询</button>
            <button type="default" class="btn-c" size="mini" @tap="exit">退出</button>
        </view>
        <view class="info-list-zone">
            <view class="card-item" v-for="(item, index) in listDataShow">
                <uni-card :title="item['物料代码']" :extra="'数量: ' + item['数量']" note="Tips">
                    <view class="card-detail">
                        <view class="detail" v-if="item['仓库']">
                            <text>仓库:</text>{{item['仓库']}}
                        </view>
                        <view class="detail" v-if="item['仓位']">
                            <text>仓位:</text>{{item['仓位']}}
                        </view>
                        <view class="detail" v-if="item['物料名称']">
                            <text>物料名称:</text>{{item['物料名称']}}
                        </view>
                        <view class="detail" v-if="item['规格型号']">
                            <text>规格型号:</text>{{item['规格型号']}}
                        </view>
                        <view class="detail" v-if="item['批次']">
                            <text>批次:</text>{{item['批次']}}
                        </view>
                        <view class="detail" v-if="item['辅助属性']">
                            <text>辅助属性:</text>{{item['辅助属性']}}
                        </view>
                        <view class="detail" v-if="item['生产日期']">
                            <text>生产日期:</text>{{item['生产日期']}}
                        </view>
                        <view class="detail" v-if="item['有效期至']">
                            <text>有效期至:</text>{{item['有效期至']}}
                        </view>
                        <view class="detail" v-if="item['组织']">
                            <text>组织:</text>{{item['组织']}}
                        </view>
                    </view>
                </uni-card>
            </view>
        </view>
        <view class="pagination-zone">
            <uni-pagination show-icon :page-size="paginationMeta.pageSize" :total="paginationMeta.total" :current="paginationMeta.current"
                @change="onPaginationChangeHandler"></uni-pagination>
        </view>
    </view>
</template>
<script>
    import {
        CommonUtils
    } from '../../utils/common'
    import {
        getUserInfo
    } from '../../utils/auth'
    export default {
        data() {
            return {
                navHeight: 0,
                HWHNameList: [],
                arrayHWHName: [],
                HStockPlaceNameList: [],
                arrayHStockPlaceName: [],
                HIsStockMgr: false,
                scrollTop: 0,
                hform: {
                    HBarCode: '',
                    HWHName: '',
                    HWHID: 0,
                    HStockPlaceName: '',
                    HStockPlaceID: 0,
                },
                paginationMeta: {
                    current: 1,
                    total: 0,
                    pageSize: 30,
                },
                listData: [],
                listDataShow: [],
            }
        },
        methods: {
            exit() {
                uni.navigateBack()
            },
            onArrayHWHNameChangeHandler(e) {
                let index = this.HWHNameList.findIndex(p => p.HName == e)
                if (index != -1) {
                    this.hform.HWHID = this.HWHNameList[index].HItemID
                    this.HIsStockMgr = this.HWHNameList[index].HIsStockMgr
                }
            },
            getWHInfo() {
                CommonUtils.doRequest(
                    "/Web/GetWarehouseList_Json_New", {
                        Warehouse: "",
                        HOrgID: uni.getStorageSync('OrganizationID')
                    },
                    (res) => {
                        let res1 = res.data
                        let {
                            data,
                            count
                        } = res1
                        if (count == 1) {
                            this.HWHNameList = data
                            for (var i = 0; i < data.length; i++) {
                                this.arrayHWHName[i] = data[i]["HName"]
                            }
                        } else {
                            uni.showToast({
                                title: '仓库数据请求失败',
                                icon: 'none'
                            })
                        }
                    },
                )
            },
            onArrayHStockPlaceNameChangeHandler() {
                let index = this.HStockPlaceNameList.findIndex(p => p.HName == e)
                if (index != -1) {
                    this.hform.HStockPlaceID = this.HStockPlaceNameList[index].HItemID
                }
            },
            getStockPlaceInfo() {
                CommonUtils.doRequest(
                    "/WEBSController/GetStockPlaceList_Json", {
                        StockPlace: '',
                        HWhID: this.hform.HWHID,
                        HStockOrgID: uni.getStorageSync('OrganizationID')
                    },
                    (res) => {
                        let res1 = res.data
                        console.log(res1)
                        let {
                            data,
                            count
                        } = res1
                        if (count == 1) {
                            this.HStockPlaceNameList = data
                            for (var i = 0; i < data.length; i++) {
                                this.arrayHStockPlaceName[i] = data[i]["HWhName"]
                            }
                        } else {
                            uni.showToast({
                                title: '仓位数据请求失败',
                                icon: 'none'
                            })
                        }
                    },
                )
            },
            cmdSearch() {
                if (this.hform.HWHName == '') {
                    this.hform.HWHID = 0
                }
                if (this.hform.HStockPlaceName == '') {
                    this.hform.HStockPlaceID = 0
                }
                CommonUtils.doRequest2({
                    url: '/KF_ICInventoryByMaterID/GetBillEntry_TmpList_Pack1',
                    data: {
                        "HBarCode": this.hform.HBarCode,
                        "sHWHID": this.hform.HWHID,
                        "sHSPID": this.hform.HStockPlaceID,
                        "HOWNERID": uni.getStorageSync('OrganizationID'),
                        "sWhere": ''
                    },
                    resFunction: (res) => {
                        let {
                            data,
                            count,
                            Message
                        } = res.data
                        if (count > 0) {
                            this.listData = data
                            this.paginationMeta.total = data.length
                            this.onPaginationChangeHandler({
                                current: 1
                            })
                        } else {
                            uni.showToast({
                                icon: 'none',
                                title: Message
                            })
                        }
                    }
                })
            },
            async onPaginationChangeHandler({
                current
            }) {
                this.listDataShow =
                    this.listData.slice((current - 1) * this.paginationMeta.pageSize,
                        current * this.paginationMeta.pageSize)
            }
        },
        onLoad() {
            this.getWHInfo()
            this.getStockPlaceInfo()
            this.$nextTick(() => {
                this.cmdSearch()
            })
        }
    }
</script>
<style lang="scss" scoped>
    .page {
        height: calc(100vh - 44px);
        box-sizing: border-box;
        padding: 20rpx 10rpx;
        display: flex;
        flex-direction: column;
        gap: 10rpx;
        position: relative;
        .button-zone {
            height: auto;
            box-sizing: border-box;
            padding-top: 20rpx;
            display: flex;
            flex-direction: row;
            justify-content: space-between;
            flex-wrap: wrap;
            button {
                border-radius: 50rpx;
                width: 180rpx;
                height: 66rpx;
                line-height: 66rpx;
                font-size: 28rpx;
            }
            .btn-a {
                background-color: #3a78ff;
                color: #fff;
            }
            .btn-c {
                background-color: #ff5722;
                color: #fff;
            }
        }
        .search-condition-zone {
            height: auto;
            box-sizing: border-box;
            padding: 0 60rpx;
            display: flex;
            flex-direction: column;
            gap: 20rpx;
            .form-item {
                display: flex;
                flex-direction: row;
                gap: 20rpx;
                align-items: center;
                .left {
                    width: 4rem;
                }
                .right {
                    flex: 1;
                    padding: 8rpx 16rpx;
                    .search {
                        width: 32rpx;
                        height: 32rpx;
                    }
                }
                .general {
                    border-radius: 22rpx;
                    border: 1px solid #acacac;
                }
                .disabled {
                    border-radius: 22rpx;
                    border: 1px solid #e4e4e4;
                    background-color: #e4e4e4;
                }
                .uni-combox {
                    box-sizing: border-box;
                    padding: 0;
                }
            }
        }
        .info-list-zone {
            flex: 1;
            overflow-y: auto;
            .card-item {
                .card-detail {
                    width: 100%;
                    display: flex;
                    flex-wrap: wrap;
                    justify-content: space-between;
                    line-height: 120%;
                    .detail {
                        // width: 50%;
                        font-size: 26rpx;
                        margin-bottom: 12rpx;
                        color: #555;
                        margin-right: 20rpx;
                        text {
                            color: #999;
                            font-size: 26rpx;
                        }
                    }
                }
            }
        }
        .pagination-zone {
            height: 80rpx;
        }
    }
</style>