Browse Source

Merge branch 'hella_online_20240803' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-uniapp into hella_online_20240803

# Conflicts:
#	src/pages/issue/record/directIssue.vue
lijuncheng0816
niexiting 3 months ago
parent
commit
33752bccdf
  1. 92
      src/api/httpRequest3.js
  2. 21
      src/common/noclick.js
  3. 1
      src/main.js
  4. 4
      src/manifest.json
  5. 18
      src/mycomponents/common/comMessage.vue
  6. 32
      src/mycomponents/job/jobFilter.vue
  7. 2
      src/mycomponents/qty/balanceQtyEdit.vue
  8. 26
      src/mycomponents/scan/winCheckFgLabel.vue
  9. 92
      src/mycomponents/scan/winComScan.vue
  10. 3
      src/mycomponents/scan/winComScanBalance.vue
  11. 43
      src/mycomponents/scan/winComScanBalanceLocation.vue
  12. 39
      src/mycomponents/scan/winComScanFg.vue
  13. 3
      src/mycomponents/scan/winScanAsnNumber.vue
  14. 3
      src/mycomponents/scan/winScanContainer.vue
  15. 10
      src/mycomponents/scan/winScanFgLabel.vue
  16. 4
      src/mycomponents/scan/winScanItem.vue
  17. 5
      src/mycomponents/scan/winScanJobNumber.vue
  18. 3
      src/mycomponents/scan/winScanLocation.vue
  19. 9
      src/mycomponents/scan/winScanPack.vue
  20. 3
      src/mycomponents/scan/winScanPackAndCont.vue
  21. 37
      src/mycomponents/scan/winScanPackAndLocation.vue
  22. 22
      src/mycomponents/scan/winScanPackAndLocationNoBalance.vue
  23. 12
      src/mycomponents/scan/winScanPackAndPosition.vue
  24. 7
      src/mycomponents/scan/winScanPackJob.vue
  25. 9
      src/mycomponents/scan/winScanPackLevel.vue
  26. 18
      src/mycomponents/scan/winScanPackage.vue
  27. 3
      src/pages.json
  28. 4
      src/pages/count/job/fuzzyCountDetail.vue
  29. 49
      src/pages/customerReturn/job/returnDetail.vue
  30. 3
      src/pages/deliver/coms/comScanDeliverPack.vue
  31. 9
      src/pages/fg/receiptByPlan.vue
  32. 24
      src/pages/inventoryMove/coms/comMoveRecord.vue
  33. 51
      src/pages/inventoryMove/job/inventoryMoveDetail.vue
  34. 4
      src/pages/issue/coms/comIssueJobCard.vue
  35. 17
      src/pages/issue/coms/comScanIssuePack.vue
  36. 6
      src/pages/issue/job/issueDetail.vue
  37. 68
      src/pages/issue/job/issueJob.vue
  38. 5
      src/pages/issue/request/issueScanRequest.vue
  39. 11
      src/pages/login/index.vue
  40. 4
      src/pages/package/coms/comOverPackJobCard.vue
  41. 15
      src/pages/package/coms/comScanPackagePack.vue
  42. 130
      src/pages/package/job/overPackageJob.vue
  43. 10
      src/pages/package/job/overPackageJobDetail.vue
  44. 2
      src/pages/package/record/splitPackageRecord.vue
  45. 63
      src/pages/point/index.vue
  46. 4
      src/pages/pointPutawayJob/index.vue
  47. 10
      src/pages/productDismantle/job/productDismantleDetail.vue
  48. 4
      src/pages/productPutaway/coms/comProductJobCard.vue
  49. 10
      src/pages/productPutaway/job/productPutawayDetail.vue
  50. 8
      src/pages/productPutaway/job/productPutawayJob.vue
  51. 11
      src/pages/productPutaway/record/productPutawayRecord.vue
  52. 4
      src/pages/productReceipt/coms/comProductJobCard.vue
  53. 7
      src/pages/productReceipt/job/ccProductReceiptJob.vue
  54. 10
      src/pages/productReceipt/job/completeReceiveJobDetail.vue
  55. 4
      src/pages/productReceipt/job/productReceiptDetail.vue
  56. 9
      src/pages/productReceipt/job/productReceiptJob.vue
  57. 43
      src/pages/productReceipt/job/scrapReceiptDetail.vue
  58. 10
      src/pages/productReceipt/job/semiProductReceiptDetail.vue
  59. 56
      src/pages/productRecycle/job/productRecycleJobDetail.vue
  60. 61
      src/pages/productionReceipt/job/productionReceiptDetail.vue
  61. 80
      src/pages/productionReceipt/job/productionReceiptJob.vue
  62. 5
      src/pages/productionReturn/coms/comScanReturnPack.vue
  63. 10
      src/pages/productionReturn/job/returnDetail.vue
  64. 16
      src/pages/purchaseReceipt/job/receiptDetail.vue
  65. 34
      src/pages/purchaseReceipt/job/receiptJob.vue
  66. 60
      src/pages/purchaseReturn/job/returnDetail.vue
  67. 1
      src/pages/purchaseReturn/record/returnRecord.vue
  68. 15
      src/pages/putaway/job/putawayDetail.vue
  69. 7
      src/pages/putaway/job/putawayJob.vue
  70. 6
      src/pages/query/pack.vue
  71. 4
      src/pages/repleinsh/coms/comRepleinshJobCard.vue
  72. 38
      src/pages/repleinsh/coms/comScanReplishPack.vue
  73. 6
      src/pages/repleinsh/job/repleinshJob.vue
  74. 56
      src/pages/scrap/job/scrapJobDetail.vue
  75. 15
      src/pages/scrap/request/scrapRequestCreate.vue
  76. 8
      src/pages/stockUp/coms/comScanStockUpPack.vue
  77. 10
      src/pages/transfer/job/issueDetail.vue
  78. 11
      src/pages/transfer/job/receiptDetail.vue
  79. 10
      src/pages/transfer/job/transferDetail.vue
  80. 50
      src/pages/unPlanned/job/issueJobDetail.vue
  81. 10
      src/pages/unPlanned/job/receiptJobDetail.vue
  82. 20
      src/pages/unPlanned/record/issueRecord.vue
  83. 17
      src/pages/unPlanned/record/receiptRecord.vue
  84. 21
      src/pages/unPlanned/request/issueRequestCreate.vue
  85. 12
      src/store/modules/user.js

92
src/api/httpRequest3.js

@ -1,10 +1,10 @@
import storage from '../common/utils/storage' import storage from '../common/utils/storage'
import { import {
removeToken removeToken
} from '@/common/utils/auth' } from '@/common/utils/auth'
function service(options = {}) { function service(options = {}) {
var token = storage.getStorage(storage.constant.token) var token = storage.getStorage(storage.constant.token)
var tenantId = storage.getStorage('tenantId') var tenantId = storage.getStorage('tenantId')
// if(getApp()!=undefined){ // if(getApp()!=undefined){
@ -19,23 +19,23 @@ function service(options = {}) {
options.header = { options.header = {
"content-type": "application/json", "content-type": "application/json",
"Authorization": "Bearer "+token, "Authorization": "Bearer " + token,
"dataType":"json", "dataType": "json",
"dataSource":"PDA", "dataSource": "PDA",
"tenant-id":tenantId "tenant-id": tenantId
}; };
options.timeout = 300000 options.timeout = 300000
options.url = requestUrl+options.url options.url = requestUrl + options.url
return new Promise((resolve, reject) => { return new Promise((resolve, reject) => {
options.success = (res) => { options.success = (res) => {
if (res ) { if (res) {
if(res.statusCode == 200){ if (res.statusCode == 200) {
if(res.data.code==0){ if (res.data.code == 0) {
resolve(res.data); resolve(res.data);
}else { } else {
if(res.data.code==401){ if (res.data.code == 401) {
uni.clearStorageSync() uni.clearStorageSync()
uni.removeStorageSync('overPackageRecord') // 删除直接翻包中缓存的来源库位 uni.removeStorageSync('overPackageRecord') // 删除直接翻包中缓存的来源库位
removeToken(); removeToken();
@ -43,18 +43,40 @@ function service(options = {}) {
url: '/pages/login/index' url: '/pages/login/index'
}) })
} }
reject("系统异常:"+res.data.msg) if (res.data.msg) {
console.log("系统异常",res.data.msg) if (res.data.msg.includes('get lock')) {
reject("系统异常:状态码["+res.statusCode +"]\n"+"数据库死锁")
} else {
reject("系统异常:状态码["+res.statusCode +"]\n"+res.data.msg)
}
} else {
reject("系统异常:状态码["+res.statusCode+"]")
}
} }
}else { } else {
reject("系统异常:"+ res.data.msg) if (res.data.msg) {
console.log("系统异常",res.data.msg) if (res.data.msg.includes('get lock')) {
reject("系统异常:状态码[" +res.statusCode+"]\n"+ "数据库死锁")
} else {
reject("系统异常:状态码[" +res.statusCode+"]\n"+ res.data.msg)
}
} else {
reject("系统异常:状态码["+res.statusCode+"]")
}
} }
} else { } else {
reject("系统异常:"+res.data.msg) if (res.data.msg) {
console.log("系统异常",res.data.msg) if (res.data.msg.includes('get lock')) {
reject("系统异常:状态码["+res.statusCode +"]\n"+ "数据库死锁")
} else {
reject("系统异常:状态码["+res.statusCode +"]\n"+ res.data.msg)
}
} else {
reject("系统异常:状态码["+res.statusCode+"]")
}
} }
}; };
options.fail = (error) => { options.fail = (error) => {
@ -65,14 +87,40 @@ function service(options = {}) {
message = '接口请求超时' message = '接口请求超时'
} else if (message.includes('Request failed with status code')) { } else if (message.includes('Request failed with status code')) {
message = '接口' + message.substr(message.length - 3) + '异常' message = '接口' + message.substr(message.length - 3) + '异常'
} else if (message.includes('get lock')) {
message = '接口' + "数据库死锁"
}else if(message.includes('statusCode:-1')){
message = "当前设备无网络,请检查网络后重试"
} }
reject("系统异常:"+message); reject("系统异常:" + message);
console.log("系统异常",message) console.log("系统异常", message)
}; };
// #ifdef APP
uni.getNetworkType({
success: function(res) {
const networkType = res.networkType;
console.log("网络类型", networkType)
if (networkType == "none") {
reject("当前设备无网络,请检查网络后重试");
} else {
uni.request(options); uni.request(options);
});
} }
}
})
// #endif
// #ifdef H5
console.log("网s络H5", navigator.onLine)
if (navigator.onLine) {
uni.request(options);
} else {
reject("当前无网络");
}
// #endif
});
}
export default service; export default service;

21
src/common/noclick.js

@ -11,15 +11,34 @@ function noMultipleClicks(methods, info) {
} else { } else {
methods(); methods();
} }
setTimeout(()=> { let timer = setTimeout(()=> {
that.noClick= true; that.noClick= true;
clearTimeout(timer)
}, 2000) }, 2000)
} else { } else {
// 这里是重复点击的判断 // 这里是重复点击的判断
} }
} }
// 节流函数
const throttle = (fn, t,_this) => {
console.log('throttle')
return ()=> {
if (!_this.timer) {
_this.timer = setTimeout(()=>{
fn()
console.log('fn')
//·清空定时器
_this.timer = null
}, t)
}
}
}
//导出 //导出
export default { export default {
noMultipleClicks,//禁止多次点击 noMultipleClicks,//禁止多次点击
throttle
} }

1
src/main.js

