修改 采购入库模块 新增 输入框自动聚焦
修改 生成领料单校验 模块 物料信息显示 源单数量
4个文件已修改
211 ■■■■■ 已修改文件
.hbuilderx/launch.json 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
components/BillListPopup/BillListPopup_Check.vue 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/caigourukujiaoyan/form.vue 38 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
pages/shengchanlingliao/form.vue 169 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
.hbuilderx/launch.json
@@ -25,7 +25,7 @@
            "localRepoPath" : "D:/WorkBench/ZY_APP_Dev/STUWMS/unpackage/debug",
            "openVueDevtools" : true,
            "packageName" : "com.shebeiguanli.www",
            "playground" : "standard",
            "playground" : "custom",
            "type" : "uni-app:app-android"
        }
    ]
components/BillListPopup/BillListPopup_Check.vue
@@ -76,7 +76,7 @@
                length: 0,
                page: 0,
                HBillNo: '',
                HMater: this.HMater,
                // HMater: this.HMater,
                HCustom: '',
                HBillList: [],
                panelHeight: 0,
pages/caigourukujiaoyan/form.vue
@@ -4,7 +4,7 @@
            <view class="form-item">
                <view class="title">条码:</view>
                <view class="right">
                    <input v-model="hform.HBarCode" placeholder="请扫描(或输入)条码" @confirm="getCode(hform.HBarCode)" />
                    <input v-model="hform.HBarCode" :focus="HBarCodeFocus" placeholder="请扫描(或输入)条码" @confirm="getCode(hform.HBarCode)" />
                </view>
                <uni-icons type="scan"
                    style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
@@ -45,7 +45,7 @@
                    <view class="title">单据号:</view>
                    <view class="right" style="width: 380rpx;">
                        <input name="HBillNo" v-model="hform.HBillNo" placeholder="请扫描(或输入)条码"
                            @confirm="GetMeesageByBillNo(hform.HBarCode)" />
                            @confirm="GetMeesageByBillNo(hform.HBarCode)" :focus="HBillNoFocus"/>
                    </view>
                    <uni-icons type="scan"
                        style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
@@ -81,8 +81,8 @@
            </view>
            <view v-if="tabs == 2">
                <view class="list" v-for="(item,index) in Materlist" :key="index">
                    <uni-card :title="item.物料名称" :extra="'数量:'+item.数量" style="margin: 10px;" @tap="delMater(item)">
                        <view class="card-detail">
                    <uni-card :title="item.物料名称" :extra="'数量:'+item.数量" style="margin: 10px;" @tap="delMater(item)">
                        <view class="card-detail">
                            <view class="detail">
                                <text>物料代码:</text>{{item.物料代码}}
                            </view>
