| | |
| | | }, |
| | | { |
| | | "openVueDevtools" : true, |
| | | "playground" : "custom", |
| | | "type" : "uni-app:app-android" |
| | | } |
| | | ] |
| | |
| | | "name" : "智云LMES", |
| | | "appid" : "__UNI__B002F49", |
| | | "description" : "", |
| | | "versionName" : "1.0.25", |
| | | "versionCode" : 125, |
| | | "versionName" : "1.0.28", |
| | | "versionCode" : 128, |
| | | "transformPx" : false, |
| | | /* 5+App特有相关 */ |
| | | "app-plus" : { |
| | |
| | | "<uses-permission android:name=\"android.permission.WRITE_CONTACTS\"/>", |
| | | "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" |
| | | ], |
| | | "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ] |
| | | "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ], |
| | | "minSdkVersion" : 23 |
| | | }, |
| | | /* ios打包配置 */ |
| | | "ios" : { |
| | |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | "nativePlugins" : { |
| | | "Mpaas-Scan" : { |
| | | "AppId" : "ALIPUB2087527291109", |
| | | "License" : "uqSDoPf8ArVz0mKgs62fihEiELxaNc/fCwZU2eRwDvfdN3uhWCRRtXgszPkWmqjSUPYSFgOdMh0dv4UkQe0twC8fZt8+71FB3K6A83NaLtwi5gu+hVJ8MZnOTUe/ipmCCVmRGapmwfKfyHbV2oSAOLbq4/fgBszewOVtdjx7ogzyIltcCHOESsdejnFxmg/7+HuX5/0qmLxGIUUwGhwQazot0bQeGBP8sJ4ONZLd7n4WQFe8bQCrRcB3CPAFClwA/VldpIjOwrTYTd0LHyrhPJN5xHdpeoKmGIyJYsoxm94DDUFZyGHB+Qs+3euCJHOlCqpa7/A+ciAdUSeKHa0tkw==", |
| | | "WorkspaceId" : "default", |
| | | "__plugin_info__" : { |
| | | "name" : "支付宝原生扫码插件", |
| | | "description" : "支付宝原生扫码组件,包体积仅0.7MB,15分钟即可完成接入。同时,mPaaS提供「扫码分析」大盘", |
| | | "platforms" : "Android,iOS", |
| | | "url" : "https://ext.dcloud.net.cn/plugin?id=2636", |
| | | "android_package_name" : "com.shebeiguanli.www", |
| | | "ios_bundle_id" : "", |
| | | "isCloud" : true, |
| | | "bought" : 1, |
| | | "pid" : "2636", |
| | | "parameters" : { |
| | | "AppId" : { |
| | | "des" : "Android平台的AppId,请填写Android的config文件中的appId对应的值", |
| | | "key" : "mobilegw.appid", |
| | | "value" : "" |
| | | }, |
| | | "License" : { |
| | | "des" : "Android平台的License,,请填写Android的config文件中的mpaasConfigLicense对应的值", |
| | | "key" : "mpaasConfigLicense", |
| | | "value" : "" |
| | | }, |
| | | "WorkspaceId" : { |
| | | "des" : "Android平台的WorkspaceId,请填写Android的config文件中的workspaceId对应的值", |
| | | "key" : "workspaceId", |
| | | "value" : "" |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| | | }, |
| | | /* 快应用特有相关 */ |
| | |
| | | methods: { |
| | | //扫码 |
| | | toScanCode(){ |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | this.hform.HBarCode = res.result |
| | | this.getHBarCodeData(res.result) |
| | | } |
| | | }); |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | this.hform.HBarCode = ret.resp_result |
| | | this.getHBarCodeData(ret.resp_result) |
| | | }) |
| | | }, |
| | | //日期 |
| | | HDateChange(e){ |
| | |
| | | }, |
| | | //扫码选择设备 |
| | | toScanCode(){ |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | uni.request({ |
| | | url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo', |
| | | data: { HBarCode: res.result }, |
| | | success: (res) => { |
| | | console.log(res.data); |
| | | if(res.data.count == 1){ |
| | | var data = res.data.list[0][0] |
| | | this.hform.HEquipID = data.hmainid |
| | | this.hform.HEquipName = data.设备名称 |
| | | } |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title:'接口请求失败', |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | }); |
| | | } |
| | | }); |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | uni.request({ |
| | | url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo', |
| | | data: { HBarCode: ret.resp_result }, |
| | | success: (res) => { |
| | | console.log(res.data); |
| | | if(res.data.count == 1){ |
| | | var data = res.data.list[0][0] |
| | | this.hform.HEquipID = data.hmainid |
| | | this.hform.HEquipName = data.设备名称 |
| | | } |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title:'接口请求失败', |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }) |
| | | }, |
| | | |
| | | //获取设备保养规程数据 |
| | |
| | | methods: { |
| | | //扫码 |
| | | toScanCode(){ |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | uni.request({ |
| | | url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo', |
| | | data: { HBarCode: res.result }, |
| | | success: (res) => { |
| | | console.log(res.data); |
| | | if(res.data.count == 1){ |
| | | var data = res.data.list[0][0] |
| | | this.hform.HEquipID = data.hmainid |
| | | this.hform.HEquipName = data.设备名称 |
| | | } |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title:'接口请求失败', |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | }); |
| | | } |
| | | }); |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | uni.request({ |
| | | url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo', |
| | | data: { HBarCode: ret.resp_result }, |
| | | success: (res) => { |
| | | console.log(res.data); |
| | | if(res.data.count == 1){ |
| | | var data = res.data.list[0][0] |
| | | this.hform.HEquipID = data.hmainid |
| | | this.hform.HEquipName = data.设备名称 |
| | | } |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title:'接口请求失败', |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }) |
| | | }, |
| | | upCode(){ |
| | | uni.request({ |
| | |
| | | methods: { |
| | | //扫码 |
| | | toScanCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | this.HBarCode = res.result |
| | | |
| | | this.getCode(this.HBarCode) |
| | | } |
| | | }); |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | this.HBarCode = ret.resp_result |
| | | this.getCode(this.HBarCode) |
| | | }) |
| | | }, |
| | | //扫条码处理 |
| | | getCode(HBarCode) { |
| | |
| | | }, |
| | | //扫码 |
| | | toScanCode(){ |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | if(this.hform.HBarCode == '*'){ |
| | | this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | }else{ |
| | | this.hform.HBarCode = res.result |
| | | } |
| | | |
| | | this.getCode(this.hform.HBarCode) |
| | | } |
| | | }); |
| | | 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.getCode(this.hform.HBarCode) |
| | | }) |
| | | }, |
| | | //扫其他(仓库,仓位) |
| | | // toScanData(e){ |
| | |
| | | methods: { |
| | | //扫码 |
| | | toScanCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | // if(this.hform.HBarCode == '*'){ |
| | | // this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | // }else{ |
| | | // this.hform.HBarCode = res.result |
| | | // } |
| | | this.hform.HBarCode = res.result |
| | | // this.GetMeesageByBillNo(this.hform.HBarCode) |
| | | this.getCode(this.hform.HBarCode) |
| | | } |
| | | }); |
| | | 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.hform.HBarCode = ret.resp_result |
| | | // this.GetMeesageByBillNo(this.hform.HBarCode) |
| | | this.getCode(this.hform.HBarCode) |
| | | }) |
| | | |
| | | }, |
| | | toScanBillCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | // if(this.hform.HBarCode == '*'){ |
| | | // this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | // }else{ |
| | | // this.hform.HBarCode = res.result |
| | | // } |
| | | |
| | | this.hform.HBillNo = res.result |
| | | this.GetMeesageByBillNo(this.hform.HBillNo) |
| | | } |
| | | }); |
| | | 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.hform.HBillNo = ret.resp_result |
| | | this.GetMeesageByBillNo(this.hform.HBillNo) |
| | | }) |
| | | }, |
| | | //扫描单据号条码 |
| | | GetMeesageByBillNo(e) { |
| | |
| | | }, |
| | | //扫码 |
| | | toScanCode(){ |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | if(this.hform.HBarCode == '*'){ |
| | | this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | }else{ |
| | | this.hform.HBarCode = res.result |
| | | } |
| | | |
| | | this.getCode(this.hform.HBarCode) |
| | | } |
| | | }); |
| | | 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.getCode(this.hform.HBarCode) |
| | | }) |
| | | }, |
| | | //扫其他(仓库,仓位) |
| | | // toScanData(e){ |
| | |
| | | methods: { |
| | | //扫码 |
| | | toScanCode(e){ |
| | | // this.hform.HBarCode = 'GXLX250603001-01' |
| | | // this.getHBarCodeData('GXLX250603001-01') |
| | | |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | if(e==0){ |
| | | this.hform.HBarCode = res.result |
| | | this.getHBarCodeData(res.result) |
| | | }else{ |
| | | this.hform.HBarCode_Mater = res.result |
| | | this.getHBarCodeMater(res.result) |
| | | } |
| | | } |
| | | }); |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | if(e==0){ |
| | | this.hform.HBarCode = ret.resp_result |
| | | this.getHBarCodeData(ret.resp_result) |
| | | }else{ |
| | | this.hform.HBarCode_Mater = ret.resp_result |
| | | this.getHBarCodeMater(ret.resp_result) |
| | | } |
| | | }) |
| | | }, |
| | | //扫流水号 |
| | | toScanProcNo(){ |
| | | if(this.hform.HProcExchHinteID){ |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | this.hform.HProcNo = res.result |
| | | this.getHProcNoData(this.hform.HBarCode,res.result) |
| | | } |
| | | }); |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | this.hform.HProcNo = resp_result |
| | | this.getHProcNoData(this.hform.HBarCode,resp_result) |
| | | }) |
| | | }else{ |
| | | uni.showToast({ |
| | | title:'请扫完流转卡后再扫配件码', |
| | |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }else{ |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | | icon:'none' |
| | | }) |
| | | } |
| | | |
| | | }, |
| | | fail: (res) => { |
| | |
| | | this.getHGroupList() |
| | | this.getHEmpList() |
| | | this.getHCenterList() |
| | | |
| | | this.getDefValByUser() |
| | | }, |
| | | methods: { |
| | | //通过登录用户获取默认值 |
| | | getDefValByUser(){ |
| | | uni.request({ |
| | | url: this.serverUrl + '/Cj_StationInBill/GetDefValByUser', |
| | | type: "GET", |
| | | async: false, |
| | | data: { "Czybm": this.userInfo.Czybm, "Czymc": this.userInfo.Czymc }, |
| | | success: (res) => { |
| | | // console.log(res.data) |
| | | if(res.data.count == 1){ |
| | | var data = res.data.data[0] |
| | | this.hform.HGroupID = data.HGroupID |
| | | this.hform.HGroupName = data.生产班组名称 |
| | | this.hform.HEmpID = data.HEmpID |
| | | this.hform.HEmpName = data.操作员名称 |
| | | this.hform.HEmpNumber = data.操作员代码 |
| | | this.hform.HSourceID = data.HSourceID |
| | | this.hform.HSourceName = data.生产资源名称 |
| | | this.hform.HCenterID = data.HWorkCenterID |
| | | this.hform.HCenterName = data.工作中心名称 |
| | | this.hform.HEmpName_second = data.操作员名称 |
| | | }else{ |
| | | uni.showToast({ |
| | | title:'获取生产班组信息失败', |
| | | icon:'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title:'获取生产班组信息失败', |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | //扫码 |
| | | toScanCode(){ |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | var str = ret.resp_result |
| | | if(str.includes('@')) { |
| | | const parts = str.split('@'); |
| | | this.hform.HBarCode = parts[0] |
| | | this.hform.HProcNo = parts[1] |
| | | this.getHBarCodeData(parts[0],1) |
| | | // this.getHProcNoData(parts[0],parts[1]) |
| | | }else{ |
| | | this.hform.HBarCode = ret.resp_result |
| | | this.getHBarCodeData(ret.resp_result) |
| | | } |
| | | }) |
| | | // const str = "GXLX250603001-01@10"; |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | // autoZoom:false, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | var str = res.result |
| | | if(str.includes('@')) { |
| | | const parts = str.split('@'); |
| | | this.hform.HBarCode = parts[0] |
| | | this.hform.HProcNo = parts[1] |
| | | this.getHBarCodeData(parts[0]) |
| | | // this.getHProcNoData(parts[0],parts[1]) |
| | | }else{ |
| | | this.hform.HBarCode = res.result |
| | | this.getHBarCodeData(res.result) |
| | | } |
| | | } |
| | | }); |
| | | // uni.scanCode({ |
| | | // onlyFromCamera: true, |
| | | // // autoZoom:false, |
| | | // success: (res) => { |
| | | // console.log('条码内容:' + res.result); |
| | | // var str = res.result |
| | | // if(str.includes('@')) { |
| | | // const parts = str.split('@'); |
| | | // this.hform.HBarCode = parts[0] |
| | | // this.hform.HProcNo = parts[1] |
| | | // this.getHBarCodeData(parts[0],1) |
| | | // // this.getHProcNoData(parts[0],parts[1]) |
| | | // }else{ |
| | | // this.hform.HBarCode = res.result |
| | | // this.getHBarCodeData(res.result) |
| | | // } |
| | | // } |
| | | // }); |
| | | }, |
| | | toInCode(e){ |
| | | var str = this.hform.HBarCode |
| | |
| | | const parts = str.split('@'); |
| | | this.hform.HBarCode = parts[0] |
| | | this.hform.HProcNo = parts[1] |
| | | this.getHBarCodeData(parts[0]) |
| | | this.getHBarCodeData(parts[0],1) |
| | | // this.getHProcNoData(parts[0],parts[1]) |
| | | }else{ |
| | | this.getHBarCodeData(this.hform.HBarCode) |
| | |
| | | }, |
| | | //扫流水号 |
| | | toScanProcNo(){ |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | this.hform.HProcNo = res.result |
| | | this.getHProcNoData(this.hform.HBarCode,res.result) |
| | | } |
| | | }); |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | this.hform.HProcNo = ret.resp_result |
| | | this.getHProcNoData(this.hform.HBarCode,ret.resp_result) |
| | | }) |
| | | }, |
| | | //日期 |
| | | HDateChange(e){ |
| | |
| | | if(res.data.code == 1){ |
| | | var data = res.data.data[0] |
| | | this.getHBarCodeData(data.HBarCode) |
| | | // this.getHProcNoData(data.HBarCode,data.HProcNo) |
| | | this.getHProcNoData(data.HBarCode,data.HProcNo) |
| | | |
| | | this.hform.HInterID= data.HInterID |
| | | this.hform.HBillNo= data.HBillNo |
| | |
| | | }, |
| | | }); |
| | | }, |
| | | getHBarCodeData(HBarCode){ |
| | | getHBarCodeData(HBarCode,e){ |
| | | var barNo = HBarCode.substr(0, 2); |
| | | var barNo1 = HBarCode.substr(0, 4); |
| | | uni.request({ |
| | |
| | | this.hform.HCenterID= data.HCenterID |
| | | this.hform.NoOutboundHqty= (data.流转卡数量 - data.出站报废关联数量 - data.出站关联数量) |
| | | |
| | | this.getHProcNoData(this.hform.HBarCode,this.hform.HProcNo) |
| | | if(e){ |
| | | this.getHProcNoData(this.hform.HBarCode,this.hform.HProcNo) |
| | | } |
| | | }else{ |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }else{ |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | | icon:'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | |
| | | methods: { |
| | | //扫码 |
| | | toScanCode(){ |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | uni.request({ |
| | | url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo', |
| | | data: { HBarCode: res.result }, |
| | | success: (res) => { |
| | | console.log(res.data); |
| | | if(res.data.count == 1){ |
| | | var data = res.data.list[0][0] |
| | | this.hform.HEquipID = data.hmainid |
| | | this.hform.HEquipName = data.设备名称 |
| | | } |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title:'接口请求失败', |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | }); |
| | | } |
| | | }); |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | uni.request({ |
| | | url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo', |
| | | data: { HBarCode: ret.resp_result }, |
| | | success: (res) => { |
| | | console.log(res.data); |
| | | if(res.data.count == 1){ |
| | | var data = res.data.list[0][0] |
| | | this.hform.HEquipID = data.hmainid |
| | | this.hform.HEquipName = data.设备名称 |
| | | } |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title:'接口请求失败', |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }) |
| | | }, |
| | | // upCode(){ |
| | | // uni.request({ |
| | |
| | | methods: { |
| | | //扫码 |
| | | toScanCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | if (this.hform.HBarCode == '*') { |
| | | this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | } else { |
| | | this.hform.HBarCode = res.result |
| | | } |
| | | |
| | | this.getCode(this.hform.HBarCode) |
| | | 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.getCode(this.hform.HBarCode) |
| | | }) |
| | | }, |
| | | //选择仓库 |
| | | HWHNameChange(e) { |
| | |
| | | }, |
| | | //扫码 |
| | | toScanCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | if (this.hform.HBarCode == '*') { |
| | | this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | } else { |
| | | this.hform.HBarCode = res.result |
| | | } |
| | | |
| | | this.getCode(this.hform.HBarCode) |
| | | 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.getCode(this.hform.HBarCode) |
| | | }) |
| | | }, |
| | | showBillList() { |
| | | this.$refs.billList.showPopup() |
| | |
| | | methods: { |
| | | //扫码 |
| | | toScanCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | // if(this.hform.HBarCode == '*'){ |
| | | // this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | // }else{ |
| | | // this.hform.HBarCode = res.result |
| | | // } |
| | | this.hform.HBarCode = res.result |
| | | // this.GetMeesageByBillNo(this.hform.HBarCode) |
| | | this.getCode(this.hform.HBarCode) |
| | | } |
| | | }); |
| | | 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.hform.HBarCode = ret.resp_result |
| | | // this.GetMeesageByBillNo(this.hform.HBarCode) |
| | | this.getCode(this.hform.HBarCode) |
| | | }) |
| | | }, |
| | | toScanBillCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | // if(this.hform.HBarCode == '*'){ |
| | | // this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | // }else{ |
| | | // this.hform.HBarCode = res.result |
| | | // } |
| | | |
| | | this.hform.HBillNo = res.result |
| | | this.GetMeesageByBillNo(this.hform.HBillNo) |
| | | } |
| | | }); |
| | | 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.hform.HBillNo = ret.resp_result |
| | | this.GetMeesageByBillNo(this.hform.HBillNo) |
| | | }) |
| | | }, |
| | | //扫描单据号条码 |
| | | GetMeesageByBillNo(e) { |
| | |
| | | methods: { |
| | | //扫码 |
| | | toScanCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | if (this.hform.HBarCode == '*') { |
| | | this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | } else { |
| | | this.hform.HBarCode = res.result |
| | | } |
| | | |
| | | this.getCode(this.hform.HBarCode) |
| | | 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.getCode(this.hform.HBarCode) |
| | | }) |
| | | }, |
| | | //扫其他(仓库,仓位) |
| | | // toScanData(e){ |
| | |
| | | }, |
| | | //扫码 |
| | | toScanCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | if (this.hform.HBarCode == '*') { |
| | | this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | } else { |
| | | this.hform.HBarCode = res.result |
| | | } |
| | | |
| | | this.getCode(this.hform.HBarCode) |
| | | 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.getCode(this.hform.HBarCode) |
| | | }) |
| | | }, |
| | | showBillList() { |
| | | this.$refs.billList.showPopup() |
| | |
| | | methods: { |
| | | //扫码 |
| | | toScanCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | // if(this.hform.HBarCode == '*'){ |
| | | // this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | // }else{ |
| | | // this.hform.HBarCode = res.result |
| | | // } |
| | | this.hform.HBarCode = res.result |
| | | // this.GetMeesageByBillNo(this.hform.HBarCode) |
| | | this.getCode(this.hform.HBarCode) |
| | | } |
| | | }); |
| | | 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.hform.HBarCode = ret.resp_result |
| | | // this.GetMeesageByBillNo(this.hform.HBarCode) |
| | | this.getCode(this.hform.HBarCode) |
| | | }) |
| | | }, |
| | | toScanBillCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | // if(this.hform.HBarCode == '*'){ |
| | | // this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | // }else{ |
| | | // this.hform.HBarCode = res.result |
| | | // } |
| | | |
| | | this.hform.HBillNo = res.result |
| | | this.GetMeesageByBillNo(this.hform.HBillNo) |
| | | } |
| | | }); |
| | | 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.hform.HBillNo = ret.resp_result |
| | | this.GetMeesageByBillNo(this.hform.HBillNo) |
| | | }) |
| | | }, |
| | | //扫描单据号条码 |
| | | GetMeesageByBillNo(e) { |
| | |
| | | methods: { |
| | | //扫码 |
| | | toScanCode(){ |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | this.hform.HBarCode = res.result |
| | | // uni.request({ |
| | | // url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo', |
| | | // data: { HBarCode: res.result }, |
| | | // success: (res) => { |
| | | // console.log(res.data); |
| | | // var data = res.data.list[0][0] |
| | | // if(res.data.count == 1){ |
| | | // this.hform.HEquipID = data.hmainid |
| | | // this.hform.HEquipName = data.设备名称 |
| | | // } |
| | | // uni.showToast({ |
| | | // title:res.data.Message, |
| | | // icon:'none' |
| | | // }) |
| | | // }, |
| | | // fail: (res) => { |
| | | // console.log(res); |
| | | // uni.showToast({ |
| | | // title:'接口请求失败', |
| | | // icon:'none' |
| | | // }) |
| | | // }, |
| | | // }); |
| | | } |
| | | }); |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | this.hform.HBarCode = ret.resp_result |
| | | // uni.request({ |
| | | // url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo', |
| | | // data: { HBarCode: ret.resp_result }, |
| | | // success: (res) => { |
| | | // console.log(res.data); |
| | | // var data = res.data.list[0][0] |
| | | // if(res.data.count == 1){ |
| | | // this.hform.HEquipID = data.hmainid |
| | | // this.hform.HEquipName = data.设备名称 |
| | | // } |
| | | // uni.showToast({ |
| | | // title:res.data.Message, |
| | | // icon:'none' |
| | | // }) |
| | | // }, |
| | | // fail: (res) => { |
| | | // console.log(res); |
| | | // uni.showToast({ |
| | | // title:'接口请求失败', |
| | | // icon:'none' |
| | | // }) |
| | | // }, |
| | | // }); |
| | | }) |
| | | }, |
| | | // upCode(){ |
| | | // uni.request({ |
| | |
| | | methods: { |
| | | //扫码 |
| | | toScanCode(){ |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | this.hform.HBarCode = res.result |
| | | // uni.request({ |
| | | // url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo', |
| | | // data: { HBarCode: res.result }, |
| | | // success: (res) => { |
| | | // console.log(res.data); |
| | | // var data = res.data.list[0][0] |
| | | // if(res.data.count == 1){ |
| | | // this.hform.HEquipID = data.hmainid |
| | | // this.hform.HEquipName = data.设备名称 |
| | | // } |
| | | // uni.showToast({ |
| | | // title:res.data.Message, |
| | | // icon:'none' |
| | | // }) |
| | | // }, |
| | | // fail: (res) => { |
| | | // console.log(res); |
| | | // uni.showToast({ |
| | | // title:'接口请求失败', |
| | | // icon:'none' |
| | | // }) |
| | | // }, |
| | | // }); |
| | | } |
| | | }); |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | this.hform.HBarCode = ret.resp_result |
| | | // uni.request({ |
| | | // url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo', |
| | | // data: { HBarCode: ret.resp_result }, |
| | | // success: (res) => { |
| | | // console.log(res.data); |
| | | // var data = res.data.list[0][0] |
| | | // if(res.data.count == 1){ |
| | | // this.hform.HEquipID = data.hmainid |
| | | // this.hform.HEquipName = data.设备名称 |
| | | // } |
| | | // uni.showToast({ |
| | | // title:res.data.Message, |
| | | // icon:'none' |
| | | // }) |
| | | // }, |
| | | // fail: (res) => { |
| | | // console.log(res); |
| | | // uni.showToast({ |
| | | // title:'接口请求失败', |
| | | // icon:'none' |
| | | // }) |
| | | // }, |
| | | // }); |
| | | }) |
| | | }, |
| | | // upCode(){ |
| | | // uni.request({ |
| | |
| | | methods: { |
| | | //扫码 |
| | | toScanCode(){ |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | uni.request({ |
| | | url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo', |
| | | data: { HBarCode: res.result }, |
| | | success: (res) => { |
| | | console.log(res.data); |
| | | if(res.data.count == 1){ |
| | | var data = res.data.list[0][0] |
| | | this.hform.HEquipID = data.hmainid |
| | | this.hform.HEquipName = data.设备名称 |
| | | } |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title:'接口请求失败', |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | }); |
| | | } |
| | | }); |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | uni.request({ |
| | | url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo', |
| | | data: { HBarCode: ret.resp_result }, |
| | | success: (res) => { |
| | | console.log(res.data); |
| | | if(res.data.count == 1){ |
| | | var data = res.data.list[0][0] |
| | | this.hform.HEquipID = data.hmainid |
| | | this.hform.HEquipName = data.设备名称 |
| | | } |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title:'接口请求失败', |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }) |
| | | }, |
| | | //维修开始选择 |
| | | HBeginDateChange(e){ |
| | |
| | | }, |
| | | //扫码 |
| | | toScanCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | if (this.hform.HBarCode == '*') { |
| | | this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | } else { |
| | | this.hform.HBarCode = res.result |
| | | } |
| | | |
| | | this.getCode(this.hform.HBarCode) |
| | | 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.getCode(this.hform.HBarCode) |
| | | }) |
| | | }, |
| | | showBillList() { |
| | | this.$refs.billList.showPopup() |
| | |
| | | methods: { |
| | | //条码号扫码 |
| | | toScanCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | // if(this.hform.HBarCode == '*'){ |
| | | // this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | // }else{ |
| | | // this.hform.HBarCode = res.result |
| | | // } |
| | | this.hform.HBarCode = res.result |
| | | this.getCode(this.hform.HBarCode) |
| | | } |
| | | }); |
| | | 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.hform.HBarCode = ret.resp_result |
| | | this.getCode(this.hform.HBarCode) |
| | | }) |
| | | }, |
| | | //扫描单据号条码 |
| | | toScanBillCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | // if(this.hform.HBarCode == '*'){ |
| | | // this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | // }else{ |
| | | // this.hform.HBarCode = res.result |
| | | // } |
| | | this.hform.HBillNo = res.result |
| | | this.GetMeesageByBillNo(this.hform.HBillNo) |
| | | } |
| | | }); |
| | | 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.hform.HBillNo = ret.resp_result |
| | | this.GetMeesageByBillNo(this.hform.HBillNo) |
| | | }) |
| | | }, |
| | | //扫描单据号条码 |
| | | GetMeesageByBillNo(e) { |
| | |
| | | }, |
| | | //扫码 |
| | | toScanCode(){ |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | this.hform.HBillNo = res.result |
| | | this.GetMeesageByBillNo(this.hform.HBillNo) |
| | | } |
| | | }); |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | this.hform.HBillNo = ret.resp_result |
| | | this.GetMeesageByBillNo(this.hform.HBillNo) |
| | | }) |
| | | }, |
| | | //扫描单据号条码 |
| | | GetMeesageByBillNo(e){ |
| | |
| | | }, |
| | | //扫码 |
| | | toScanCode(){ |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | // if(this.hform.HBarCode == '*'){ |
| | | // this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | // }else{ |
| | | // this.hform.HBarCode = res.result |
| | | // } |
| | | this.hform.HBillNo = res.result |
| | | this.GetMeesageByBillNo(res.result) |
| | | } |
| | | }); |
| | | 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.hform.HBillNo = ret.resp_result |
| | | this.GetMeesageByBillNo(ret.resp_result) |
| | | }) |
| | | }, |
| | | //扫描单据号条码 |
| | | GetMeesageByBillNo(e){ |
| | |
| | | }, |
| | | //扫码 |
| | | toScanCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | if (this.hform.HBarCode == '*') { |
| | | this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | } else { |
| | | this.hform.HBarCode = res.result |
| | | } |
| | | |
| | | this.getCode(this.hform.HBarCode) |
| | | 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.getCode(this.hform.HBarCode) |
| | | }) |
| | | }, |
| | | showBillList() { |
| | | this.$refs.billList.showPopup() |
| | |
| | | }, |
| | | //扫码 |
| | | toScanCode(){ |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | this.hform.HBillNo = res.result |
| | | this.GetMeesageByBillNo(this.hform.HBillNo) |
| | | } |
| | | }); |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | this.hform.HBillNo = ret.resp_result |
| | | this.GetMeesageByBillNo(this.hform.HBillNo) |
| | | }) |
| | | }, |
| | | //扫描单据号条码 |
| | | GetMeesageByBillNo(e){ |
| | |
| | | }, |
| | | //扫码 |
| | | toScanCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | if (this.hform.HBarCode == '*') { |
| | | this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | } else { |
| | | this.hform.HBarCode = res.result |
| | | } |
| | | |
| | | this.getCode(this.hform.HBarCode) |
| | | 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.getCode(this.hform.HBarCode) |
| | | }) |
| | | }, |
| | | showBillList() { |
| | | this.$refs.billList.showPopup() |
| | |
| | | }, |
| | | //扫码 |
| | | toScanCode(){ |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | this.HBarCode = res.result |
| | | |
| | | this.getCode(this.HBarCode) |
| | | } |
| | | }); |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | this.HBarCode = ret.resp_result |
| | | this.getCode(this.HBarCode) |
| | | }) |
| | | }, |
| | | //扫条码处理 |
| | | getCode(HBarCode){ |
| | |
| | | |
| | | }, |
| | | toScanCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | if (this.CommonUtils.isEmpty(res.result) === false) { |
| | | console.log('条码内容:' + res.result); |
| | | this.barCodeInfoMeta.barCodeNo = res.result |
| | | |
| | | this.searchbarCodeInfo() |
| | | // this.doRequest( |
| | | // "/Gy_SplitBarCode/Info", { |
| | | // HBarCodeNo: res.result, |
| | | // HSplitBarNum: 1 |
| | | // }, |
| | | // function(res) { |
| | | // console.log(res) |
| | | // this.barCodeSplitInfo = [] |
| | | // let res1 = res.data |
| | | // let { |
| | | // data, |
| | | // count |
| | | // } = res1 |
| | | // if (count > 0) { |
| | | // console.log(data[0]) |
| | | // this.barCodeInfo = data[0] |
| | | // } |
| | | // }, |
| | | // function(err) { |
| | | // console.error(err) |
| | | // } |
| | | // ) |
| | | } |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | if (this.CommonUtils.isEmpty(ret.resp_result) === false) { |
| | | console.log('条码内容:' + ret.resp_result); |
| | | this.barCodeInfoMeta.barCodeNo = ret.resp_result |
| | | |
| | | this.searchbarCodeInfo() |
| | | // this.doRequest( |
| | | // "/Gy_SplitBarCode/Info", { |
| | | // HBarCodeNo: ret.resp_result, |
| | | // HSplitBarNum: 1 |
| | | // }, |
| | | // function(res) { |
| | | // console.log(res) |
| | | // this.barCodeSplitInfo = [] |
| | | // let res1 = res.data |
| | | // let { |
| | | // data, |
| | | // count |
| | | // } = res1 |
| | | // if (count > 0) { |
| | | // console.log(data[0]) |
| | | // this.barCodeInfo = data[0] |
| | | // } |
| | | // }, |
| | | // function(err) { |
| | | // console.error(err) |
| | | // } |
| | | // ) |
| | | } |
| | | }); |
| | | }) |
| | | } |
| | | }, |
| | | onLoad() { |
| | |
| | | } |
| | | }, |
| | | toScanCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | if (CommonUtils.isEmpty(res.result) === false) { |
| | | console.log('条码内容:' + res.result); |
| | | this.lailiaoInfo.barCodeNo = res.result; |
| | | if (res.result.includes("@") === false) { |
| | | return uni.showToast({ |
| | | icon: 'none', |
| | | title: '条码格式错误,请重新扫描...' |
| | | }) |
| | | } |
| | | let barCodeInfo = res.result.split("@") |
| | | let [PurchaseBillNo, Row] = barCodeInfo |
| | | this.lailiaoInfo.HBillNo = PurchaseBillNo, |
| | | this.lailiaoInfo.HBillLineNo = Row |
| | | console.log({ |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | if (CommonUtils.isEmpty(ret.resp_result) === false) { |
| | | console.log('条码内容:' + ret.resp_result); |
| | | this.lailiaoInfo.barCodeNo = ret.resp_result; |
| | | if (ret.resp_result.includes("@") === false) { |
| | | return uni.showToast({ |
| | | icon: 'none', |
| | | title: '条码格式错误,请重新扫描...' |
| | | }) |
| | | } |
| | | let barCodeInfo = ret.resp_result.split("@") |
| | | let [PurchaseBillNo, Row] = barCodeInfo |
| | | this.lailiaoInfo.HBillNo = PurchaseBillNo, |
| | | this.lailiaoInfo.HBillLineNo = Row |
| | | console.log({ |
| | | sWhere: ` and 单据号 = '${PurchaseBillNo}'`, |
| | | user: this.userInfo.Czymc, |
| | | }) |
| | | CommonUtils.doRequest( |
| | | "/Cg_POOrderBill/list", { |
| | | sWhere: ` and 单据号 = '${PurchaseBillNo}'`, |
| | | user: this.userInfo.Czymc, |
| | | }) |
| | | CommonUtils.doRequest( |
| | | "/Cg_POOrderBill/list", { |
| | | sWhere: ` and 单据号 = '${PurchaseBillNo}'`, |
| | | user: this.userInfo.Czymc, |
| | | }, |
| | | (res) => { |
| | | console.log('采购订单: ', res) |
| | | let { |
| | | data, |
| | | count |
| | | } = res.data |
| | | if (count > 0) { |
| | | this.setLailiaoInfo(data, Row) |
| | | } |
| | | }, |
| | | (error) => { |
| | | |
| | | }, |
| | | (res) => { |
| | | console.log('采购订单: ', res) |
| | | let { |
| | | data, |
| | | count |
| | | } = res.data |
| | | if (count > 0) { |
| | | this.setLailiaoInfo(data, Row) |
| | | } |
| | | ) |
| | | |
| | | } |
| | | }, |
| | | (error) => { |
| | | |
| | | } |
| | | ) |
| | | |
| | | } |
| | | }); |
| | | }) |
| | | }, |
| | | GenereateBarCode() { |
| | | let sMain = [] |
| | |
| | | methods: { |
| | | //扫码 |
| | | toScanCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | // if(this.hform.HBarCode == '*'){ |
| | | // this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | // }else{ |
| | | // this.hform.HBarCode = res.result |
| | | // } |
| | | this.hform.HBarCode = res.result |
| | | // this.GetMeesageByBillNo(this.hform.HBarCode) |
| | | this.getCode(this.hform.HBarCode) |
| | | } |
| | | }); |
| | | 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.hform.HBarCode = ret.resp_result |
| | | // this.GetMeesageByBillNo(this.hform.HBarCode) |
| | | this.getCode(this.hform.HBarCode) |
| | | }) |
| | | }, |
| | | toScanBillCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | // if(this.hform.HBarCode == '*'){ |
| | | // this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | // }else{ |
| | | // this.hform.HBarCode = res.result |
| | | // } |
| | | |
| | | this.hform.HBillNo = res.result |
| | | this.GetMeesageByBillNo(this.hform.HBillNo) |
| | | } |
| | | }); |
| | | 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.hform.HBillNo = ret.resp_result |
| | | this.GetMeesageByBillNo(this.hform.HBillNo) |
| | | }) |
| | | }, |
| | | //扫描单据号条码 |
| | | GetMeesageByBillNo(e) { |
| | |
| | | this.getHProcList() |
| | | this.getHSupList() |
| | | this.getHEmpList() |
| | | |
| | | this.getDefValByUser() |
| | | }, |
| | | methods: { |
| | | //通过登录用户获取默认值 |
| | | getDefValByUser(){ |
| | | uni.request({ |
| | | url: this.serverUrl + '/Cj_StationInBill/GetDefValByUser', |
| | | type: "GET", |
| | | async: false, |
| | | data: { "Czybm": this.userInfo.Czybm, "Czymc": this.userInfo.Czymc }, |
| | | success: (res) => { |
| | | console.log(res.data) |
| | | if(res.data.count == 1){ |
| | | var data = res.data.data[0] |
| | | this.hform.HGroupID = data.HGroupID |
| | | this.hform.HGroupName = data.生产班组名称 |
| | | this.hform.HEmpID = data.HEmpID |
| | | this.hform.HEmpName = data.操作员名称 |
| | | this.hform.HEmpNumber = data.操作员代码 |
| | | this.hform.HSourceID = data.HSourceID |
| | | this.hform.HSourceName = data.生产资源名称 |
| | | this.hform.HCenterID = data.HWorkCenterID |
| | | this.hform.HCenterName = data.工作中心名称 |
| | | this.hform.HEmpName_second = data.操作员名称 |
| | | }else{ |
| | | uni.showToast({ |
| | | title:'获取生产班组信息失败', |
| | | icon:'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title:'获取生产班组信息失败', |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | //扫码 |
| | | toScanCode(){ |
| | | // this.hform.HBarCode = 'OP000021_01' |
| | | // this.getHBarCodeData('OP000021_01') |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | var str = res.result |
| | | if(str.includes('@')) { |
| | | const parts = str.split('@'); |
| | | this.hform.HBarCode = parts[0] |
| | | this.hform.HProcNo = parts[1] |
| | | this.getHBarCodeData(parts[0]) |
| | | // this.getHProcNoData(parts[0],parts[1]) |
| | | }else{ |
| | | this.hform.HBarCode = res.result |
| | | this.getHBarCodeData(res.result) |
| | | } |
| | | } |
| | | }); |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | var str = ret.resp_result |
| | | if(str.includes('@')) { |
| | | const parts = str.split('@'); |
| | | this.hform.HBarCode = parts[0] |
| | | this.hform.HProcNo = parts[1] |
| | | this.getHBarCodeData(parts[0],1) |
| | | // this.getHProcNoData(parts[0],parts[1]) |
| | | }else{ |
| | | this.hform.HBarCode = ret.resp_result |
| | | this.getHBarCodeData(ret.resp_result) |
| | | } |
| | | }) |
| | | }, |
| | | //扫流水号 |
| | | toScanProcNo(){ |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | this.hform.HProcNo = res.result |
| | | this.getHProcNoData(this.hform.HBarCode,res.result) |
| | | } |
| | | }); |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | this.hform.HProcNo = ret.resp_result |
| | | this.getHProcNoData(this.hform.HBarCode,ret.resp_result) |
| | | }) |
| | | }, |
| | | //日期 |
| | | HDateChange(e){ |
| | |
| | | if(res.data.code == 1){ |
| | | var data = res.data.data[0] |
| | | this.getHBarCodeData(data.HBarCode) |
| | | // this.getHProcNoData(data.HBarCode,data.HProcNo) |
| | | this.getHProcNoData(data.HBarCode,data.HProcNo) |
| | | |
| | | this.hform.HInterID= data.HInterID |
| | | this.hform.HBillNo= data.HBillNo |
| | |
| | | }, |
| | | }); |
| | | }, |
| | | getHBarCodeData(HBarCode){ |
| | | getHBarCodeData(HBarCode,e){ |
| | | uni.request({ |
| | | url: this.serverUrl + '/Cj_StationEntrustInBill/txtHBarCode_KeyDown', |
| | | data: {HBarCode: HBarCode}, |
| | |
| | | this.hform.HDept= this.userInfo.HDept |
| | | this.hform.HProcExchHinteID= data.hmainid |
| | | this.hform.HPRDOrg= data.组织 |
| | | |
| | | if(e){ |
| | | this.getHProcNoData(this.hform.HBarCode,this.hform.HProcNo) |
| | | } |
| | | }else{ |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }else{ |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | | icon:'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | |
| | | methods: { |
| | | //扫码 |
| | | toScanCode(){ |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | this.hform.HBarCode = res.result |
| | | // uni.request({ |
| | | // url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo', |
| | | // data: { HBarCode: res.result }, |
| | | // success: (res) => { |
| | | // console.log(res.data); |
| | | // var data = res.data.list[0][0] |
| | | // if(res.data.count == 1){ |
| | | // this.hform.HEquipID = data.hmainid |
| | | // this.hform.HEquipName = data.设备名称 |
| | | // } |
| | | // uni.showToast({ |
| | | // title:res.data.Message, |
| | | // icon:'none' |
| | | // }) |
| | | // }, |
| | | // fail: (res) => { |
| | | // console.log(res); |
| | | // uni.showToast({ |
| | | // title:'接口请求失败', |
| | | // icon:'none' |
| | | // }) |
| | | // }, |
| | | // }); |
| | | } |
| | | }); |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | this.hform.HBarCode = ret.resp_result |
| | | // uni.request({ |
| | | // url: this.serverUrl + '/Gy_EquipFileMain/Gy_MouldFileBillBarCodeInfo', |
| | | // data: { HBarCode: ret.resp_result }, |
| | | // success: (res) => { |
| | | // console.log(res.data); |
| | | // var data = res.data.list[0][0] |
| | | // if(res.data.count == 1){ |
| | | // this.hform.HEquipID = data.hmainid |
| | | // this.hform.HEquipName = data.设备名称 |
| | | // } |
| | | // uni.showToast({ |
| | | // title:res.data.Message, |
| | | // icon:'none' |
| | | // }) |
| | | // }, |
| | | // fail: (res) => { |
| | | // console.log(res); |
| | | // uni.showToast({ |
| | | // title:'接口请求失败', |
| | | // icon:'none' |
| | | // }) |
| | | // }, |
| | | // }); |
| | | }) |
| | | }, |
| | | // upCode(){ |
| | | // uni.request({ |
| | |
| | | HBillNo:'', |
| | | HBarCode:'', |
| | | HQty:'', |
| | | HPieceQty:'', |
| | | HWasterQty:'', |
| | | HPieceQty:0, |
| | | HWasterQty:0, |
| | | HEmpName:'', |
| | | HEmpID:'', |
| | | HEmpID:0, |
| | | HInnerBillNo:'', |
| | | HWWWorkOrderBillNo:'', |
| | | HRemark:'', |
| | |
| | | HProcExchBillNo:'', |
| | | HMaterNumber:'', |
| | | HMaterName:'', |
| | | HMaterID:'', |
| | | HMaterID:0, |
| | | HMaterModel:'', |
| | | HSupName:'', |
| | | HSupID:'', |
| | |
| | | this.getHProcList() |
| | | this.getHSupList() |
| | | this.getHEmpList() |
| | | |
| | | this.getDefValByUser() |
| | | }, |
| | | methods: { |
| | | //通过登录用户获取默认值 |
| | | getDefValByUser(){ |
| | | uni.request({ |
| | | url: this.serverUrl + '/Cj_StationInBill/GetDefValByUser', |
| | | type: "GET", |
| | | async: false, |
| | | data: { "Czybm": this.userInfo.Czybm, "Czymc": this.userInfo.Czymc }, |
| | | success: (res) => { |
| | | console.log(res.data) |
| | | if(res.data.count == 1){ |
| | | var data = res.data.data[0] |
| | | this.hform.HGroupID = data.HGroupID |
| | | this.hform.HGroupName = data.生产班组名称 |
| | | this.hform.HEmpID = data.HEmpID |
| | | this.hform.HEmpName = data.操作员名称 |
| | | this.hform.HEmpNumber = data.操作员代码 |
| | | this.hform.HSourceID = data.HSourceID |
| | | this.hform.HSourceName = data.生产资源名称 |
| | | this.hform.HCenterID = data.HWorkCenterID |
| | | this.hform.HCenterName = data.工作中心名称 |
| | | this.hform.HEmpName_second = data.操作员名称 |
| | | }else{ |
| | | uni.showToast({ |
| | | title:'获取生产班组信息失败', |
| | | icon:'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.showToast({ |
| | | title:'获取生产班组信息失败', |
| | | icon:'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }, |
| | | //扫码 |
| | | toScanCode(){ |
| | | this.hform.HBarCode = 'OP000021_01' |
| | | this.getHBarCodeData('OP000021_01') |
| | | // uni.scanCode({ |
| | | // onlyFromCamera: true, |
| | | // success: (res) => { |
| | | // console.log('条码内容:' + res.result); |
| | | // this.hform.HBarCode = res.result |
| | | // this.getHBarCodeData(res.result) |
| | | // } |
| | | // }); |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | var str = ret.resp_result |
| | | if(str.includes('@')) { |
| | | const parts = str.split('@'); |
| | | this.hform.HBarCode = parts[0] |
| | | this.hform.HProcNo = parts[1] |
| | | this.getHBarCodeData(parts[0],1) |
| | | // this.getHProcNoData(parts[0],parts[1]) |
| | | }else{ |
| | | this.hform.HBarCode = ret.resp_result |
| | | this.getHBarCodeData(ret.resp_result) |
| | | } |
| | | }) |
| | | }, |
| | | //扫流水号 |
| | | toScanProcNo(){ |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | this.hform.HProcNo = res.result |
| | | this.getHProcNoData(this.hform.HBarCode,res.result) |
| | | } |
| | | }); |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | this.hform.HProcNo = ret.resp_result |
| | | this.getHProcNoData(this.hform.HBarCode,ret.resp_result) |
| | | }) |
| | | }, |
| | | //日期 |
| | | HDateChange(e){ |
| | |
| | | }, |
| | | }); |
| | | }, |
| | | getHBarCodeData(HBarCode){ |
| | | getHBarCodeData(HBarCode,e){ |
| | | uni.request({ |
| | | url: this.serverUrl + '/Cj_StationEntrustInBill/txtHBarCode_KeyDown', |
| | | data: {HBarCode: HBarCode}, |
| | |
| | | this.hform.HProcExchHinteID= data.hmainid |
| | | this.hform.HPRDOrg= data.组织 |
| | | |
| | | if(e){ |
| | | this.getHProcNoData(this.hform.HBarCode,this.hform.HProcNo) |
| | | } |
| | | }else{ |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | |
| | | } |
| | | }); |
| | | } |
| | | } |
| | | }else{ |
| | | uni.showToast({ |
| | | title:res.data.Message, |
| | | icon:'none' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | |
| | | }, |
| | | //扫码 |
| | | toScanCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | if (this.hform.HBarCode == '*') { |
| | | this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | } else { |
| | | this.hform.HBarCode = res.result |
| | | } |
| | | |
| | | this.getCode(this.hform.HBarCode) |
| | | 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.getCode(this.hform.HBarCode) |
| | | }) |
| | | }, |
| | | showBillList() { |
| | | this.$refs.billList.showPopup() |
| | |
| | | methods: { |
| | | //扫码 |
| | | toScanCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | // if(this.hform.HBarCode == '*'){ |
| | | // this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | // }else{ |
| | | // this.hform.HBarCode = res.result |
| | | // } |
| | | this.hform.HBarCode = res.result |
| | | // this.GetMeesageByBillNo(this.hform.HBarCode) |
| | | this.getCode(this.hform.HBarCode) |
| | | } |
| | | }); |
| | | 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.hform.HBarCode = ret.resp_result |
| | | // this.GetMeesageByBillNo(this.hform.HBarCode) |
| | | this.getCode(this.hform.HBarCode) |
| | | }) |
| | | }, |
| | | toScanBillCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | // if(this.hform.HBarCode == '*'){ |
| | | // this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | // }else{ |
| | | // this.hform.HBarCode = res.result |
| | | // } |
| | | |
| | | this.hform.HBillNo = res.result |
| | | this.GetMeesageByBillNo(this.hform.HBillNo) |
| | | } |
| | | }); |
| | | 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.hform.HBillNo = ret.resp_result |
| | | this.GetMeesageByBillNo(this.hform.HBillNo) |
| | | }) |
| | | }, |
| | | //扫描单据号条码 |
| | | GetMeesageByBillNo(e) { |
| | |
| | | }, |
| | | methods: { |
| | | toScanCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | if (this.CommonUtils.isEmpty(res.result) === false) { |
| | | console.log('条码内容:' + res.result); |
| | | this.HBillNo = res.result |
| | | CommonUtils.doRequest( |
| | | "/Cg_POInStockBill/page", { |
| | | sWhere: ` and 单据号='${res.result}'`, |
| | | user: this.userInfo.HEmpName, |
| | | page: this.pageInfo.page, |
| | | size: this.pageInfo.size |
| | | }, |
| | | function(res) { |
| | | console.log(res) |
| | | let res1 = res.data |
| | | |
| | | let { |
| | | count, |
| | | data |
| | | } = res1; |
| | | if (count > 0) { |
| | | console.log(data) |
| | | // this.HMaterList = data.reduce((acc, obj) => { |
| | | // acc.push({ |
| | | // "HMaterID": obj['HMaterID'], |
| | | // "HMaterNo": obj['物料代码'], |
| | | // "HMaterName": obj['物料名称'], |
| | | // "HMaterType": obj['规格型号'], |
| | | // "HQty": obj['数量'], |
| | | // "HBarCode": "", |
| | | // "HBillNo": obj['单据号'] |
| | | // }) |
| | | // }, []) |
| | | |
| | | } |
| | | }, |
| | | function(err) { |
| | | console.error(err) |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | if (this.CommonUtils.isEmpty(ret.resp_result) === false) { |
| | | console.log('条码内容:' + ret.resp_result); |
| | | this.HBillNo = ret.resp_result |
| | | CommonUtils.doRequest( |
| | | "/Cg_POInStockBill/page", { |
| | | sWhere: ` and 单据号='${ret.resp_result}'`, |
| | | user: this.userInfo.HEmpName, |
| | | page: this.pageInfo.page, |
| | | size: this.pageInfo.size |
| | | }, |
| | | function(res) { |
| | | console.log(res) |
| | | let res1 = res.data |
| | | |
| | | let { |
| | | count, |
| | | data |
| | | } = res1; |
| | | if (count > 0) { |
| | | console.log(data) |
| | | // this.HMaterList = data.reduce((acc, obj) => { |
| | | // acc.push({ |
| | | // "HMaterID": obj['HMaterID'], |
| | | // "HMaterNo": obj['物料代码'], |
| | | // "HMaterName": obj['物料名称'], |
| | | // "HMaterType": obj['规格型号'], |
| | | // "HQty": obj['数量'], |
| | | // "HBarCode": "", |
| | | // "HBillNo": obj['单据号'] |
| | | // }) |
| | | // }, []) |
| | | |
| | | } |
| | | ) |
| | | } |
| | | }, |
| | | function(err) { |
| | | console.error(err) |
| | | } |
| | | ) |
| | | } |
| | | }); |
| | | }) |
| | | }, |
| | | }, |
| | | onload() { |
| | |
| | | }, |
| | | //扫码 |
| | | toScanCode(){ |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | if(this.hform.HBarCode == '*'){ |
| | | this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | }else{ |
| | | this.hform.HBarCode = res.result |
| | | } |
| | | |
| | | this.getCode(this.hform.HBarCode) |
| | | } |
| | | }); |
| | | 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.getCode(this.hform.HBarCode) |
| | | }) |
| | | }, |
| | | //扫其他(仓库,仓位) |
| | | // toScanData(e){ |
| | |
| | | methods: { |
| | | //扫码 |
| | | toScanCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | // if(this.hform.HBarCode == '*'){ |
| | | // this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | // }else{ |
| | | // this.hform.HBarCode = res.result |
| | | // } |
| | | this.hform.HBarCode = res.result |
| | | // this.GetMeesageByBillNo(this.hform.HBarCode) |
| | | this.getCode(this.hform.HBarCode) |
| | | } |
| | | }); |
| | | 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.hform.HBarCode = ret.resp_result |
| | | // this.GetMeesageByBillNo(this.hform.HBarCode) |
| | | this.getCode(this.hform.HBarCode) |
| | | }) |
| | | }, |
| | | toScanBillCode() { |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | // if(this.hform.HBarCode == '*'){ |
| | | // this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | // }else{ |
| | | // this.hform.HBarCode = res.result |
| | | // } |
| | | 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.hform.HBillNo = res.result |
| | | this.GetMeesageByBillNo(this.hform.HBillNo) |
| | | } |
| | | }); |
| | | this.hform.HBillNo = ret.resp_result |
| | | this.GetMeesageByBillNo(this.hform.HBillNo) |
| | | }) |
| | | }, |
| | | //扫描单据号条码 |
| | | GetMeesageByBillNo(e) { |
| | |
| | | }, |
| | | //扫码 |
| | | toScanCode(){ |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | if(this.hform.HBarCode == '*'){ |
| | | this.hform.HBarCode = this.hform.HBarCode + res.result |
| | | }else{ |
| | | this.hform.HBarCode = res.result |
| | | } |
| | | |
| | | this.getCode(this.hform.HBarCode) |
| | | } |
| | | }); |
| | | 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.getCode(this.hform.HBarCode) |
| | | }) |
| | | }, |
| | | toScanCodeA(){ |
| | | uni.scanCode({ |
| | | onlyFromCamera: true, |
| | | success: (res) => { |
| | | console.log('条码内容:' + res.result); |
| | | this.hform.HSourceBillNo = res.result |
| | | this.getHBarCodeData(res.result) |
| | | } |
| | | }); |
| | | var mpaasScanModule = uni.requireNativePlugin("Mpaas-Scan-Module") |
| | | mpaasScanModule.mpaasScan({ |
| | | 'hideAlbum': true, |
| | | 'timeoutInterval':'10', //超时时间 |
| | | 'timeoutText':'未识别到二维码' //超时提醒 |
| | | },(ret) => { |
| | | console.log(ret.resp_result) |
| | | this.hform.HSourceBillNo = ret.resp_result |
| | | this.getHBarCodeData(ret.resp_result) |
| | | }) |
| | | }, |
| | | //日期 |
| | | HDateChange(e){ |