@ -36,6 +36,7 @@ export function createApp() {
app.use(uView) app.use(uView)
app.component('comMessage', comMessage) app.component('comMessage', comMessage)
app.config.globalProperties.$noMultipleClicks = noclick.noMultipleClicks; app.config.globalProperties.$noMultipleClicks = noclick.noMultipleClicks;
app.config.globalProperties.$throttle = noclick.throttle;
// startApp(app); // startApp(app);
return { return {
app, app,

4
src/manifest.json

@ -3,8 +3,8 @@
"package" : "uni.UNI43932FE", "package" : "uni.UNI43932FE",
"appid" : "__UNI__C9CF4BF", "appid" : "__UNI__C9CF4BF",
"description" : "", "description" : "",
"versionName" : "1.0.52", "versionName" : "1.0.55",
"versionCode" : 52, "versionCode" : 55,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

18
src/mycomponents/common/comMessage.vue

@ -12,16 +12,22 @@
<slot name="icon"> <slot name="icon">
<image class="icon" :src="icon" /> <image class="icon" :src="icon" />
</slot> </slot>
<scroll-view style="max-height: 400rpx; " scroll-y="true">
<slot name="content"> <slot name="content">
<text class="content" :style="{'color': textColor?textColor:'#000'}" > <view class="" style="display: flex;align-items: center;justify-content: center;">
<text class="text_content" :style="{'color': textColor?textColor:'#000'}" >
{{content}} {{content}}
</text> </text>
</view>
<!-- <rich-text class="content" :nodes="content" v-else></rich-text> --> <!-- <rich-text class="content" :nodes="content" v-else></rich-text> -->
</slot> </slot>
</scroll-view>
<view class='split_line'></view> <view class='split_line'></view>
<slot name="button"> <slot name="button">
<view class="uni-flex uni-row u-col-center space-between" style="width: 100%;height: 48px;"> <view class="uni-flex uni-row u-col-center space-between" style="width: 100%;height: 50rpx;">
<view v-if="showCancelButton" class="cance_button" @tap="cancelClose"> <view v-if="showCancelButton" class="cance_button" @tap="cancelClose">
<text :style="{'color':cancelColor}">{{ cancelText }}</text> <text :style="{'color':cancelColor}">{{ cancelText }}</text>
</view> </view>
@ -493,6 +499,7 @@
display: flex; // display: flex; //
flex-direction: column; // flex-direction: column; //
align-items: center; // align-items: center; //
margin: 8rpx;
// background-image: url() // background-image: url()
} }
@ -544,4 +551,11 @@
.def_text { .def_text {
color: $uni-color-primary; color: $uni-color-primary;
} }
.text_content{
padding: 10rpx;
font-size: 32rpx;
text-align: center;
word-break: break-all;
white-space: normal;
}
</style> </style>

32
src/mycomponents/job/jobFilter.vue

@ -46,6 +46,22 @@
<u-input style="margin-left: 20rpx;" confirmType="search" v-model="fromLocationCode" :border="true" <u-input style="margin-left: 20rpx;" confirmType="search" v-model="fromLocationCode" :border="true"
placeholder="请输入来源库位" @confirm="fromLocationCodeConfirm" /> placeholder="请输入来源库位" @confirm="fromLocationCodeConfirm" />
</view> </view>
<view v-if="isShowFromAreaCode" class="uni-flex space-between u-col-center"
style="width: 100%;margin-top: 30rpx;">
<view class="" style="font-size: 32rpx;">
来源库区
</view>
<u-input style="margin-left: 20rpx;" confirmType="search" v-model="fromAreaCode" :border="true"
placeholder="请输入来源库区" />
</view>
<view v-if="isShowToAreaCode" class="uni-flex space-between u-col-center"
style="width: 100%;margin-top: 30rpx;">
<view class="" style="font-size: 32rpx;">
到库区
</view>
<u-input style="margin-left: 50rpx;" confirmType="search" v-model="toAreaCode" :border="true"
placeholder="请输入到库区" />
</view>
<!-- <view class=""> <!-- <view class="">
<view class="uni-flex u-row-center" style="margin-top: 30rpx;" v-if="isShowAsn"> <view class="uni-flex u-row-center" style="margin-top: 30rpx;" v-if="isShowAsn">
@ -125,6 +141,16 @@
isShowQurery: { isShowQurery: {
type: Boolean, type: Boolean,
default: false default: false
},
//
isShowFromAreaCode: {
type: Boolean,
default: false
},
//
isShowToAreaCode: {
type: Boolean,
default: false
} }
}, },
data() { data() {
@ -134,6 +160,8 @@
checkedWaitModel: false, checkedWaitModel: false,
productionLineCode: '', // 线 productionLineCode: '', // 线
fromLocationCode: '', // fromLocationCode: '', //
fromAreaCode: '', //
toAreaCode: '', //
itemCode: '', // itemCode: '', //
creationTime: '', creationTime: '',
status: '' status: ''
@ -161,6 +189,8 @@
let params = { let params = {
productionLineCode: this.productionLineCode, productionLineCode: this.productionLineCode,
fromLocationCode: this.fromLocationCode, fromLocationCode: this.fromLocationCode,
fromAreaCode: this.fromAreaCode, //
toAreaCode: this.toAreaCode, //
itemCode: this.itemCode, itemCode: this.itemCode,
creationTime: this.creationTime, creationTime: this.creationTime,
status: this.status status: this.status
@ -170,6 +200,8 @@
reset(){ reset(){
this.productionLineCode = '' this.productionLineCode = ''
this.fromLocationCode = '' this.fromLocationCode = ''
this.fromAreaCode = ''//
this.toAreaCode = ''//
this.itemCode = '' this.itemCode = ''
this.creationTime = '' this.creationTime = ''
this.status = '' this.status = ''

2
src/mycomponents/qty/balanceQtyEdit.vue

@ -36,7 +36,7 @@
<text>数量 : </text> <text>数量 : </text>
<view class="uni-flex uni-row uni-center" style="align-items: center;"> <view class="uni-flex uni-row uni-center" style="align-items: center;">
<input class="qty_input" v-model="allQty" :focus="true" type="number" <input class="qty_input" v-model="allQty" :focus="true" type="number"
@confirm="confirm()" @input="checkNum" :maxlength="maxlength" /> @confirm="confirm()" @input="checkNum" :maxlength="maxlength" disabled :style="{background:'#f5f5f5',color:'#bbbbbb'}"/>
<uom :uom="dataContent.uom"></uom> <uom :uom="dataContent.uom"></uom>
</view> </view>
</view> </view>

26
src/mycomponents/scan/winCheckFgLabel.vue

@ -102,18 +102,17 @@
methods: { methods: {
// //
openScanPopupForType(customerCode) { openScanPopupForType(customerCode) {
this.customerCode = customerCode; this.customerCode = customerCode;
this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //
this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.fromLocationAreaTypeList); //
this.$refs.popup.open('bottom')
setTimeout(res => {
if (this.fromLocationCode != '') { if (this.fromLocationCode != '') {
this.packGetFocus(); this.packGetFocus();
} else { } else {
this.locationGetFocus(); this.locationGetFocus();
} }
this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //
this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.fromLocationAreaTypeList); //
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500) }, 500)
}, },
@ -121,21 +120,24 @@
openScanPopupForJob(fromLocationCode, fromLocationList, jobContent) { openScanPopupForJob(fromLocationCode, fromLocationList, jobContent) {
this.fromLocationCode = fromLocationCode; this.fromLocationCode = fromLocationCode;
this.fromLocationList = fromLocationList; this.fromLocationList = fromLocationList;
if (fromLocationCode != '') {
this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); //
this.$refs.popup.open('bottom')
setTimeout(res => {
if (this.fromLocationCode != '') {
this.packGetFocus(); this.packGetFocus();
} else { } else {
if (this.fromLocationList.length == 0) { if (this.fromLocationList.length == 0) {
this.locationGetFocus(); this.locationGetFocus();
} else { } else {
this.fromLocationCode = this.fromLocationList[0]; this.fromLocationCode = this.fromLocationList[0];
this.packGetFocus();
} }
} }
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500) }, 500)
this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); //
}, },
closeScanPopup(content) { closeScanPopup(content) {

92
src/mycomponents/scan/winComScan.vue

@ -5,9 +5,9 @@
<view class="pop_tab"> <view class="pop_tab">
<view class="tab_info"> <view class="tab_info">
<view class="conbox"> <view class="conbox">
<textarea inputmode="none" v-model="scanMsg" trim="all" maxlength="1000" style="margin-left: 5px;width: 90%;" <textarea v-model="scanMsg" trim="all" maxlength="1000" style="margin-left: 5px;width: 90%;"
:focus="boxfocus" :placeholder="placeholderValue" :placeholder="placeholderValue" :focus="boxfocus" @blur="handleBlur" @focus="handleFocus"
@input="handelScanMsg" :cursor="cursorIndex" ></textarea> @input="handelScanMsg" ></textarea>
</view> </view>
<view class="uni-flex uni-row space-between u-col-center"> <view class="uni-flex uni-row space-between u-col-center">
@ -16,7 +16,7 @@
</view> --> </view> -->
<view class="uni-flex"> <view class="uni-flex">
<button class="clean_scan_btn" @click="clearScanValue()">清空</button> <button class="clean_scan_btn" @touchend.prevent="clearScanValue()">清空</button>
<button class="scan_btn" @click="clickScanMsg()">扫描</button> <button class="scan_btn" @click="clickScanMsg()">扫描</button>
</view> </view>
</view> </view>
@ -33,8 +33,7 @@
</view> </view>
</view> </view>
<u-line class='line_color' style='padding-top: 10rpx;padding-bottom: 20rpx;'></u-line> <u-line class='line_color' style='padding-top: 10rpx;padding-bottom: 20rpx;'></u-line>
<scroll-view scroll-y="true" class="scroll-view" v-if="expand" <scroll-view scroll-y="true" class="scroll-view" v-if="expand" style="height: 70px;">
style="height: 70px;">
<view class="uni-flex u-col" v-for="(item,index) in scanList"> <view class="uni-flex u-col" v-for="(item,index) in scanList">
<view style="width: 100%;max-height: 100px;"> <view style="width: 100%;max-height: 100px;">
<view class="uni-flex u-row space-between u-col-center" @click="showItem(item)"> <view class="uni-flex u-row space-between u-col-center" @click="showItem(item)">
@ -55,7 +54,7 @@
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
<script > <script>
import { import {
getLabelInfo getLabelInfo
} from '../../common/label.js'; } from '../../common/label.js';
@ -73,10 +72,10 @@
type: Boolean, type: Boolean,
default: true default: true
}, },
boxFocus: { // boxFocus: {
type: Boolean, // type: Boolean,
default: true // default: true
}, // },
isShowHistory: { isShowHistory: {
type: Boolean, type: Boolean,
default: true default: true
@ -100,41 +99,7 @@
} }
}, },
mounted() { mounted() {
this.boxfocus =true;
// uni.hideKeyboard();
// #ifdef H5
// if (document.querySelector('textarea') != null) {
// document.querySelector('textarea').setAttribute('inputmode', 'none')
// }
// #endif
// this.hide()
// #ifdef APP-PLUS
//
// this.hide()
// uni.onKeyboardHeightChange(res => {
// console.log(res.height)
// if(res.height>0){
// // uni.hideKeyboard();
// plus.key.hideSoftKeybord();
// }
// })
//
// uni.onWindowResize((res) => {
// plus.key.hideSoftKeybord()
// })
// plus.key.hideSoftKeybord();
// setInterval(function(){
// plus.key.hideSoftKeybord();
// // uni.hideKeyboard();//
// // plus.key.hideSoftKeybord();
// },60);
// #endif
// if (this.$el.querySelector('textarea') != null) {
// this.$el.querySelector('textarea').setAttribute('inputmode', 'none')
// }
}, },
watch: { watch: {
placeholder() { placeholder() {
@ -169,6 +134,7 @@
}, },
clearScanValue() { clearScanValue() {
this.scanMsg = '' this.scanMsg = ''
// this.cursorIndex = 0
this.getfocus(); this.getfocus();
}, },
clickScanMsg() { clickScanMsg() {
@ -182,14 +148,16 @@
// mask: true // mask: true
// }) // })
let that = this; let that = this;
let index = that.scanMsg.indexOf('\n'); // if(index==-1){
if (index >= 0) { // that.scanMsg =that.scanMsg + "\n";
// }
if (that.scanMsg.includes('\n')) {
// that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50'; // that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50';
setTimeout(() => { setTimeout(() => {
that.losefocus(); that.losefocus();
let content = uni.$u.trim(that.scanMsg) let content = uni.$u.trim(that.scanMsg)
if (content == "") { if (content == "") {
that.getfocus(); // that.getfocus();
this.$refs.comMessage.showErrorMessage("扫描内容为空,请重新扫描", res => { this.$refs.comMessage.showErrorMessage("扫描内容为空,请重新扫描", res => {
if (res) { if (res) {
that.scanMsg = "" that.scanMsg = ""
@ -205,13 +173,14 @@
getLabelInfo(content, this.headerType, callback => { getLabelInfo(content, this.headerType, callback => {
// uni.hideLoading(); // uni.hideLoading();
let scanResult = callback; let scanResult = callback;
scanResult.scanMessage=content scanResult.scanMessage = content
if (scanResult.success) { if (scanResult.success) {
that.clear(); that.clear();
// that.getfocus();// // that.getfocus();//
that.$emit("getResult", scanResult); that.$emit("getResult", scanResult);
} else { } else {
that.clear(); that.clear();
that.losefocus();
this.$refs.comMessage.showErrorMessage(scanResult.message, res => { this.$refs.comMessage.showErrorMessage(scanResult.message, res => {
if (res) { if (res) {
that.getfocus(); that.getfocus();
@ -219,34 +188,37 @@
}) })
} }
}); });
}, 500); }, 200);
} }
}, },
handleFocus() {},
handleBlur() {
// setTimeout(res=>{
// uni.hideKeyboard();
// },200)
},
getfocus() { getfocus() {
let that = this; let that = this;
this.$nextTick(r => { this.$nextTick(r => {
console.log("获取焦点")
that.boxfocus = true; that.boxfocus = true;
}); });
// this.hide()
}, },
losefocus() { losefocus() {
let that = this; let that = this;
this.$nextTick(r => { this.$nextTick(r => {
console.log("失去焦点")
that.boxfocus = false; that.boxfocus = false;
uni.hideKeyboard();
}); });
}, },
clear() { clear() {
if(this.clearResult) if (this.clearResult) {
{ this.scanMsg = ""
this.cursorIndex = 0; // this.cursorIndex = 0;
this.scanMsg = ''
} }
}, },
iconClick(type) { iconClick(type) {
this.$emit("clearResult", this.scanMsgk); this.$emit("clearResult", this.scanMsg);
}, },
expands() { expands() {
this.expand = !this.expand; this.expand = !this.expand;
@ -289,7 +261,7 @@
<script module="textarea" lang="renderjs"> <script module="textarea" lang="renderjs">
export default { export default {
mounted() { mounted() {
document.querySelector('textarea').setAttribute('inputmode', 'none') // document.querySelector('textarea').setAttribute('inputmode', 'none')
}, },
} }
</script> </script>

3
src/mycomponents/scan/winComScanBalance.vue

@ -118,6 +118,9 @@
this.toLocationAreaTypeList = getDirectoryItemArray(businessType.inAreaTypes) this.toLocationAreaTypeList = getDirectoryItemArray(businessType.inAreaTypes)
this.itemTypesList = getDirectoryItemArray(businessType.itemTypes) this.itemTypesList = getDirectoryItemArray(businessType.itemTypes)
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
setTimeout(res=>{
this.getfocus()
},500)
}, },
getScanResult(result) { getScanResult(result) {

43
src/mycomponents/scan/winComScanBalanceLocation.vue

@ -64,6 +64,10 @@
getBasicItemByCode getBasicItemByCode
} from '@/api/request2.js'; } from '@/api/request2.js';
import {
getLabelInfo
} from '@/common/label.js';
import { import {
getListLocationAreaTypeDesc, getListLocationAreaTypeDesc,
checkDirectoryItemExist, checkDirectoryItemExist,
@ -141,28 +145,58 @@
this.fromLocationAreaTypeList = getDirectoryItemArray(businessType.outAreaTypes) this.fromLocationAreaTypeList = getDirectoryItemArray(businessType.outAreaTypes)
this.itemTypesList = getDirectoryItemArray(businessType.itemTypes) this.itemTypesList = getDirectoryItemArray(businessType.itemTypes)
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
setTimeout(res=>{
this.packGetFocus()
},500)
}, },
openScanPopupForJob(fromLocationCode, fromLocationList, jobContent){ openScanPopupForJob(fromLocationCode, fromLocationList, jobContent){
this.fromLocationCode = fromLocationCode; this.fromLocationCode = fromLocationCode;
this.fromLocationList = fromLocationList; this.fromLocationList = fromLocationList;
if (fromLocationCode != '') { this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); //
this.$refs.popup.open('bottom')
setTimeout(res => {
if (this.fromLocationCode != '') {
this.packGetFocus(); this.packGetFocus();
} else { } else {
if (this.fromLocationList.length == 0) { if (this.fromLocationList.length == 0) {
this.locationGetFocus(); this.locationGetFocus();
} else { } else {
this.fromLocationCode = this.fromLocationList[0]; this.fromLocationCode = this.fromLocationList[0];
this.packGetFocus();
} }
} }
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500) }, 500)
},
//
openScanPopupForJobSimulate(fromLocationCode, fromLocationList, jobContent, scanMessage) {
this.fromLocationCode = fromLocationCode;
this.fromLocationList = fromLocationList;
if (!fromLocationCode) {
if (this.fromLocationList.length == 0) {
// this.locationGetFocus();
alert('没有来源库位:List')
} else {
this.fromLocationCode = this.fromLocationList[0];
}
}
this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses) this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; // this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); // this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); //
getLabelInfo(scanMessage, this.headerType, callback => {
if (callback.success) {
this.getScanResult(callback);
} else {
this.showErrorMessage(callback.message, res => {})
}
})
}, },
handleConfirm() { handleConfirm() {
@ -263,6 +297,7 @@
}) })
}, },
showErrorMessage(message) { showErrorMessage(message) {
this.packLoseFocus();
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
if(this.$refs.comscan){ if(this.$refs.comscan){

39
src/mycomponents/scan/winComScanFg.vue

@ -6,12 +6,14 @@
<view class="tab_info"> <view class="tab_info">
<view class="conbox"> <view class="conbox">
<textarea inputmode="none" v-model="scanMsg" trim="all" maxlength="1000" <textarea inputmode="none" v-model="scanMsg" trim="all" maxlength="1000"
style="margin-left: 5px;width: 90%;" :focus="boxfocus" :placeholder="placeholderValue" style="margin-left: 5px;width: 90%;"
@focus="getfocus" @blur="losefocus" @input="handelScanMsg" :cursor="cursorIndex"></textarea> :focus="boxfocus" :placeholder="placeholderValue"
@focus="handleFocus"
@input="handelScanMsg" :cursor="cursorIndex"></textarea>
</view> </view>
<view class="uni-flex uni-row space-between u-col-center"> <view class="uni-flex uni-row space-between u-col-center">
<view class="uni-flex"> <view class="uni-flex">
<button class="clean_scan_btn" @click="clearScanValue()">清空</button> <button class="clean_scan_btn" @touchend.prevent="clearScanValue()">清空</button>
<button class="scan_btn" @click="clickScanMsg()">扫描</button> <button class="scan_btn" @click="clickScanMsg()">扫描</button>
</view> </view>
</view> </view>
@ -103,13 +105,11 @@
} }
}, },
mounted() { mounted() {
this.boxfocus = true;
// uni.hideKeyboard();
// #ifdef H5 // #ifdef H5
if (document.querySelector('textarea') != null) { // if (document.querySelector('textarea') != null) {
document.querySelector('textarea').setAttribute('inputmode', 'none') // document.querySelector('textarea').setAttribute('inputmode', 'none')
} // }
// #endif // #endif
// this.hide() // this.hide()
// #ifdef APP-PLUS // #ifdef APP-PLUS
@ -125,20 +125,6 @@
this.placeholderValue = '请扫描' + this.placeholder; this.placeholderValue = '请扫描' + this.placeholder;
}, },
methods: { methods: {
hide() {
// #ifdef APP-PLUS
//
var interval = setInterval(function() {
uni.hideKeyboard(); //
console.log('刷新')
}, 5);
setTimeout(() => {
clearInterval(interval);
console.log('停止刷新')
}, 1000);
// #endif
},
setItemCodeSimulate(itemCode, scanMsg) { setItemCodeSimulate(itemCode, scanMsg) {
this.itemCode = itemCode; this.itemCode = itemCode;
this.scanMsg = scanMsg; this.scanMsg = scanMsg;
@ -154,6 +140,7 @@
this.scanMsg = val this.scanMsg = val
}, },
clearScanValue() { clearScanValue() {
this.cursorIndex=0,
this.scanMsg = '' this.scanMsg = ''
this.getfocus(); this.getfocus();
}, },
@ -171,7 +158,6 @@
let content = uni.$u.trim(that.scanMsg) let content = uni.$u.trim(that.scanMsg)
// let content = that.scanMsg; // let content = that.scanMsg;
if (content == "") { if (content == "") {
that.getfocus();
this.$refs.comMessage.showErrorMessage("扫描内容为空,请重新扫描", res => { this.$refs.comMessage.showErrorMessage("扫描内容为空,请重新扫描", res => {
if (res) { if (res) {
that.scanMsg = "" that.scanMsg = ""
@ -235,6 +221,7 @@
that.$emit("getResult", scanResult); that.$emit("getResult", scanResult);
} }
} catch (error) { } catch (error) {
that.losefocus();
this.$refs.comMessage.showErrorMessage(error.message, res => { this.$refs.comMessage.showErrorMessage(error.message, res => {
if (res) { if (res) {
that.getfocus(); that.getfocus();
@ -243,6 +230,7 @@
} }
}).catch(error => { }).catch(error => {
that.losefocus();
this.$refs.comMessage.showErrorMessage(error, res => { this.$refs.comMessage.showErrorMessage(error, res => {
if (res) { if (res) {
that.scanMsg = "" that.scanMsg = ""
@ -268,6 +256,11 @@
that.boxfocus = false; that.boxfocus = false;
}); });
}, },
// handleBlur(){
// setTimeout(res=>{
// uni.hideKeyboard();
// },200)
// },
clear() { clear() {
this.cursorIndex = 0; this.cursorIndex = 0;
this.scanMsg = '' this.scanMsg = ''

3
src/mycomponents/scan/winScanAsnNumber.vue

@ -55,8 +55,9 @@
}, },
methods: { methods: {
openScanPopup() { openScanPopup() {
setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
setTimeout(res => {
this.getfocus('bottom')
}, 500) }, 500)
}, },
closeScanPopup() { closeScanPopup() {

3
src/mycomponents/scan/winScanContainer.vue

@ -54,8 +54,9 @@
}, },
methods: { methods: {
openScanPopup() { openScanPopup() {
setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
setTimeout(res => {
this.getfocus()
}, 500) }, 500)
}, },
closeScanPopup() { closeScanPopup() {

10
src/mycomponents/scan/winScanFgLabel.vue

@ -60,13 +60,13 @@
this.$refs.comscansimulate.clickScanMsg(); this.$refs.comscansimulate.clickScanMsg();
}, },
openScanPopup(itemCode) { openScanPopup(itemCode) {
setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
setTimeout(res => {
setTimeout(re=>{ setTimeout(re=>{
this.$refs.comscan.setItemCode(itemCode) this.$refs.comscan.setItemCode(itemCode)
},500) },500)
this.getfocus()
}, 200) }, 500)
}, },
closeScanPopup() { closeScanPopup() {
@ -91,13 +91,13 @@
}, },
getfocus() { getfocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan ) {
this.$refs.comscan.getfocus(); this.$refs.comscan.getfocus();
} }
}, },
losefocus() { losefocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan ) {
this.$refs.comscan.losefocus(); this.$refs.comscan.losefocus();
} }
}, },

4
src/mycomponents/scan/winScanItem.vue

@ -76,8 +76,10 @@
}, },
methods: { methods: {
openScanPopup() { openScanPopup() {
setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
var that =this;
setTimeout(res => {
that.getfocus()
}, 500) }, 500)
}, },
closeScanPopup() { closeScanPopup() {

5
src/mycomponents/scan/winScanJobNumber.vue

@ -61,8 +61,9 @@
}, },
methods: { methods: {
openScanPopup() { openScanPopup() {
setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
setTimeout(res => {
this.getfocus()
}, 500) }, 500)
}, },
closeScanPopup() { closeScanPopup() {
@ -72,7 +73,7 @@
this.$refs.popup.close() this.$refs.popup.close()
}, },
getfocus() { getfocus() {
if (this.isShow) { if (this.$refs.scan) {
this.$refs.scan.getfocus() this.$refs.scan.getfocus()
} }
}, },

3
src/mycomponents/scan/winScanLocation.vue

@ -65,8 +65,9 @@
}, },
methods: { methods: {
openScanPopup() { openScanPopup() {
setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
setTimeout(res => {
this.getfocus()
}, 500) }, 500)
}, },
openScanPopupSimulate(location) { openScanPopupSimulate(location) {

9
src/mycomponents/scan/winScanPack.vue

@ -70,9 +70,10 @@
}) })
}, },
openScanPopup() { openScanPopup() {
setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
}, 200) setTimeout(res => {
this.getfocus()
}, 500)
}, },
closeScanPopup() { closeScanPopup() {
@ -103,13 +104,13 @@
}, },
getfocus() { getfocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan) {
this.$refs.comscan.getfocus(); this.$refs.comscan.getfocus();
} }
}, },
losefocus() { losefocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan) {
this.$refs.comscan.losefocus(); this.$refs.comscan.losefocus();
} }
}, },