@@ -188,6 +188,9 @@
    export default {
        data() {
            return {
                HBarCodeFocus: false,
                HBillNoFocus: false,
                userInfo: getUserInfo(),
                serverUrl: uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API',
                HModName: 'Kf_POStockInBill_CheckList_PDA',
@@ -249,8 +252,24 @@
                // this.getNewData()
            }
            this.getHBaseList()
            this.refreshHBillNoFocus()
        },
        methods: {
            // 刷新单据号聚焦
            async refreshHBillNoFocus() {
                this.HBillNoFocus = false
                this.hform.HBillNo = '',
                await this.$nextTick()
                this.HBillNoFocus = true
            },
            // 刷新条码聚焦
            async refreshHBarCodeFocus() {
                this.HBarCodeFocus = false
                this.hform.HBarCode = ''
                await this.$nextTick()
                this.HBarCodeFocus = true
            },
            //扫码
            toScanCode() {
                var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
@@ -314,17 +333,21 @@
                            }
                            this.tabs = 2
                            this.DisBillEntryList();
                            this.refreshHBarCodeFocus()
                        } else {
                            CommonUtils.playSound(0);
                            this.refreshHBillNoFocus()
                            uni.showToast({
                                title: res.data.Message,
                                icon: 'none'
                            })
                            this.hform.HBillNo = ''
                            // this.hform.HBillNo = ''
                        }
                    },
                    fail: (res) => {
                        CommonUtils.playSound(0);
                        this.refreshHBillNoFocus()
                        console.log(res);
                        uni.showToast({
                            title: '接口请求失败',
@@ -502,7 +525,7 @@
                        },
                        success: (res) => {
                            console.log('扫码返回', res.data);
                            this.hform.HBarCode = ''
                            // this.hform.HBarCode = ''
                            if (res.data.count == 1) {
                                CommonUtils.playSound(1);
                                var data = res.data.data
@@ -597,10 +620,13 @@
                                    icon: 'none'
                                })
                            }
                            this.refreshHBarCodeFocus()
                        },
                        fail: (res) => {
                            CommonUtils.playSound(0);
                            console.log(res);
                            this.refreshHBarCodeFocus()
                            uni.showToast({
                                title: '接口请求失败',
                                icon: 'none'
pages/shengchanlingliao/form.vue
@@ -4,7 +4,8 @@
            <view class="form-item">
                <view class="title">条码:</view>
                <view class="right" style="width: 380rpx;">
                    <input v-model="hform.HBarCode" placeholder="请扫描(或输入)条码" @confirm="getCode(hform.HBarCode)" />
                    <input v-model="hform.HBarCode" :focus="HBarCodeFocus" placeholder="请扫描(或输入)条码"
                        @confirm="getCode(hform.HBarCode)" />
                </view>
                <uni-icons type="scan"
                    style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
@@ -51,16 +52,16 @@
                        style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
                        size="20" @click="toScanCode"></uni-icons>
                </view>
                <view class="form-item" v-show="showHBillNo">
                    <view class="title">单据号(物料):</view>
                    <view class="right" style="width: 380rpx;">
                        <input name="HBillNoMater" :focus="HBillNoFocusMater" v-model="HBillNoMater" placeholder="请扫描(或输入)条码"
                            @confirm="showBillList()" />
                    </view>
                    <uni-icons type="scan"
                        style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
                        size="20" @click="toScanCodeMater"></uni-icons>
                </view>
                <view class="form-item" v-show="showHBillNo">
                    <view class="title">单据号(物料):</view>
                    <view class="right" style="width: 380rpx;">
                        <input name="HBillNoMater" :focus="HBillNoFocusMater" v-model="HBillNoMater"
                            placeholder="请扫描(或输入)条码" @confirm="showBillList()" />
                    </view>
                    <uni-icons type="scan"
                        style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;"
                        size="20" @click="toScanCodeMater"></uni-icons>
                </view>
                <view class="form-item" v-show="!showHBillNo">
                    <view class="title">单据号:</view>
                    <view class="righton">
@@ -96,9 +97,7 @@
                            <view class="detail">
                                <text>物料代码:</text>{{item.物料代码}}
                            </view>
                            <view class="detail" v-if="item.总数量">
                                <text>总数量:</text>{{item.总数量}}
                            </view>
                            <view class="detail" v-if="item.规格型号">
                                <text>规格型号:</text>{{item.规格型号}}
                            </view>
@@ -114,7 +113,9 @@
                            <view class="detail" v-if="item.生产订单号">
                                <text>生产订单号:</text>{{item.生产订单号}}
                            </view>
                            <view class="detail" v-if="item.单据数量">
                                <text>源单数量:</text>{{item.单据数量}}
                            </view>
                        </view>
                    </uni-card>
                </view>
@@ -185,13 +186,13 @@
                <button class="btn-c" size="mini" @tap="goBack">退出</button>
            </view>
        </view>
        <BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HMater='HBillNoMater'
            :HStockOrgID="hform.HStockOrgID" :MultiSourceBill="false"></BillListPopupVue>
        <BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HMater='HBillNoMater'
            :HStockOrgID="hform.HStockOrgID" :MultiSourceBill="false"></BillListPopupVue>
    </view>
</template>
<script>
    import getDateTime from '@/utils/getdateTime.js';
    import BillListPopupVue from '../../components/BillListPopup/BillListPopup_Check.vue';
    import BillListPopupVue from '../../components/BillListPopup/BillListPopup_Check.vue';
    import {
        getUserInfo
    } from "@/utils/auth.js";
@@ -206,10 +207,11 @@
                HModName: 'Kf_MateOutBill_Check_PDA',
                ModRightName: 'CE_MateOutCheck',
                OperationType: 1,
                HBarCodeFocus: false,
                HBillNoFocus: false,
                HBillNoFocusMater:false,
                HBillNoMater:'',
                HBillNoFocusMater: false,
                HBillNoMater: '',
                showHBillNo: true,
                tabs: 1,
                linterid: '',
@@ -257,13 +259,13 @@
                }
            }
        },
        components:{
            BillListPopupVue
        },
        onUnload() {
            uni.$off('BillSelectComplete')
        },
        onLoad(e) {
        components: {
            BillListPopupVue
        },
        onUnload() {
            uni.$off('BillSelectComplete')
        },
        onLoad(e) {
            console.log(e, this.userInfo)
            this.OperationType = e.OperationType
            if (e.HBillNo) {
@@ -274,32 +276,32 @@
                this.refreshHBillNoFocus()
            }
            this.getHBaseList()
            uni.$on('BillSelectComplete', async (e) => {
                console.log("接收到的消息: ", e)
                console.log("是否应用多源单: ", e.enableMultiSourceBill)
                if(e.enableMultiSourceBill){
                    for(let item of e.MultiSourceBillList) {
                        try{
                            this.hform.HBillNo = e.HBillNo
                            await this.GetMeesageByBillNo()
                        }catch {
                            return
                        }
                    }
                    this.$refs.billList.exit()
                    // if(e.MultiSourceBillList.length != 0){
                    //      this.showHSourceBillNo = false
                    // }
                }else {
                    this.hform.HBillNo = e.HBillNo
                    this.GetMeesageByBillNo()
                    this.$refs.billList.exit()
                }
            })
            uni.$on('BillSelectComplete', async (e) => {
                console.log("接收到的消息: ", e)
                console.log("是否应用多源单: ", e.enableMultiSourceBill)
                if (e.enableMultiSourceBill) {
                    for (let item of e.MultiSourceBillList) {
                        try {
                            this.hform.HBillNo = e.HBillNo
                            await this.GetMeesageByBillNo()
                        } catch {
                            return
                        }
                    }
                    this.$refs.billList.exit()
                    // if(e.MultiSourceBillList.length != 0){
                    //      this.showHSourceBillNo = false
                    // }
                } else {
                    this.hform.HBillNo = e.HBillNo
                    this.GetMeesageByBillNo()
                    this.$refs.billList.exit()
                }
            })
        },
        onUnload() {
            uni.$off('BillSelectComplete')
            uni.$off('BillSelectComplete')
        },
        methods: {
            toScanCode2() {
@@ -310,10 +312,10 @@
                    'timeoutText': '未识别到二维码' //超时提醒            
                }, (ret) => {
                    console.log(ret.resp_result)
                    if(this.hform.HBarCode == '*'){
                        this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
                    }else{
                        this.hform.HBarCode = ret.resp_result
                    if (this.hform.HBarCode == '*') {
                        this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
                    } else {
                        this.hform.HBarCode = ret.resp_result
                    }
                    // this.hform.HBillNo = ret.resp_result
                    this.getCode(ret.resp_result)
@@ -349,6 +351,12 @@
                    }
                })
            },
            async refreshHBarCodeFocus() {
                this.HBarCodeFocus = false
                await this.$nextTick()
                this.hform.HBarCode = ''
                this.HBarCodeFocus = true
            },
            async refreshHBillNoFocus() {
                this.HBillNoFocus = false
@@ -410,6 +418,7 @@
                            }
                            this.tabs = 2
                            this.DisBillEntryList();
                            this.refreshHBarCodeFocus()
                        } else {
                            this.playSound(0)
                            this.refreshHBillNoFocus()
@@ -692,6 +701,8 @@
                                    icon: 'none'
                                })
                            }
                            this.refreshHBarCodeFocus()
                        },
                        fail: (res) => {
                            console.log(res);
@@ -699,6 +710,8 @@
                                title: '接口请求失败',
                                icon: 'none'
                            })
                            this.refreshHBarCodeFocus()
                        },
                    });
                }
