| | |
| | | "name" : "智云LMES", |
| | | "appid" : "__UNI__B002F49", |
| | | "description" : "", |
| | | "versionName" : "2.088", |
| | | "versionCode" : 288, |
| | | "versionName" : "2.089", |
| | | "versionCode" : 289, |
| | | "transformPx" : false, |
| | | /* 5+App特有相关 */ |
| | | "app-plus" : { |
| | |
| | | <view class="tabs" id="tabs"> |
| | | <view :class="tabs == 0 ? 'on':''" @tap="tabs = 0">基本信息</view> |
| | | <view :class="tabs == 1 ? 'on':''" @tap="tabs = 1">物料信息</view> |
| | | <view :class="tabs == 2 ? 'on':''" @tap="tabs = 2">可投料物料</view> |
| | | </view> |
| | | <template v-if="tabs == 0"> |
| | | <view class="form" :style="{ |
| | |
| | | <uni-card :title="item.HBarCode" style="margin: 10px;" |
| | | @tap="showDetail = showDetail==index?-1:index"> |
| | | <view class="card-detail"> |
| | | <view class="detail" v-if="item.HMaterNumber"> |
| | | <text>物料编码:</text>{{item.HMaterNumber}} |
| | | <view class="detail" v-if="item.物料代码"> |
| | | <text>物料编码:</text>{{item.物料代码}} |
| | | </view> |
| | | <view class="detail" v-if="item.HMaterName"> |
| | | <text>物料名称:</text>{{item.HMaterName}} |
| | | <view class="detail" v-if="item.物料名称"> |
| | | <text>物料名称:</text>{{item.物料名称}} |
| | | </view> |
| | | <view class="detail" v-if="item.HMaterModel"> |
| | | <text>规则型号:</text>{{item.HMaterModel}} |
| | |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <template v-if="tabs == 2"> |
| | | <view :style="{ |
| | | height: containerHeight + 'px', |
| | | overflowY: 'auto' |
| | | }"> |
| | | <view v-if="HMaterList.length > 0" class="list" v-for="(item,index) in HMaterList" |
| | | :key="index" @tap.stop="delMater(index)"> |
| | | <uni-card :title="item.工位代码" style="margin: 10px;" |
| | | @tap="showDetail = showDetail==index?-1:index"> |
| | | <view class="card-detail"> |
| | | <view class="detail" v-if="item.物料代码"> |
| | | <text>物料编码:</text>{{item.物料代码}} |
| | | </view> |
| | | <view class="detail" v-if="item.物料名称"> |
| | | <text>物料名称:</text>{{item.物料名称}} |
| | | </view> |
| | | |
| | | |
| | | </view> |
| | | </uni-card> |
| | | </view> |
| | | <view v-if="HMaterUpperList.length == 0" class="over"> |
| | | 暂无数据 |
| | | </view> |
| | | </view> |
| | | </template> |
| | | <view class="buttons" id="buttons"> |
| | | <button :class="editBill?'btn-c':'btn-a'" :disabled="editBill" size="mini" @tap="submit">提交</button> |
| | | <view style="flex: 1"></view> |
| | |
| | | title: '温馨提示', |
| | | message: '未扫描工位码,无法扫描物料码,请先扫描工位码后再扫描物料码...' |
| | | }) |
| | | return |
| | | } |
| | | |
| | | try { |
| | |
| | | let findIndexExist = this.HMaterUpperList.findIndex(item => data[0]["HBarCode"] == item[ |
| | | "HBarCode"]) |
| | | if (findIndex == -1) { |
| | | //写入日志 |
| | | this.WriteErrlog(this.HMaterCode,'录入物料信息失败,工位绑定的物料中没有所扫物料信息。') |
| | | CommonUtils.playSound(0) |
| | | this.refreshHMaterCodeFocus() |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: '录入物料信息失败,工位绑定的物料中没有所扫物料信息。' |
| | | }) |
| | | |
| | | return |
| | | } |
| | | |
| | | if (findIndexExist != -1) { |
| | | CommonUtils.playSound(0) |
| | | //写入日志 |
| | | this.WriteErrlog(this.HMaterCode,'录入物料信息失败,不允许重复录入物料信息。') |
| | | this.refreshHMaterCodeFocus() |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: '录入物料信息失败,不允许重复录入物料信息。' |
| | | }) |
| | | |
| | | return |
| | | } |
| | | |
| | |
| | | this.refreshHMaterCodeFocus() |
| | | } else { |
| | | CommonUtils.playSound(0) |
| | | //写入日志 |
| | | this.WriteErrlog(this.HMaterCode,Message) |
| | | this.refreshHMaterCodeFocus() |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | |
| | | } |
| | | } catch (err) { |
| | | this.refreshHMaterCodeFocus() |
| | | //写入日志 |
| | | this.WriteErrlog(this.HMaterCode,Message) |
| | | CommonUtils.playSound(0) |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | |
| | | }) |
| | | } |
| | | }, |
| | | async WriteErrlog(HMaterCode,Reason) { |
| | | let HRemark = "扫描工位ID"+this.hform.HWorkStationID+",工位名称:"+this.hform.HWorkStationName+",扫描条码编号:"+HMaterCode+",失败原因:"+Reason |
| | | try { |
| | | let res = await CommonUtils.doRequest2Async({ |
| | | url: '/Sc_FeedingErrorProofingController/WriteErrlog', |
| | | data: { |
| | | user:getUserInfo()["Czymc"], |
| | | HRemark:HRemark |
| | | } |
| | | }) |
| | | |
| | | let { |
| | | data, |
| | | Message, |
| | | count |
| | | } = res.data |
| | | if (count == 1) { |
| | | |
| | | } else { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `日志上传失败: ${Message}` |
| | | }) |
| | | } |
| | | } catch (err) { |
| | | CommonUtils.showTips({ |
| | | title: '温馨提示', |
| | | message: `日志上传失败: ${err}` |
| | | }) |
| | | } |
| | | }, |
| | | delMater(index) { |
| | | if (this.editBill) { |
| | | return |
| | |
| | | title: '登录中...', |
| | | mask: true |
| | | }) |
| | | if (this.serverUrlName =="余姚华远"){//华远不需要wms验证 |
| | | var data = { |
| | | UserName: this.UserName, |
| | | PassWord: this.PassWord, |
| | | HOrgName: this.HOrgName, |
| | | Organization: this.Organization |
| | | } |
| | | var data2 = {//用于保存登录信息 |
| | | HUserNumber: this.UserName, |
| | | HPassWord: this.PassWord, |
| | | HStockOrgID: this.HOrgName, |
| | | HStockOrgName: this.Organization |
| | | } |
| | | uni.setStorageSync('loginData', JSON.stringify(data2)); |
| | | uni.request({ |
| | | url: this.serverUrl + '/Web/GetUser', |
| | | method: 'GET', |
| | | data: data, |
| | | success: (res) => { |
| | | console.log(res) |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: res.data.Message, |
| | | icon: 'none' |
| | | }) |
| | | if (res.data.count == 1) { |
| | | setLoginData(data2) |
| | | setUserInfo(res.data.data[0]) |
| | | uni.setStorageSync('HUserName', res.data.data[0].Czymc); |
| | | uni.setStorageSync('HBillerID', res.data.data[0].HK3UserID); |
| | | uni.setStorageSync('SourceFlag', false); |
| | | uni.setStorageSync('login', "login"); |
| | | uni.setStorageSync('Organization', this.Organization); |
| | | uni.setStorageSync('OrganizationID', this.HOrgName); |
| | | this.CommonUtils.setServerUrl(this.serverUrl) |
| | | uni.reLaunch({ |
| | | url: '/pages/index/index' |
| | | }) |
| | | } |
| | | }, |
| | | fail: (res) => { |
| | | console.log(res); |
| | | uni.hideLoading() |
| | | uni.showToast({ |
| | | title: '接口请求失败', |
| | | icon: 'none' |
| | | }) |
| | | }, |
| | | }); |
| | | }else{ |
| | | var data = { |
| | | HUserNumber: this.UserName, |
| | | HPassWord: this.PassWord, |
| | |
| | | HStockOrgName: this.Organization |
| | | } |
| | | |
| | | // UserName: this.UserName, |
| | | // PassWord: this.PassWord, |
| | | // HOrgName: this.HOrgName, |
| | | // Organization: this.Organization |
| | | // } |
| | | |
| | | uni.setStorageSync('loginData', JSON.stringify(data)); |
| | | uni.request({ |
| | | url: this.serverUrl + 'WEBSController/GetUser_Json', |
| | |
| | | }) |
| | | }, |
| | | }); |
| | | } |
| | | |
| | | // uni.request({ |
| | | // url: this.serverUrl + '/Web/GetUser', |
| | | // method: 'GET', |
| | | // data: data, |
| | | // success: (res) => { |
| | | // console.log(res) |
| | | // uni.hideLoading() |
| | | // uni.showToast({ |
| | | // title: res.data.Message, |
| | | // icon: 'none' |
| | | // }) |
| | | // if (res.data.count == 1) { |
| | | // setLoginData(data) |
| | | // setUserInfo(res.data.data[0]) |
| | | // uni.setStorageSync('HUserName', res.data.data[0].Czymc); |
| | | // uni.setStorageSync('HBillerID', res.data.data[0].HK3UserID); |
| | | // uni.setStorageSync('SourceFlag', false); |
| | | // uni.setStorageSync('login', "login"); |
| | | // uni.setStorageSync('Organization', this.Organization); |
| | | // uni.setStorageSync('OrganizationID', this.HOrgName); |
| | | // this.CommonUtils.setServerUrl(this.serverUrl) |
| | | // uni.reLaunch({ |
| | | // url: '/pages/index/index' |
| | | // }) |
| | | // } |
| | | // }, |
| | | // fail: (res) => { |
| | | // console.log(res); |
| | | // uni.hideLoading() |
| | | // uni.showToast({ |
| | | // title: '接口请求失败', |
| | | // icon: 'none' |
| | | // }) |
| | | // }, |
| | | // }); |
| | | } |
| | | } |
| | | } |