3
src/mycomponents/scan/winScanPackAndCont.vue

@ -61,8 +61,9 @@
}, },
methods: { methods: {
openScanPopup() { openScanPopup() {
setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
setTimeout(res => {
this.getfocus()
}, 500) }, 500)
}, },

37
src/mycomponents/scan/winScanPackAndLocation.vue

@ -152,43 +152,44 @@
}, },
// //
openScanPopupForType(fromLocationCode, businessType) { openScanPopupForType(fromLocationCode, businessType) {
this.businessType = businessType; this.businessType = businessType;
this.fromLocationCode = fromLocationCode; this.fromLocationCode = fromLocationCode;
this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //
this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.outAreaTypes); //
this.$refs.popup.open('bottom')
setTimeout(res => {
if (fromLocationCode != '') { if (fromLocationCode != '') {
this.packGetFocus(); this.packGetFocus();
} else { } else {
this.locationGetFocus(); this.locationGetFocus();
} }
this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //
this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.outAreaTypes); //
if (!this.show) {
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500) }, 500)
}
}, },
// //
openScanPopupForJob(fromLocationCode, fromLocationList, jobContent) { openScanPopupForJob(fromLocationCode, fromLocationList, jobContent) {
this.fromLocationCode = fromLocationCode; this.fromLocationCode = fromLocationCode;
this.fromLocationList = fromLocationList; this.fromLocationList = fromLocationList;
if (fromLocationCode != '') { this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); //
this.$refs.popup.open('bottom')
setTimeout(res => {
if (this.fromLocationCode != '') {
this.packGetFocus(); this.packGetFocus();
} else { } else {
if (this.fromLocationList.length == 0) { if (this.fromLocationList.length == 0) {
this.locationGetFocus(); this.locationGetFocus();
} else { } else {
this.fromLocationCode = this.fromLocationList[0]; this.fromLocationCode = this.fromLocationList[0];
this.packGetFocus();
} }
} }
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500) }, 500)
this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); //
}, },
// //
openScanPopupForJobSimulate(fromLocationCode, fromLocationList, jobContent, scanMessage) { openScanPopupForJobSimulate(fromLocationCode, fromLocationList, jobContent, scanMessage) {
@ -417,7 +418,7 @@
balance: datas, balance: datas,
fromLocationCode: this.fromLocationCode, fromLocationCode: this.fromLocationCode,
} }
this.packGetFocus(); // this.packGetFocus();
this.$emit("getResult", data); this.$emit("getResult", data);
this.$emit("getCountScanResult", data); this.$emit("getCountScanResult", data);
}, },
@ -433,18 +434,18 @@
balance: item, balance: item,
fromLocationCode: this.fromLocationCode, fromLocationCode: this.fromLocationCode,
} }
this.packGetFocus(); // this.packGetFocus();
this.$emit("getResult", data); this.$emit("getResult", data);
}, },
packGetFocus() { packGetFocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan) {
this.$refs.comscan.getfocus(); this.$refs.comscan.getfocus();
} }
}, },
packLoseFocus() { packLoseFocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan) {
this.$refs.comscan.losefocus(); this.$refs.comscan.losefocus();
} }
}, },

22
src/mycomponents/scan/winScanPackAndLocationNoBalance.vue

@ -131,16 +131,16 @@
openScanPopupForType(fromLocationCode, businessType) { openScanPopupForType(fromLocationCode, businessType) {
this.businessType = businessType; this.businessType = businessType;
this.fromLocationCode = fromLocationCode; this.fromLocationCode = fromLocationCode;
this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //
this.fromLocationTypeArray = getDirectoryItemArray(this.businessType.outLocationTypes); //
this.$refs.popup.open('bottom')
setTimeout(res => {
if (fromLocationCode != '') { if (fromLocationCode != '') {
this.packGetFocus(); this.packGetFocus();
} else { } else {
this.locationGetFocus(); this.locationGetFocus();
} }
this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //
this.fromLocationTypeArray = getDirectoryItemArray(this.businessType.outLocationTypes); //
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500) }, 500)
}, },
@ -148,6 +148,12 @@
openScanPopupForJob(fromLocationCode, fromLocationList, jobContent) { openScanPopupForJob(fromLocationCode, fromLocationList, jobContent) {
this.fromLocationCode = fromLocationCode; this.fromLocationCode = fromLocationCode;
this.fromLocationList = fromLocationList; this.fromLocationList = fromLocationList;
this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationTypeArray = getDirectoryItemArray(jobContent.fromLocationTypes); //
this.$refs.popup.open('bottom')
setTimeout(res => {
if (fromLocationCode != '') { if (fromLocationCode != '') {
this.packGetFocus(); this.packGetFocus();
} else { } else {
@ -155,14 +161,10 @@
this.locationGetFocus(); this.locationGetFocus();
} else { } else {
this.fromLocationCode = this.fromLocationList[0]; this.fromLocationCode = this.fromLocationList[0];
this.packGetFocus();
} }
} }
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500) }, 500)
this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationTypeArray = getDirectoryItemArray(jobContent.fromLocationTypes); //
}, },
closeScanPopup(content) { closeScanPopup(content) {

12
src/mycomponents/scan/winScanPackAndPosition.vue

@ -105,23 +105,23 @@
this.showErrorMessage(error) this.showErrorMessage(error)
}) })
} }
setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
setTimeout(res => {
this.getfocus()
}, 500) }, 500)
}, },
initData(){ initData() {
this.positionInfo = "请选择位置"; this.positionInfo = "请选择位置";
this.positionList = []; this.positionList = [];
this.productionLineCode = ''; this.productionLineCode = '';
this.rawLocationCode = ""; this.rawLocationCode = "";
this.fgLocationCode = ""; this.fgLocationCode = "";
this.workshopCode = ""; this.workshopCode = "";
this.workStationCode =""; this.workStationCode = "";
this.workShopName = ""; this.workShopName = "";
this.productionLineName=""; this.productionLineName = "";
this.workStationName=""; this.workStationName = "";
this.show = false; this.show = false;
this.isEditPosition = true this.isEditPosition = true
}, },

7
src/mycomponents/scan/winScanPackJob.vue

@ -71,6 +71,9 @@
// //
openScanPopup(){ openScanPopup(){
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
setTimeout(res=>{
this.packGetFocus()
},500)
}, },
// //
closeScanPopup(content) { closeScanPopup(content) {
@ -83,13 +86,13 @@
this.$emit("getResult", result); this.$emit("getResult", result);
}, },
packGetFocus() { packGetFocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan) {
this.$refs.comscan.getfocus(); this.$refs.comscan.getfocus();
} }
}, },
packLoseFocus() { packLoseFocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan) {
this.$refs.comscan.losefocus(); this.$refs.comscan.losefocus();
} }
}, },

9
src/mycomponents/scan/winScanPackLevel.vue

@ -96,9 +96,10 @@
}) })
}, },
openScanPopup() { openScanPopup() {
setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
}, 200) setTimeout(res => {
this.getfocus();
}, 500)
}, },
closeScanPopup() { closeScanPopup() {
@ -130,13 +131,13 @@
}, },
getfocus() { getfocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan) {
this.$refs.comscan.getfocus(); this.$refs.comscan.getfocus();
} }
}, },
losefocus() { losefocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan) {
this.$refs.comscan.losefocus(); this.$refs.comscan.losefocus();
} }
}, },

18
src/mycomponents/scan/winScanPackage.vue

