| | |
| | | <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%;" |
| | |
| | | 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"> |
| | |
| | | <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> |
| | |
| | | <view class="detail" v-if="item.生产订单号"> |
| | | <text>生产订单号:</text>{{item.生产订单号}} |
| | | </view> |
| | | |
| | | <view class="detail" v-if="item.单据数量"> |
| | | <text>源单数量:</text>{{item.单据数量}} |
| | | </view> |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | |
| | | <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"; |
| | |
| | | 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: '', |
| | |
| | | } |
| | | } |
| | | }, |
| | | 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) { |
| | |
| | | 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() { |
| | |
| | | '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) |
| | |
| | | } |
| | | }) |
| | | |
| | | }, |
| | | async refreshHBarCodeFocus() { |
| | | this.HBarCodeFocus = false |
| | | await this.$nextTick() |
| | | this.hform.HBarCode = '' |
| | | this.HBarCodeFocus = true |
| | | }, |
| | | async refreshHBillNoFocus() { |
| | | this.HBillNoFocus = false |
| | |
| | | } |
| | | this.tabs = 2 |
| | | this.DisBillEntryList(); |
| | | this.refreshHBarCodeFocus() |
| | | } else { |
| | | this.playSound(0) |
| | | this.refreshHBillNoFocus() |
| | |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | |
| | | this.refreshHBarCodeFocus() |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | |
| | | this.refreshHBarCodeFocus() |
| | | }, |
| | | }); |
| | | } |
| | |
| | | } |
| | | }); |
| | | }, |
| | | //单据查询列表显示 |
| | | 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> |
| | | |