333 lines
10 KiB
Vue
Executable File
333 lines
10 KiB
Vue
Executable File
<template>
|
|
<view class="page">
|
|
<view class="header-row-class-organzie">
|
|
<view class="header-row-title-class-organzie">当前组织:</view>
|
|
<picker @change="orgChange" :value="index" :range="orgArry" range-key="FNAME">
|
|
<view class="head-row-content-class-organzie">{{orgArry[index].FNAME}}</view>
|
|
</picker>
|
|
<image class="img-organzie" src="@/static/img/changearrow.svg"></image>
|
|
</view>
|
|
<view class="head" style="padding: 0 0;">
|
|
<view class="search">
|
|
<text class="search-title">单号/物料标签</text>
|
|
<view class="active-input">
|
|
<input class="search-input" placeholder="录入请检单条码" placeholder-class="placeholder-class-input"
|
|
v-model="checkBillBarcode" @confirm="searchConfirm" :focus="barcodeFocuse"></input>
|
|
</view>
|
|
<image class="search-img" src="../../../static/img/scan-blue.png" @click="searchScan"></image>
|
|
</view>
|
|
</view>
|
|
<view class="list" v-for="(item,index) in checkBillList" @click="detailClick(item,index)">
|
|
<view class="list-item">
|
|
<view class="list-item-detail">
|
|
<view class="list-item-detail-area">
|
|
<view class="list-item-detail-title">检验结果</view>
|
|
<view class="list-item-detail-describe">
|
|
{{item.FQCRESULT==1?'未知':((item.FQCRESULT==2)?'合格':
|
|
((item.FQCRESULT==3)?'不合格':''))}}
|
|
</view>
|
|
</view>
|
|
<view class="list-item-detail-area">
|
|
<view class="list-item-detail-title">检验单号</view>
|
|
<view class="list-item-detail-describe">{{item.FBILLNO}}</view>
|
|
</view>
|
|
<view class="list-item-detail-area">
|
|
<view class="list-item-detail-title">物料编码</view>
|
|
<view class="list-item-detail-describe">{{item.FMATERNUMBER}}</view>
|
|
</view>
|
|
<view class="list-item-detail-area">
|
|
<view class="list-item-detail-title">物料名称</view>
|
|
<view class="list-item-detail-describe">{{item.FMATERNAME}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="list-item-detail">
|
|
<view class="list-item-detail-area">
|
|
<view class="list-item-detail-title">送检数量</view>
|
|
<view class="list-item-detail-describe">{{item.FMQTY}}</view>
|
|
</view>
|
|
<view class="list-item-detail-area">
|
|
<view class="list-item-detail-title">合格/不合格数</view>
|
|
<view class="list-item-detail-describe">{{item.FGODBADQTY}}</view>
|
|
</view>
|
|
<view class="list-item-detail-area">
|
|
<view class="list-item-detail-title">报废数</view>
|
|
<view class="list-item-detail-describe">{{item.FSCRAPQTY}}</view>
|
|
</view>
|
|
<view class="list-item-detail-area">
|
|
<view class="list-item-detail-title">物料规格</view>
|
|
<view class="list-item-detail-describe">{{item.FSPECIFICATION}}</view>
|
|
</view>
|
|
</view>
|
|
<view class="list-item-detail">
|
|
<view class="list-item-detail-area">
|
|
<view class="list-item-detail-title">版本</view>
|
|
<view class="list-item-detail-describe">{{item.FAUXPROPNAME?item.FAUXPROPNAME:'-'}}</view>
|
|
</view>
|
|
<view class="list-item-detail-area">
|
|
<view class="list-item-detail-title">批号</view>
|
|
<view class="list-item-detail-describe">{{item.FLOT?item.FLOT:'-'}}</view>
|
|
</view>
|
|
<view class="list-item-detail-area">
|
|
<view class="list-item-detail-title">送检时间</view>
|
|
<view class="list-item-detail-describe" style="width: 500rpx;">{{item.C_YMD}}</view>
|
|
</view>
|
|
<view class="list-item-detail-area">
|
|
|
|
</view>
|
|
</view>
|
|
</view>
|
|
|
|
</view>
|
|
<opsoft-dialog-notice
|
|
:dialogNoticeShow="showDialog"
|
|
:dialogNoticeType="dialogNoticeType"
|
|
:dialogNoticeTitle="dialogNoticeTitle"
|
|
:dialogNoticeContent="dialogNoticeContent"
|
|
@dialogNoticeConfirmClick="dialogNoticeConfirmClick"
|
|
>
|
|
</opsoft-dialog-notice>
|
|
</view>
|
|
</template>
|
|
<script>
|
|
import Vue from 'vue';
|
|
import opsoftDialogNotice from '@/components/opsoft-dialog-notice/opsoft-dialog-notice.vue';
|
|
import errorStrUntil from '@/common/errorStrUntil.js';
|
|
export default{
|
|
data(){
|
|
return{
|
|
dialogNoticeContent:'',
|
|
dialogNoticeTitle:'',
|
|
dialogNoticeType:'',
|
|
showDialog:false,
|
|
|
|
orgArry:[{name:"请选择组织", key:"", FName:""}],
|
|
orgFItemID:'',
|
|
index:0,
|
|
checkBillBarcode:'',
|
|
barcodeFocuse:false,
|
|
showTips:false,
|
|
pageIndex:1,
|
|
pageSize:6,
|
|
checkBillList:[]
|
|
}
|
|
},
|
|
onLoad() {
|
|
//debugger
|
|
// #ifdef APP-PLUS
|
|
plus.screen.lockOrientation('landscape-primary');
|
|
// #endif
|
|
this.getOrgList();
|
|
},
|
|
onUnload() {
|
|
// #ifdef APP-PLUS
|
|
plus.screen.lockOrientation('portrait-primary');
|
|
// #endif
|
|
},
|
|
onPullDownRefresh:function(){
|
|
let _self = this;
|
|
_self.showTips = false;
|
|
this.getCheckList(1, this.pageSize);
|
|
setTimeout(()=>{
|
|
//停止下拉样式
|
|
uni.stopPullDownRefresh();
|
|
//隐藏标题读取
|
|
uni.hideNavigationBarLoading();
|
|
},
|
|
500);
|
|
},
|
|
|
|
onReachBottom:function(){
|
|
let _self = this;
|
|
if(!_self.showTips) {
|
|
this.getCheckList(this.pageIndex, this.pageSize);
|
|
}
|
|
else {
|
|
uni.showToast({
|
|
icon: 'none',
|
|
title: '已经到底了'
|
|
});
|
|
}
|
|
},
|
|
onBackPress(options) {
|
|
if(options.from === 'navigateBack'){
|
|
return false;
|
|
}
|
|
this.back();
|
|
return true;
|
|
},
|
|
components: {
|
|
opsoftDialogNotice
|
|
},
|
|
methods:{
|
|
back(){
|
|
uni.redirectTo({
|
|
url:'../../tabbar/apply/apply'
|
|
});
|
|
},
|
|
dialogNoticeConfirmClick(){
|
|
this.showDialog = false;
|
|
},
|
|
dialogNoticeProps(err,type){
|
|
err = errorStrUntil.handle(err);
|
|
this.showDialog = true;
|
|
this.dialogNoticeType = 'error';
|
|
this.dialogNoticeTitle = '异常提示';
|
|
if(type=='success'){
|
|
this.dialogNoticeType = 'success';
|
|
this.dialogNoticeTitle = '执行成功';
|
|
}
|
|
this.dialogNoticeContent = err;
|
|
},
|
|
detailClick(item,index){
|
|
uni.setStorageSync('OQCBillID',item.FINTERID);
|
|
uni.navigateTo({
|
|
url:'./checkDetail'
|
|
});
|
|
},
|
|
searchConfirm(){
|
|
this.getCheckList(1,6);
|
|
},
|
|
searchScan(){
|
|
let _self = this;
|
|
uni.scanCode({
|
|
success:function(res){
|
|
_self.checkBillBarcode = res.result;
|
|
_self.getCheckList(1,6);
|
|
}
|
|
});
|
|
},
|
|
getOrgList:function(){
|
|
let _self = this;
|
|
let orgInfo = uni.getStorageSync('orgInfo');
|
|
|
|
if(orgInfo && orgInfo.length > 0) {
|
|
let defaultOrgInfo = uni.getStorageSync('defaultOrgInfo');
|
|
let isOpenDefaultOrg = uni.getStorageSync('isOpenDefaultOrg');
|
|
if(!isOpenDefaultOrg){
|
|
this.orgFItemID = orgInfo[0].FINTERID;
|
|
}
|
|
else {
|
|
if(defaultOrgInfo){
|
|
this.orgFItemID = defaultOrgInfo.FINTERID;
|
|
}
|
|
else {
|
|
this.orgFItemID = orgInfo[0].FINTERID;
|
|
}
|
|
}
|
|
|
|
this.orgArry = orgInfo;
|
|
this.orgArry.forEach(
|
|
function(el,index){
|
|
let currentOrgid = el.FINTERID;
|
|
let result = (currentOrgid == _self.orgFItemID);
|
|
if(result){
|
|
_self.index = index;
|
|
}
|
|
}
|
|
);
|
|
|
|
}
|
|
else {
|
|
this.orgArry = [{name:"请选择组织", key:"", FNAME:"当前无组织"}];
|
|
this.index = 0;
|
|
}
|
|
uni.setStorageSync('orgID',this.orgFItemID);
|
|
this.getCheckList(1,6);
|
|
},
|
|
|
|
orgChange:function(e){
|
|
this.isChangedOrg = true;
|
|
this.index = e.target.value;
|
|
let isOpenDefaultOrg = uni.getStorageSync('isOpenDefaultOrg');
|
|
if(!this.orgArry[this.index].FINTERID){
|
|
this.orgFItemID = "";
|
|
}
|
|
else {
|
|
this.orgFItemID = this.orgArry[this.index].FINTERID;
|
|
if(isOpenDefaultOrg){
|
|
uni.setStorageSync('defaultOrgInfo',this.orgArry[this.index]);
|
|
}
|
|
}
|
|
|
|
console.log(this.orgFItemID);
|
|
uni.setStorageSync('orgID',this.orgFItemID);
|
|
this.getCheckList(1,6);
|
|
},
|
|
getCheckList: function(index,size) {
|
|
let _self = this;
|
|
uni.showLoading({
|
|
title:"加载中",
|
|
mask:true
|
|
})
|
|
this.pageIndex = index;
|
|
let requestParams = {
|
|
"fType":4,
|
|
"fNO":this.checkBillBarcode?this.checkBillBarcode:'',
|
|
"PageNumber": this.pageIndex,
|
|
"BarNumber": size,
|
|
"orgID":this.orgFItemID
|
|
};
|
|
this.$request.get('/STKAPPINSPECT/InStockInspectionList',{params:requestParams}).then(res => {
|
|
uni.hideLoading();
|
|
//debugger
|
|
if (_self.pageIndex == 1) {
|
|
_self.checkBillList = res;
|
|
_self.pageIndex = _self.pageIndex+1;
|
|
}
|
|
else {
|
|
if (res.length != 0) {
|
|
let newArray = _self.checkBillList.concat(res);
|
|
_self.checkBillList = newArray;
|
|
_self.pageIndex = _self.pageIndex+1;
|
|
if(res.length < 6) {
|
|
_self.showTips = true;
|
|
}
|
|
}
|
|
else {
|
|
_self.showTips = true;
|
|
}
|
|
}
|
|
}).catch(err => {
|
|
uni.hideLoading();
|
|
this.dialogNoticeProps(err,'error')
|
|
});
|
|
},
|
|
}
|
|
}
|
|
</script>
|
|
<style>
|
|
.header-row-class-organzie{
|
|
display: flex;
|
|
justify-content: flex-end;
|
|
align-items: center;
|
|
padding-right: 50rpx;
|
|
}
|
|
.header-row-title-class-organzie{
|
|
font-size: 32rpx;
|
|
font-family: MicrosoftYaHei;
|
|
color: #666666;
|
|
}
|
|
.head-row-content-class-organzie{
|
|
font-size: 32rpx;
|
|
font-family: MicrosoftYaHei;
|
|
color: #666666;
|
|
}
|
|
.img-organzie{
|
|
height: 32rpx;
|
|
width: 32rpx;
|
|
margin-left: 24rpx;
|
|
}
|
|
.search{padding: 10rpx 0;margin: 0 0;}
|
|
.search-title{text-align: start;width: 200rpx;}
|
|
.search-img{height: 28rpx;width: 28rpx;margin-top: 20rpx;}
|
|
.active-input{position: relative;width: 100%;border: #cacaca solid 1px;margin-left: 20rpx;
|
|
border-radius: 10rpx;}
|
|
.placeholder-class-input{font-size: 30rpx;font-family: PingFangSC, PingFangSC-Regular;font-weight: 400;color: #cacaca;}
|
|
.list{border: #000000 solid 1rpx;margin: 0rpx 32rpx 32rpx 32rpx;background-color: #FFFFFF;border-radius: 10rpx;}
|
|
.list-item{}
|
|
.list-item-detail{display: flex;flex-direction: row;}
|
|
.list-item-detail-area{display: flex;flex-direction: row;margin-left: 32rpx;width: 50%;
|
|
overflow: hidden; white-space: nowrap;text-overflow: ellipsis;}
|
|
.list-item-detail-title{text-align: start;width: 200rpx;flex-shrink: 0;}
|
|
.list-item-detail-describe{width: 200rpx;overflow: hidden;white-space: nowrap;text-overflow: ellipsis;}
|
|
</style> |