@ -67,18 +67,19 @@
this.$refs.comscansimulate.clickScanMsg(); this.$refs.comscansimulate.clickScanMsg();
}, },
openScanPopup() { openScanPopup() {
setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
}, 200) setTimeout(res => {
this.getfocus()
}, 500)
}, },
openScanPopupByBusinessType(businessType) { openScanPopupByBusinessType(businessType) {
setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
setTimeout(res => {
this.getfocus()
this.businessType = businessType; this.businessType = businessType;
}, 500)
}, 200)
}, },
@ -223,13 +224,13 @@
}, },
getfocus() { getfocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan) {
this.$refs.comscan.getfocus(); this.$refs.comscan.getfocus();
} }
}, },
losefocus() { losefocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan ) {
this.$refs.comscan.losefocus(); this.$refs.comscan.losefocus();
} }
}, },
@ -240,9 +241,10 @@
this.show = e.show this.show = e.show
}, },
showErrorMessage(message) { showErrorMessage(message) {
this.losefocus()
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
this.getfocus();
} }
}); });
}, },

3
src/pages.json

@ -2297,7 +2297,8 @@
// "fontSize": "58rpx" // "fontSize": "58rpx"
// }] // }]
// }, // },
"softinputMode": "adjustPan" //adjustResize //
"softinputMode": "adjustResize" //adjustResize
}, },
"tabBar": { "tabBar": {
"color": "#000000", "color": "#000000",

4
src/pages/count/job/fuzzyCountDetail.vue

@ -433,10 +433,12 @@
}, },
remove(item, index) { remove(item, index) {
this.scanPopupLoseFocus();
this.showQuestionMessage("是否要移除扫描信息?", res => { this.showQuestionMessage("是否要移除扫描信息?", res => {
if (res) { if (res) {
this.detailSource.splice(index, 1) this.detailSource.splice(index, 1)
} }
this.scanPopupGetFocus();
}); });
}, },
@ -489,6 +491,7 @@
showMessage(message) { showMessage(message) {
this.scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) { if (res) {
this.afterCloseMessage() this.afterCloseMessage()
@ -496,6 +499,7 @@
}); });
}, },
showErrorMessage(message) { showErrorMessage(message) {
this.scanPopupLoseFocus();
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
this.afterCloseMessage() this.afterCloseMessage()

49
src/pages/customerReturn/job/returnDetail.vue

@ -339,17 +339,44 @@
if (!this.checkLocation()) { if (!this.checkLocation()) {
return return
} }
// //
if (this.scanCount == this.subList.length) {
this.checkCount();
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.checkCount();
} else {
//
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
if (res) {
this.openScanPopup();
}
});
}
}
},
checkCount(){
// //
let str = '' let str = ''
this.detailSource.forEach((item) => { this.detailSource.forEach((item) => {
item.subList.forEach(cur => { item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) { if (cur.qty != cur.handleQty) {
str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` var tempHandleQty =0
if(cur.handleQty){
tempHandleQty=cur.handleQty
}else {
tempHandleQty =0
}
str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致`
} }
}) })
}) })
if (str) { if (str) {
str += ',是否确认提交?' str = '任务明细未全部完成,是否提交?\n'+str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) { if (res) {
this.submitJob() this.submitJob()
@ -358,24 +385,6 @@
} else { } else {
this.submitJob() this.submitJob()
} }
// //
// if (this.scanCount == this.subList.length) {
// this.submitJob();
// } else if (this.scanCount < this.subList.length) {
// //
// if (this.jobContent.allowPartialComplete == "TRUE") {
// //
// this.submitJob();
// } else {
// //
// this.$refs.comMessage.showErrorMessage(',\n' + "[" + this.scanCount +
// "][" + this.subList.length + "]", res => {
// if (res) {
// this.openScanPopup();
// }
// });
// }
// }
}, },
submitJob() { submitJob() {

3
src/pages/deliver/coms/comScanDeliverPack.vue

@ -184,8 +184,9 @@
this.initData(); this.initData();
this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode + this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode +
"-" + this.jobContent.subList[0].workStationCode "-" + this.jobContent.subList[0].workStationCode
setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
setTimeout(res => {
this.getfocus();
}, 500) }, 500)
}, },

9
src/pages/fg/receiptByPlan.vue

@ -352,10 +352,10 @@ import { nextTick } from 'vue';
this.allList = [] this.allList = []
this.index = 1 this.index = 1
} }
} else {
throw new Error("未查找到单据信息")
} }
// else {
// throw new Error("")
// }
uni.hideLoading() uni.hideLoading()
if(isAllSubmit){ if(isAllSubmit){
this.clearData() this.clearData()
@ -366,13 +366,10 @@ import { nextTick } from 'vue';
this.dataContent.handleQty = 0; this.dataContent.handleQty = 0;
} }
nextTick(()=>{ nextTick(()=>{
this.showCommitSuccessMessage("提交成功\n生成装配收货记录\n" + list[0].requestNumber, list) this.showCommitSuccessMessage("提交成功\n生成装配收货记录\n" + list[0].requestNumber, list)
}) })
} catch (error) { } catch (error) {
uni.hideLoading() uni.hideLoading()
var hint = error.message ? error.message : error var hint = error.message ? error.message : error

24
src/pages/inventoryMove/coms/comMoveRecord.vue

@ -49,6 +49,10 @@
import comBlankView from '@/mycomponents/common/comBlankView.vue' import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import {
getInventoryStatusName
} from '@/common/directory.js';
import { import {
inventoryMoveRecordSubmit, inventoryMoveRecordSubmit,
getBasicLocationByCode, getBasicLocationByCode,
@ -278,17 +282,27 @@
} else { } else {
newDetail.toInventoryStatus = this.toInventoryStatus; newDetail.toInventoryStatus = this.toInventoryStatus;
} }
if (newDetail.packingNumber == '') {
newDetail.packingNumber = pack.number;
}
newDetail.toLocationCode = this.toLocationCode; newDetail.toLocationCode = this.toLocationCode;
newDetail.fromLocationCode = result.fromLocationCode newDetail.fromLocationCode = result.fromLocationCode
item.subList.push(newDetail); item.subList.push(newDetail);
} else { } else {
this.showErrorMessage(detail.packingNumber + "重复扫描") this.showErrorMessage("包装["+detail.packingNumber+"]\n"+
"批次["+detail.batch+"]\n"+"库位["+detail.fromLocationCode+"]\n"+
"库存状态["+getInventoryStatusName(detail.toInventoryStatus)+"]\n"
+ "重复扫描")
} }
} }
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
}, },
showErrorMessage(message) { showErrorMessage(message) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus()
}
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
@ -341,10 +355,10 @@
this.showErrorMessage("请先选择目标库位") this.showErrorMessage("请先选择目标库位")
return; return;
} }
if(this.fromLocationCode==this.toLocationCode){ // if(this.fromLocationCode==this.toLocationCode){
this.showErrorMessage("来源库位和目标库位不能一致") // this.showErrorMessage("")
return; // return;
} // }
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) { if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
// //

51
src/pages/inventoryMove/job/inventoryMoveDetail.vue

@ -354,17 +354,44 @@
this.showErrorMessage("扫描数为0,请先扫描") this.showErrorMessage("扫描数为0,请先扫描")
return; return;
} }
//
//
if (this.scanCount == this.subList.length) {
this.checkCount();
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.checkCount();
} else {
//
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
if (res) {
this.openScanPopup();
}
});
}
}
},
checkCount(){
// //
let str = '' let str = ''
this.detailSource.forEach((item) => { this.detailSource.forEach((item) => {
item.subList.forEach(cur => { item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) { if (cur.qty != cur.handleQty) {
str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` var tempHandleQty =0
if(cur.handleQty){
tempHandleQty=cur.handleQty
}else {
tempHandleQty =0
}
str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致\n`
} }
}) })
}) })
if (str) { if (str) {
str += ',是否确认提交?' str = '任务明细未全部完成,是否提交?\n'+str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) { if (res) {
this.submitJob() this.submitJob()
@ -373,26 +400,6 @@
} else { } else {
this.submitJob() this.submitJob()
} }
// //
// //
// if (this.scanCount == this.subList.length) {
// this.submitJob();
// } else if (this.scanCount < this.subList.length) {
// //
// if (this.jobContent.allowPartialComplete == "TRUE") {
// //
// this.submitJob();
// } else {
// //
// this.$refs.comMessage.showErrorMessage(',\n' + "[" + this.scanCount +
// "][" + this
// .subList.length + "]", res => {
// if (res) {
// this.openScanPopup();
// }
// });
// }
// }
}, },
submitJob() { submitJob() {

4
src/pages/issue/coms/comIssueJobCard.vue

@ -11,8 +11,8 @@
</view> </view>
</view> </view>
</view> </view>
<view class='split_line'></view> <view class='split_line' v-show="dataContent.acceptUserName"></view>
<jobAccept :dataContent="dataContent"></jobAccept> <jobAccept :dataContent="dataContent" v-show="dataContent.acceptUserName"></jobAccept>
</job-com-main-card> </job-com-main-card>
</template> </template>

17
src/pages/issue/coms/comScanIssuePack.vue

@ -213,8 +213,9 @@
this.initData(); this.initData();
// this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode + // this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode +
// "-" + this.jobContent.subList[0].workStationCode // "-" + this.jobContent.subList[0].workStationCode
setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
setTimeout(res => {
this.getfocus();
}, 500) }, 500)
}, },
@ -315,7 +316,10 @@
"状态 [" + status + "] \n" + "状态 [" + status + "] \n" +
"库区 [" + areaType + "] \n" + "库区 [" + areaType + "] \n" +
"未查找到库存余额" "未查找到库存余额"
this.showErrorMessage(hint) this.showErrorMessage(hint,
res => {
that.getfocus();
})
} else if (res.data.length == 1) { } else if (res.data.length == 1) {
result.balance = res.data[0] result.balance = res.data[0]
@ -332,11 +336,16 @@
uni.hideLoading() uni.hideLoading()
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
this.showErrorMessage(error) this.showErrorMessage(error,
res => {
that.getfocus();
})
}) })
} }
} catch (e) { } catch (e) {
this.showErrorMessage(e.stack) this.showErrorMessage(e.stack,res => {
that.getfocus();
})
uni.hideLoading(); uni.hideLoading();
} }
}, },

6
src/pages/issue/job/issueDetail.vue

@ -481,6 +481,8 @@
'】不一致,是否继续提交', res => { '】不一致,是否继续提交', res => {
if (res) { if (res) {
this.submit(); this.submit();
}else {
this.scanPopupGetFocus()
} }
}); });
} }
@ -489,8 +491,8 @@
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) { if (this.$refs.comScanIssuePack) {
this.$refs.scanPopup.getfocus(); this.$refs.comScanIssuePack.getfocus();
} }
}, },

68
src/pages/issue/job/issueJob.vue

