| | |
| | | "name" : "智云LMES", |
| | | "appid" : "__UNI__B002F49", |
| | | "description" : "", |
| | | "versionName" : "1.0.33", |
| | | "versionCode" : 133, |
| | | "versionName" : "1.0.34", |
| | | "versionCode" : 134, |
| | | "transformPx" : false, |
| | | /* 5+App特有相关 */ |
| | | "app-plus" : { |
| | |
| | | <view class="right" v-show="showHSourceBillNo"> |
| | | <!-- <uni-combox v-if="reHSourceBillNo" :candidates="arrayHSourceBillNo" placeholder="请输入源单单号" |
| | | v-model="hform.HSourceBillNo" @input="HSourceBillNoChange"></uni-combox> --> |
| | | <input auto-focus @confirm="onHSourceBillNoConfirmHandler" type="text" name="HSourceBillNo" v-model="hform.HSourceBillNo" placeholder="请输入源单单号" /> |
| | | <input :focus="HSourceBillNoFocus" @confirm="onHSourceBillNoConfirmHandler" type="text" name="HSourceBillNo" v-model="hform.HSourceBillNo" placeholder="请输入源单单号" /> |
| | | |
| | | </view> |
| | | <view class="icon-wrapper" v-show="showHSourceBillNo" :disabled="hform.HMainSourceBillType === -1"> |
| | |
| | | reHSourceBillNo: true, |
| | | showHSupName: true, |
| | | BarCodeFocus: false, |
| | | HSourceBillNoFocus: false, |
| | | |
| | | tabs: 0, |
| | | HMainSourceBillType: '手工录入', |
| | |
| | | if (e.HInterID) { |
| | | this.HInterID_Temp = e.HInterID |
| | | // this.btnType = 1 |
| | | this.BarCodeFocus = true |
| | | this.RoadBillMain(e.HInterID) |
| | | this.refreshBarCodeState() |
| | | } else { |
| | | this.getNewData() |
| | | this.refreshHSourceBillState() |
| | | } |
| | | this.getHBaseList() |
| | | this.getHSupList() |
| | |
| | | uni.$off('BillSelectComplete') |
| | | }, |
| | | methods: { |
| | | async refreshHSourceBillState() { |
| | | this.HSourceBillNoFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HSourceBillNo = "" |
| | | this.HSourceBillNoFocus = true |
| | | }) |
| | | console.log('this.hform.HMainSourceBillType: ',this.hform.HMainSourceBillType); |
| | | if (this.hform.HMainSourceBillType == -1) { |
| | | await this.refreshBarCodeState() |
| | | } |
| | | }, |
| | | async refreshBarCodeState() { |
| | | this.BarCodeFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HBarCode = "" |
| | | this.BarCodeFocus = true |
| | | }) |
| | | }, |
| | | onHSourceBillNoConfirmHandler() { |
| | | if(this.hform.HMainSourceBillType == -1) { |
| | | this.playSound(1) |
| | |
| | | this.DisBillEntryList() |
| | | } else { |
| | | this.playSound(0) |
| | | this.refreshHSourceBillState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | this.playSound(0) |
| | | this.refreshHSourceBillState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | this.DisBillEntryList() |
| | | } else { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | this.hform.HQty = '' |
| | | } else { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | <view class="form-item" v-show="showHBillNo"> |
| | | <view class="title">单据号:</view> |
| | | <view class="right" style="width: 380rpx;"> |
| | | <input name="HBillNo" auto-focus v-model="hform.HBillNo" placeholder="请扫描(或输入)条码" |
| | | <input name="HBillNo" :focus="HBillNoFocus" v-model="hform.HBillNo" placeholder="请扫描(或输入)条码" |
| | | @confirm="GetMeesageByBillNo(hform.HBarCode)" /> |
| | | </view> |
| | | <uni-icons type="scan" |
| | |
| | | ModRightName: 'CE_OtherOutCheck', |
| | | OperationType: 1, |
| | | |
| | | HBillNoFocus: false, |
| | | barCodeFocus: false, |
| | | showHStockPlaceName: false, |
| | | showHBillNo: true, |
| | |
| | | this.OperationType = e.OperationType |
| | | if (e.HBillNo) { |
| | | this.hform.HBillNo = e.HBillNo |
| | | this.barCodeFocus = true |
| | | this.GetMeesageByBillNo(e.HBillNo) |
| | | this.refreshBarCodeState() |
| | | } else { |
| | | // this.getNewData() |
| | | this.refreshHBillState() |
| | | } |
| | | this.getHBaseList() |
| | | }, |
| | | methods: { |
| | | async refreshHBillState(){ |
| | | this.HBillNoFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HBillNo = "" |
| | | this.HBillNoFocus = true |
| | | |
| | | }) |
| | | }, |
| | | async refreshBarCodeState(){ |
| | | this.barCodeFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HBarCode = "" |
| | | this.barCodeFocus = true |
| | | }) |
| | | }, |
| | | //扫码 |
| | | toScanCode() { |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | 'timeoutInterval': '10', //超时时间 |
| | | 'timeoutText': '未识别到二维码' //超时提醒 |
| | | }, (ret) => { |
| | | console.log(ret.resp_result) |
| | | // if(this.hform.HBarCode == '*'){ |
| | | // this.hform.HBarCode = this.hform.HBarCode + ret.resp_result |
| | |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | '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.hform.HBillNo = ret.resp_result |
| | | this.GetMeesageByBillNo(this.hform.HBillNo) |
| | | }) |
| | |
| | | this.DisBillEntryList(); |
| | | } else { |
| | | CommonUtils.playSound(0); |
| | | this.refreshHBillState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0); |
| | | this.refreshHBillState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | if (res.data.count == 1) { |
| | | this.hform.HQty = '' |
| | | this.DisBillEntryList() |
| | | CommonUtils.playSound(1) |
| | | } else { |
| | | CommonUtils.playSound(0) |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0); |
| | | this.refreshBarCodeState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | //清空数量 |
| | | this.hform.HQty = '' |
| | | } else { |
| | | CommonUtils.playSound(0) |
| | | CommonUtils.playSound(0); |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0); |
| | | this.refreshBarCodeState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | success: (res) => { |
| | | if (res.confirm) { |
| | | uni.request({ |
| | | |
| | | url: this.serverUrl + |
| | | '/WEBSController/set_SaveOtherOutBill_BillCheck_Json', |
| | | data: { |
| | |
| | | <view class="form-item"> |
| | | <view class="title">条码:</view> |
| | | <view class="right" style="width: 380rpx;"> |
| | | <input :focus="barCodeFocus" v-model="hform.HBarCode" placeholder="请扫描(或输入)条码" @confirm="getCode(hform.HBarCode)" /> |
| | | <input :focus="barCodeFocus" v-model="hform.HBarCode" placeholder="请扫描(或输入)条码" |
| | | @confirm="getCode(hform.HBarCode)" /> |
| | | </view> |
| | | <view class="icon-wrapper"> |
| | | <uni-icons type="scan" size="20" @click="toScanCode"></uni-icons> |
| | |
| | | <view class="right" v-show="showHSourceBillNo"> |
| | | <!-- <uni-combox v-if="reHSourceBillNo" :candidates="arrayHSourceBillNo" placeholder="请输入源单单号" |
| | | v-model="hform.HSourceBillNo" @input="HSourceBillNoChange"></uni-combox> --> |
| | | <input auto-focus @confirm="onHSourceBillNoConfirmHandler" type="text" name="HSourceBillNo" v-model="hform.HSourceBillNo" placeholder="请输入源单单号" /> |
| | | <input :focus="HSourceBillNoFocus" @confirm="onHSourceBillNoConfirmHandler" type="text" |
| | | name="HSourceBillNo" v-model="hform.HSourceBillNo" placeholder="请输入源单单号" /> |
| | | |
| | | </view> |
| | | <view class="icon-wrapper" v-show="showHSourceBillNo" :disabled="hform.HMainSourceBillType === -1"> |
| | |
| | | <input name="HSourceBillNo" disabled v-model="hform.HSourceBillNo" placeholder="请输入源单单号" /> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="form-item"> |
| | | <view class="title">单据子类型:</view> |
| | | <view class="right"> |
| | | <picker :range="arrayHBillSubType" v-model="hform.HBillSubType" @change="HBillSubTypeChange"> |
| | | |
| | | |
| | | <input disabled name="HMainSourceBillType" v-model="HBillSubType" placeholder="请选择单据子类型" /> |
| | | <view class="picker-overlay"></view> |
| | | </picker> |
| | | </view> |
| | | </view> |
| | | |
| | | |
| | | <view class="form-item"> |
| | | <view class="title">先进先出仓:</view> |
| | | <view class="right"> |
| | |
| | | import { |
| | | getUserInfo |
| | | } from "@/utils/auth.js"; |
| | | import { CommonUtils } from '../../utils/common'; |
| | | import { |
| | | CommonUtils |
| | | } from '../../utils/common'; |
| | | import BillListPopupVue from '../../components/BillListPopup/BillListPopup.vue'; |
| | | export default { |
| | | data() { |
| | |
| | | reHSourceBillNo: true, |
| | | showHSupName: true, |
| | | barCodeFocus: false, |
| | | |
| | | HSourceBillNoFocus: false, |
| | | |
| | | |
| | | tabs: 0, |
| | | HMainSourceBillType: '手工录入', |
| | |
| | | HStockPlaceNameList: [], |
| | | arrayHSourceBillNo: [], //源单单号 |
| | | HSourceBillNoList: [], |
| | | |
| | | |
| | | arrayHBillSubType: [], |
| | | arrayHBillSubTypeValue: [], |
| | | HBillSubType: '', |
| | |
| | | if (e.HInterID) { |
| | | this.HInterID_Temp = e.HInterID |
| | | // this.btnType = 1 |
| | | this.barCodeFocus = true |
| | | this.refreshBarCodeState() |
| | | this.RoadBillMain(e.HInterID) |
| | | } else { |
| | | this.getNewData() |
| | | this.refreshHSourceBillState() |
| | | } |
| | | this.getHBaseList() |
| | | this.getHSupList() |
| | |
| | | uni.$off('BillSelectComplete') |
| | | }, |
| | | methods: { |
| | | async refreshHSourceBillState() { |
| | | this.HSourceBillNoFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HSourceBillNo = "" |
| | | this.HSourceBillNoFocus = true |
| | | }) |
| | | if (this.hform.HMainSourceBillType == -1) { |
| | | await this.refreshBarCodeState() |
| | | } |
| | | }, |
| | | async refreshBarCodeState() { |
| | | this.barCodeFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HBarCode = "" |
| | | this.barCodeFocus = true |
| | | }) |
| | | }, |
| | | onHSourceBillNoConfirmHandler() { |
| | | if(this.hform.HMainSourceBillType == -1) { |
| | | if (this.hform.HMainSourceBillType == -1) { |
| | | this.playSound(1) |
| | | this.barCodeFocus = true |
| | | return |
| | | return |
| | | } |
| | | this.getHBarCodeData(this.hform.HSourceBillNo) |
| | | }, |
| | |
| | | } |
| | | innerAudioContext.play(); // 播放音频 |
| | | }, |
| | | set_InitBillSubType(){ |
| | | set_InitBillSubType() { |
| | | this.arrayHBillSubType = [] |
| | | this.arrayHBillSubTypeValue = [] |
| | | CommonUtils.doRequest( |
| | |
| | | this.arrayHBillSubType.push(item['HName']) |
| | | this.arrayHBillSubTypeValue.push(item['HNumber']) |
| | | }) |
| | | |
| | | |
| | | this.HBillSubType = this.arrayHBillSubType[0] |
| | | this.hform.HBillSubType = this.arrayHBillSubTypeValue[0] |
| | | } else { |
| | |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | '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.getCode(this.hform.HBarCode) |
| | | }) |
| | | }, |
| | |
| | | this.DisBillEntryList() |
| | | } else { |
| | | this.playSound(0) |
| | | this.refreshHSourceBillState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | this.playSound(0) |
| | | this.refreshHSourceBillState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | this.DisBillEntryList() |
| | | } else { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | this.hform.HQty = '' |
| | | } else { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | <view class="right" v-show="showHSourceBillNo"> |
| | | <!-- <uni-combox v-if="reHSourceBillNo" :candidates="arrayHSourceBillNo" placeholder="请输入源单单号" |
| | | v-model="hform.HSourceBillNo" @input="HSourceBillNoChange"></uni-combox> --> |
| | | <input auto-focus @confirm="onHSourceBillNoConfirmHandler" type="text" name="HSourceBillNo" |
| | | <input :focus="HSourceBillNoFocus" @confirm="onHSourceBillNoConfirmHandler" type="text" name="HSourceBillNo" |
| | | v-model="hform.HSourceBillNo" placeholder="请输入源单单号" /> |
| | | |
| | | </view> |
| | |
| | | reHSourceBillNo: true, |
| | | showHSupName: true, |
| | | barCodeFocus: false, |
| | | HSourceBillNoFocus: false, |
| | | |
| | | tabs: 0, |
| | | HMainSourceBillType: '生产用料清单', |
| | |
| | | this.barCodeFocus = true |
| | | } else { |
| | | this.getNewData() |
| | | this.HSourceBillNoFocus = true |
| | | } |
| | | this.getHBaseList() |
| | | this.getHSupList() |
| | |
| | | uni.$off('BillSelectComplete') |
| | | }, |
| | | methods: { |
| | | async refreshHSourceBillState(){ |
| | | this.HSourceBillNoFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HSourceBillNo = "" |
| | | this.HSourceBillNoFocus = true |
| | | |
| | | }) |
| | | }, |
| | | async refreshBarCodeState(){ |
| | | this.barCodeFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HBarCode = "" |
| | | this.barCodeFocus = true |
| | | }) |
| | | }, |
| | | onHSourceBillNoConfirmHandler() { |
| | | this.getHBarCodeData(this.hform.HSourceBillNo) |
| | | }, |
| | |
| | | this.DisBillEntryList() |
| | | } else { |
| | | this.playSound(0) |
| | | this.refreshHSourceBillState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | this.playSound(0) |
| | | this.refreshHSourceBillState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | this.DisBillEntryList() |
| | | } else { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | this.hform.HQty = '' |
| | | } else { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | <view class="form-item" v-show="showHBillNo"> |
| | | <view class="title">单据号:</view> |
| | | <view class="right" style="width: 380rpx;"> |
| | | <input name="HBillNo" auto-focus v-model="hform.HBillNo" placeholder="请扫描(或输入)单据号" |
| | | <input name="HBillNo" :focus="HBillNoFocus" v-model="hform.HBillNo" placeholder="请扫描(或输入)单据号" |
| | | @confirm="GetMeesageByBillNo(hform.HBillNo)" /> |
| | | </view> |
| | | <uni-icons type="scan" |
| | |
| | | ModRightName: 'CE_MateReplenishOutCheck', |
| | | OperationType: 1, |
| | | |
| | | HBillNoFocus: false, |
| | | BarCodeFocus: false, |
| | | showHStockPlaceName: false, |
| | | showHBillNo: true, |
| | |
| | | if (e.HBillNo) { |
| | | this.hform.HBillNo = e.HBillNo |
| | | this.GetMeesageByBillNo(e.HBillNo) |
| | | this.refreshBarCodeState() |
| | | } else { |
| | | // this.getNewData() |
| | | this.refreshHBillState() |
| | | } |
| | | |
| | | |
| | | this.getHBaseList() |
| | | }, |
| | | onLoad(e) { |
| | | console.log(e, this.userInfo) |
| | | this.OperationType = e.OperationType |
| | | if (e.HBillNo) { |
| | | this.hform.HBillNo = e.HBillNo |
| | | this.GetMeesageByBillNo(e.HBillNo) |
| | | } else { |
| | | // this.getNewData() |
| | | } |
| | | |
| | | |
| | | this.getHBaseList() |
| | | }, |
| | | methods: { |
| | | async refreshHBillState(){ |
| | | this.HBillNoFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HBillNo = "" |
| | | this.HBillNoFocus = true |
| | | |
| | | }) |
| | | }, |
| | | async refreshBarCodeState(){ |
| | | this.BarCodeFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HBarCode = "" |
| | | this.BarCodeFocus = true |
| | | }) |
| | | }, |
| | | //条码号扫码 |
| | | toScanCode() { |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | |
| | | this.DisBillEntryList(); |
| | | } else { |
| | | CommonUtils.playSound(0) |
| | | this.refreshHBillState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0) |
| | | this.refreshHBillState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | if (res.data.count == 1) { |
| | | this.hform.HQty = '' |
| | | this.DisBillEntryList() |
| | | CommonUtils.playSound(1) |
| | | } else { |
| | | CommonUtils.playSound(0) |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | this.refreshBarCodeState() |
| | | CommonUtils.playSound(0) |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | |
| | | this.hform.HQty = '' |
| | | } else { |
| | | CommonUtils.playSound(0) |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0) |
| | | this.refreshBarCodeState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | <view class="form-item" v-show="showHBillNo"> |
| | | <view class="title">单据号:</view> |
| | | <view class="right" style="width: 380rpx;"> |
| | | <input auto-focus name="HBillNo" v-model="hform.HBillNo" placeholder="请扫描(或输入)条码" @confirm="GetMeesageByBillNo(hform.HBarCode)"/> |
| | | <input :focus="HBillNoFocus" name="HBillNo" v-model="hform.HBillNo" placeholder="请扫描(或输入)条码" @confirm="GetMeesageByBillNo(hform.HBarCode)"/> |
| | | </view> |
| | | <uni-icons type="scan" style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" size="20" @click="toScanCode"></uni-icons> |
| | | </view> |
| | |
| | | export default { |
| | | data() { |
| | | return { |
| | | HBillNoFocus: false, |
| | | |
| | | userInfo:getUserInfo(), |
| | | serverUrl: uni.getStorageSync('serverUrl')||'http://47.96.97.237/API', |
| | | HModName:'Kf_MoveStockBill_Check_PDA', |
| | |
| | | if(e.HBillNo){ |
| | | this.hform.HBillNo = e.HBillNo |
| | | this.GetMeesageByBillNo(e.HBillNo) |
| | | }else { |
| | | this.refreshHBillNoFocus() |
| | | } |
| | | }, |
| | | methods: { |
| | | async refreshHBillNoFocus() { |
| | | this.HBillNoFocus = false |
| | | await this.$nextTick(() => { |
| | | this.HBillNoFocus = true |
| | | this.hform.HBillNo = "" |
| | | }) |
| | | }, |
| | | playSound(e){ |
| | | const innerAudioContext = uni.createInnerAudioContext(); |
| | | if(e == 1){ |
| | |
| | | this.DisBillEntryList(); |
| | | }else{ |
| | | this.playSound(0) |
| | | this.refreshHBillNoFocus() |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | | icon:'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | this.playSound(0) |
| | | this.refreshHBillNoFocus() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title:'接口请求失败', |
| | |
| | | <view class="form-item" v-show="showHBillNo"> |
| | | <view class="title">单据号:</view> |
| | | <view class="right" style="width: 380rpx;"> |
| | | <input name="HBillNo" auto-focus v-model="hform.HBillNo" placeholder="请扫描(或输入)条码" @confirm="GetMeesageByBillNo()"/> |
| | | <input name="HBillNo" :focus="HBillNoFocus" v-model="hform.HBillNo" placeholder="请扫描(或输入)条码" @confirm="GetMeesageByBillNo()"/> |
| | | </view> |
| | | <uni-icons type="scan" style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" size="20" @click="toScanCode"></uni-icons> |
| | | </view> |
| | |
| | | ModRightName:'CE_MateOutCheck', |
| | | OperationType: 1, |
| | | |
| | | HBillNoFocus: false, |
| | | showHBillNo:true, |
| | | tabs:1, |
| | | linterid:'', |
| | |
| | | this.GetMeesageByBillNo(e.HBillNo) |
| | | }else{ |
| | | // this.getNewData() |
| | | this.refreshHBillNoFocus() |
| | | } |
| | | // this.getHBaseList() |
| | | }, |
| | | methods: { |
| | | async refreshHBillNoFocus() { |
| | | this.HBillNoFocus = false |
| | | await this.$nextTick(() => { |
| | | this.HBillNoFocus = true |
| | | this.hform.HBillNo = "" |
| | | }) |
| | | }, |
| | | playSound(e){ |
| | | const innerAudioContext = uni.createInnerAudioContext(); |
| | | if(e == 1){ |
| | |
| | | this.DisBillEntryList(); |
| | | }else{ |
| | | this.playSound(0) |
| | | this.refreshHBillNoFocus() |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | | icon:'none' |
| | |
| | | fail: (res) => { |
| | | console.log(res); |
| | | this.playSound(0) |
| | | this.refreshHBillNoFocus() |
| | | uni.showToast({ |
| | | title:'接口请求失败', |
| | | icon:'none' |
| | |
| | | <view class="right" v-show="showHSourceBillNo"> |
| | | <!-- <uni-combox v-if="reHSourceBillNo" :candidates="arrayHSourceBillNo" placeholder="请输入源单单号" |
| | | v-model="hform.HSourceBillNo" @input="HSourceBillNoChange"></uni-combox> --> |
| | | <input :focus="HSourceBillNoFocus" type="text" name="HSourceBillNo" v-model="hform.HSourceBillNo" |
| | | @confirm="onSourceBillBlurHandler" placeholder="请输入源单单号" /> |
| | | <input :focus="HSourceBillNoFocus" type="text" name="HSourceBillNo" |
| | | v-model="hform.HSourceBillNo" @confirm="onSourceBillBlurHandler" placeholder="请输入源单单号" /> |
| | | |
| | | </view> |
| | | <view class="icon-wrapper" v-show="showHSourceBillNo" :disabled="hform.HMainSourceBillType === -1"> |
| | |
| | | arrayHSourceBillNo: [], //源单单号 |
| | | HSourceBillNoList: [], |
| | | |
| | | HSourceBillNoFocus: false, |
| | | barCodeFocus: false, |
| | | |
| | | arrayHEmpName: [], //操作员 |
| | | HEmpNameList: [], |
| | | arrayHDeptName: [], //部门 |
| | |
| | | Materlist: [], |
| | | FIFOlist: [], |
| | | hform: { |
| | | HSourceBillNoFocus: false, |
| | | barCodeFocus: false, |
| | | |
| | | HBillType: 1204, |
| | | HBillerID: uni.getStorageSync('HBillerID'), |
| | | HRedBlueFlag: false, |
| | |
| | | uni.$off('BillSelectComplete') |
| | | }, |
| | | methods: { |
| | | async refreshHSourceBillState(){ |
| | | console.log('执行刷新单据状态函数'); |
| | | async refreshHSourceBillState() { |
| | | this.HSourceBillNoFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HSourceBillNo = "" |
| | | this.HSourceBillNoFocus = true |
| | | }) |
| | | }, |
| | | async refreshBarCodeState(){ |
| | | async refreshBarCodeState() { |
| | | this.barCodeFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HBarCode = "" |
| | |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | '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.getCode(this.hform.HBarCode) |
| | | }) |
| | | }, |
| | |
| | | <view class="form-item" v-show="showHBillNo"> |
| | | <view class="title">单据号:</view> |
| | | <view class="right" style="width: 380rpx;"> |
| | | <input auto-focus name="HBillNo" v-model="hform.HBillNo" placeholder="请扫描(或输入)条码" @confirm="GetMeesageByBillNo(hform.HBarCode)"/> |
| | | <input :focus="HBillNoFocus" name="HBillNo" v-model="hform.HBillNo" placeholder="请扫描(或输入)条码" @confirm="GetMeesageByBillNo(hform.HBarCode)"/> |
| | | </view> |
| | | <uni-icons type="scan" style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" size="20" @click="toScanCode"></uni-icons> |
| | | </view> |
| | |
| | | ModRightName:'CE_ProductInCheck', |
| | | OperationType: 1, |
| | | |
| | | HBillNoFocus: false, |
| | | showHBillNo:true, |
| | | tabs:1, |
| | | linterid:'', |
| | |
| | | if(e.HBillNo){ |
| | | this.hform.HBillNo = e.HBillNo |
| | | this.GetMeesageByBillNo(e.HBillNo) |
| | | }else { |
| | | this.refreshHBillState() |
| | | } |
| | | }, |
| | | methods: { |
| | | async refreshHBillState(){ |
| | | this.HBillNoFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HBillNo = "" |
| | | this.HBillNoFocus = true |
| | | |
| | | }) |
| | | }, |
| | | playSound(e){ |
| | | const innerAudioContext = uni.createInnerAudioContext(); |
| | | if(e == 1){ |
| | |
| | | this.DisBillEntryList(); |
| | | }else{ |
| | | this.playSound(0) |
| | | this.refreshHBillState() |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | | icon:'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | this.playSound(0) |
| | | this.refreshHBillState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title:'接口请求失败', |
| | |
| | | <view class="right" v-show="showHSourceBillNo"> |
| | | <!-- <uni-combox v-if="reHSourceBillNo" :candidates="arrayHSourceBillNo" placeholder="请输入源单单号" |
| | | v-model="hform.HSourceBillNo" @input="HSourceBillNoChange"></uni-combox> --> |
| | | <input type="text" auto-focus name="HSourceBillNo" @confirm="onHSourceBillNoConfirmHandler" |
| | | <input type="text" :focus="HSourceBillNoFocus" name="HSourceBillNo" @confirm="onHSourceBillNoConfirmHandler" |
| | | v-model="hform.HSourceBillNo" placeholder="请输入源单单号" /> |
| | | |
| | | </view> |
| | |
| | | reHSourceBillNo: true, |
| | | showHSupName: true, |
| | | barCodeFocus: false, |
| | | HSourceBillNoFocus: false, |
| | | |
| | | tabs: 0, |
| | | HMainSourceBillType: '生产订单', |
| | |
| | | this.barCodeFocus = true |
| | | this.RoadBillMain(e.HInterID) |
| | | } else { |
| | | this.HSourceBillNoFocus = true |
| | | this.getNewData() |
| | | } |
| | | this.getHBaseList() |
| | |
| | | uni.$off('BillSelectComplete') |
| | | }, |
| | | methods: { |
| | | async refreshHSourceBillState(){ |
| | | this.HSourceBillNoFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HSourceBillNo = "" |
| | | this.HSourceBillNoFocus = true |
| | | |
| | | }) |
| | | }, |
| | | async refreshBarCodeState(){ |
| | | this.barCodeFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HBarCode = "" |
| | | this.barCodeFocus = true |
| | | }) |
| | | }, |
| | | onHSourceBillNoConfirmHandler() { |
| | | this.getHBarCodeData(this.hform.HSourceBillNo) |
| | | }, |
| | |
| | | this.DisBillEntryList() |
| | | } else { |
| | | this.playSound(0) |
| | | this.refreshHSourceBillState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | this.playSound(0) |
| | | this.refreshHSourceBillState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | this.DisBillEntryList() |
| | | } else { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | this.hform.HQty = '' |
| | | } else { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | HSubID: '', |
| | | HOrderBillNo: '', |
| | | HMaterID: '', |
| | | barCodeNo: '', |
| | | // barCodeNo: '', |
| | | HBillNo: '', |
| | | HBillLineNo: '', |
| | | HMaterNumber: '', |
| | |
| | | HSupID: '', |
| | | HUnitID: '', |
| | | HDate: '', |
| | | HSourceBillNo: '', |
| | | HMaker: getUserInfo()["Czymc"], |
| | | HSupNumber: '', |
| | | } |
| | | }; |
| | | }, |
| | |
| | | if (this.$printer.isConnected() === false) { |
| | | this.$refs.labelPrinter.openPopup() |
| | | } else { |
| | | // this.printInfo = async () => { |
| | | // let cpcl = await this.$printer.cpcl().clear() |
| | | // .page(new CPage({ |
| | | // width: 608, |
| | | // height: 400 |
| | | // })) |
| | | // .qrcode(new CQRCode({ |
| | | // x: 500, |
| | | // y: 30, |
| | | // width: 3, |
| | | // content: this.generatedBarCode, |
| | | // codeRotation: CCodeRotation.ROTATION_0, |
| | | // level: CCorrectLevel.L |
| | | // })) |
| | | // .text(new CText({ |
| | | // x: 30, |
| | | // y: 30, |
| | | // content: "供应商: ", |
| | | // font: CFont.TSS24 |
| | | // })) |
| | | // .text(new CText({ |
| | | // x: 30, |
| | | // y: 80, |
| | | // content: "供应商料号: ", |
| | | // font: CFont.TSS24 |
| | | // })) |
| | | // .text(new CText({ |
| | | // x: 30, |
| | | // y: 130, |
| | | // content: "物料编码: ", |
| | | // font: CFont.TSS24 |
| | | // })) |
| | | // .text(new CText({ |
| | | // x: 30, |
| | | // y: 180, |
| | | // content: "物料分组: ", |
| | | // font: CFont.TSS24 |
| | | // })) |
| | | // .text(new CText({ |
| | | // x: 300, |
| | | // y: 180, |
| | | // content: "规格型号: ", |
| | | // font: CFont.TSS24 |
| | | // })) |
| | | // .text(new CText({ |
| | | // x: 30, |
| | | // y: 230, |
| | | // content: "数量: ", |
| | | // font: CFont.TSS24 |
| | | // })) |
| | | // .text(new CText({ |
| | | // x: 300, |
| | | // y: 230, |
| | | // content: "日期: ", |
| | | // font: CFont.TSS24 |
| | | // })) |
| | | // .text(new CText({ |
| | | // x: 30, |
| | | // y: 280, |
| | | // content: "检验员: ", |
| | | // font: CFont.TSS24 |
| | | // })) |
| | | // .text(new CText({ |
| | | // x: 300, |
| | | // y: 280, |
| | | // content: "计划跟踪号: ", |
| | | // font: CFont.TSS24 |
| | | // })) |
| | | // .text(new CText({ |
| | | // x: 30, |
| | | // y: 330, |
| | | // content: "检验结果: ", |
| | | // font: CFont.TSS24 |
| | | // })) |
| | | // .box(new CBox({ |
| | | // topLeftX: 260, |
| | | // topLeftY: 320, |
| | | // bottomRightX: 280, |
| | | // bottomRightY: 340, |
| | | // lineWidth: 4, |
| | | // })) |
| | | // .text(new CText({ |
| | | // x: 290, |
| | | // y: 320, |
| | | // content: "合格", |
| | | // font: CFont.TSS24 |
| | | // })) |
| | | // .box(new CBox({ |
| | | // topLeftX: 360, |
| | | // topLeftY: 320, |
| | | // bottomRightX: 380, |
| | | // bottomRightY: 340, |
| | | // lineWidth: 4, |
| | | // })) |
| | | // .text(new CText({ |
| | | // x: 390, |
| | | // y: 320, |
| | | // content: "不合格", |
| | | // font: CFont.TSS24 |
| | | // })) |
| | | // .box(new CBox({ |
| | | // topLeftX: 480, |
| | | // topLeftY: 320, |
| | | // bottomRightX: 500, |
| | | // bottomRightY: 340, |
| | | // lineWidth: 4, |
| | | // })) |
| | | // .text(new CText({ |
| | | // x: 510, |
| | | // y: 320, |
| | | // content: "特采", |
| | | // font: CFont.TSS24 |
| | | // })) |
| | | // .form(new CForm()) |
| | | // .print(); |
| | | // console.log(cpcl.command().string()) |
| | | // return cpcl.command().binary() |
| | | // } |
| | | // await this.$nextTick(() => { |
| | | // this.$refs.labelPrinter.execPrint() |
| | | // }) |
| | | // T 24 0 300 280 计划跟踪号: ${this.lailiaoInfo.HMTONo || ''} |
| | | let HBarCodeNoStr = |
| | | `${this.lailiaoInfo.HBillNo}@${this.lailiaoInfo.HBillLineNo}@${this.lailiaoInfo.HMaterNumber || ''}@${this.lailiaoInfo.HMTONo || ''}@${this.lailiaoInfo.HQty || ''}@${this.lailiaoInfo.HSupID || ''}` |
| | | |
| | | let pcsInfo = this.lailiaoInfo.HPcsName ? '(' + this.lailiaoInfo.HPcsName +')' : '' |
| | | `${this.lailiaoInfo.HBillNo}@${this.lailiaoInfo.HBillLineNo}@${this.lailiaoInfo.HMaterNumber || ''}@${this.lailiaoInfo.HMTONo || ''}@${parseFloat(this.lailiaoInfo.HQty||0).toFixed(10)}@${this.lailiaoInfo.HSupNumber || ''}` |
| | | |
| | | let pcsInfo = this.lailiaoInfo.HPcsName ? '(' + this.lailiaoInfo.HPcsName + ')' : '' |
| | | |
| | | this.printInfo = `! 0 200 200 400 1 |
| | | PAGE-WIDTH 608 |
| | | SETQRVER 3 |
| | | B QR 490 30 M 4 U 3 |
| | | B QR 470 30 Q 0 U 3 |
| | | LA,${HBarCodeNoStr} |
| | | ENDQR |
| | | T 24 0 10 30 供应商: ${this.lailiaoInfo.HSupName} |
| | | T 55 0 10 55 (Supplier) |
| | | T 24 0 10 75 供应商料号: ${this.lailiaoInfo.HMaterNumber} |
| | | T 55 0 10 100 (Supplier Sku No.) |
| | | T 24 0 10 120 物料名称: ${this.lailiaoInfo.HMaterName} |
| | | T 55 0 10 145 (Material Code) |
| | | T 24 0 10 165 款号: |
| | | T 55 0 10 190 (Style No.) |
| | | T 24 0 0 30 供应商: ${this.lailiaoInfo.HSupName} |
| | | T 55 0 0 55 (Supplier) |
| | | T 24 0 0 75 供应商料号: ${this.lailiaoInfo.HMaterNumber} |
| | | T 55 0 0 100 (Supplier Sku No.) |
| | | T 24 0 0 120 物料名称: ${this.lailiaoInfo.HMaterName} |
| | | T 55 0 0 145 (Material Code) |
| | | T 24 0 0 165 款号: |
| | | T 55 0 0 190 (Style No.) |
| | | T 24 0 300 165 客户编号: |
| | | T 55 0 300 190 (Consumer No.) |
| | | T 24 0 10 210 分组: ${this.lailiaoInfo.HBatchNo} |
| | | T 55 0 10 235 (Group) |
| | | T 24 0 0 210 分组: |
| | | T 55 0 0 235 (Group) |
| | | T 24 0 300 210 规格: ${this.lailiaoInfo.HMaterModel} |
| | | T 55 0 300 235 (SKU NO.) |
| | | T 24 0 10 255 数量: ${this.lailiaoInfo.HQty} ${pcsInfo} |
| | | T 55 0 10 280 (Quantity) |
| | | T 24 0 0 255 数量: ${this.lailiaoInfo.HQty} ${pcsInfo} |
| | | T 55 0 0 280 (Quantity) |
| | | T 24 0 300 255 日期: ${this.lailiaoInfo.HDate || ''} |
| | | T 55 0 300 280 (Date) |
| | | T 24 0 10 300 检验员: |
| | | T 55 0 10 325 (QC) |
| | | T 24 0 0 300 检验员: |
| | | T 55 0 0 325 (QC) |
| | | T 24 0 300 300 采购单号: ${this.lailiaoInfo.HBillNo || ''} |
| | | T 55 0 300 325 (Purchase Order No.) |
| | | T 24 0 10 345 检验结果: |
| | | T 55 0 10 370 (Inspection status) |
| | | T 24 0 0 345 检验结果: |
| | | T 55 0 0 370 (Inspection status) |
| | | BOX 240 345 260 365 4 |
| | | T 24 0 270 345 合格 |
| | | T 55 0 250 370 (Pass) |
| | |
| | | T 55 0 440 370 (Spec. accepted) |
| | | FORM |
| | | PRINT` |
| | | |
| | | |
| | | |
| | | await this.$nextTick(() => { |
| | | this.$refs.labelPrinter.execPrint() |
| | | }) |
| | |
| | | |
| | | } |
| | | let d = data[row - 1] |
| | | console.log('数量: ', parseFloat(d['数量']).toFixed(10)); |
| | | this.lailiaoInfo = Object.assign(this.lailiaoInfo, { |
| | | HMaterNumber: d['物料编码'], |
| | | HMaterName: d['物料名称'], |
| | | HMaterModel: d['规格型号'], |
| | | HBatchNo: d['批号'], |
| | | // HBatchNo: d['批号'], |
| | | HQty: d['数量'], |
| | | HMinQty: d['数量'], |
| | | HBQty: d['数量'], |
| | | HSupID: d['HSupID'], |
| | | HSupNumber: d['供应商代码'], |
| | | HSupName: d['供应商'], |
| | | HUnitID: d['HUnitID'], |
| | | HPcsName: d['计量单位'], |
| | |
| | | HMainID: d['hmainid'], |
| | | HSubID: d['HEntryID'], |
| | | HMaterID: d['HMaterID'], |
| | | HDate: d['日期'] |
| | | HDate: d['日期'], |
| | | }) |
| | | CommonUtils.playSound(1) |
| | | this.buttonStatus.btn2 = true |
| | |
| | | HMaterNumber: '', |
| | | HMaterName: '', |
| | | HMaterModel: '', |
| | | HPcsName: '', |
| | | HBatchNo: '', |
| | | HQty: '', |
| | | HMTONo: '', |
| | |
| | | HSupNameShort: '', |
| | | HMinQty: '', |
| | | HBQty: '', |
| | | HSupID: '', |
| | | HUnitID: '', |
| | | HDate: '', |
| | | HSourceBillNo: '', |
| | | HSupNumber: '', |
| | | } |
| | | |
| | | this.buttonStatus = { |
| | | btn1: true, |
| | | btn2: false |
| | | } |
| | | |
| | | this.refreshBarcodeState() |
| | | }, |
| | | barCodeEntryHandler(barCode) { |
| | | if (CommonUtils.isEmpty(barCode) === false) { |
| | |
| | | } |
| | | let barCodeInfo = barCode.split("@") |
| | | let [PurchaseBillNo, Row] = barCodeInfo |
| | | this.lailiaoInfo.HBillNo = PurchaseBillNo, |
| | | this.lailiaoInfo.HBillLineNo = Row |
| | | this.lailiaoInfo.HBillNo = PurchaseBillNo |
| | | this.lailiaoInfo.HSourceBillNo = PurchaseBillNo |
| | | this.lailiaoInfo.HBillLineNo = Row |
| | | console.log({ |
| | | sWhere: ` and 单据号 = '${PurchaseBillNo}'`, |
| | | user: this.userInfo.Czymc, |
| | |
| | | }, |
| | | GenereateBarCode() { |
| | | let HBarCodeNoStr = |
| | | `${this.lailiaoInfo.HBillNo}@${this.lailiaoInfo.HBillLineNo}@${this.lailiaoInfo.HMaterNumber || ''}@${this.lailiaoInfo.HMTONo || ''}@${this.lailiaoInfo.HQty || ''}@${this.lailiaoInfo.HSupID || ''}` |
| | | `${this.lailiaoInfo.HBillNo}@${this.lailiaoInfo.HBillLineNo}@${this.lailiaoInfo.HMaterNumber || ''}@${this.lailiaoInfo.HMTONo || ''}@${parseFloat(this.lailiaoInfo.HQty || 0).toFixed(10)}@${this.lailiaoInfo.HSupNumber || ''}` |
| | | let sMain = [] |
| | | sMain[0] = this.lailiaoInfo |
| | | let sMainStr = JSON.stringify(sMain); |
| | |
| | | <view class="right" v-show="showHSourceBillNo"> |
| | | <!-- <uni-combox v-if="reHSourceBillNo" :candidates="arrayHSourceBillNo" placeholder="请输入源单单号" |
| | | v-model="hform.HSourceBillNo" @input="HSourceBillNoChange"></uni-combox> --> |
| | | <input auto-focus @confirm="getHBarCodeData(hform.HSourceBillNo)" type="text" name="HSourceBillNo" v-model="hform.HSourceBillNo" placeholder="请输入源单单号" /> |
| | | <input :focus="HSourceBillNoFocus" @confirm="getHBarCodeData(hform.HSourceBillNo)" type="text" name="HSourceBillNo" v-model="hform.HSourceBillNo" placeholder="请输入源单单号" /> |
| | | |
| | | </view> |
| | | <view class="icon-wrapper" v-show="showHSourceBillNo" :disabled="hform.HMainSourceBillType === -1"> |
| | |
| | | reHSourceBillNo: true, |
| | | showHSupName: true, |
| | | barCodeFocus: false, |
| | | HSourceBillNoFocus: false, |
| | | |
| | | tabs: 0, |
| | | HMainSourceBillType: '委外用料清单', |
| | |
| | | this.barCodeFocus = true |
| | | } else { |
| | | this.getNewData() |
| | | this.HSourceBillNoFocus = true; |
| | | } |
| | | this.getHBaseList() |
| | | this.getHSupList() |
| | |
| | | uni.$off('BillSelectComplete') |
| | | }, |
| | | methods: { |
| | | async refreshHSourceBillState(){ |
| | | this.HSourceBillNoFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HSourceBillNo = "" |
| | | this.HSourceBillNoFocus = true |
| | | |
| | | }) |
| | | }, |
| | | async refreshBarCodeState(){ |
| | | this.barCodeFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HBarCode = "" |
| | | this.barCodeFocus = true |
| | | }) |
| | | }, |
| | | playSound(e) { |
| | | const innerAudioContext = uni.createInnerAudioContext(); |
| | | if (e == 1) { |
| | |
| | | this.DisBillEntryList() |
| | | } else { |
| | | this.playSound(0) |
| | | this.refreshHSourceBillState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | this.playSound(0) |
| | | this.refreshHSourceBillState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | this.DisBillEntryList() |
| | | } else { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | this.hform.HQty = '' |
| | | } else { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | <view class="form-item" v-show="showHBillNo"> |
| | | <view class="title">单据号:</view> |
| | | <view class="right" style="width: 380rpx;"> |
| | | <input auto-focus name="HBillNo" v-model="hform.HBillNo" placeholder="请扫描(或输入)条码" |
| | | <input :focus="HBillNoFocus" name="HBillNo" v-model="hform.HBillNo" placeholder="请扫描(或输入)条码" |
| | | @confirm="GetMeesageByBillNo(hform.HBarCode)" /> |
| | | </view> |
| | | <uni-icons type="scan" |
| | |
| | | ModRightName: 'CE_EntrustOutCheck', |
| | | OperationType: 1, |
| | | |
| | | HBillNoFocus: false, |
| | | barCodeFocus: false, |
| | | showHStockPlaceName: false, |
| | | showHBillNo: true, |
| | |
| | | if (e.HBillNo) { |
| | | this.hform.HBillNo = e.HBillNo |
| | | this.GetMeesageByBillNo(e.HBillNo) |
| | | this.barCodeFocus = true; |
| | | this.refreshBarCodeState() |
| | | } else { |
| | | // this.getNewData() |
| | | this.refreshHBillState() |
| | | } |
| | | this.getHBaseList() |
| | | }, |
| | | methods: { |
| | | async refreshHBillState(){ |
| | | this.HBillNoFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HBillNo = "" |
| | | this.HBillNoFocus = true |
| | | |
| | | }) |
| | | }, |
| | | async refreshBarCodeState(){ |
| | | this.barCodeFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HBarCode = "" |
| | | this.barCodeFocus = true |
| | | }) |
| | | }, |
| | | //扫码 |
| | | toScanCode() { |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | 'timeoutInterval': '10', //超时时间 |
| | | 'timeoutText': '未识别到二维码' //超时提醒 |
| | | }, (ret) => { |
| | | console.log(ret.resp_result) |
| | | // if(this.hform.HBarCode == '*'){ |
| | | // this.hform.HBarCode = this.hform.HBarCode + ret.resp_result |
| | |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | '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.hform.HBillNo = ret.resp_result |
| | | this.GetMeesageByBillNo(this.hform.HBillNo) |
| | | }) |
| | |
| | | this.DisBillEntryList(); |
| | | } else { |
| | | CommonUtils.playSound(0); |
| | | this.refreshHBillState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0); |
| | | this.refreshHBillState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | console.log(this.hform.HSourceBillNo, HSourceFlag) |
| | | if (HDeleteFlag == "*") { |
| | | if (sBarCode == "") { |
| | | CommonUtils.playSound(0) |
| | | uni.showToast({ |
| | | title: '请输入要删除的条码', |
| | | icon: 'none' |
| | |
| | | if (res.data.count == 1) { |
| | | this.hform.HQty = '' |
| | | this.DisBillEntryList() |
| | | CommonUtils.playSound(1) |
| | | } else { |
| | | CommonUtils.playSound(0) |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0) |
| | | this.refreshBarCodeState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | //清空数量 |
| | | this.hform.HQty = '' |
| | | } else { |
| | | CommonUtils.playSound(0); |
| | | CommonUtils.playSound(0) |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0); |
| | | CommonUtils.playSound(0) |
| | | this.refreshBarCodeState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | <view class="title">源单单号:</view> |
| | | <view class="right" v-show="showHSourceBillNo"> |
| | | <uni-combox v-if="reHSourceBillNo" |
| | | :isAutoFocus="true" ref="uniComboxSourceBill" :confirm-call="onSourceBillConfirmHandler" |
| | | :isFocus="HSourceBillNoFocus" ref="uniComboxSourceBill" :confirm-call="onSourceBillConfirmHandler" |
| | | :candidates="arrayHSourceBillNo" placeholder="请输入源单单号" v-model="hform.HSourceBillNo" @input="HSourceBillNoChange"></uni-combox> |
| | | </view> |
| | | <view class="righton" v-show="!showHSourceBillNo"> |
| | |
| | | reHSourceBillNo:true, |
| | | showHSupName:true, |
| | | BarCodeFocus: false, |
| | | HSourceBillNoFocus: false, |
| | | |
| | | tabs:0, |
| | | HMainSourceBillType:'发货通知单', |
| | |
| | | if(e.HInterID){ |
| | | this.HInterID_Temp = e.HInterID |
| | | // this.btnType = 1 |
| | | this.BarCodeFocus = true |
| | | this.refreshBarCodeState() |
| | | this.RoadBillMain(e.HInterID) |
| | | }else{ |
| | | this.refreshHSourceBillState() |
| | | this.getNewData() |
| | | } |
| | | this.getHBaseList() |
| | |
| | | this.getHDeptList() |
| | | }, |
| | | methods: { |
| | | async refreshHSourceBillState() { |
| | | this.HSourceBillNoFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HSourceBillNo = "" |
| | | this.HSourceBillNoFocus = true |
| | | }) |
| | | if (this.hform.HMainSourceBillType == -1) { |
| | | await this.refreshBarCodeState() |
| | | } |
| | | }, |
| | | async refreshBarCodeState() { |
| | | this.BarCodeFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HBarCode = "" |
| | | this.BarCodeFocus = true |
| | | }) |
| | | }, |
| | | playSound(e){ |
| | | const innerAudioContext = uni.createInnerAudioContext(); |
| | | if(e == 1){ |
| | |
| | | this.DisBillEntryList() |
| | | }else{ |
| | | this.playSound(0) |
| | | this.refreshHSourceBillState() |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | | icon:'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | this.playSound(0) |
| | | this.refreshHSourceBillState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title:'接口请求失败', |
| | |
| | | if (HDeleteFlag == "*") { |
| | | if (sBarCode == "") { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title:'请扫描要删除的条码', |
| | | icon:'none' |
| | |
| | | this.DisBillEntryList() |
| | | }else{ |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | | icon:'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title:'接口请求失败', |
| | |
| | | this.hform.HQty = '' |
| | | }else{ |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | | icon:'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title:'接口请求失败', |
| | |
| | | <view class="form-item" v-show="showHBillNo"> |
| | | <view class="title">单据号:</view> |
| | | <view class="right" style="width: 380rpx;"> |
| | | <input auto-focus name="HBillNo" v-model="hform.HBillNo" placeholder="请扫描(或输入)条码" |
| | | <input :focus="HBillNoFocus" name="HBillNo" v-model="hform.HBillNo" placeholder="请扫描(或输入)条码" |
| | | @confirm="GetMeesageByBillNo(hform.HBarCode)" /> |
| | | </view> |
| | | <uni-icons type="scan" |
| | |
| | | linterid: '', |
| | | HBillNo: '', |
| | | barCodeFocus: false, |
| | | HBillNoFocus: false, |
| | | |
| | | arrayHWHName: [], //仓库 |
| | | HWHNameList: [], |
| | |
| | | if (e.HBillNo) { |
| | | this.hform.HBillNo = e.HBillNo |
| | | this.GetMeesageByBillNo(e.HBillNo) |
| | | this.barCodeFocus = true |
| | | this.refreshBarCodeState() |
| | | } else { |
| | | // this.getNewData() |
| | | this.refreshHBillState() |
| | | } |
| | | this.getHBaseList() |
| | | }, |
| | | methods: { |
| | | async refreshHBillState(){ |
| | | this.HBillNoFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HBillNo = "" |
| | | this.HBillNoFocus = true |
| | | |
| | | }) |
| | | }, |
| | | async refreshBarCodeState(){ |
| | | this.barCodeFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HBarCode = "" |
| | | this.barCodeFocus = true |
| | | }) |
| | | }, |
| | | //扫码 |
| | | toScanCode() { |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | |
| | | this.DisBillEntryList(); |
| | | } else { |
| | | CommonUtils.playSound(0); |
| | | this.refreshHBillState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0); |
| | | this.refreshHBillState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | console.log(this.hform.HSourceBillNo, HSourceFlag) |
| | | if (HDeleteFlag == "*") { |
| | | if (sBarCode == "") { |
| | | CommonUtils.playSound(0) |
| | | uni.showToast({ |
| | | title: '请输入要删除的条码', |
| | | icon: 'none' |
| | |
| | | if (res.data.count == 1) { |
| | | this.hform.HQty = '' |
| | | this.DisBillEntryList() |
| | | CommonUtils.playSound(1) |
| | | } else { |
| | | CommonUtils.playSound(0) |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0) |
| | | this.refreshBarCodeState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | //清空数量 |
| | | this.hform.HQty = '' |
| | | } else { |
| | | CommonUtils.playSound(0); |
| | | CommonUtils.playSound(0) |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0); |
| | | CommonUtils.playSound(0) |
| | | this.refreshBarCodeState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | <view class="form-item"> |
| | | <view class="title">源单单号:</view> |
| | | <view class="right" style="width: 380rpx;" v-show="showHSourceBillNo"> |
| | | <input v-model="hform.HSourceBillNo" auto-focus @confirm="onHSourceBillNoConfirmHandler" placeholder="请扫描(或输入)源单单号"/> |
| | | <input v-model="hform.HSourceBillNo" :focus="HSourceBillNoFocus" @confirm="onHSourceBillNoConfirmHandler" placeholder="请扫描(或输入)源单单号"/> |
| | | </view> |
| | | <uni-icons v-show="showHSourceBillNo" type="scan" style="margin-left: 10rpx;background-color: #3A78FF;padding: 6rpx;color: #fff;border-radius: 100%;" size="20" @click="toScanCodeA()"></uni-icons> |
| | | <view class="righton" v-show="!showHSourceBillNo"> |
| | |
| | | reHSourceBillNo:true, |
| | | showHSupName:true, |
| | | BarCodeFocus: false, |
| | | HSourceBillNoFocus: false, |
| | | |
| | | |
| | | tabs:0, |
| | |
| | | this.HInterID_Temp = e.HInterID |
| | | // this.btnType = 1 |
| | | this.RoadBillMain(e.HInterID) |
| | | this.BarCodeFocus = true |
| | | this.refreshBarCodeState() |
| | | }else{ |
| | | this.getNewData() |
| | | this.refreshHSourceBillState() |
| | | } |
| | | this.getHBaseList() |
| | | this.getHSupList() |
| | |
| | | this.getHDeptList() |
| | | }, |
| | | methods: { |
| | | async refreshHSourceBillState() { |
| | | this.HSourceBillNoFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HSourceBillNo = "" |
| | | this.HSourceBillNoFocus = true |
| | | }) |
| | | if (this.hform.HMainSourceBillType == -1) { |
| | | await this.refreshBarCodeState() |
| | | } |
| | | }, |
| | | async refreshBarCodeState() { |
| | | this.BarCodeFocus = false |
| | | await this.$nextTick(() => { |
| | | this.hform.HBarCode = "" |
| | | this.BarCodeFocus = true |
| | | }) |
| | | }, |
| | | playSound(e){ |
| | | const innerAudioContext = uni.createInnerAudioContext(); |
| | | if(e == 1){ |
| | |
| | | this.BarCodeFocus = true |
| | | this.DisBillEntryList() |
| | | }else{ |
| | | this.playSound(1) |
| | | this.playSound(0) |
| | | this.refreshHSourceBillState() |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | | icon:'none' |
| | |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | this.playSound(1) |
| | | this.playSound(0) |
| | | this.refreshHSourceBillState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title:'接口请求失败', |
| | |
| | | if (HDeleteFlag == "*") { |
| | | if (sBarCode == "") { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title:'请扫描要删除的条码', |
| | | icon:'none' |
| | |
| | | this.DisBillEntryList() |
| | | }else{ |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | | icon:'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title:'接口请求失败', |
| | |
| | | this.hform.HQty = '' |
| | | }else{ |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | | icon:'none' |
| | |
| | | }, |
| | | fail: (res) => { |
| | | this.playSound(0) |
| | | this.refreshBarCodeState() |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title:'接口请求失败', |
| New file |
| | |
| | | class mpaasScan { |
| | | mpaasScanModule |
| | | constructor() { |
| | | this.mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | } |
| | | |
| | | scanCode(callback) { |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log("识别的内容: ", ret.resp_result) |
| | | callback.call(null ,ret.resp_result) |
| | | }) |
| | | } |
| | | } |
| | | |
| | | export let MpaasScan = Object.freeze(new mpaasScan()) |