| | |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | CommonUtils.playSound(1); |
| | | var data = res.data.data |
| | | console.log('单据信息: ', data) |
| | | this.hform.HInterID = data.hInterIDField |
| | |
| | | this.tabs = 2 |
| | | this.DisBillEntryList(); |
| | | } else { |
| | | CommonUtils.playSound(0); |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0); |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | console.log('扫码返回', res.data); |
| | | this.hform.HBarCode = '' |
| | | if (res.data.count == 1) { |
| | | CommonUtils.playSound(1); |
| | | var data = res.data.data |
| | | if (data.hBarTypeField == '仓库条码') { |
| | | this.hform.HWHName = data.hWhNameField |
| | |
| | | //清空数量 |
| | | this.hform.HQty = '' |
| | | } else { |
| | | CommonUtils.playSound(0); |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0); |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | CommonUtils.playSound(1); |
| | | var data = res.data.data |
| | | console.log('单据信息: ', data) |
| | | this.hform.HInterID = data.hInterIDField |
| | |
| | | this.tabs = 2 |
| | | this.DisBillEntryList(); |
| | | } else { |
| | | CommonUtils.playSound(0); |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0); |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | HBarCode: sBarCode |
| | | }, |
| | | success: (res) => { |
| | | CommonUtils.playSound(1); |
| | | console.log('删除条码', res.data); |
| | | this.hform.HBarCode = '' |
| | | if (res.data.count == 1) { |
| | |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0); |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | // HCustom2: "" |
| | | }, |
| | | success: (res) => { |
| | | |
| | | console.log('扫码返回', res.data); |
| | | this.hform.HBarCode = '' |
| | | if (res.data.count == 1) { |
| | | CommonUtils.playSound(1); |
| | | var data = res.data.data |
| | | if (data.hBarTypeField == '仓库条码') { |
| | | this.hform.HWHName = data.hWhNameField |
| | |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0); |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | CommonUtils.playSound(1); |
| | | var data = res.data.data |
| | | console.log('单据信息: ', data) |
| | | this.hform.HInterID = data.hInterIDField |
| | |
| | | this.tabs = 2 |
| | | this.DisBillEntryList(); |
| | | } else { |
| | | CommonUtils.playSound(0); |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0); |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | console.log('扫码返回', res.data); |
| | | this.hform.HBarCode = '' |
| | | if (res.data.count == 1) { |
| | | CommonUtils.playSound(1); |
| | | var data = res.data.data |
| | | if (data.hBarTypeField == '仓库条码') { |
| | | this.hform.HWHName = data.hWhNameField |
| | |
| | | //清空数量 |
| | | this.hform.HQty = '' |
| | | } else { |
| | | CommonUtils.playSound(0); |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0); |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | import { |
| | | getUserInfo |
| | | } from "@/utils/auth.js"; |
| | | import { CommonUtils } from "@/utils/common.js" |
| | | export default { |
| | | data() { |
| | | return { |
| | |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | CommonUtils.playSound(1) |
| | | var data = res.data.data |
| | | console.log('单据信息: ', data) |
| | | this.hform.HInterID = data.hInterIDField |
| | |
| | | this.tabs = 2 |
| | | this.DisBillEntryList(); |
| | | } else { |
| | | CommonUtils.playSound(0) |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0) |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | console.log('扫码返回', res.data); |
| | | this.hform.HBarCode = '' |
| | | if (res.data.count == 1) { |
| | | CommonUtils.playSound(1) |
| | | var data = res.data.data |
| | | if (data.hBarTypeField == '仓库条码') { |
| | | this.hform.HWHName = data.hWhNameField |
| | |
| | | //清空数量 |
| | | this.hform.HQty = '' |
| | | } else { |
| | | CommonUtils.playSound(0) |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0) |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | CommonUtils.playSound(1); |
| | | var data = res.data.data |
| | | console.log('单据信息: ', data) |
| | | this.hform.HInterID = data.hInterIDField |
| | |
| | | this.tabs = 2 |
| | | this.DisBillEntryList(); |
| | | } else { |
| | | CommonUtils.playSound(0); |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0); |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | console.log('扫码返回', res.data); |
| | | this.hform.HBarCode = '' |
| | | if (res.data.count == 1) { |
| | | CommonUtils.playSound(1); |
| | | var data = res.data.data |
| | | if (data.hBarTypeField == '仓库条码') { |
| | | this.hform.HWHName = data.hWhNameField |
| | |
| | | //清空数量 |
| | | this.hform.HQty = '' |
| | | } else { |
| | | CommonUtils.playSound(0); |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0); |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | CommonUtils.playSound(1); |
| | | var data = res.data.data |
| | | console.log('单据信息: ', data) |
| | | this.hform.HInterID = data.hInterIDField |
| | |
| | | this.tabs = 2 |
| | | this.DisBillEntryList(); |
| | | } else { |
| | | CommonUtils.playSound(0); |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0); |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | console.log('扫码返回', res.data); |
| | | this.hform.HBarCode = '' |
| | | if (res.data.count == 1) { |
| | | CommonUtils.playSound(1); |
| | | var data = res.data.data |
| | | if (data.hBarTypeField == '仓库条码') { |
| | | this.hform.HWHName = data.hWhNameField |
| | |
| | | //清空数量 |
| | | this.hform.HQty = '' |
| | | } else { |
| | | CommonUtils.playSound(0); |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0); |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | }, |
| | | success: (res) => { |
| | | if (res.data.count == 1) { |
| | | CommonUtils.playSound(1); |
| | | var data = res.data.data |
| | | console.log('单据信息: ', data) |
| | | this.hform.HInterID = data.hInterIDField |
| | |
| | | this.tabs = 2 |
| | | this.DisBillEntryList(); |
| | | } else { |
| | | CommonUtils.playSound(0); |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0); |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | console.log('扫码返回', res.data); |
| | | this.hform.HBarCode = '' |
| | | if (res.data.count == 1) { |
| | | CommonUtils.playSound(1); |
| | | var data = res.data.data |
| | | if (data.hBarTypeField == '仓库条码') { |
| | | this.hform.HWHName = data.hWhNameField |
| | |
| | | //清空数量 |
| | | this.hform.HQty = '' |
| | | } else { |
| | | CommonUtils.playSound(0); |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | CommonUtils.playSound(0); |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | // uni-app 播放音频封装 |
| | | playSound(e){ |
| | | const innerAudioContext = uni.createInnerAudioContext(); |
| | | if(e == 1){ |
| | | innerAudioContext.src = '/static/success.wav'; |
| | | }else{ |
| | | innerAudioContext.src = '/static/jingbao.wav'; |
| | | } |
| | | innerAudioContext.play(); // 播放音频 |
| | | } |
| | | } |
| | | |
| | | export const CommonUtils = Object.freeze(new commonUtils()); |