@ -1,7 +1,7 @@
<template> <template>
<view class=""> <view class="">
<com-empty-view v-if="jobList.length==0"></com-empty-view> <com-empty-view v-if="jobList.length==0"></com-empty-view>
<job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="true" :productionline="productionlineList" <job-filter :isShowFromLocationCode="true" :isShowFromAreaCode="true" :isShowToAreaCode="true" :isShowProductionLineCode="true" :productionline="productionlineList"
ref="filter" otherTitle="" ref="filter" otherTitle=""
:checkedToday="checkedToday" :checkedToday="checkedToday"
:checkedWaitTask="checkedWaitTask" :checkedWaitTask="checkedWaitTask"
@ -109,6 +109,8 @@
title: '', title: '',
productionLine: "", productionLine: "",
fromLocation: "", fromLocation: "",
fromAreaCode: '', //
toAreaCode: '', //
filterItemCode: "", filterItemCode: "",
businessTypeCode: "Issue", businessTypeCode: "Issue",
businessType: null, businessType: null,
@ -141,13 +143,13 @@
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return; return;
} }
this.getList('more', this.fromLocation, this.productionLine, this.filterItemCode) this.getList('more', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
}, },
//退 //退
@ -171,11 +173,11 @@
methods: { methods: {
timerRefresh() { timerRefresh() {
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
this.stopRefresh(); this.stopRefresh();
var that = this; var that = this;
this.timer = setInterval(function() { this.timer = setInterval(function() {
that.getList('refresh', that.fromLocation, that.productionLine, that.filterItemCode) that.getList('refresh', that.fromLocation, that.productionLine, that.filterItemCode,this.fromAreaCode,this.toAreaCode)
console.log('发料刷新'); console.log('发料刷新');
}, planRefreshTime) }, planRefreshTime)
}, },
@ -215,7 +217,7 @@
}) })
}, },
getList(type, fromLocation = '', productionLine = '',filterItemCode='') { getList(type, fromLocation = '', productionLine = '',filterItemCode='',fromAreaCode='',toAreaCode='') {
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
title: "加载中­....", title: "加载中­....",
@ -251,6 +253,22 @@
value: fromLocation value: fromLocation
}) })
} }
if(fromAreaCode){
//
filters.push({
column: "fromAreaCode",
action: "==",
value: fromAreaCode
})
}
if(toAreaCode){
//
filters.push({
column: "toAreaCode",
action: "==",
value: toAreaCode
})
}
if (productionLine) { if (productionLine) {
// 线 // 线
filters.push({ filters.push({
@ -358,13 +376,35 @@
}else{ }else{
this.filterItemCode = '' this.filterItemCode = ''
} }
if (params.fromAreaCode) {
//
this.fromAreaCode = params.fromAreaCode
filters.push({
column: "fromAreaCode",
action: "==",
value: params.fromAreaCode
})
}else{
this.fromAreaCode = ''
}
if (params.toAreaCode) {
//
this.toAreaCode = params.toAreaCode
filters.push({
column: "toAreaCode",
action: "==",
value: params.toAreaCode
})
}else{
this.toAreaCode = ''
}
var params = { var params = {
filters: filters, filters: filters,
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 100,
} }
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
// getIssueJobList(params).then(res => { // getIssueJobList(params).then(res => {
// uni.hideLoading(); // uni.hideLoading();
// if (res.data.total == 0) { // if (res.data.total == 0) {
@ -383,12 +423,12 @@
fromLocationCode(fromLocation) { fromLocationCode(fromLocation) {
this.fromLocation = fromLocation; this.fromLocation = fromLocation;
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
}, },
productionLineCode(productionLineCode) { productionLineCode(productionLineCode) {
this.productionLine = productionLineCode this.productionLine = productionLineCode
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
}, },
getByAsnNumber(code) { getByAsnNumber(code) {
let that = this; let that = this;
@ -417,7 +457,7 @@
openJobDetail(item, scanMessage = '') { openJobDetail(item, scanMessage = '') {
this.getJobInfoByNumber(item.number,scanMessage = '') this.getJobInfoByNumber(item.number,scanMessage)
}, },
@ -461,7 +501,7 @@
cancleJob(id) { cancleJob(id) {
cancleTakeIssueJob(id).then(res => { cancleTakeIssueJob(id).then(res => {
if (res.data) { if (res.data) {
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
uni.showToast({ uni.showToast({
title: "放弃任务成功" title: "放弃任务成功"
@ -498,14 +538,14 @@
switchChangeToday(state, creationTime) { switchChangeToday(state, creationTime) {
this.checkedToday = state; this.checkedToday = state;
this.todayTime = creationTime; this.todayTime = creationTime;
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
}, },
switchChangeWait(state, jobStatus) { switchChangeWait(state, jobStatus) {
this.checkedWaitTask = state; this.checkedWaitTask = state;
this.status = jobStatus; this.status = jobStatus;
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
}, },
getJobInfoByNumber(number,scanMessage){ getJobInfoByNumber(number,scanMessage){
let that = this; let that = this;
@ -542,7 +582,7 @@
if (this.$refs.scanPopup) { if (this.$refs.scanPopup) {
this.$refs.scanPopup.getfocus() this.$refs.scanPopup.getfocus()
} }
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
} }
}); });

5
src/pages/issue/request/issueScanRequest.vue

@ -151,6 +151,9 @@
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
}, },
showErrorMessage(message) { showErrorMessage(message) {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.losefocus();
}
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
this.scanPopupGetFocus() this.scanPopupGetFocus()
@ -158,7 +161,7 @@
}); });
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) { if (this.$refs.scanPopup) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
} }
}, },

11
src/pages/login/index.vue

@ -226,14 +226,21 @@
title: "正在登录", title: "正在登录",
mask: true mask: true
}) })
await this.$store.dispatch('Login', logininfo); try{
var result = await this.$store.dispatch('Login', logininfo);
// await this.$store.dispatch('GetTenantIdInfo', this.tenantName) // await this.$store.dispatch('GetTenantIdInfo', this.tenantName)
console.log(result)
uni.hideLoading() uni.hideLoading()
uni.setStorageSync('hasLogin', true) uni.setStorageSync('hasLogin', true)
uni.switchTab({ uni.switchTab({
url: '/pages/index/index' url: '/pages/index/index'
}); });
uni.setStorageSync('username', this.username); uni.setStorageSync('username', this.username);
}catch(e){
uni.hideLoading()
this.showErrorMessage(e)
}
}, },
@ -261,6 +268,8 @@
this.imageSrc = base64.replace(/[\r\n]/g, "") this.imageSrc = base64.replace(/[\r\n]/g, "")
this.uuid = res.data.uuid this.uuid = res.data.uuid
} }
}).catch(error => {
this.showErrorMessage(error);
}) })
}, },
getAppVersion() { getAppVersion() {

4
src/pages/package/coms/comOverPackJobCard.vue

@ -1,8 +1,8 @@
<template> <template>
<job-com-main-card :dataContent="dataContent"> <job-com-main-card :dataContent="dataContent">
<jobComMainDetailCard :dataContent="dataContent"></jobComMainDetailCard> <jobComMainDetailCard :dataContent="dataContent"></jobComMainDetailCard>
<view class='split_line'></view> <view class='split_line' v-show="dataContent.acceptUserName"></view>
<jobAccept :dataContent="dataContent"></jobAccept> <jobAccept :dataContent="dataContent" v-show="dataContent.acceptUserName"></jobAccept>
</job-com-main-card> </job-com-main-card>
</template> </template>

15
src/pages/package/coms/comScanPackagePack.vue

@ -96,6 +96,17 @@ import { getDirectoryItemArray } from '@/common/directory';
} }
}, },
//
openScanPopupForJobSimulate(content, jobcontent, scanMessage) {
this.issueRecord = [];
this.dataContent = content;
this.jobContent = jobcontent;
this.initData();
this.$refs.scanPopup.openScanPopupForJobSimulate(this.fromLocationCode, this.fromLocationList, this.jobContent,
scanMessage);
},
showBalanceSelect(items) { showBalanceSelect(items) {
this.$refs.balanceSelect.openPopup(items); this.$refs.balanceSelect.openPopup(items);
}, },
@ -160,6 +171,7 @@ import { getDirectoryItemArray } from '@/common/directory';
let lot = result.label.batch; let lot = result.label.batch;
let item = that.toLocation.Items.find(r => r.itemCode == itemCode); let item = that.toLocation.Items.find(r => r.itemCode == itemCode);
if (item == undefined) { if (item == undefined) {
this.packLoseFocus()
that.showErrorMessage('未查找到物料【' + itemCode + '】的翻包明细', that.showErrorMessage('未查找到物料【' + itemCode + '】的翻包明细',
res => { res => {
that.packGetFocus(); that.packGetFocus();
@ -341,7 +353,10 @@ import { getDirectoryItemArray } from '@/common/directory';
let record = this.creatRecord(label, balance, packageInfo); let record = this.creatRecord(label, balance, packageInfo);
batch.Records.push(record); batch.Records.push(record);
this.calcBatchHandleQty(batch); this.calcBatchHandleQty(batch);
this.$emit('refresh');
setTimeout(res=>{
this.packGetFocus(); this.packGetFocus();
},100)
}, },
swipeClick(e, item, index) { swipeClick(e, item, index) {

130
src/pages/package/job/overPackageJob.vue

@ -19,6 +19,13 @@
<uni-load-more :status="loadingType" v-if="jobList.length>0" /> <uni-load-more :status="loadingType" v-if="jobList.length>0" />
</view> </view>
<win-scan-button @goScan='openScanPopup' v-if="jobList.length>0"></win-scan-button>
<winComScanBalance ref="scanPopup" @getBalance='getScanResult'
:isCheckLocationBalance="false"
:bussinessCode="businessTypeCode">
</winComScanBalance>
<!-- <winScanPackJob ref="scanPopup" @getResult='getScanResult'></winScanPackJob> -->
<jobList ref="jobList" @selectItem="selectItem"></jobList>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
</template> </template>
@ -32,6 +39,10 @@
goHome, goHome,
updateTitle updateTitle
} from '@/common/basic.js'; } from '@/common/basic.js';
import {
getBusinessType
} from '@/common/record.js';
import { import {
planRefreshTime planRefreshTime
} from '@/common/config.js'; } from '@/common/config.js';
@ -45,6 +56,9 @@
import jobFilter from '@/mycomponents/job/jobFilter.vue' import jobFilter from '@/mycomponents/job/jobFilter.vue'
import comOverPackJobCard from '@/pages/package/coms/comOverPackJobCard.vue' import comOverPackJobCard from '@/pages/package/coms/comOverPackJobCard.vue'
import jobInfoPopup from '@/pages/issue/coms/jobInfoPopup.vue' import jobInfoPopup from '@/pages/issue/coms/jobInfoPopup.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue'
import jobList from '@/mycomponents/jobList/jobList.vue'
export default { export default {
name: 'issue', name: 'issue',
@ -52,7 +66,10 @@
comEmptyView, comEmptyView,
jobFilter, jobFilter,
comOverPackJobCard, comOverPackJobCard,
jobInfoPopup jobInfoPopup,
winComScanBalance,
winScanButton,
jobList
}, },
data() { data() {
return { return {
@ -68,7 +85,11 @@
detailOptions: [], detailOptions: [],
detailGiveupOptions: [], detailGiveupOptions: [],
title:'', title:'',
timer:null businessTypeCode: "OverPackage",
businessType: null,
timer:null,
scanMessage:""
}; };
}, },
@ -125,6 +146,16 @@
}, },
methods: { methods: {
getBusinessTypeFunc() {
getBusinessType(this.businessTypeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.openScanPopup();
} else {
this.showErrorMessage(res.message)
}
});
},
timerRefresh() { timerRefresh() {
this.getList('refresh') this.getList('refresh')
this.stopRefresh(); this.stopRefresh();
@ -225,8 +256,8 @@
}, },
openJobDetail(item) { openJobDetail(item,scanMessage = '') {
this.getJobInfoByNumber(item.number) this.getJobInfoByNumber(item.number,scanMessage)
}, },
showItemList(itemList) { showItemList(itemList) {
@ -327,8 +358,16 @@
} }
}); });
}, },
openScanPopup() {
if (this.businessType == null) {
this.getBusinessTypeFunc()
} else {
this.$refs.scanPopup.openScanPopup(this.businessType);
}
},
getJobInfoByNumber(number){ getJobInfoByNumber(number,scanMessage){
console.log("扫描",scanMessage)
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
title: "加载中....", title: "加载中....",
@ -367,14 +406,93 @@
return; return;
} }
uni.navigateTo({ uni.navigateTo({
url: './overPackageJobDetail?id=' + result.masterId + '&status=' + result.status+'&title='+this.title url: './overPackageJobDetail?id=' + result.masterId + '&status=' + result.status+'&title='+this.title+'&scanMessage=' +
scanMessage
}); });
this.scanMessage=""
} }
}).catch(error => { }).catch(error => {
uni.hideLoading(); uni.hideLoading();
that.showMessage(error); that.showMessage(error);
}) })
}, },
selectItem(item) {
this.$refs.scanPopup.closeScanPopup();
this.openJobDetail(item, this.scanMessage);
},
getScanResult(result) {
let balance = result.balance;
if (balance != null) {
this.scanMessage = ""
if (!result.label.batch) {
this.showMessage("批次为空")
return;
}
if (!result.label.itemCode) {
this.showMessage("物料号为空")
return;
}
try {
var filters = [{
column: "status",
action: "in",
value: '1,2'
},
{
column: "batch",
action: "==",
value: result.label.batch
},
{
column: "itemCode",
action: "==",
value: result.label.itemCode
},
{
column: "fromLocationCode",
action: "==",
value: balance.locationCode
}
]
getOverPageJobList({
filters: filters,
pageNo: 1,
pageSize: 1000,
sort: 'createTime',
by: 'asc'
}).then(res => {
this.scanMessage = result.scanMessage
let resultList = res.data.list;
if (resultList.length > 0) {
resultList.forEach(item => {
item.title = item.number;
item.selected = false
})
let list = []
resultList.forEach(item => {
if (!list.find(subItem => subItem.title == item.title)) {
list.push(item)
}
})
if (list.length > 0) {
this.selectItem(list[0])
}
} else {
this.showMessage("按来源库位[" + balance.locationCode + "]批次[" + result.label.batch +
"]物料号[" + result.label.itemCode + "]未查找到任务\n" + "扫描[" + result
.scanMessage + "]")
}
}).catch(error => {
this.showMessage(error + "\n扫描[" + result.scanMessage + "]")
})
} catch (e) {
this.showMessage(e.message)
}
}
}
} }
} }
</script> </script>

10
src/pages/package/job/overPackageJobDetail.vue

@ -58,7 +58,7 @@
</view> </view>
<win-scan-button @goScan='openScanDetailPopup'></win-scan-button> <win-scan-button @goScan='openScanDetailPopup'></win-scan-button>
<comScanPackagePack ref="comScanPackagePack" @closeScan='closeScan' @updateData='updateData'> <comScanPackagePack ref="comScanPackagePack" @closeScan='closeScan' @updateData='updateData' @refresh="resizeCollapse">
</comScanPackagePack> </comScanPackagePack>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
</view> </view>
@ -128,6 +128,7 @@
detailOptions: [], detailOptions: [],
scanOptions: [], scanOptions: [],
jobStatus: "", jobStatus: "",
scanMessage: ''
// printDeafult: {}, // // printDeafult: {}, //
// templateDeafult: {} // // templateDeafult: {} //
@ -143,6 +144,7 @@
title: option.title + '详情' title: option.title + '详情'
}) })
this.id = option.id; this.id = option.id;
this.scanMessage = option.scanMessage || '';
if (this.id != undefined) { if (this.id != undefined) {
// //
if (option.status == "1") { if (option.status == "1") {
@ -229,6 +231,9 @@
that.jobStatus = res.data.status that.jobStatus = res.data.status
that.subList = res.data.subList; that.subList = res.data.subList;
that.detailSource = getDataSource(that.detailSource, that.subList) that.detailSource = getDataSource(that.detailSource, that.subList)
if (this.scanMessage) {
this.openScanPopupSimulate(this.scanMessage);
}
// this.$nextTick(() => { // this.$nextTick(() => {
// if (uni.getStorageSync('overPackageJobDetailPointParams')) { // if (uni.getStorageSync('overPackageJobDetailPointParams')) {
// const overPackageJobDetailPointParams = uni.getStorageSync( // const overPackageJobDetailPointParams = uni.getStorageSync(
@ -255,6 +260,9 @@
this.showErrorMessage(error) this.showErrorMessage(error)
}) })
}, },
openScanPopupSimulate(scanMessage) {
this.$refs.comScanPackagePack.openScanPopupForJobSimulate(this.detailSource, this.jobContent, scanMessage);
},
closeScan() { closeScan() {
this.resizeCollapse(); this.resizeCollapse();

2
src/pages/package/record/splitPackageRecord.vue

@ -30,7 +30,7 @@
<view class=""> <view class="">
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="$throttle(commit,2000,this)()">提交</button>
</view> </view>
</view> </view>
</view> </view>

63
src/pages/point/index.vue

@ -39,7 +39,7 @@
</view> </view>
<view class="right"> <view class="right">
<view class="image"> <view class="image">
<l-qrcode ref="qrcodeRef" useCanvasToTempFilePath @success="success" :value="item.barcodeString" <l-qrcode ref="qrcodeRef" useCanvasToTempFilePath @success="success($event,item)" :value="item.barcodeString"
size="300rpx"></l-qrcode> size="300rpx"></l-qrcode>
</view> </view>
<view class="left-item"> <view class="left-item">
@ -93,13 +93,25 @@
}, },
methods: { methods: {
success(img) { success(img,item) {
this.picUrl.push(img) item.barcodeBase641 = img
this.picIndex++
if (this.picIndex == this.data.length) {
this.isLoadFinish = true;
uni.hideLoading() uni.hideLoading()
this.isLoadFinish = true
// #ifdef APP
plus.io.resolveLocalFileSystemURL(item.barcodeBase641, (entry) => {
// entrytest.html
entry.file((file) => {
let fileReader = new plus.io.FileReader();
fileReader.onloadend = (evt) => {
console.log("文件路径" + evt.target.result)
item.barcodeBase64 = evt.target.result
} }
fileReader.readAsDataURL(file);
});
}, (e) => {
console.log("失败" + e)
});
// #endif
}, },
setHtmlData() { setHtmlData() {
let str = '' let str = ''
@ -182,11 +194,11 @@
"mainBody", str); // "mainBody", str); //
}); });
}, },
printImage() {
generateBase64(index) { uni.showLoading({
title: "加载中",
// mask: true
if (index == this.picUrl.length) { })
this.setHtmlData() this.setHtmlData()
let clearInt = setInterval(() => { let clearInt = setInterval(() => {
if (!this.newHtmlContent.mainBody) { if (!this.newHtmlContent.mainBody) {
@ -197,35 +209,6 @@
uni.hideLoading() uni.hideLoading()
} }
}, 1000) }, 1000)
} else {
let i = this.picUrl.length - 1 - index
var url = this.picUrl[i]
// #ifdef APP
plus.io.resolveLocalFileSystemURL(url, (entry) => {
// entrytest.html
entry.file((file) => {
let fileReader = new plus.io.FileReader();
fileReader.onloadend = (evt) => {
console.log("文件路径" + evt.target.result)
let i = this.data.length - 1 - index
this.data[i].barcodeBase64 = evt.target.result
this.generateBase64(index + 1)
}
fileReader.readAsDataURL(file);
});
}, (e) => {
console.log("失败" + e)
});
// #endif
}
},
printImage() {
uni.showLoading({
title: "加载中",
mask: true
})
this.generateBase64(0)
}, },
// #ifdef APP // #ifdef APP