@@ -896,28 +909,28 @@
                    }
                });
            },
            //单据查询列表显示
            showBillList(){
                this.$refs.billList.showPopup()
            },
            toScanCodeMater() {
                var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
                mpaasScanModule.mpaasScan({
                    'hideAlbum': true,
                    'timeoutInterval': '10', //超时时间
                    'timeoutText': '未识别到二维码' //超时提醒
                }, (ret) => {
                    console.log(ret.resp_result)
                    // if(this.hform.HBarCode == '*'){
                    //     this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
                    // }else{
                    //     this.hform.HBarCode = ret.resp_result
                    // }
                    this.HBillNoMater = ret.resp_result
                    this.$refs.billList.showPopup()
                })
            },
        }
            //单据查询列表显示
            showBillList() {
                this.$refs.billList.showPopup()
            },
            toScanCodeMater() {
                var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module")
                mpaasScanModule.mpaasScan({
                    'hideAlbum': true,
                    'timeoutInterval': '10', //超时时间
                    'timeoutText': '未识别到二维码' //超时提醒
                }, (ret) => {
                    console.log(ret.resp_result)
                    // if(this.hform.HBarCode == '*'){
                    //     this.hform.HBarCode = this.hform.HBarCode + ret.resp_result
                    // }else{
                    //     this.hform.HBarCode = ret.resp_result
                    // }
                    this.HBillNoMater = ret.resp_result
                    this.$refs.billList.showPopup()
                })
            },
        }
    }
</script>