| | |
| | | "localRepoPath" : "D:/WorkBench/ZY_APP_Dev/STUWMS/unpackage/debug", |
| | | "openVueDevtools" : true, |
| | | "packageName" : "com.shebeiguanli.www", |
| | | "playground" : "standard", |
| | | "playground" : "custom", |
| | | "type" : "uni-app:app-android" |
| | | } |
| | | ] |
| | |
| | | "name" : "智云LMES", |
| | | "appid" : "__UNI__B002F49", |
| | | "description" : "", |
| | | "versionName" : "1.0.93", |
| | | "versionCode" : 193, |
| | | "versionName" : "1.0.94", |
| | | "versionCode" : 194, |
| | | "transformPx" : false, |
| | | /* 5+App特有相关 */ |
| | | "app-plus" : { |
| | |
| | | <button class="btn-c" size="mini" @tap="goBack">退出</button> |
| | | </view> |
| | | </view> |
| | | <BillListPopupVue ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HMainSourceBillType" |
| | | <BillSelectPopupXiaoWeiVue v-if="enableModule == 1" ref="billList" :HBillType="hform.HBillType" |
| | | :HSourceBillType="hform.HMainSourceBillType" :HStockOrgID="hform.HStockOrgID"></BillSelectPopupXiaoWeiVue> |
| | | <BillListPopupVue v-else-if="enableModule == 2" ref="billList" :HBillType="hform.HBillType" :HSourceBillType="hform.HMainSourceBillType" |
| | | :HStockOrgID="hform.HStockOrgID"></BillListPopupVue> |
| | | <BarCodePopupVue ref="barcodePopup"></BarCodePopupVue> |
| | | </view> |
| | |
| | | } from '../../utils/userRelationManager'; |
| | | import BillListPopupVue from '../../components/BillListPopup/BillListPopup.vue'; |
| | | import BarCodePopupVue from "../../components/BarCodePopup/BarCodePopup.vue"; |
| | | import BillSelectPopupXiaoWeiVue from '../../components/BillSelectPopupXiaoWei/BillSelectPopupXiaoWei.vue'; |
| | | export default { |
| | | components: { |
| | | BillListPopupVue, |
| | | BarCodePopupVue |
| | | BarCodePopupVue, |
| | | BillSelectPopupXiaoWeiVue |
| | | }, |
| | | |
| | | data() { |
| | | return { |
| | | HSourceBillNoFocus: false, |
| | |
| | | } |
| | | }, |
| | | computed: { |
| | | enableModule: { |
| | | get() { |
| | | if (this.hform.HMainSourceBillType == 1201 && |
| | | /小卫|智云/.test(uni.getStorageSync('Organization')) |
| | | ) { |
| | | |
| | | return 1 |
| | | } else { |
| | | return 2 |
| | | } |
| | | } |
| | | |
| | | // 其他条件 |
| | | }, |
| | | HStockPlaceNameListComputed: { |
| | | get() { |
| | | // 动态计算对应仓库的仓位 |
| | |
| | | console.log('扫码返回', res.data.data); |
| | | this.HBarCode = '' |
| | | if (res.data.count == 1) { |
| | | if(res.data.data.length < 1) { |
| | | this.playSound(0) |
| | | return uni.showToast({ |
| | | title: '该单据号对应的单据不存在!', |
| | | icon: 'none' |
| | | }) |
| | | } |
| | | this.playSound(1) |
| | | var data = res.data.data |
| | | this.baseInfo = { |
| | |
| | | </view> |
| | | </view> |
| | | </view> |
| | | <view class="bill-info"> |
| | | <checkbox-group @change="checkboxGroupChangeHandler"> |
| | | <view class="form-item" style="justify-content: right;"> |
| | | <view class="title">质量审批</view> |
| | | <checkbox value="qualityApproval"></checkbox> |
| | | </view> |
| | | </checkbox-group> |
| | | </view> |
| | | </view> |
| | | <view class="bottom-btn" id="bottom-btn"> |
| | | <button :class="EnableSubmit?'btn-a':'btn-c'" :disabled="!EnableSubmit" size="mini" @tap="cmdSubmit">提交</button> |
| | |
| | | HInterID: '', |
| | | HStockOrgName: uni.getStorageSync("Organization"), |
| | | HStockOrgID: uni.getStorageSync("OrganizationID"), |
| | | |
| | | HQualityApproval: false, |
| | | }, |
| | | // 分页模块元数据 |
| | | paginationMeta: { |
| | |
| | | } |
| | | }, |
| | | methods: { |
| | | checkboxGroupChangeHandler(e) { |
| | | let checkBoxValues = Array.from(e.detail.value) |
| | | if(checkBoxValues.findIndex(elem => elem == 'qualityApproval') != -1) { |
| | | this.hform.HQualityApproval = true |
| | | }else { |
| | | this.hform.HQualityApproval = false |
| | | } |
| | | }, |
| | | onTableRowClickHandler(row, index) { |
| | | console.log('row: ',row); |
| | | if(!this.listData[index].checked){ |
| | |
| | | class commonUtils { |
| | | serverUrl |
| | | |
| | | audioContext // 全局音频实例 |
| | | constructor() { |
| | | this.serverUrl = uni.getStorageSync('serverUrl') || 'http://47.96.97.237/API/'; |
| | | this.audioContext = null; |
| | | } |
| | | |
| | | setServerUrl(url) { |
| | | this.serverUrl = url |
| | | } |
| | | |
| | | |
| | | getServerUrl() { |
| | | return this.serverUrl |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | // 防抖函数 |
| | | debounce(func, delay, immediate = false) { |
| | |
| | | } |
| | | }) |
| | | } |
| | | |
| | | doRequest2({url, data, resFunction, errFunction,method, that}){ |
| | | that = that || this; |
| | | let errorTip = null; |
| | | uni.showLoading({ |
| | | title: '加载中...' |
| | | }) |
| | | uni.request({ |
| | | method: method || "GET", |
| | | url: this.serverUrl + url, |
| | | data: data || "", |
| | | success: (res) => { |
| | | if (typeof resFunction === 'function') { |
| | | resFunction.call(that, res) |
| | | } else if (typeof errFunction === 'undefined' || errFunction === null) { |
| | | return |
| | | } else { |
| | | throw new TypeError("访问成功回调函数类型不为函数或者空!") |
| | | } |
| | | }, |
| | | fail: (err) => { |
| | | console.error(err) |
| | | errorTip = () => { |
| | | uni.showToast({ |
| | | icon: "none", |
| | | title: err.errMsg || err.data.message || "接口异常!", |
| | | duration: 2000 |
| | | }) |
| | | } |
| | | if (typeof errFunction === 'function') { |
| | | errFunction.call(that, err) |
| | | } else if (typeof errFunction === 'undefined' || errFunction === null) { |
| | | return |
| | | } else { |
| | | throw new TypeError("访问失败回调函数类型不为函数或者空!") |
| | | } |
| | | |
| | | }, |
| | | complete: () => { |
| | | |
| | | setTimeout(() => { |
| | | uni.hideLoading() |
| | | if (errorTip != null) { |
| | | errorTip() |
| | | } |
| | | }, 1000) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | stringToBoolean(str) { |
| | | // 忽略大小写的转换 |
| | | return str?.toLowerCase() === "true"; |
| | | } |
| | | |
| | | doRequest2({ |
| | | url, |
| | | data, |
| | | resFunction, |
| | | errFunction, |
| | | method, |
| | | that |
| | | }) { |
| | | that = that || this; |
| | | let errorTip = null; |
| | | uni.showLoading({ |
| | | title: '加载中...' |
| | | }) |
| | | uni.request({ |
| | | method: method || "GET", |
| | | url: this.serverUrl + url, |
| | | data: data || "", |
| | | success: (res) => { |
| | | if (typeof resFunction === 'function') { |
| | | resFunction.call(that, res) |
| | | } else if (typeof errFunction === 'undefined' || errFunction === null) { |
| | | return |
| | | } else { |
| | | throw new TypeError("访问成功回调函数类型不为函数或者空!") |
| | | } |
| | | }, |
| | | fail: (err) => { |
| | | console.error(err) |
| | | errorTip = () => { |
| | | uni.showToast({ |
| | | icon: "none", |
| | | title: err.errMsg || err.data.message || "接口异常!", |
| | | duration: 2000 |
| | | }) |
| | | } |
| | | if (typeof errFunction === 'function') { |
| | | errFunction.call(that, err) |
| | | } else if (typeof errFunction === 'undefined' || errFunction === null) { |
| | | return |
| | | } else { |
| | | throw new TypeError("访问失败回调函数类型不为函数或者空!") |
| | | } |
| | | |
| | | }, |
| | | complete: () => { |
| | | |
| | | setTimeout(() => { |
| | | uni.hideLoading() |
| | | if (errorTip != null) { |
| | | errorTip() |
| | | } |
| | | }, 1000) |
| | | } |
| | | }) |
| | | } |
| | | |
| | | stringToBoolean(str) { |
| | | // 忽略大小写的转换 |
| | | return str?.toLowerCase() === "true"; |
| | | } |
| | | |
| | | // uni-app 播放音频封装 |
| | | playSound(e) { |
| | |
| | | innerAudioContext.src = '/static/jingbao.wav'; |
| | | } |
| | | innerAudioContext.play(); // 播放音频 |
| | | |
| | | innerAudioContext.onPlay(() => { |
| | | console.log('开始播放'); |
| | | }); |
| | | innerAudioContext.onError((res) => { |
| | | console.log(res.errMsg); |
| | | console.log(res.errCode); |
| | | }); |
| | | innerAudioContext.onPause(function() { |
| | | console.log('播放出现错误,销毁'); |
| | | innerAudioContext.destroy(); |
| | | }) |
| | | } |
| | | |
| | | // playSound(e) { |
| | | // // 全局维护一个音频实例,防止缓存溢出 |
| | | // if (this.audioContext) { |
| | | // this.audioContext.destroy(); |
| | | // } |
| | | // this.audioContext = uni.createInnerAudioContext(); |
| | | // if (e == 1) { |
| | | // this.audioContext.src = '/static/success.wav'; |
| | | // } else { |
| | | // this.audioContext.src = '/static/jingbao.wav'; |
| | | // } |
| | | // this.audioContext.play(); // 播放音频 |
| | | // |
| | | // // 播放结束后销毁实例 |
| | | // this.audioContext.onEnded(() => { |
| | | // this.audioContext.destroy(); |
| | | // this.audioContext = null; |
| | | // }); |
| | | // |
| | | // // 错误处理 |
| | | // this.audioContext.onError((err) => { |
| | | // uni.showToast({ |
| | | // icon: 'none', |
| | | // title: `音频播放错误: ${err}` |
| | | // }) |
| | | // |
| | | // this.audioContext.destroy(); |
| | | // this.audioContext = null; |
| | | // }); |
| | | // } |
| | | |
| | | |
| | | |
| | | replaceWithFunction(str, handler) { |
| | | return str.replace(/\{(.+?)\}/g, (match, key) => { |
| | | // 调用处理函数,传入匹配到的键 |
| | | return handler(key, match); |
| | | }); |
| | | return str.replace(/\{(.+?)\}/g, (match, key) => { |
| | | // 调用处理函数,传入匹配到的键 |
| | | return handler(key, match); |
| | | }); |
| | | } |
| | | } |
| | | |