4
src/pages/pointPutawayJob/index.vue

@ -26,7 +26,7 @@
<tr> <tr>
<td>供应商</td> <td>供应商</td>
<td>{{item.supplierCode}}</td> <td>{{item.supplierCode}}</td>
<td>批次</td> <td>供应商批次</td>
<td>{{item.supplierBatch}}</td> <td>{{item.supplierBatch}}</td>
</tr> </tr>
<tr> <tr>
@ -218,7 +218,7 @@
<tr> <tr>
<td>供应商</td> <td>供应商</td>
<td>${item.supplierCode}</td> <td>${item.supplierCode}</td>
<td>批次</td> <td>供应商批次</td>
<td>${item.supplierBatch}</td> <td>${item.supplierBatch}</td>
</tr> </tr>
<tr> <tr>

10
src/pages/productDismantle/job/productDismantleDetail.vue

@ -342,12 +342,14 @@
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
this.submitJob(); this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) {
this.submitJob()
}
});
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
"]箱总共[" + this
.subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }

4
src/pages/productPutaway/coms/comProductJobCard.vue

@ -1,8 +1,8 @@
<template> <template>
<job-com-main-card :dataContent="dataContent"> <job-com-main-card :dataContent="dataContent">
<jobComMainDetailCard :dataContent="dataContent"></jobComMainDetailCard> <jobComMainDetailCard :dataContent="dataContent"></jobComMainDetailCard>
<view class='split_line'></view> <view class='split_line' v-show="dataContent.acceptUserName"></view>
<jobAccept :dataContent="dataContent"></jobAccept> <jobAccept :dataContent="dataContent" v-show="dataContent.acceptUserName"></jobAccept>
</job-com-main-card> </job-com-main-card>
</template> </template>

10
src/pages/productPutaway/job/productPutawayDetail.vue

@ -404,12 +404,14 @@
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
this.submitJob(); this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) {
this.submitJob()
}
});
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
"]箱总共[" + this
.subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }

8
src/pages/productPutaway/job/productPutawayJob.vue

@ -213,7 +213,7 @@
}, },
openJobDetail(item, scanMessage = '') { openJobDetail(item, scanMessage = '') {
this.getJobInfoByNumber(item.number,scanMessage = '') this.getJobInfoByNumber(item.number,scanMessage)
}, },
getJobInfoByNumber(number,scanMessage){ getJobInfoByNumber(number,scanMessage){
@ -357,8 +357,14 @@
}, },
showMessage(message) { showMessage(message) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus()
}
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus()
}
} }
}); });

11
src/pages/productPutaway/record/productPutawayRecord.vue

@ -232,7 +232,10 @@
}, },
showErrorMessage(message) { showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {}); this.scanPopupLoseFocus();
this.$refs.comMessage.showErrorMessage(message, res => {
this.scanPopupGetFocus();
});
}, },
calcHandleQty() { calcHandleQty() {
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
@ -275,6 +278,12 @@
} }
}, },
scanPopupLoseFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus();
}
},
scanLocationCode(location, code) { scanLocationCode(location, code) {
this.toLocationCode = code this.toLocationCode = code
this.detailSource.forEach(item => { this.detailSource.forEach(item => {

4
src/pages/productReceipt/coms/comProductJobCard.vue

@ -2,8 +2,8 @@
<job-com-main-card :dataContent="dataContent"> <job-com-main-card :dataContent="dataContent">
<jobComMainDetailCard :dataContent="dataContent"></jobComMainDetailCard> <jobComMainDetailCard :dataContent="dataContent"></jobComMainDetailCard>
<view class='split_line'></view> <view class='split_line' v-show="dataContent.acceptUserName"></view>
<jobAccept :dataContent="dataContent"></jobAccept> <jobAccept :dataContent="dataContent" v-show="dataContent.acceptUserName"></jobAccept>
<!-- <view class="task_item"> <!-- <view class="task_item">
<view class="task_text"> <view class="task_text">
<view class=""> <view class="">

7
src/pages/productReceipt/job/ccProductReceiptJob.vue

@ -322,9 +322,14 @@
}, },
showMessage(message) { showMessage(message) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus()
}
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packGetFocus()
}
} }
}); });
}, },

10
src/pages/productReceipt/job/completeReceiveJobDetail.vue

@ -302,12 +302,14 @@
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
this.submitJob(); this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) {
this.submitJob()
}
});
} else { } else {
// //
this.showMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + "]总共[" + this.subList this.showMessage("任务明细未全部完成,不允许部分提交!");
.length +
"]");
} }
} }

4
src/pages/productReceipt/job/productReceiptDetail.vue

@ -378,8 +378,8 @@
var subItem = item.subList[i] var subItem = item.subList[i]
if (calc.sub(subItem.handleQty, subItem.qty) < 0) { if (calc.sub(subItem.handleQty, subItem.qty) < 0) {
isCheck = false; isCheck = false;
hint = "包装【" + subItem.packingNumber + "】实际收货数量:" + subItem.handleQty + "与包装数量" + subItem.qty + hint = "包装【" + subItem.packingNumber + "】实际收货数量:[" + subItem.handleQty + "]与包装数量[" + subItem.qty +
"不相等,是否继续收货?" "]不相等,是否继续收货?"
break break
} }
} }

9
src/pages/productReceipt/job/productReceiptJob.vue

@ -218,7 +218,7 @@
}, },
openJobDetail(item, scanMessage = '') { openJobDetail(item, scanMessage = '') {
this.getJobInfoByNumber(item.number,scanMessage = '') this.getJobInfoByNumber(item.number,scanMessage)
}, },
showItemList(itemList) { showItemList(itemList) {
@ -312,9 +312,14 @@
}, },
showMessage(message) { showMessage(message) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus()
}
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packGetFocus()
}
} }
}); });
}, },

43
src/pages/productReceipt/job/scrapReceiptDetail.vue

@ -295,17 +295,40 @@
return return
} }
// //
if (this.scanCount == this.subList.length) {
this.checkCount();
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.checkCount();
} else {
//
this.showMessage("任务明细未全部完成,是否提交");
}
}
},
checkCount(){
// //
let str = '' let str = ''
this.detailSource.forEach((item) => { this.detailSource.forEach((item) => {
item.subList.forEach(cur => { item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) { if (cur.qty != cur.handleQty) {
str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` var tempHandleQty =0
if(cur.handleQty){
tempHandleQty=cur.handleQty
}else {
tempHandleQty =0
}
str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致`
} }
}) })
}) })
if (str) { if (str) {
str += ',是否确认提交?' str = '任务明细未全部完成,是否提交?\n'+str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) { if (res) {
this.submitJob() this.submitJob()
@ -314,22 +337,6 @@
} else { } else {
this.submitJob() this.submitJob()
} }
// //
// if (this.scanCount == this.subList.length) {
// this.submitJob();
// } else if (this.scanCount < this.subList.length) {
// //
// if (this.jobContent.allowPartialComplete == "TRUE") {
// //
// this.submitJob();
// } else {
// //
// this.showMessage(',\n' + "[" + this.scanCount + "][" + this.subList
// .length +
// "]");
// }
// }
}, },
submitJob() { submitJob() {

10
src/pages/productReceipt/job/semiProductReceiptDetail.vue

@ -302,12 +302,14 @@
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
this.submitJob(); this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) {
this.submitJob()
}
});
} else { } else {
// //
this.showMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + "]总共[" + this.subList this.showMessage("任务明细未全部完成,不允许部分提交!");
.length +
"]");
} }
} }

56
src/pages/productRecycle/job/productRecycleJobDetail.vue

@ -318,17 +318,45 @@
this.showErrorMessage("扫描数为0,请先扫描") this.showErrorMessage("扫描数为0,请先扫描")
return; return;
} }
// //
// //
if (this.scanCount == this.subList.length) {
this.checkCount();
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.checkCount();
} else {
//
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
if (res) {
this.openScanPopup();
}
});
}
}
},
checkCount(){
// //
let str = '' let str = ''
this.detailSource.forEach((item) => { this.detailSource.forEach((item) => {
item.subList.forEach(cur => { item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) { if (cur.qty != cur.handleQty) {
str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` var tempHandleQty =0
if(cur.handleQty){
tempHandleQty=cur.handleQty
}else {
tempHandleQty =0
}
str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致`
} }
}) })
}) })
if (str) { if (str) {
str += ',是否确认提交?' str = '任务明细未全部完成,是否提交?\n'+str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) { if (res) {
this.submitJob() this.submitJob()
@ -337,26 +365,6 @@
} else { } else {
this.submitJob() this.submitJob()
} }
// //
// //
// if (this.scanCount == this.subList.length) {
// this.submitJob();
// } else if (this.scanCount < this.subList.length) {
// //
// if (this.jobContent.allowPartialComplete == "TRUE") {
// //
// this.submitJob();
// } else {
// //
// this.$refs.comMessage.showErrorMessage(',\n' + "[" + this.scanCount +
// "][" + this
// .subList.length + "]", res => {
// if (res) {
// this.openScanPopup();
// }
// });
// }
// }
}, },
submitJob() { submitJob() {
@ -442,6 +450,7 @@
}, },
showMessage(message) { showMessage(message) {
this.scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) { if (res) {
this.scanPopupGetFocus() this.scanPopupGetFocus()
@ -450,6 +459,7 @@
}, },
showErrorMessage(message) { showErrorMessage(message) {
this.scanPopupLoseFocus();
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
this.scanPopupGetFocus() this.scanPopupGetFocus()
@ -463,6 +473,8 @@
this.$refs.comMessage.showQuestionMessage(message, res => { this.$refs.comMessage.showQuestionMessage(message, res => {
if (res) { if (res) {
callback(res); callback(res);
}else {
this.scanPopupGetFocus()
} }
}); });
}) })

61
src/pages/productionReceipt/job/productionReceiptDetail.vue

@ -213,6 +213,33 @@
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
this.continueScan() this.continueScan()
this.$forceUpdate(); this.$forceUpdate();
},
autoCommit(){
//
var noCommitInfo=null
for (var i = 0; i < this.detailSource.length; i++) {
var sub =this.detailSource[i].subList
for(var j=0;j<sub.length;j++){
var item =sub[j]
if(item.qty!=item.handleQty){
noCommitInfo=item;
break;
}
}
}
//
if(noCommitInfo){
var handQty =noCommitInfo.handleQty?noCommitInfo.handleQty:0
this.showQuestionMessage("扫描数量["+handQty+"]任务数量["+noCommitInfo.qty+"]不一致,是否提交?",res=>{
if(res){
this.commit()
}
})
}else {
//
this.commit()
}
}, },
// //
@ -332,6 +359,7 @@
itemDetail.balance.packQty = Number(result.package.packQty) itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.packUnit = result.package.packUnit itemDetail.balance.packUnit = result.package.packUnit
this.calcHandleQty(); this.calcHandleQty();
this.autoCommit();
} else { } else {
this.scanPopupGetFocus(); this.scanPopupGetFocus();
} }
@ -354,6 +382,7 @@
itemDetail.balance.packQty = Number(result.package.packQty) itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.packUnit = result.package.packUnit itemDetail.balance.packUnit = result.package.packUnit
this.calcHandleQty(); this.calcHandleQty();
this.autoCommit();
} }
} }
} }
@ -381,12 +410,14 @@
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
this.submitJob(); this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) {
this.submitJob()
}
});
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
"]箱总共[" + this
.subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }
@ -422,17 +453,17 @@
}); });
var params = this.setParams() var params = this.setParams()
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
productionReceiptJobSubmit(params).then(res => { // productionReceiptJobSubmit(params).then(res => {
uni.hideLoading() // uni.hideLoading()
if (res.data) { // if (res.data) {
this.showCommitSuccessMessage("提交成功\n生成发料接收记录\n" + res.data) // this.showCommitSuccessMessage("\n\n" + res.data)
} else { // } else {
this.showErrorMessage("提交失败[" + res.msg + "]") // this.showErrorMessage("[" + res.msg + "]")
} // }
}).catch(error => { // }).catch(error => {
uni.hideLoading() // uni.hideLoading()
this.showErrorMessage(error) // this.showErrorMessage(error)
}) // })
// var itemCodes = [] // var itemCodes = []

80
src/pages/productionReceipt/job/productionReceiptJob.vue

@ -4,7 +4,10 @@
<job-filter ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday" <job-filter ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday"
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" @switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday"
:checkedWaitTask="checkedWaitTask" :isShowProductionLineCode="true" @productionLineCode="productionLineCode" :checkedWaitTask="checkedWaitTask" :isShowProductionLineCode="true" @productionLineCode="productionLineCode"
:productionline="productionLineList"> :productionline="productionLineList"
:isShowItemCode="true"
:isShowQurery='true'
@onQuery="getListByFilter">
</job-filter> </job-filter>
<view v-if="jobList.length>0"> <view v-if="jobList.length>0">
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
@ -84,7 +87,8 @@
title: '', title: '',
scanMessage: "", scanMessage: "",
productionLineList: [], productionLineList: [],
productionLine: "" productionLine: "",
filterItemCode:""
}; };
}, },
onLoad(option) { onLoad(option) {
@ -93,7 +97,7 @@
}, },
onShow() { onShow() {
this.getList('refresh', this.productionLine); this.getList('refresh', this.productionLine,this.filterItemCode)
}, },
onReady() { onReady() {
@ -106,11 +110,11 @@
if (this.loadingType == 'loading' || this.loadingType == 'nomore') { if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return; return;
} }
this.getList("more", this.productionLine); this.getList('more', this.productionLine,this.filterItemCode)
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.getList('refresh', this.productionLine); this.getList('refresh', this.productionLine,this.filterItemCode)
}, },
//退 //退
@ -135,7 +139,7 @@
methods: { methods: {
productionLineCode(productionLineCode) { productionLineCode(productionLineCode) {
this.productionLine = productionLineCode this.productionLine = productionLineCode
this.getList('refresh', this.productionLine) this.getList('refresh', this.productionLine,this.filterItemCode)
}, },
getProductionReceiptJobByProductionline() { getProductionReceiptJobByProductionline() {
getProductionReceiptJobByProductionline().then(res => { getProductionReceiptJobByProductionline().then(res => {
@ -153,7 +157,7 @@
} }
}) })
}, },
getList(type, productionLine = '') { getList(type, productionLine = '',filterItemCode="") {
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
title: "加载中­....", title: "加载中­....",
@ -195,6 +199,15 @@
}) })
} }
if(filterItemCode){
//
filters.push({
column: "itemCode",
action: "like",
value: filterItemCode
})
}
var params = { var params = {
filters: filters, filters: filters,
pageNo: this.pageNo, pageNo: this.pageNo,
@ -266,7 +279,7 @@
cancleJob(id) { cancleJob(id) {
cancleTakeProductionReceiptJob(id).then(res => { cancleTakeProductionReceiptJob(id).then(res => {
if (res.data) { if (res.data) {
this.getList("refresh", this.productionLine) this.getList('refresh', this.productionLine,this.filterItemCode)
uni.showToast({ uni.showToast({
title: "放弃任务成功" title: "放弃任务成功"
}) })
@ -281,13 +294,13 @@
switchChangeToday(state, creationTime) { switchChangeToday(state, creationTime) {
this.checkedToday = state; this.checkedToday = state;
this.todayTime = creationTime; this.todayTime = creationTime;
this.getList("refresh", this.productionLine); this.getList('refresh', this.productionLine,this.filterItemCode)
}, },
switchChangeWait(state, jobStatus) { switchChangeWait(state, jobStatus) {
this.checkedWaitTask = state; this.checkedWaitTask = state;
this.status = jobStatus; this.status = jobStatus;
this.getList("refresh"), this.productionLine; this.getList('refresh', this.productionLine,this.filterItemCode)
}, },
getScanNumber(code) { getScanNumber(code) {
this.getDataListByType(code) this.getDataListByType(code)
@ -334,9 +347,14 @@
}, },
showMessage(message) { showMessage(message) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus()
}
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packGetFocus()
}
} }
}); });
}, },
@ -355,6 +373,11 @@
action: "in", action: "in",
value: result.package.number + "," + result.package.parentNumber value: result.package.number + "," + result.package.parentNumber
}, },
{
column: "status",
action: "in",
value: '1,2'
},
{ {
column: "batch", column: "batch",
action: "==", action: "==",
@ -405,6 +428,41 @@
this.showMessage(e.message) this.showMessage(e.message)
} }
}, },
getListByFilter(params) {
console.log('getListByFilter',params)
let that = this;
var filters = []
if (this.checkedToday) {
filters.push({
column: "create_time",
action: "betweeen",
value: this.todayTime
})
}
filters.push({
column: "status",
action: "in",
value: this.status
})
if (params.productionLineCode) {
// 线
this.productionLine = params.productionLineCode
}else{
this.productionLine = ''
}
if (params.itemCode) {
//
this.filterItemCode = params.itemCode
}else{
this.filterItemCode = ''
}
this.getList('refresh', this.productionLine, this.filterItemCode)
},
} }
} }
</script> </script>

5
src/pages/productionReturn/coms/comScanReturnPack.vue

@ -159,8 +159,6 @@
this.scanOptions = getDetailEditRemoveOption(); this.scanOptions = getDetailEditRemoveOption();
}, },
methods: { methods: {
openScanPopup(content, jobcontent) { openScanPopup(content, jobcontent) {
this.issueRecord = []; this.issueRecord = [];
this.dataContent = content; this.dataContent = content;
@ -168,8 +166,9 @@
this.initData(); this.initData();
// this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode + // this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode +
// "-" + this.jobContent.subList[0].workStationCode // "-" + this.jobContent.subList[0].workStationCode
setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
setTimeout(res => {
that.getfocus();
}, 500) }, 500)
}, },

10
src/pages/productionReturn/job/returnDetail.vue

@ -349,12 +349,14 @@
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
this.submitJob(); this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) {
this.submitJob()
}
});
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
"]箱总共[" + this
.subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }

16
src/pages/purchaseReceipt/job/receiptDetail.vue

@ -373,7 +373,7 @@
}) })
if (itemDetail.scaned && scanedLength == itemDetail if (itemDetail.scaned && scanedLength == itemDetail
.packList.length) { .packList.length) {
isExit.scanDate = new Date(); itemDetail.scanDate = new Date();
this.showMessage("箱码【" + packingNumber + "】已经扫描") this.showMessage("箱码【" + packingNumber + "】已经扫描")
} else { } else {
itemDetail.scaned = true; itemDetail.scaned = true;
@ -454,16 +454,14 @@
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
this.$refs.comMessage.showQuestionMessage('还有未扫描的物料,是否继续提交?', res => { this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) { if (res) {
this.submitJob(); this.submitJob()
} }
}); });
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
"]箱总共[" + this
.subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }
@ -712,6 +710,9 @@
showMessage(message) { showMessage(message) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.losefocus();
}
setTimeout(r => { setTimeout(r => {
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) { if (res) {
@ -722,6 +723,9 @@
}, },
showErrorMessage(message) { showErrorMessage(message) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.losefocus();
}
setTimeout(r => { setTimeout(r => {
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {

34
src/pages/purchaseReceipt/job/receiptJob.vue

@ -20,7 +20,7 @@
<receipt-job-list-popup ref="jobListPopup" @selectedItem="selectedItem"></receipt-job-list-popup> <receipt-job-list-popup ref="jobListPopup" @selectedItem="selectedItem"></receipt-job-list-popup>
</view> </view>
<win-scan-button @goScan='openScanPopup' v-if="jobList.length>0"></win-scan-button> <win-scan-button @goScan='openScanPopup' v-if="jobList.length>0"></win-scan-button>
<winScanPackJob title="箱标签/ASN单号" ref="scanPopup" @getResult='getScanResult' > <winScanPackJob title="箱标签/ASN单号" ref="scanPopup" @getResult='getScanResult'>
</winScanPackJob> </winScanPackJob>
<jobList ref="jobList" @selectItem="selectItem"></jobList> <jobList ref="jobList" @selectItem="selectItem"></jobList>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
@ -78,7 +78,7 @@
status: '1,2', // status: '1,2', //
detailOptions: [], detailOptions: [],
detailGiveupOptions: [], detailGiveupOptions: [],
scanMessage:"" scanMessage: ""
}; };
}, },
@ -205,7 +205,7 @@
var list = res.data.list; var list = res.data.list;
this.totalCount = res.data.total this.totalCount = res.data.total
updateTitle(this.title+"(" + this.totalCount + ")"); updateTitle(this.title + "(" + this.totalCount + ")");
this.loadingType = "loadmore"; this.loadingType = "loadmore";
if (list == null || list.length == 0) { if (list == null || list.length == 0) {
this.loadingType = "nomore"; this.loadingType = "nomore";
@ -292,7 +292,7 @@
url: './receiptDetail?id=' + item.masterId + '&status=' + item.status + '&operation=' + this url: './receiptDetail?id=' + item.masterId + '&status=' + item.status + '&operation=' + this
.operation + '&scanMessage=' + scanMessage .operation + '&scanMessage=' + scanMessage
}); });
this.scanMessage="" this.scanMessage = ""
}, },
showItemList(itemList) { showItemList(itemList) {
@ -350,10 +350,12 @@
}, },
showMessage(message) { showMessage(message) {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.packLoseFocus()
}
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
if (this.$refs.scanPopup) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packGetFocus() this.$refs.scanPopup.packGetFocus()
} }
} }
@ -363,12 +365,12 @@
openScanPopup() { openScanPopup() {
this.$refs.scanPopup.openScanPopup(); this.$refs.scanPopup.openScanPopup();
}, },
selectItem(item,isScanedASN=false) { selectItem(item, isScanedASN = false) {
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
if(isScanedASN){ if (isScanedASN) {
this.openJobDetail(item) this.openJobDetail(item)
}else{ } else {
this.openJobDetail(item, this.scanMessage); this.openJobDetail(item, this.scanMessage);
} }
@ -376,7 +378,7 @@
getScanResult(result) { getScanResult(result) {
try { try {
this.scanMessage="" this.scanMessage = ""
let filters = [] let filters = []
if (result.label.barType == "BarCode") { if (result.label.barType == "BarCode") {
// ASN // ASN
@ -384,7 +386,7 @@
column: "asn_number", column: "asn_number",
action: "==", action: "==",
value: result.label.code value: result.label.code
},{ }, {
column: "status", column: "status",
action: "in", action: "in",
value: '1,2', value: '1,2',
@ -432,7 +434,7 @@
pageNo: 1, pageNo: 1,
pageSize: 100, pageSize: 100,
}).then(res => { }).then(res => {
this.scanMessage =result.scanMessage this.scanMessage = result.scanMessage
let resultList = res.data.list; let resultList = res.data.list;
if (resultList.length > 0) { if (resultList.length > 0) {
resultList.forEach(item => { resultList.forEach(item => {
@ -448,15 +450,15 @@
console.log('list', list) console.log('list', list)
if (list.length > 1) { if (list.length > 1) {
this.$refs.jobList.openList(list,result.scanMessage.indexOf('ASN')>-1) this.$refs.jobList.openList(list, result.scanMessage.indexOf('ASN') > -1)
} else { } else {
this.selectItem(list[0],result.scanMessage.indexOf('ASN')>-1) this.selectItem(list[0], result.scanMessage.indexOf('ASN') > -1)
} }
} else { } else {
this.showMessage("未查找到任务\n"+"扫描["+result.scanMessage+"]") this.showMessage("未查找到任务\n" + "扫描[" + result.scanMessage + "]")
} }
}).catch(error => { }).catch(error => {
this.showMessage(error+"\n扫描["+result.scanMessage+"]") this.showMessage(error + "\n扫描[" + result.scanMessage + "]")
}) })
} catch (e) { } catch (e) {

60
src/pages/purchaseReturn/job/returnDetail.vue

@ -350,17 +350,45 @@
this.showErrorMessage("扫描数为0,请先扫描") this.showErrorMessage("扫描数为0,请先扫描")
return; return;
} }
//
//
if (this.scanCount == this.subList.length) {
this.checkCount();
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.checkCount();
} else {
//
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
if (res) {
this.openScanPopup();
}
});
}
}
},
checkCount(){
// //
let str = '' let str = ''
this.detailSource.forEach((item) => { this.detailSource.forEach((item) => {
item.subList.forEach(cur => { item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) { if (cur.qty != cur.handleQty) {
str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` var tempHandleQty =0
if(cur.handleQty){
tempHandleQty=cur.handleQty
}else {
tempHandleQty =0
}
str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致`
} }
}) })
}) })
if (str) { if (str) {
str += ',是否确认提交?' str = '任务明细未全部完成,是否提交?\n'+str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) { if (res) {
this.submitJob() this.submitJob()
@ -369,26 +397,6 @@
} else { } else {
this.submitJob() this.submitJob()
} }
//
//
// if (this.scanCount == this.subList.length) {
// this.submitJob();
// } else if (this.scanCount < this.subList.length) {
// //
// if (this.jobContent.allowPartialComplete == "TRUE") {
// //
// this.submitJob();
// } else {
// //
// this.$refs.comMessage.showErrorMessage(',\n' + "[" + this.scanCount +
// "][" + this
// .subList.length + "]", res => {
// if (res) {
// this.openScanPopup();
// }
// });
// }
// }
}, },
submitJob() { submitJob() {
@ -458,15 +466,21 @@
}, },
closeScanPopup() { closeScanPopup() {
if(this.$refs.scanPopup){
this.$refs.scanPopup.closeScanPopup(); this.$refs.scanPopup.closeScanPopup();
}
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packGetFocus(); this.$refs.scanPopup.packGetFocus();
}
}, },
scanPopupLoseFocus() { scanPopupLoseFocus() {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus(); this.$refs.scanPopup.packLoseFocus();
}
}, },
openDetail(item) { openDetail(item) {
@ -474,6 +488,7 @@
}, },
showMessage(message) { showMessage(message) {
this.scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => { this.$refs.comMessage.showMessage(message, res => {
if (res) { if (res) {
this.scanPopupGetFocus() this.scanPopupGetFocus()
@ -482,6 +497,7 @@
}, },
showErrorMessage(message) { showErrorMessage(message) {
this.scanPopupLoseFocus();
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
this.scanPopupGetFocus() this.scanPopupGetFocus()

1
src/pages/purchaseReturn/record/returnRecord.vue

@ -211,6 +211,7 @@
} }
} }
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
this.scanPopupGetFocus()
}, },
updateData() { updateData() {

15
src/pages/putaway/job/putawayDetail.vue

@ -1,14 +1,14 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class="page-header"> <view class="page-header">
<veiw class="header-view"> <view class="header-view">
<view class="header_job_top"> <view class="header_job_top">
<job-top :dataContent="jobContent"></job-top> <job-top :dataContent="jobContent"></job-top>
</view> </view>
<view class="header_item"> <view class="header_item">
申请单号 : {{jobContent.requestNumber}} 申请单号 : {{jobContent.requestNumber}}
</view> </view>
</veiw> </view>
</view> </view>
<view class="page-main"> <view class="page-main">
@ -364,6 +364,7 @@
} }
} }
calcTreeHandleQty(this.detailSource); calcTreeHandleQty(this.detailSource);
this.continueScan()
this.$forceUpdate() this.$forceUpdate()
} else { } else {
var scanedLength = 0; var scanedLength = 0;
@ -451,12 +452,14 @@
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
this.submitJob(); this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) {
this.submitJob()
}
});
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
"]箱总共[" + this
.subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }

7
src/pages/putaway/job/putawayJob.vue

@ -308,9 +308,14 @@
showMessage(message) { showMessage(message) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus()
}
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packGetFocus()
}
} }
}); });
}, },

6
src/pages/query/pack.vue

@ -119,6 +119,7 @@
return; return;
} }
this.packingNumber =result.label.packingNumber ; this.packingNumber =result.label.packingNumber ;
this.closeScanPopup();
this.tabChange(0) this.tabChange(0)
}, },
getItemInfo(code) { getItemInfo(code) {
@ -402,6 +403,9 @@
}, },
showMessage(message) { showMessage(message) {
if (this.$refs.scanPopup ) {
this.$refs.scanPopup.losefocus();
}
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
this.afterCloseMessage() this.afterCloseMessage()
@ -409,7 +413,7 @@
}); });
}, },
afterCloseMessage() { afterCloseMessage() {
if (this.$refs.scanPopup != undefined) { if (this.$refs.scanPopup ) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
} }
}, },

4
src/pages/repleinsh/coms/comRepleinshJobCard.vue

@ -1,8 +1,8 @@
<template> <template>
<job-com-main-card :dataContent="dataContent"> <job-com-main-card :dataContent="dataContent">
<jobComMainDetailCard :dataContent="dataContent"></jobComMainDetailCard> <jobComMainDetailCard :dataContent="dataContent"></jobComMainDetailCard>
<view class='split_line'></view> <view class='split_line' v-show="dataContent.acceptUserName"></view>
<jobAccept :dataContent="dataContent"></jobAccept> <jobAccept :dataContent="dataContent" v-show="dataContent.acceptUserName"></jobAccept>
</job-com-main-card> </job-com-main-card>
</template> </template>

38
src/pages/repleinsh/coms/comScanReplishPack.vue

@ -161,8 +161,9 @@
this.dataContent = content; this.dataContent = content;
this.jobContent = jobcontent; this.jobContent = jobcontent;
this.initData(); this.initData();
setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
setTimeout(res => {
this.getfocus();
}, 500) }, 500)
}, },
@ -230,7 +231,9 @@
let location = this.fromLocationList.find(r => r == fromlocation) let location = this.fromLocationList.find(r => r == fromlocation)
if (location == undefined) { if (location == undefined) {
this.fromLocationCode = '' this.fromLocationCode = ''
this.showErrorMessage('发料库位【' + fromlocation + '】不存在') this.showErrorMessage('发料库位【' + fromlocation + '】不存在',res=>{
this.getfocus();
})
} }
}, },
@ -246,7 +249,10 @@
if (this.toLocation && result.package.packUnit) { if (this.toLocation && result.package.packUnit) {
let item = this.toLocation.Items.find(r => r.itemCode == result.package.itemCode); let item = this.toLocation.Items.find(r => r.itemCode == result.package.itemCode);
if (!item) { if (!item) {
this.showErrorMessage('扫描物料代码不属于该任务'); this.showErrorMessage('扫描物料代码不属于该任务',
res => {
this.getfocus();
});
return return
} }
if (result.package.packUnit !== item.packUnit) { if (result.package.packUnit !== item.packUnit) {
@ -310,14 +316,20 @@
getBalanceByFilter(params).then(res => { getBalanceByFilter(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data.list.length > 0) { if (res.data.list.length > 0) {
this.showErrorMessage("包装在库位【" + res.data.list[0].locationCode + "】已有库存余额"); this.showErrorMessage("包装在库位【" + res.data.list[0].locationCode + "】已有库存余额",
res => {
this.getfocus();
});
} else { } else {
this.queryBalance(result); this.queryBalance(result);
} }
// callback(res.data) // callback(res.data)
}).catch(err => { }).catch(err => {
uni.hideLoading() uni.hideLoading()
this.showErrorMessage(err.message); this.showErrorMessage(err.message,
res => {
this.getfocus();
});
}) })
}, },
@ -368,7 +380,10 @@
"状态 [" + status + "] \n" + "状态 [" + status + "] \n" +
"库区 [" + areaType + "] \n" + "库区 [" + areaType + "] \n" +
"未查找到库存余额" "未查找到库存余额"
this.showErrorMessage(hint) this.showErrorMessage(hint,
res => {
this.getfocus();
})
} else if (res.data.length == 1) { } else if (res.data.length == 1) {
result.balance = res.data[0] result.balance = res.data[0]
@ -385,12 +400,19 @@
uni.hideLoading() uni.hideLoading()
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
this.showErrorMessage(error) this.showErrorMessage(error,
res => {
this.getfocus();
})
}) })
} }
} catch (e) { } catch (e) {
this.showErrorMessage(e.stack)
uni.hideLoading(); uni.hideLoading();
this.showErrorMessage(e.stack,
res => {
this.getfocus();
})
} }
}, },

6
src/pages/repleinsh/job/repleinshJob.vue

@ -125,7 +125,9 @@
onHide() { onHide() {
this.stopRefresh(); this.stopRefresh();
}, },
onUnload(){
this.stopRefresh();
},
onReady() { onReady() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption(); this.detailGiveupOptions = getDetailGiveupOption();
@ -348,7 +350,7 @@
}, },
openJobDetail(item, scanMessage = '') { openJobDetail(item, scanMessage = '') {
this.getJobInfoByNumber(item.number,scanMessage = '') this.getJobInfoByNumber(item.number,scanMessage )
}, },

56
src/pages/scrap/job/scrapJobDetail.vue

@ -214,7 +214,8 @@
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) { if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
if (this.jobContent.allowModifyInventoryStatus == "TRUE") { if (this.jobContent.allowModifyInventoryStatus == "TRUE") {
this.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + this.scanPopupLoseFocus();
this.$refs.comMessage.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus + itemStatus +
']不一致,是否继续出库?', res => { ']不一致,是否继续出库?', res => {
if (res) { if (res) {
@ -231,7 +232,8 @@
} }
}); });
} else { } else {
this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' + this.scanPopupLoseFocus();
this.$refs.comMessage.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus + itemStatus +
']不一致,不允许转移!', res => { ']不一致,不允许转移!', res => {
this.scanPopupGetFocus(); this.scanPopupGetFocus();
@ -286,17 +288,44 @@
this.showErrorMessage("扫描数为0,请先扫描") this.showErrorMessage("扫描数为0,请先扫描")
return; return;
} }
// //
if (this.scanCount == this.subList.length) {
this.checkCount();
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.checkCount();
} else {
//
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
if (res) {
this.openScanPopup();
}
});
}
}
},
checkCount(){
// //
let str = '' let str = ''
this.detailSource.forEach((item) => { this.detailSource.forEach((item) => {
item.subList.forEach(cur => { item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) { if (cur.qty != cur.handleQty) {
str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` var tempHandleQty =0
if(cur.handleQty){
tempHandleQty=cur.handleQty
}else {
tempHandleQty =0
}
str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致`
} }
}) })
}) })
if (str) { if (str) {
str += ',是否确认提交?' str = '任务明细未全部完成,是否提交?\n'+str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) { if (res) {
this.submitJob() this.submitJob()
@ -305,25 +334,6 @@
} else { } else {
this.submitJob() this.submitJob()
} }
// //
// if (this.scanCount == this.subList.length) {
// this.submitJob();
// } else if (this.scanCount < this.subList.length) {
// //
// if (this.jobContent.allowPartialComplete == "TRUE") {
// //
// this.submitJob();
// } else {
// //
// this.$refs.comMessage.showErrorMessage(',\n' + "[" + this.scanCount +
// "][" + this
// .subList.length + "]", res => {
// if (res) {
// this.openScanPopup();
// }
// });
// }
// }
}, },
submitJob() { submitJob() {

15
src/pages/scrap/request/scrapRequestCreate.vue

@ -159,6 +159,7 @@
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfo(balance, pack); //
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
this.scanPopupGetFocus()
} else { } else {
var detail = item.subList.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber && if (r.packingNumber == balance.packingNumber &&
@ -171,6 +172,7 @@
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
item.subList.push(newDetail); item.subList.push(newDetail);
this.scanPopupGetFocus()
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]重复扫描") this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]重复扫描")
@ -185,7 +187,7 @@
showErrorMessage(message) { showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
this.scanPopupGetFocus()
} }
}); });
}, },
@ -231,8 +233,8 @@
}, },
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) { if (this.$refs.scanPopup) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.packGetFocus();
} }
}, },
@ -292,13 +294,6 @@
if (res) {} if (res) {}
}); });
}, },
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
showScanMessage(message) { showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message); this.$refs.comMessage.showScanMessage(message);

8
src/pages/stockUp/coms/comScanStockUpPack.vue

@ -182,8 +182,9 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
this.initData(); this.initData();
this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode + this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode +
"-" + this.jobContent.subList[0].workStationCode "-" + this.jobContent.subList[0].workStationCode
setTimeout(res => {
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
setTimeout(res => {
this.getfocus()
}, 500) }, 500)
}, },
@ -420,17 +421,16 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
batch.Records.push(record); batch.Records.push(record);
this.issueRecord.unshift(record) this.issueRecord.unshift(record)
this.calcBatchHandleQty(batch); this.calcBatchHandleQty(batch);
this.getfocus();
}, },
getfocus() { getfocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan ) {
this.$refs.comscan.getfocus(); this.$refs.comscan.getfocus();
} }
}, },
losefocus() { losefocus() {
if (this.$refs.comscan != undefined) { if (this.$refs.comscan) {
this.$refs.comscan.losefocus(); this.$refs.comscan.losefocus();
} }
}, },

10
src/pages/transfer/job/issueDetail.vue

@ -333,12 +333,14 @@
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
this.submitJob(); this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) {
this.submitJob()
}
});
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
"]箱总共[" + this
.subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }

11
src/pages/transfer/job/receiptDetail.vue

@ -358,13 +358,14 @@
} else if (this.scanCount < this.subList.length) { } else if (this.scanCount < this.subList.length) {
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
this.submitJob(); if (res) {
this.submitJob()
}
});
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
"]箱总共[" + this
.subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }

10
src/pages/transfer/job/transferDetail.vue

@ -368,13 +368,15 @@
async commit() { async commit() {
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
this.submitJob(); this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) {
this.submitJob()
}
});
} else { } else {
this.scanCount = this.getScanCount(); this.scanCount = this.getScanCount();
if (this.scanCount < this.subList.length) { if (this.scanCount < this.subList.length) {
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
"]箱总共[" + this
.subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }

50
src/pages/unPlanned/job/issueJobDetail.vue

@ -280,17 +280,44 @@
this.showErrorMessage("扫描数为0,请先扫描") this.showErrorMessage("扫描数为0,请先扫描")
return; return;
} }
// //
if (this.scanCount == this.subList.length) {
this.checkCount();
} else if (this.scanCount < this.subList.length) {
//
if (this.jobContent.allowPartialComplete == "TRUE") {
//
this.checkCount();
} else {
//
this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
if (res) {
this.openScanPopup();
}
});
}
}
},
checkCount(){
// //
let str = '' let str = ''
this.detailSource.forEach((item) => { this.detailSource.forEach((item) => {
item.subList.forEach(cur => { item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) { if (cur.qty != cur.handleQty) {
str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致` var tempHandleQty =0
if(cur.handleQty){
tempHandleQty=cur.handleQty
}else {
tempHandleQty =0
}
str += `包装号【${cur.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${cur.qty}】不一致`
} }
}) })
}) })
if (str) { if (str) {
str += ',是否确认提交?' str = '任务明细未全部完成,是否提交?\n'+str
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) { if (res) {
this.submitJob() this.submitJob()
@ -299,25 +326,6 @@
} else { } else {
this.submitJob() this.submitJob()
} }
// //
// if (this.scanCount == this.subList.length) {
// this.submitJob();
// } else if (this.scanCount < this.subList.length) {
// //
// if (this.jobContent.allowPartialComplete == "TRUE") {
// //
// this.submitJob();
// } else {
// //
// this.$refs.comMessage.showErrorMessage(',\n' + "[" + this.scanCount +
// "][" + this
// .subList.length + "]", res => {
// if (res) {
// this.openScanPopup();
// }
// });
// }
// }
}, },

10
src/pages/unPlanned/job/receiptJobDetail.vue

@ -261,12 +261,14 @@
// //
if (this.jobContent.allowPartialComplete == "TRUE") { if (this.jobContent.allowPartialComplete == "TRUE") {
// //
this.submitJob(); this.$refs.comMessage.showQuestionMessage1("任务明细未全部完成,是否提交?", 'red', res => {
if (res) {
this.submitJob()
}
});
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage("任务明细未全部完成,不允许部分提交!", res => {
"]箱总共[" + this
.subList.length + "]箱", res => {
if (res) { if (res) {
this.openScanPopup(); this.openScanPopup();
} }

20
src/pages/unPlanned/record/issueRecord.vue

@ -154,12 +154,13 @@
// newDetail.inventoryStatus ="OK"; // newDetail.inventoryStatus ="OK";
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
this.packGetFocus()
} else { } else {
var detail = item.subList.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == result.packingNumber && if (r.packingNumber == balance.packingNumber &&
r.batch == result.batch && r.batch == balance.batch &&
r.locationCode == result.locationCode && r.locationCode == balance.locationCode &&
r.inventoryStatus == result.inventoryStatus && r.inventoryStatus == balance.inventoryStatus &&
r.scaned == true) { r.scaned == true) {
return r; return r;
} }
@ -168,14 +169,21 @@
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
item.subList.push(newDetail); item.subList.push(newDetail);
this.packGetFocus()
} else { } else {
this.showErrorMessage(result.packingNumber + "重复扫描") this.showErrorMessage("箱码[" + balance.packingNumber + "]批次[" + balance.batch + "]已经扫描")
} }
} }
this.calcHandleQty(); this.calcHandleQty();
}, },
packGetFocus(){
if(this.$refs.scanPopup){
this.$refs.scanPopup.packGetFocus()
}
},
calcHandleQty() { calcHandleQty() {
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
this.$forceUpdate(); this.$forceUpdate();
@ -184,7 +192,7 @@
showErrorMessage(message) { showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
this.packGetFocus()
} }
}); });
}, },

17
src/pages/unPlanned/record/receiptRecord.vue

@ -144,10 +144,12 @@
let newDetail = this.createDetailInfo(label, pack); let newDetail = this.createDetailInfo(label, pack);
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
this.getfocus()
} else { } else {
var detail = item.subList.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == result.number && if (r.packingNumber == pack.number &&
r.batch == result.batch) { r.batch == pack.batch) {
return r; return r;
} }
}) })
@ -155,9 +157,10 @@
if (detail == undefined) { if (detail == undefined) {
let newDetail = this.createDetailInfo(label, pack); let newDetail = this.createDetailInfo(label, pack);
item.subList.push(newDetail); item.subList.push(newDetail);
this.getfocus()
} else { } else {
if (detail.scaned) { if (detail.scaned) {
this.showErrorMessage("箱码[" + result.Number + "]批次[" + result.batch + "]已经扫描") this.showErrorMessage("箱码[" + pack.number + "]批次[" + pack.batch + "]已经扫描")
} }
} }
@ -166,6 +169,12 @@
}, },
getfocus(){
if(this.$refs.scanPopup){
this.$refs.scanPopup.getfocus()
}
},
createItemInfo(label, pack) { createItemInfo(label, pack) {
let item = { let item = {
itemCode: pack.itemCode, itemCode: pack.itemCode,
@ -213,7 +222,7 @@
showErrorMessage(message) { showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
this.getfocus()
} }
}); });
}, },

21
src/pages/unPlanned/request/issueRequestCreate.vue

@ -166,12 +166,13 @@
let newDetail = createDetailInfo(balance, pack); // let newDetail = createDetailInfo(balance, pack); //
itemp.subList.push(newDetail); itemp.subList.push(newDetail);
this.detailSource.push(itemp) this.detailSource.push(itemp)
this.packGetFocus()
} else { } else {
var detail = item.subList.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == result.packingNumber && if (r.packingNumber == balance.packingNumber &&
r.batch == result.batch && r.batch == balance.batch &&
r.locationCode == result.locationCode && r.locationCode == balance.locationCode &&
r.inventoryStatus == result.inventoryStatus && r.inventoryStatus == balance.inventoryStatus &&
r.scaned == true) { r.scaned == true) {
return r; return r;
} }
@ -180,13 +181,21 @@
if (detail == undefined) { if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
item.subList.push(newDetail); item.subList.push(newDetail);
this.packGetFocus()
} else { } else {
this.showErrorMessage(result.packingNumber + "重复扫描") this.showErrorMessage("包装["+balance.packingNumber+"]"+"批次["+balance.batch+"]" + "重复扫描")
} }
} }
this.calcHandleQty(); this.calcHandleQty();
}, },
packGetFocus(){
if(this.$refs.scanPopup){
this.$refs.scanPopup.packGetFocus()
}
},
calcHandleQty() { calcHandleQty() {
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
@ -196,7 +205,7 @@
showErrorMessage(message) { showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
this.packGetFocus()
} }
}); });
}, },

12
src/store/modules/user.js

@ -59,16 +59,14 @@ const user = {
storage.setStorage(storage.constant.token,res.accessToken) storage.setStorage(storage.constant.token,res.accessToken)
resolve(res) resolve(res)
}else { }else {
uni.showToast({ if(res.msg){
title:res.msg reject(res.msg)
}) }else {
reject("登录失败")
}
} }
}).catch(error => { }).catch(error => {
reject(error) reject(error)
uni.showToast({
title:error
})
}) })
}) })
}, },

Loading…
Cancel
Save