Browse Source

Merge branch 'hella_online_20240803' into master_hella

hella_online_20240829
陈薪名 3 months ago
parent
commit
ab587f5b5a
  1. 9
      .env.production
  2. 148
      src/api/httpRequest3.js
  3. 2
      src/api/request2.js
  4. 4
      src/common/config.js
  5. 27
      src/hybrid/html/purchaseReceiptJob.html
  6. 4
      src/manifest.json
  7. 42
      src/mycomponents/common/comMessage.vue
  8. 47
      src/mycomponents/job/jobAccept.vue
  9. 34
      src/mycomponents/job/jobFilter.vue
  10. 40
      src/mycomponents/scan/winCheckFgLabel.vue
  11. 77
      src/mycomponents/scan/winComScan.vue
  12. 15
      src/mycomponents/scan/winComScanBalance.vue
  13. 62
      src/mycomponents/scan/winComScanBalanceLocation.vue
  14. 39
      src/mycomponents/scan/winComScanFg.vue
  15. 7
      src/mycomponents/scan/winScanAsnNumber.vue
  16. 23
      src/mycomponents/scan/winScanContainer.vue
  17. 10
      src/mycomponents/scan/winScanFgLabel.vue
  18. 5
      src/mycomponents/scan/winScanItem.vue
  19. 8
      src/mycomponents/scan/winScanJobNumber.vue
  20. 4
      src/mycomponents/scan/winScanLocation.vue
  21. 10
      src/mycomponents/scan/winScanPack.vue
  22. 4
      src/mycomponents/scan/winScanPackAndCont.vue
  23. 78
      src/mycomponents/scan/winScanPackAndLocation.vue
  24. 41
      src/mycomponents/scan/winScanPackAndLocationNoBalance.vue
  25. 17
      src/mycomponents/scan/winScanPackAndPosition.vue
  26. 7
      src/mycomponents/scan/winScanPackJob.vue
  27. 10
      src/mycomponents/scan/winScanPackLevel.vue
  28. 19
      src/mycomponents/scan/winScanPackage.vue
  29. 3
      src/pages.json
  30. 2
      src/pages/container/record/containerBindRecord.vue
  31. 2
      src/pages/container/record/containerUnBindRecord.vue
  32. 4
      src/pages/count/job/countBlindDetail.vue
  33. 4
      src/pages/count/job/countDetail.vue
  34. 4
      src/pages/count/job/countDetail1.vue
  35. 4
      src/pages/count/job/countLightDetail.vue
  36. 4
      src/pages/count/job/fuzzyCountDetail.vue
  37. 2
      src/pages/count/record/countRecord.vue
  38. 56
      src/pages/customerReturn/job/returnDetail.vue
  39. 4
      src/pages/customerReturn/record/returnRecord.vue
  40. 4
      src/pages/customerReturn/request/customerReturnRequestCreate.vue
  41. 4
      src/pages/deliver/coms/comScanDeliverPack.vue
  42. 2
      src/pages/deliver/job/deliverDetail.vue
  43. 6
      src/pages/deliver/record/deliverRecord.vue
  44. 2
      src/pages/deliver/request/deliverRequestCreate.vue
  45. 15
      src/pages/fg/receiptByPlan.vue
  46. 2
      src/pages/fg/receiptNoPlan.vue
  47. 6
      src/pages/inspect/job/inspectDetail.vue
  48. 6
      src/pages/inspect/job/inspectFullDetail.vue
  49. 6
      src/pages/inspect/job/inspectResult.vue
  50. 4
      src/pages/inventoryMove/coms/comMove.vue
  51. 29
      src/pages/inventoryMove/coms/comMoveRecord.vue
  52. 16
      src/pages/inventoryMove/coms/comMoveRecordCard.vue
  53. 60
      src/pages/inventoryMove/job/inventoryMoveDetail.vue
  54. 9
      src/pages/issue/coms/comIssueJobCard.vue
  55. 107
      src/pages/issue/coms/comScanIssuePack.vue
  56. 8
      src/pages/issue/job/issueDetail.vue
  57. 183
      src/pages/issue/job/issueJob.vue
  58. 11
      src/pages/issue/record/directIssue.vue
  59. 4
      src/pages/issue/record/directIssue1.vue
  60. 7
      src/pages/issue/record/directIssue2.vue
  61. 4
      src/pages/issue/record/issueRecord.vue
  62. 2
      src/pages/issue/record/issueRecordV1.vue
  63. 2
      src/pages/issue/request/issueRequestCreate.vue
  64. 7
      src/pages/issue/request/issueScanRequest.vue
  65. 4
      src/pages/login/index.vue
  66. 2
      src/pages/material/materialDowngrade.vue
  67. 6
      src/pages/package/coms/comOverPackJobCard.vue
  68. 53
      src/pages/package/coms/comScanPackagePack.vue
  69. 213
      src/pages/package/job/overPackageJob.vue
  70. 36
      src/pages/package/job/overPackageJobDetail.vue
  71. 4
      src/pages/package/record/mergePackageRecord.vue
  72. 10
      src/pages/package/record/overPackageRecord.vue
  73. 4
      src/pages/package/record/splitPackageRecord.vue
  74. 77
      src/pages/point/index.vue
  75. 126
      src/pages/pointPutawayJob/index.vue
  76. 4
      src/pages/productDismantle/job/productDismantleDetail.vue
  77. 2
      src/pages/productDismantle/record/productDismantleRecord.vue
  78. 10
      src/pages/productPutaway/coms/comProductJobCard.vue
  79. 25
      src/pages/productPutaway/job/fgProductPutawayJob.vue
  80. 4
      src/pages/productPutaway/job/productPutawayDetail.vue
  81. 131
      src/pages/productPutaway/job/productPutawayJob.vue
  82. 25
      src/pages/productPutaway/job/semiProductPutawayJob.vue
  83. 15
      src/pages/productPutaway/record/productPutawayRecord.vue
  84. 4
      src/pages/productPutaway/request/putawayRequestCreate.vue
  85. 7
      src/pages/productReceipt/coms/comProductJobCard.vue
  86. 4
      src/pages/productReceipt/job/ccProductReceiptDetail.vue
  87. 11
      src/pages/productReceipt/job/ccProductReceiptJob.vue
  88. 4
      src/pages/productReceipt/job/completeReceiveJobDetail.vue
  89. 2
      src/pages/productReceipt/job/fgProductReceiptDetail.vue
  90. 20
      src/pages/productReceipt/job/fgProductReceiptJob.vue
  91. 4
      src/pages/productReceipt/job/productReceiptDetail.vue
  92. 139
      src/pages/productReceipt/job/productReceiptJob.vue
  93. 50
      src/pages/productReceipt/job/scrapReceiptDetail.vue
  94. 28
      src/pages/productReceipt/job/scrapReceiptJob.vue
  95. 4
      src/pages/productReceipt/job/semiProductReceiptDetail.vue
  96. 21
      src/pages/productReceipt/job/semiProductReceiptJob.vue
  97. 4
      src/pages/productReceipt/record/productReceiptRecord.vue
  98. 71
      src/pages/productRecycle/job/productRecycleJobDetail.vue
  99. 4
      src/pages/productRecycle/record/productRecycleRecord.vue
  100. 34
      src/pages/productionReceipt/job/productionReceiptDetail.vue

9
.env.production

@ -1,12 +1,11 @@
VITE_BASE_URL=http://172.22.32.8:81/api/admin-api VITE_BASE_URL=http://172.21.32.13:81/api/admin-api
VITE_BASE_URL_IMAGE=http://172.22.32.8:81/admin-api VITE_BASE_URL_IMAGE=http://172.21.32.13:81/admin-api
# 租户配置 # 租户配置
VITE_TENANT='[{"text":"成都1397","value":2},{"text":"长春2379","value":3}]' VITE_TENANT='[{"text":"长春1379","value":1}]'
# 是否是测试环境 # 是否是测试环境
VITE_isDevelopment=false VITE_isDevelopment=false
# 积木报表请求路径 # 积木报表请求路径
VITE_JMREPORT_BASE_URL='http://172.22.32.8:90' VITE_JMREPORT_BASE_URL='http://172.21.32.13:90'

148
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){
@ -16,63 +16,109 @@ function service(options = {}) {
// } // }
var requestUrl = "" var requestUrl = ""
requestUrl = import.meta.env.VITE_BASE_URL requestUrl = import.meta.env.VITE_BASE_URL
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();
uni.reLaunch({ uni.reLaunch({
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 {
}else { reject("系统异常:状态码["+res.statusCode+"]")
reject("系统异常:"+ res.data.msg) }
console.log("系统异常",res.data.msg) }
} else {
if (res.data.msg) {
if (res.data.msg.includes('get lock')) {
reject("系统异常:状态码[" +res.statusCode+"]\n"+ "数据库死锁")
} else {
reject("系统异常:状态码[" +res.statusCode+"]\n"+ res.data.msg)
} }
} else { } else {
reject("系统异常:"+res.data.msg) reject("系统异常:状态码["+res.statusCode+"]")
console.log("系统异常",res.data.msg)
} }
}; }
options.fail = (error) => {
var message = error.errMsg } else {
if (message === 'Network Error') { if (res.data.msg) {
message = '接口连接异常' if (res.data.msg.includes('get lock')) {
} else if (message.includes('timeout')) { reject("系统异常:状态码["+res.statusCode +"]\n"+ "数据库死锁")
message = '接口请求超时' } else {
} else if (message.includes('Request failed with status code')) { reject("系统异常:状态码["+res.statusCode +"]\n"+ res.data.msg)
message = '接口' + message.substr(message.length - 3) + '异常'
} }
reject("系统异常:"+message); } else {
console.log("系统异常",message) reject("系统异常:状态码["+res.statusCode+"]")
}; }
uni.request(options);
}); }
} };
options.fail = (error) => {
var message = error.errMsg
if (message === 'Network Error') {
message = '接口连接异常'
} else if (message.includes('timeout')) {
message = '接口请求超时'
} else if (message.includes('Request failed with status code')) {
message = '接口' + message.substr(message.length - 3) + '异常'
} else if (message.includes('get lock')) {
message = '接口' + "数据库死锁"
}
reject("系统异常:" + 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);
}
}
})
// #endif
// #ifdef H5
console.log("网s络H5", navigator.onLine)
if (navigator.onLine) {
uni.request(options);
} else {
reject("当前无网络");
}
// #endif
});
}
export default service; export default service;

2
src/api/request2.js

@ -92,7 +92,7 @@ export function updateUserPwd(oldPassword, newPassword) {
return request({ return request({
url: baseApi + '/system/user/profile/update-password', url: baseApi + '/system/user/profile/update-password',
method: 'PUT', method: 'PUT',
params: data data: data
}) })
} }

4
src/common/config.js

@ -1,2 +1,4 @@
export const overPagePrint="overPage_print" export const overPagePrint="overPage_print"
export const overPageTemplate="overPage_Template" export const overPageTemplate="overPage_Template"
//3分钟刷新
export const planRefreshTime=3*60*1000

27
src/hybrid/html/purchaseReceiptJob.html

@ -28,10 +28,11 @@
align-items: center align-items: center
} }
.top th { .top1 th {
font-weight: bold; font-weight: bold;
font-size: 16px; font-size: 13px;
padding: 10px; padding: 10px;
text-align: left;
} }
@ -42,13 +43,33 @@
width: 100% width: 100%
} }
th{ th{
text-align:left; font-weight: bold;
font-size: 13px;
padding: 10px; padding: 10px;
} }
td{ td{
padding: 10px; padding: 10px;
} }
td:nth-child(2n){
width:calc(50% - 100px);
}
td:nth-child(2n+1){
width:80px;
}
.relative{
margin-bottom: 10px;
position: relative;
}
.q{
position: absolute;
left: 50%;
top:50%;
font-size: 160px;
transform: translate(-50% ,-50%);
color: rgba(0, 0, 0, 0.1);
}
</style> </style>
</head> </head>
<body> <body>

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.45", "versionName" : "1.0.55",
"versionCode" : 45, "versionCode" : 55,
"transformPx" : false, "transformPx" : false,
/* 5+App */ /* 5+App */
"app-plus" : { "app-plus" : {

42
src/mycomponents/common/comMessage.vue

@ -13,8 +13,11 @@
<image class="icon" :src="icon" /> <image class="icon" :src="icon" />
</slot> </slot>
<slot name="content"> <slot name="content">
<rich-text class="content" :nodes="content"> <text class="content" :style="{'color': textColor?textColor:'#000'}" >
</rich-text> {{content}}
</text>
<!-- <rich-text class="content" :nodes="content" v-else></rich-text> -->
</slot> </slot>
<view class='split_line'></view> <view class='split_line'></view>
<slot name="button"> <slot name="button">
@ -62,7 +65,9 @@
isDisabled: true, // true isDisabled: true, // true
seconds: 0, seconds: 0,
success: () => {} ,// success: () => {} ,//
version:"" version:"",
textColor:'',
count:0
} }
}, },
@ -154,7 +159,11 @@
showQuestionMessage(mContent, callback) { showQuestionMessage(mContent, callback) {
this.showSelectModal("疑问", mContent, callback); this.showSelectModal("疑问", mContent, callback);
}, },
// (+
showQuestionMessage1(mContent,textColor, callback) {
console.log(textColor)
this.showSelectModal1("疑问", mContent, callback,textColor);
},
// (+) // (+)
showWarningMessage(mContent, callback) { showWarningMessage(mContent, callback) {
this.showConfirmCountdownModal("警告", mContent, callback); this.showConfirmCountdownModal("警告", mContent, callback);
@ -264,6 +273,26 @@
} }
}); });
}, },
// (+
showSelectModal1(mIconType, mContent, callback,textColor) {
this.showModal({
iconType: mIconType,
content: mContent,
textColor:textColor,
success: function(res) {
if (callback != undefined) {
if (res.confirm == true) {
callback(true);
console.log('用户点击确定')
} else {
callback(false);
console.log('用户点击取消')
}
}
}
});
},
// (+) // (+)
showConfirmCountdownQuestionModal(mContent, callback) { showConfirmCountdownQuestionModal(mContent, callback) {
@ -396,6 +425,11 @@
this.cancelColor = '#666F83' this.cancelColor = '#666F83'
} }
if (data.textColor) {
this.textColor = data.textColor
} else {
this.textColor = ''
}
if (data.showConfirmButton === false || data.showConfirmButton === true) { if (data.showConfirmButton === false || data.showConfirmButton === true) {
this.showConfirmButton = data.showConfirmButton this.showConfirmButton = data.showConfirmButton
} else { } else {

47
src/mycomponents/job/jobAccept.vue

@ -0,0 +1,47 @@
<template>
<!-- style="margin-top: 10rpx;margin-bottom: 10rpx;" class="uni-flex uni-row space-between u-col-center" -->
<view class="task_item" style="margin-left: 15rpx; margin-right: 15rpx;">
<view class="uni-flex u-col" style="flex-direction: column;">
<view class="uni-flex uni-row u-col-center">
<text style="font-size: 32rpx;" >承接人: {{dataContent.acceptUserName}}</text>
</view>
<view class="uni-flex uni-row u-col-center">
<text style="font-size: 32rpx;" class="center">承接时间 : {{formatDate(dataContent.acceptTime)}}</text>
</view>
</view>
</view>
</template>
<script>
import {
dateFormat
} from '@/common/basic.js';
export default {
components: {
},
data() {
return {
};
},
watch: {},
props: {
dataContent: {
type: Object,
default: {}
}
},
methods: {
formatDate: function(val) {
return dateFormat(val)
}
}
}
</script>
<style lang="scss">
</style>

34
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">
@ -59,7 +75,7 @@
</view> --> </view> -->
<view class=" uni-flex uni-row" style="margin-top: 5px;" v-if="isShowQurery"> <view class=" uni-flex uni-row" style="margin-top: 5px;" v-if="isShowQurery">
<button class="btn_single_clear" hover-class="btn_commit_after" @click="reset()">重置</button> <button class="btn_single_clear" hover-class="btn_commit_after" @click="reset()">重置</button>
<button class="btn_single_commit" hover-class="btn_commit_after" @click="query()">查询</button> <button class="btn_single_commit" hover-class="btn_commit_after" style="margin-left: 20rpx;" @click="query()">查询</button>
</view> </view>
</view> </view>
@ -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 = ''

40
src/mycomponents/scan/winCheckFgLabel.vue

@ -102,18 +102,17 @@
methods: { methods: {
// //
openScanPopupForType(customerCode) { openScanPopupForType(customerCode) {
this.customerCode = customerCode; this.customerCode = customerCode;
if (this.fromLocationCode != '') {
this.packGetFocus();
} else {
this.locationGetFocus();
}
this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses) this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); // this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //
this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.fromLocationAreaTypeList); // this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.fromLocationAreaTypeList); //
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') if (this.fromLocationCode != '') {
this.packGetFocus();
} else {
this.locationGetFocus();
}
}, 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.packGetFocus();
} else {
if (this.fromLocationList.length == 0) {
this.locationGetFocus();
} else {
this.fromLocationCode = this.fromLocationList[0];
}
}
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
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); //
this.$refs.popup.open('bottom')
setTimeout(res => {
if (this.fromLocationCode != '') {
this.packGetFocus();
} else {
if (this.fromLocationList.length == 0) {
this.locationGetFocus();
} else {
this.fromLocationCode = this.fromLocationList[0];
this.packGetFocus();
}
}
}, 500)
}, },
closeScanPopup(content) { closeScanPopup(content) {

77
src/mycomponents/scan/winComScan.vue

@ -4,11 +4,15 @@
<view> <view>
<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
:focus="boxfocus" :placeholder="placeholderValue" v-model="scanMsg" trim="all" maxlength="1000" style="margin-left: 5px;width: 90%;"
:placeholder="placeholderValue"
:focus="boxfocus"
@blur="handleBlur"
@focus="handleFocus"
@input="handelScanMsg" :cursor="cursorIndex" ></textarea> @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="paizhao" @click="scanQRCode()" v-if="true"> <!-- <view class="paizhao" @click="scanQRCode()" v-if="true">
@ -16,7 +20,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>
@ -73,10 +77,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 +104,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 +139,7 @@
}, },
clearScanValue() { clearScanValue() {
this.scanMsg = '' this.scanMsg = ''
this.cursorIndex =0
this.getfocus(); this.getfocus();
}, },
clickScanMsg() { clickScanMsg() {
@ -186,10 +157,10 @@
if (index >= 0) { if (index >= 0) {
// 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 = ""
@ -212,6 +183,7 @@
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();
@ -222,20 +194,25 @@
}, 500); }, 500);
} }
}, },
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() {
@ -289,7 +266,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>

15
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) {
@ -214,11 +217,11 @@
var status = getInventoryStatusDesc(params.inventoryStatus) var status = getInventoryStatusDesc(params.inventoryStatus)
var areaType = getListLocationAreaTypeDesc(params.areaType) var areaType = getListLocationAreaTypeDesc(params.areaType)
var hint = var hint =
"按物料号 [" + params.itemCode + "] <br>" + "按物料号 [" + params.itemCode + "] \n" +
"包装号 [" + params.packingNumber + "] <br>" + "包装号 [" + params.packingNumber + "] \n" +
"批次 [" + params.batch + "] <br>" + "批次 [" + params.batch + "] \n" +
"状态 [" + status + "] <br>" + "状态 [" + status + "] \n" +
"库区 [" + areaType + "] <br>" + "库区 [" + areaType + "] \n" +
"未查找到库存余额" "未查找到库存余额"
this.showErrorMessage(hint) this.showErrorMessage(hint)
} else if (res.data.length == 1) { } else if (res.data.length == 1) {
@ -282,6 +285,7 @@
}, },
showErrorMessage(message) { showErrorMessage(message) {
this.losefocus()
this.$refs.comMessage.showErrorMessage(message, res => { this.$refs.comMessage.showErrorMessage(message, res => {
if (res) { if (res) {
if (this.$refs.comscan) { if (this.$refs.comscan) {
@ -297,6 +301,7 @@
// this.closeScanPopup() // this.closeScanPopup()
}, },
closeScanPopup() { closeScanPopup() {
this.losefocus();
this.$refs.popup.close() this.$refs.popup.close()
}, },
getfocus() { getfocus() {

62
src/mycomponents/scan/winComScanBalanceLocation.vue

@ -63,6 +63,10 @@
getBalanceByParams, getBalanceByParams,
getBasicItemByCode getBasicItemByCode
} from '@/api/request2.js'; } from '@/api/request2.js';
import {
getLabelInfo
} from '@/common/label.js';
import { import {
getListLocationAreaTypeDesc, getListLocationAreaTypeDesc,
@ -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.packGetFocus(); this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
} else { this.fromLocationAreaTypeList = getDirectoryItemArray(jobContent.fromAreaTypes); //
this.$refs.popup.open('bottom')
setTimeout(res => {
if (this.fromLocationCode != '') {
this.packGetFocus();
} else {
if (this.fromLocationList.length == 0) {
this.locationGetFocus();
} else {
this.fromLocationCode = this.fromLocationList[0];
this.packGetFocus();
}
}
}, 500)
},
//
openScanPopupForJobSimulate(fromLocationCode, fromLocationList, jobContent, scanMessage) {
this.fromLocationCode = fromLocationCode;
this.fromLocationList = fromLocationList;
if (!fromLocationCode) {
if (this.fromLocationList.length == 0) { if (this.fromLocationList.length == 0) {
this.locationGetFocus(); // this.locationGetFocus();
alert('没有来源库位:List')
} else { } else {
this.fromLocationCode = this.fromLocationList[0]; this.fromLocationCode = this.fromLocationList[0];
} }
} }
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
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() {
@ -205,11 +239,11 @@
var status = getInventoryStatusDesc(params.inventoryStatus) var status = getInventoryStatusDesc(params.inventoryStatus)
var areaType = getListLocationAreaTypeDesc(params.areaType) var areaType = getListLocationAreaTypeDesc(params.areaType)
var hint = var hint =
"按物料号 [" + params.itemCode + "] <br>" + "按物料号 [" + params.itemCode + "] \n" +
"包装号 [" + params.packingNumber + "] <br>" + "包装号 [" + params.packingNumber + "] \n" +
"批次 [" + params.batch + "] <br>" + "批次 [" + params.batch + "] \n" +
"状态 [" + status + "] <br>" + "状态 [" + status + "] \n" +
"库区 [" + areaType + "] <br>" + "库区 [" + areaType + "] \n" +
"未查找到库存余额" "未查找到库存余额"
this.showErrorMessage(hint) this.showErrorMessage(hint)
} else if (res.data.length == 1) { } else if (res.data.length == 1) {
@ -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){
@ -277,6 +312,7 @@
// this.closeScanPopup() // this.closeScanPopup()
}, },
closeScanPopup() { closeScanPopup() {
this.packLoseFocus()
this.$refs.popup.close() this.$refs.popup.close()
this.$emit("onCloseScanPopup") this.$emit("onCloseScanPopup")
}, },

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 = ''

7
src/mycomponents/scan/winScanAsnNumber.vue

@ -55,11 +55,16 @@
}, },
methods: { methods: {
openScanPopup() { openScanPopup() {
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus('bottom')
}, 500) }, 500)
}, },
closeScanPopup() { closeScanPopup() {
if(this.$refs.scan){
this.$refs.scan.losefocus()
}
this.$refs.popup.close() this.$refs.popup.close()
}, },
getfocus() { getfocus() {

23
src/mycomponents/scan/winScanContainer.vue

@ -12,8 +12,8 @@
</view> </view>
<view class=""> <view class="">
<view class=""> <view class="">
<win-com-scan ref="scan" headerType='HCQ' @getResult="getScanResult" :placeholder='title' :clearResult="true" <win-com-scan ref="scan" headerType='HCQ' @getResult="getScanResult" :placeholder='title'
:boxFocus="true" :isShowHistory="isShowHistory"> :clearResult="true" :boxFocus="true" :isShowHistory="isShowHistory">
</win-com-scan> </win-com-scan>
</view> </view>
</view> </view>
@ -54,11 +54,13 @@
}, },
methods: { methods: {
openScanPopup() { openScanPopup() {
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus()
}, 500) }, 500)
}, },
closeScanPopup() { closeScanPopup() {
this.losefocus()
this.$refs.popup.close() this.$refs.popup.close()
}, },
scanClick() { scanClick() {
@ -81,7 +83,8 @@
if (this.containerInfo.containerStatus == 'USED') { if (this.containerInfo.containerStatus == 'USED') {
this.callBack(); this.callBack();
} else { } else {
this.showErrorMessage("器具[" + this.code + "]状态是[" + this.containerInfo.status + "],不可以绑定") this.showErrorMessage("器具[" + this.code + "]状态是[" + this.containerInfo.status +
"],不可以绑定")
} }
} else { } else {
this.showErrorMessage("未查找到器具[" + this.code + "]") this.showErrorMessage("未查找到器具[" + this.code + "]")
@ -97,10 +100,16 @@
this.$emit("getContainer", this.containerInfo); this.$emit("getContainer", this.containerInfo);
}, },
getfocus() { getfocus() {
this.$refs.scan.getfocus(); if (this.$refs.scan) {
this.$refs.scan.getfocus();
}
}, },
losefocus() { losefocus() {
this.$refs.scan.losefocus(); if (this.$refs.scan) {
this.$refs.scan.losefocus();
}
}, },
showErrorMessage(message) { showErrorMessage(message) {
setTimeout(r => { setTimeout(r => {
@ -116,4 +125,4 @@
</script> </script>
<style> <style>
</style> </style>

10
src/mycomponents/scan/winScanFgLabel.vue

@ -60,13 +60,13 @@
this.$refs.comscansimulate.clickScanMsg(); this.$refs.comscansimulate.clickScanMsg();
}, },
openScanPopup(itemCode) { openScanPopup(itemCode) {
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom')
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();
} }
}, },

5
src/mycomponents/scan/winScanItem.vue

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

8
src/mycomponents/scan/winScanJobNumber.vue

@ -61,15 +61,19 @@
}, },
methods: { methods: {
openScanPopup() { openScanPopup() {
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus()
}, 500) }, 500)
}, },
closeScanPopup() { closeScanPopup() {
if(this.$refs.scan){
this.$refs.scan.losefocus()
}
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()
} }
}, },

4
src/mycomponents/scan/winScanLocation.vue

@ -65,8 +65,9 @@
}, },
methods: { methods: {
openScanPopup() { openScanPopup() {
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus()
}, 500) }, 500)
}, },
openScanPopupSimulate(location) { openScanPopupSimulate(location) {
@ -74,6 +75,7 @@
this.$refs.comscansimulate.clickScanMsg(); this.$refs.comscansimulate.clickScanMsg();
}, },
closeScanPopup() { closeScanPopup() {
this.losefocus()
if(this.$refs.popup){ if(this.$refs.popup){
this.$refs.popup.close() this.$refs.popup.close()
} }

10
src/mycomponents/scan/winScanPack.vue

@ -70,12 +70,14 @@
}) })
}, },
openScanPopup() { openScanPopup() {
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus()
}, 200) }, 500)
}, },
closeScanPopup() { closeScanPopup() {
this.losefocus();
this.$refs.popup.close(); this.$refs.popup.close();
this.$emit("close", ''); this.$emit("close", '');
}, },
@ -102,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();
} }
}, },

4
src/mycomponents/scan/winScanPackAndCont.vue

@ -61,12 +61,14 @@
}, },
methods: { methods: {
openScanPopup() { openScanPopup() {
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus()
}, 500) }, 500)
}, },
closeScanPopup() { closeScanPopup() {
this.losefocus()
this.$refs.popup.close(); this.$refs.popup.close();
this.$emit("close", ''); this.$emit("close", '');
}, },

78
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;
if (fromLocationCode != '') {
this.packGetFocus();
} else {
this.locationGetFocus();
}
this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses) this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); // this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //
this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.outAreaTypes); // this.fromLocationAreaTypeList = getDirectoryItemArray(this.businessType.outAreaTypes); //
if (!this.show) { this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') if (fromLocationCode != '') {
}, 500) this.packGetFocus();
} } else {
this.locationGetFocus();
}
}, 500)
}, },
// //
openScanPopupForJob(fromLocationCode, fromLocationList, jobContent) { openScanPopupForJob(fromLocationCode, fromLocationList, jobContent) {
this.fromLocationCode = fromLocationCode; this.fromLocationCode = fromLocationCode;
this.fromLocationList = fromLocationList; this.fromLocationList = fromLocationList;
if (fromLocationCode != '') {
this.packGetFocus();
} else {
if (this.fromLocationList.length == 0) {
this.locationGetFocus();
} else {
this.fromLocationCode = this.fromLocationList[0];
}
}
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
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); //
this.$refs.popup.open('bottom')
setTimeout(res => {
if (this.fromLocationCode != '') {
this.packGetFocus();
} else {
if (this.fromLocationList.length == 0) {
this.locationGetFocus();
} else {
this.fromLocationCode = this.fromLocationList[0];
this.packGetFocus();
}
}
}, 500)
}, },
// //
openScanPopupForJobSimulate(fromLocationCode, fromLocationList, jobContent, scanMessage) { openScanPopupForJobSimulate(fromLocationCode, fromLocationList, jobContent, scanMessage) {
@ -218,6 +219,7 @@
}, },
closeScanPopup(content) { closeScanPopup(content) {
this.packLoseFocus()
this.$refs.popup.close(); this.$refs.popup.close();
this.$emit("close", ''); this.$emit("close", '');
}, },
@ -365,7 +367,7 @@
// //
mustHavaBalance(datas) { mustHavaBalance(datas) {
if (datas.length == 0) { if (datas.length == 0) {
this.showErrorMessage(this.getQueryCondition() + '<br>未查找到库存记录', res => { this.showErrorMessage(this.getQueryCondition() + '\n未查找到库存记录', res => {
this.packGetFocus(); this.packGetFocus();
}) })
} else if (datas.length == 1) { } else if (datas.length == 1) {
@ -377,7 +379,7 @@
// if (balance.qty > 0) { // if (balance.qty > 0) {
// this.packCallBack(balance); // this.packCallBack(balance);
// } else { // } else {
// this.showErrorMessage(this.getQueryCondition() + '<br>[' + balance.qty + "],<br>", // this.showErrorMessage(this.getQueryCondition() + '\n[' + balance.qty + "],\n",
// res => { // res => {
// this.packGetFocus(); // this.packGetFocus();
// }) // })
@ -397,7 +399,7 @@
// if (balance.qty > 0) { // if (balance.qty > 0) {
// this.packCallBack(balance); // this.packCallBack(balance);
// } else { // } else {
// this.showErrorMessage(this.getQueryCondition() + '<br>[' + balance.qty + "],", // this.showErrorMessage(this.getQueryCondition() + '\n[' + balance.qty + "],",
// res => { // res => {
// this.packGetFocus(); // this.packGetFocus();
// }) // })
@ -416,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);
}, },
@ -432,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();
} }
}, },
@ -454,31 +456,31 @@
}, },
getQueryCondition() { getQueryCondition() {
let condition = '按照以下条件:<br>'; let condition = '按照以下条件:\n';
let label = this.scanResult.label; let label = this.scanResult.label;
let status = getInventoryStatusDesc(this.inventoryStatus); let status = getInventoryStatusDesc(this.inventoryStatus);
switch (this.managementPrecision) { switch (this.managementPrecision) {
case 'BY_PACKAGING': case 'BY_PACKAGING':
condition = condition + '物料号=[' + label.itemCode + ']<br>箱码=[' + label.packingNumber + condition = condition + '物料号=[' + label.itemCode + ']\n箱码=[' + label.packingNumber +
']<br>批次=[' + ']\n批次=[' +
label.batch + label.batch +
']<br>库位=[' + this.fromLocationCode + ']' ']\n库位=[' + this.fromLocationCode + ']'
break; break;
case 'BY_BATCH': case 'BY_BATCH':
condition = condition + '物料号=[' + label.itemCode + ']<br>批次=[' + condition = condition + '物料号=[' + label.itemCode + ']\n批次=[' +
label.batch + label.batch +
']<br>库位=[' + this.fromLocationCode + ']' ']\n库位=[' + this.fromLocationCode + ']'
break; break;
case 'BY_QUANTITY': case 'BY_QUANTITY':
condition = condition + '物料号=[' + label.itemCode + ']<br>库位=[' + this.fromLocationCode + ']' condition = condition + '物料号=[' + label.itemCode + ']\n库位=[' + this.fromLocationCode + ']'
break; break;
case 'BY_UNIQUEID': case 'BY_UNIQUEID':
condition = condition + '物料号=[' + label.itemCode + ']' condition = condition + '物料号=[' + label.itemCode + ']'
break; break;
} }
if (this.inventoryStatus.length > 0) { if (this.inventoryStatus.length > 0) {
condition = condition + '<br>库存状态=[' + status + ']' condition = condition + '\n库存状态=[' + status + ']'
} }
return condition; return condition;
}, },

41
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;
if (fromLocationCode != '') {
this.packGetFocus();
} else {
this.locationGetFocus();
}
this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses) this.fromInventoryStatuses = getDirectoryItemArray(this.businessType.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); // this.inventoryStatus = getDirectoryItemArray(this.businessType.outInventoryStatuses); //
this.fromLocationTypeArray = getDirectoryItemArray(this.businessType.outLocationTypes); // this.fromLocationTypeArray = getDirectoryItemArray(this.businessType.outLocationTypes); //
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') if (fromLocationCode != '') {
this.packGetFocus();
} else {
this.locationGetFocus();
}
}, 500) }, 500)
}, },
@ -148,24 +148,27 @@
openScanPopupForJob(fromLocationCode, fromLocationList, jobContent) { openScanPopupForJob(fromLocationCode, fromLocationList, jobContent) {
this.fromLocationCode = fromLocationCode; this.fromLocationCode = fromLocationCode;
this.fromLocationList = fromLocationList; this.fromLocationList = fromLocationList;
if (fromLocationCode != '') {
this.packGetFocus();
} else {
if (this.fromLocationList.length == 0) {
this.locationGetFocus();
} else {
this.fromLocationCode = this.fromLocationList[0];
}
}
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 500)
this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses) this.fromInventoryStatuses = getDirectoryItemArray(jobContent.outInventoryStatuses)
this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; // this.inventoryStatus = getDirectoryItemArray(jobContent.outInventoryStatuses); //; //
this.fromLocationTypeArray = getDirectoryItemArray(jobContent.fromLocationTypes); // this.fromLocationTypeArray = getDirectoryItemArray(jobContent.fromLocationTypes); //
this.$refs.popup.open('bottom')
setTimeout(res => {
if (fromLocationCode != '') {
this.packGetFocus();
} else {
if (this.fromLocationList.length == 0) {
this.locationGetFocus();
} else {
this.fromLocationCode = this.fromLocationList[0];
this.packGetFocus();
}
}
}, 500)
}, },
closeScanPopup(content) { closeScanPopup(content) {
this.packLoseFocus()
this.$refs.popup.close(); this.$refs.popup.close();
this.$emit("close", ''); this.$emit("close", '');
}, },
@ -212,7 +215,7 @@
uni.hideLoading(); uni.hideLoading();
var hint = getListLocationTypeDesc(this.fromLocationTypeArray); var hint = getListLocationTypeDesc(this.fromLocationTypeArray);
this.showErrorMessage("库位[" + this.fromLocationCode + "]是" + this.showErrorMessage("库位[" + this.fromLocationCode + "]是" +
getLocationTypeName(type) + ",<br>需要的库位类型是[" + hint + "]", callback => { getLocationTypeName(type) + ",\n需要的库位类型是[" + hint + "]", callback => {
this.locationGetFocus(); this.locationGetFocus();
}) })
} }

17
src/mycomponents/scan/winScanPackAndPosition.vue

@ -105,28 +105,29 @@
this.showErrorMessage(error) this.showErrorMessage(error)
}) })
} }
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') 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
}, },
closeScanPopup() { closeScanPopup() {
this.losefocus()
this.$refs.popup.close(); this.$refs.popup.close();
this.$emit("close", ''); this.$emit("close", '');
}, },
@ -222,4 +223,4 @@
height: auto; height: auto;
max-height: 300rpx; max-height: 300rpx;
} }
</style> </style>

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();
} }
}, },

10
src/mycomponents/scan/winScanPackLevel.vue

@ -96,12 +96,14 @@
}) })
}, },
openScanPopup() { openScanPopup() {
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus();
}, 200) }, 500)
}, },
closeScanPopup() { closeScanPopup() {
this.losefocus()
this.$refs.popup.close(); this.$refs.popup.close();
this.$emit("close", ''); this.$emit("close", '');
}, },
@ -129,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();
} }
}, },

19
src/mycomponents/scan/winScanPackage.vue

@ -67,22 +67,24 @@
this.$refs.comscansimulate.clickScanMsg(); this.$refs.comscansimulate.clickScanMsg();
}, },
openScanPopup() { openScanPopup() {
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus()
}, 200) }, 500)
}, },
openScanPopupByBusinessType(businessType) { openScanPopupByBusinessType(businessType) {
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus()
this.businessType = businessType; this.businessType = businessType;
}, 500)
}, 200)
}, },
closeScanPopup() { closeScanPopup() {
this.losefocus()
this.$refs.popup.close(); this.$refs.popup.close();
this.$emit("close", ''); this.$emit("close", '');
}, },
@ -222,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();
} }
}, },
@ -239,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",

2
src/pages/container/record/containerBindRecord.vue

@ -322,7 +322,7 @@
containerBindRecordSubmit(params).then(res => { containerBindRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成器具绑定记录<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成器具绑定记录\n" + res.data)
this.clear(); this.clear();
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")

2
src/pages/container/record/containerUnBindRecord.vue

@ -271,7 +271,7 @@
containerUnBindRecordSubmit(params).then(res => { containerUnBindRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成器具绑定记录<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成器具绑定记录\n" + res.data)
this.clear(); this.clear();
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")

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

@ -498,7 +498,7 @@
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount +
"]总共[" + this "]总共[" + this
.getTotalCount() + "]", res => { .getTotalCount() + "]", res => {
if (res) { if (res) {
@ -520,7 +520,7 @@
countJobSubmit(params).then(res => { countJobSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成盘点记录<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成盘点记录\n" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

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

@ -704,7 +704,7 @@
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount +
"]总共[" + this "]总共[" + this
.getTotalCount() + "]", res => { .getTotalCount() + "]", res => {
if (res) { if (res) {
@ -726,7 +726,7 @@
countJobSubmit(params).then(res => { countJobSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成盘点记录<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成盘点记录\n" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

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

@ -493,7 +493,7 @@
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount +
"]总共[" + this "]总共[" + this
.getTotalCount() + "]", res => { .getTotalCount() + "]", res => {
if (res) { if (res) {
@ -515,7 +515,7 @@
// countJobSubmit(params).then(res => { // countJobSubmit(params).then(res => {
// uni.hideLoading() // uni.hideLoading()
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br><br>" + res.data) // this.showCommitSuccessMessage("\n\n" + res.data)
// } else { // } else {
// this.showErrorMessage("[" + res.msg + "]") // this.showErrorMessage("[" + res.msg + "]")
// } // }

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

@ -503,7 +503,7 @@
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount +
"]总共[" + this "]总共[" + this
.getTotalCount() + "]", res => { .getTotalCount() + "]", res => {
if (res) { if (res) {
@ -525,7 +525,7 @@
countJobSubmit(params).then(res => { countJobSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成盘点记录<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成盘点记录\n" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

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()

2
src/pages/count/record/countRecord.vue

@ -404,7 +404,7 @@
} else { } else {
this.calcScanCount(); this.calcScanCount();
if (this.scanCount < this.subList.length) { if (this.scanCount < this.subList.length) {
this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.subList.length + this.showMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + "]总共[" + this.subList.length +
"]"); "]");
} }
} }

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

@ -339,25 +339,43 @@
if (!this.checkLocation()) { if (!this.checkLocation()) {
return return
} }
//
// let str = ''
if (this.scanCount == this.subList.length) { this.detailSource.forEach((item) => {
this.submitJob(); item.subList.forEach(cur => {
} else if (this.scanCount < this.subList.length) { if (cur.qty != cur.handleQty) {
// str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致`
if (this.jobContent.allowPartialComplete == "TRUE") { }
// })
this.submitJob(); })
} else { if (str) {
// str += ',是否确认提交?'
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
"]箱总共[" + this.subList.length + "]箱", res => { if (res) {
if (res) { this.submitJob()
this.openScanPopup(); }
} });
}); } else {
} 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() {
@ -378,7 +396,7 @@
customerReturnJobSubmit(params).then(res => { customerReturnJobSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成客户退货记录:" + res.data) this.showCommitSuccessMessage("提交成功\n生成客户退货记录:" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

4
src/pages/customerReturn/record/returnRecord.vue

@ -168,7 +168,7 @@
item.subList.push(newDetail); item.subList.push(newDetail);
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]重复扫描")
} }
} }
} }
@ -263,7 +263,7 @@
customerReturnRecordSubmit(params).then(res => { customerReturnRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成客户退货记录<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成客户退货记录\n" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

4
src/pages/customerReturn/request/customerReturnRequestCreate.vue

@ -193,7 +193,7 @@
item.subList.push(newDetail); item.subList.push(newDetail);
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]重复扫描")
} }
} }
} }
@ -280,7 +280,7 @@
customerReturnRequestSubmit(params).then(res => { customerReturnRequestSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成客户退货申请<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成客户退货申请\n" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

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

@ -184,12 +184,14 @@
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
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus();
}, 500) }, 500)
}, },
closeScanPopup() { closeScanPopup() {
this.losefocus()
this.$refs.popup.close(); this.$refs.popup.close();
this.$emit("closeScan") this.$emit("closeScan")
// //

2
src/pages/deliver/job/deliverDetail.vue

@ -254,7 +254,7 @@
deliverJobSubmit(params).then(res => { deliverJobSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发货记录<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成发货记录\n" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

6
src/pages/deliver/record/deliverRecord.vue

@ -45,7 +45,7 @@
<win-scan-button @goScan='openScanPopup'></win-scan-button> <win-scan-button @goScan='openScanPopup'></win-scan-button>
</view> </view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' headerType="HMQ"></win-scan-pack-and-location> <win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' headerType="HPQ,HMQ"></win-scan-pack-and-location>
<comMessage ref="comMessage"></comMessage> <comMessage ref="comMessage"></comMessage>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation' <win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location> :locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
@ -192,7 +192,7 @@
item.subList.push(newDetail); item.subList.push(newDetail);
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]重复扫描")
} }
} }
} }
@ -290,7 +290,7 @@
deliverRecordSubmit(params).then(res => { deliverRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成制品发货记录<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成制品发货记录\n" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

2
src/pages/deliver/request/deliverRequestCreate.vue

@ -157,7 +157,7 @@
deliverRequestSubmit(params).then(res => { deliverRequestSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成成品发货申请<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成成品发货申请\n" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

15
src/pages/fg/receiptByPlan.vue

@ -347,15 +347,15 @@ import { nextTick } from 'vue';
this.dataContent.goodQty = planeInfo.data.list[0].goodQty this.dataContent.goodQty = planeInfo.data.list[0].goodQty
this.dataContent.noGoodQty = calc.sub(planeInfo.data.list[0].planQty, planeInfo.data.list[ this.dataContent.noGoodQty = calc.sub(planeInfo.data.list[0].planQty, planeInfo.data.list[
0].goodQty), 0].goodQty),
this.dataContent.subList = [] this.dataContent.subList = []
this.showList = []; this.showList = [];
this.allList = [] this.allList = []
this.index = 1 this.index = 1
} }
}
} else { // else {
throw new Error("未查找到单据信息") // 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("提交成功<br>生成装配收货记录<br>" + 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

2
src/pages/fg/receiptNoPlan.vue

@ -307,7 +307,7 @@
} else { // } else { //
createInspectRequestByPlan(list[0].requestNumber) createInspectRequestByPlan(list[0].requestNumber)
} }
this.showCommitSuccessMessage("提交成功<br>生成装配收货记录<br>" + list[0].requestNumber, list) this.showCommitSuccessMessage("提交成功\n生成装配收货记录\n" + list[0].requestNumber, list)
this.scanedQty = this.scanedQty + this.showList.length; this.scanedQty = this.scanedQty + this.showList.length;
this.showList = []; this.showList = [];
this.dataContent.handleQty = 0; this.dataContent.handleQty = 0;

6
src/pages/inspect/job/inspectDetail.vue

@ -349,7 +349,7 @@
this.submitJob(); this.submitJob();
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount +
"]箱总共[" + this "]箱总共[" + this
.subList.length + "]箱", res => { .subList.length + "]箱", res => {
if (res) { if (res) {
@ -373,9 +373,9 @@
inspectJobSubmit(params).then(res => { inspectJobSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成到货检验记录<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成到货检验记录\n" + res.data)
createPutAwayRequest(res.data).then(putawayres => { createPutAwayRequest(res.data).then(putawayres => {
this.showCommitSuccessMessage("生成上架申请单号<br>" + putawayres.data) this.showCommitSuccessMessage("生成上架申请单号\n" + putawayres.data)
}).catch(error => { }).catch(error => {
uni.hideLoading(); uni.hideLoading();
this.showErrorMessage(error); this.showErrorMessage(error);

6
src/pages/inspect/job/inspectFullDetail.vue

@ -369,7 +369,7 @@
this.submitJob(); this.submitJob();
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount +
"]箱总共[" + this "]箱总共[" + this
.subList.length + "]箱", res => { .subList.length + "]箱", res => {
if (res) { if (res) {
@ -392,10 +392,10 @@
inspectJobSubmit(params).then(res => { inspectJobSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成到货检验记录" + res.data) this.showCommitSuccessMessage("提交成功\n生成到货检验记录" + res.data)
// //
createPutAwayRequest(res.data).then(putawayres => { createPutAwayRequest(res.data).then(putawayres => {
this.showCommitSuccessMessage("生成上架申请单号<br>" + putawayres.data) this.showCommitSuccessMessage("生成上架申请单号\n" + putawayres.data)
}).catch(error => { }).catch(error => {
uni.hideLoading(); uni.hideLoading();
this.showErrorMessage(error); this.showErrorMessage(error);

6
src/pages/inspect/job/inspectResult.vue

@ -543,11 +543,11 @@
if (res.data) { if (res.data) {
var hint = ""; var hint = "";
if (this.jobContent.nextAction == "FULL_INSPECT") { if (this.jobContent.nextAction == "FULL_INSPECT") {
hint = "提交成功<br>生成到货检验任务<br>" + res.data hint = "提交成功\n生成到货检验任务\n" + res.data
} else { } else {
hint = "提交成功<br>生成到货检验记录<br>" + res.data hint = "提交成功\n生成到货检验记录\n" + res.data
createPutAwayRequest(res.data).then(putawayres => { createPutAwayRequest(res.data).then(putawayres => {
this.showCommitSuccessMessage("生成上架申请单号<br>" + putawayres.data) this.showCommitSuccessMessage("生成上架申请单号\n" + putawayres.data)
}).catch(error => { }).catch(error => {
uni.hideLoading(); uni.hideLoading();
this.showErrorMessage(error); this.showErrorMessage(error);

4
src/pages/inventoryMove/coms/comMove.vue

@ -228,7 +228,7 @@
newDetail.toInventoryStatus = this.toInventoryStatus newDetail.toInventoryStatus = this.toInventoryStatus
item.subList.push(newDetail); item.subList.push(newDetail);
} else { } else {
this.showErrorMessage(balance.packingNumber + "已经在列表中") this.showErrorMessage(balance.packingNumber + "重复扫描")
} }
} }
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
@ -307,7 +307,7 @@
inventoryMoveRecordSubmit(params).then(res => { inventoryMoveRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成" + this.title + "记录<br>" + this.showCommitSuccessMessage("提交成功\n生成" + this.title + "记录\n" +
res.data) res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")

29
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,
@ -261,8 +265,8 @@
this.detailSource.push(itemp) this.detailSource.push(itemp)
} else { } else {
var detail = item.subList.find(r => { var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber && if (r.packingNumber == pack.number &&
r.batch == balance.batch && r.batch == pack.batch &&
r.fromLocationCode == balance.locationCode && r.fromLocationCode == balance.locationCode &&
r.toInventoryStatus == balance.inventoryStatus && r.toInventoryStatus == balance.inventoryStatus &&
r.scaned == true) { r.scaned == true) {
@ -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(balance.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,6 +355,11 @@
this.showErrorMessage("请先选择目标库位") this.showErrorMessage("请先选择目标库位")
return; return;
} }
// if(this.fromLocationCode==this.toLocationCode){
// this.showErrorMessage("")
// return;
// }
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) { if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
// //
uni.showLoading({ uni.showLoading({
@ -354,11 +373,11 @@
if (res.success) { if (res.success) {
this.managementList = res.list; this.managementList = res.list;
var params = this.setParams() var params = this.setParams()
// console.log("" + JSON.stringify(params)) console.log("提交" + JSON.stringify(params))
inventoryMoveRecordSubmit(params).then(res => { inventoryMoveRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成" + this.title + "<br>" + this.showCommitSuccessMessage("提交成功\n生成" + this.title + "\n" +
res.data) res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")

16
src/pages/inventoryMove/coms/comMoveRecordCard.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="" style="background-color: #fff;"> <view class="" style="background-color: #fff;">
<uni-collapse ref="collapse1" @change=""> <uni-collapse ref="collapse1" >
<uni-collapse-item :open="true"> <uni-collapse-item :open="true">
<template v-slot:title> <template v-slot:title>
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction">
@ -88,13 +88,17 @@
dataContent: { dataContent: {
handler(newName, oldName) { handler(newName, oldName) {
if (this.dataContent.subList.length > 0) { if (this.dataContent.subList.length > 0) {
if (this.$refs.collapse1 != undefined && this.$refs.collapse1 != null) { this.$nextTick(res => {
this.$nextTick(res => { setTimeout(() => {
this.$refs.collapse1.resize() if (this.$refs.collapse1) {
}) this.$refs.collapse1.resize();
} }
}, 500)
})
} }
}, },
immediate: true, immediate: true,
deep: true deep: true
} }

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

@ -354,27 +354,45 @@
this.showErrorMessage("扫描数为0,请先扫描") this.showErrorMessage("扫描数为0,请先扫描")
return; return;
} }
//
// let str = ''
// this.detailSource.forEach((item) => {
if (this.scanCount == this.subList.length) { item.subList.forEach(cur => {
this.submitJob(); if (cur.qty != cur.handleQty) {
} else if (this.scanCount < this.subList.length) { str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致`
// }
if (this.jobContent.allowPartialComplete == "TRUE") { })
// })
this.submitJob(); if (str) {
} else { str += ',是否确认提交?'
// this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + if (res) {
"]箱总共[" + this this.submitJob()
.subList.length + "]箱", res => { }
if (res) { });
this.openScanPopup(); } else {
} 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() {
@ -395,7 +413,7 @@
inventoryMoveSubmit(params).then(res => { inventoryMoveSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成库存转移记录<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成库存转移记录\n" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

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

@ -1,6 +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="task_item" style="margin-left: 15px;"> <view class="task_item" style="margin-left: 15px;">
<view class="task_text"> <view class="task_text">
<view class="card_view"> <view class="card_view">
@ -9,16 +11,21 @@
</view> </view>
</view> </view>
</view> </view>
<view class='split_line' v-show="dataContent.acceptUserName"></view>
<jobAccept :dataContent="dataContent" v-show="dataContent.acceptUserName"></jobAccept>
</job-com-main-card> </job-com-main-card>
</template> </template>
<script> <script>
import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue' import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue'
import jobComMainDetailCard from '@/mycomponents/job/jobComMainDetailCard.vue' import jobComMainDetailCard from '@/mycomponents/job/jobComMainDetailCard.vue'
import jobAccept from '@/mycomponents/job/jobAccept.vue'
export default { export default {
components: { components: {
jobComMainCard, jobComMainCard,
jobComMainDetailCard jobComMainDetailCard,
jobAccept
}, },
data() { data() {
return {}; return {};

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

@ -177,7 +177,8 @@
inputStyleObject: { inputStyleObject: {
fontSize: "100rpx" fontSize: "100rpx"
}, },
bussinessCode: 'Issue' bussinessCode: 'Issue',
toLocationAreaTypeList:[]
} }
}, },
created() { created() {
@ -212,12 +213,14 @@
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
this.$refs.popup.open('bottom')
setTimeout(res => { setTimeout(res => {
this.$refs.popup.open('bottom') this.getfocus();
}, 500) }, 500)
}, },
closeScanPopup() { closeScanPopup() {
this.losefocus()
this.$refs.popup.close(); this.$refs.popup.close();
this.$emit("closeScan") this.$emit("closeScan")
// //
@ -231,6 +234,7 @@
that.fromInventoryStatuses = this.jobContent.outInventoryStatuses that.fromInventoryStatuses = this.jobContent.outInventoryStatuses
that.toLocation = that.dataContent[0]; that.toLocation = that.dataContent[0];
that.toLocationCode = that.dataContent[0].toLocationCode; that.toLocationCode = that.dataContent[0].toLocationCode;
that.toLocationAreaTypeList=getDirectoryItemArray(this.jobContent.toAreaTypes)
// that.fromLocationList = that.getFromLocationList(); // that.fromLocationList = that.getFromLocationList();
} }
}, },
@ -265,7 +269,7 @@
} }
}, },
onScanResult(result) { queryBalance(result) {
try { try {
let that = this; let that = this;
// if (that.fromLocationCode == '') { // if (that.fromLocationCode == '') {
@ -306,20 +310,23 @@
var status = getInventoryStatusDesc(params.inventoryStatus) var status = getInventoryStatusDesc(params.inventoryStatus)
var areaType = getListLocationAreaTypeDesc(params.areaType) var areaType = getListLocationAreaTypeDesc(params.areaType)
var hint = var hint =
"按物料号 [" + params.itemCode + "] <br>" + "按物料号 [" + params.itemCode + "] \n" +
"包装号 [" + params.packingNumber + "] <br>" + "包装号 [" + params.packingNumber + "] \n" +
"批次 [" + params.batch + "] <br>" + "批次 [" + params.batch + "] \n" +
"状态 [" + status + "] <br>" + "状态 [" + status + "] \n" +
"库区 [" + areaType + "] <br>" + "库区 [" + 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]
if (result.label.packingNumber != result.balance.packingNumber) { if (result.label.packingNumber != result.balance.packingNumber) {
result.balance.handleQty = Number(result.label.qty) result.balance.qty = Number(result.label.qty)
} else { } else {
result.balance.handleQty = Number(result.balance.qty) result.balance.qty = Number(result.balance.qty)
} }
this.afterGetBalance(result.label, result.balance, result.package); this.afterGetBalance(result.label, result.balance, result.package);
} else { } else {
@ -329,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();
} }
}, },
@ -407,14 +419,73 @@
this.$refs.comMessage.showQuestionMessage( this.$refs.comMessage.showQuestionMessage(
`扫描物料包装【${result.package.packUnit}】与任务推荐包装规格【${item.packUnit}】不一致.是否要继续发料?`, res => { `扫描物料包装【${result.package.packUnit}】与任务推荐包装规格【${item.packUnit}】不一致.是否要继续发料?`, res => {
if (res) { if (res) {
this.onScanResult(result) this.getToLocationBalance(result)
} }
}); });
} else { } else {
this.onScanResult(result) this.getToLocationBalance(result)
} }
} }
}, },
//
getToLocationBalance(result) {
uni.showLoading({
title: '查询中',
mask: true
})
var filters = []
if (result.package.parentNumber) {
var packingNumber = result.package.parentNumber + "," + result.package.number;
filters.push({
column: "packingNumber",
action: "in",
value: packingNumber
})
} else {
filters.push({
column: "packingNumber",
action: "==",
value: result.package.number
})
}
filters.push({
column: "itemCode",
action: "==",
value: result.package.itemCode
})
filters.push({
column: "batch",
action: "==",
value: result.package.batch
})
filters.push({
column: "areaType",
action: "in",
value: this.toLocationAreaTypeList.join(',')
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getBalanceByFilter(params).then(res => {
uni.hideLoading()
if (res.data.list.length > 0) {
this.showErrorMessage("包装在库位【" + res.data.list[0].locationCode + "】已有库存余额");
} else {
this.queryBalance(result);
}
// callback(res.data)
}).catch(err => {
uni.hideLoading()
this.showErrorMessage(err.message);
})
},
selectBalanceItem(balance) { selectBalanceItem(balance) {
this.afterGetBalance(this.label, balance, this.packageInfo); this.afterGetBalance(this.label, balance, this.packageInfo);
@ -524,7 +595,7 @@
batch: data.batch, batch: data.batch,
qty: 0, qty: 0,
uom: data.uom, uom: data.uom,
handleQty: Number(balance.handleQty), handleQty: Number(balance.qty),
Records: [] Records: []
} }
let record = this.creatRecord(data, balance, packageInfo); let record = this.creatRecord(data, balance, packageInfo);
@ -544,8 +615,8 @@
batch: label.batch, batch: label.batch,
// qty: Number(balance.qty), // qty: Number(balance.qty),
// qty: Number(label.qty) > Number(balance.qty) ? Number(balance.qty) : Number(label.qty), // qty: Number(label.qty) > Number(balance.qty) ? Number(balance.qty) : Number(label.qty),
qty: balance.handleQty, qty: Number(balance.qty),
handleQty: balance.handleQty, handleQty: Number(balance.qty),
uom: balance.uom, uom: balance.uom,
inventoryStatus: balance.inventoryStatus, inventoryStatus: balance.inventoryStatus,
balance: balance, balance: balance,

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

@ -310,7 +310,7 @@
issueJobSubmit(params).then(res => { issueJobSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发料记录<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成发料记录\n" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }
@ -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();
} }
}, },

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

@ -1,8 +1,12 @@
<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="" :checkedToday="checkedToday" :checkedWaitTask="checkedWaitTask" ref="filter" otherTitle=""
:checkedToday="checkedToday"
:checkedWaitTask="checkedWaitTask"
@switchChangeWait="switchChangeWait"
@switchChangeToday="switchChangeToday"
:isShowItemCode="true" @onQuery="getListByFilter" :isShowQurery='true'> :isShowItemCode="true" @onQuery="getListByFilter" :isShowQurery='true'>
<!-- <job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="true" <!-- <job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="true"
:productionline="productionlineList" ref="filter" otherTitle="" @switchChangeToday="switchChangeToday" :productionline="productionlineList" ref="filter" otherTitle="" @switchChangeToday="switchChangeToday"
@ -52,6 +56,11 @@
import { import {
getBusinessType getBusinessType
} from '@/common/record.js'; } from '@/common/record.js';
import {
planRefreshTime
} from '@/common/config.js';
import { import {
getDetailOption, getDetailOption,
@ -100,9 +109,12 @@
title: '', title: '',
productionLine: "", productionLine: "",
fromLocation: "", fromLocation: "",
fromAreaCode: '', //
toAreaCode: '', //
filterItemCode: "", filterItemCode: "",
businessTypeCode: "Issue", businessTypeCode: "Issue",
businessType: null, businessType: null,
timer:null
}; };
}, },
onLoad(option) { onLoad(option) {
@ -110,8 +122,15 @@
this.getIssueJobByProductionline() this.getIssueJobByProductionline()
}, },
onShow() { onShow() {
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode) this.timerRefresh();
},
onHide() {
this.stopRefresh();
},
onUnload(){
this.stopRefresh();
}, },
onReady() { onReady() {
@ -124,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)
}, },
//退 //退
@ -153,6 +172,21 @@
}, },
methods: { methods: {
timerRefresh() {
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
this.stopRefresh();
var that = this;
this.timer = setInterval(function() {
that.getList('refresh', that.fromLocation, that.productionLine, that.filterItemCode,this.fromAreaCode,this.toAreaCode)
console.log('发料刷新');
}, planRefreshTime)
},
stopRefresh() {
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
getBusinessTypeFunc() { getBusinessTypeFunc() {
getBusinessType(this.businessTypeCode, res => { getBusinessType(this.businessTypeCode, res => {
if (res.success) { if (res.success) {
@ -183,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: "加载中­....",
@ -210,11 +244,6 @@
value: this.status value: this.status
}) })
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
if (fromLocation) { if (fromLocation) {
// //
@ -223,6 +252,22 @@
action: "==", action: "==",
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) {
// 线 // 线
@ -297,11 +342,6 @@
value: this.status value: this.status
}) })
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
if (params.fromLocationCode) { if (params.fromLocationCode) {
// //
@ -335,6 +375,28 @@
}) })
}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,
@ -342,7 +404,7 @@
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) {
@ -361,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;
@ -395,10 +457,8 @@
openJobDetail(item, scanMessage = '') { openJobDetail(item, scanMessage = '') {
uni.navigateTo({ this.getJobInfoByNumber(item.number,scanMessage)
url: './issueDetail?id=' + item.masterId + '&status=' + item.status + '&scanMessage=' +
scanMessage + '&title=' + this.title
});
}, },
showItemList(itemList) { showItemList(itemList) {
@ -441,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: "放弃任务成功"
@ -478,14 +538,66 @@
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){
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
var filters = []
filters.push({
column: "status",
action: "in",
value: '1,2'
})
filters.push({
column: "number",
action: "==",
value: number
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getIssueJobList(params).then(res => {
uni.hideLoading();
if (res.data.list.length == 0) {
that.showMessage('未查找到' + '【' + number + '】的发料任务');
} else {
var result =res.data.list[0];
if(result.acceptUserId&&result.acceptUserId!=this.$store.state.user.id){
this.$refs.comMessage.showErrorMessage("任务号["+result.number+"]已经被["+result.acceptUserName+"]承接,无法执行", res => {
if (res) {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.getfocus()
}
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
}
});
return;
}
uni.navigateTo({
url: './issueDetail?id=' + result.masterId + '&status=' + result.status + '&scanMessage=' +
scanMessage + '&title=' + this.title
});
this.scanMessage=""
}
}).catch(error => {
uni.hideLoading();
that.showMessage(error);
})
}, },
getScanNumber(code) { getScanNumber(code) {
@ -509,12 +621,6 @@
value: code value: code
}) })
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
var params = { var params = {
filters: filters, filters: filters,
pageNo: 1, pageNo: 1,
@ -523,7 +629,7 @@
getIssueJobList(params).then(res => { getIssueJobList(params).then(res => {
uni.hideLoading(); uni.hideLoading();
if (res.data.list.length == 0) { if (res.data.list.length == 0) {
that.showMessage('未查找到' + '【' + code + '】的收货任务'); that.showMessage('未查找到' + '【' + code + '】的发料任务');
} else if (res.data.list.length == 1) { } else if (res.data.list.length == 1) {
that.openJobDetail(res.data.list[0]); that.openJobDetail(res.data.list[0]);
} }
@ -537,7 +643,7 @@
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.getfocus()
} }
} }
}); });
@ -549,9 +655,6 @@
this.$refs.scanPopup.openScanPopup(this.businessType); this.$refs.scanPopup.openScanPopup(this.businessType);
} }
}, },
// openScanPopup() {
// this.$refs.scanPopup.openScanPopup();
// },
getScanResult(result) { getScanResult(result) {
let balance = result.balance; let balance = result.balance;
if (balance != null) { if (balance != null) {
@ -611,11 +714,11 @@
} }
} else { } else {
this.showMessage("按来源库位[" + balance.locationCode + "]批次[" + result.label.batch + this.showMessage("按来源库位[" + balance.locationCode + "]批次[" + result.label.batch +
"]物料号[" + result.label.itemCode + "]未查找到任务<br>" + "扫描[" + result "]物料号[" + result.label.itemCode + "]未查找到任务\n" + "扫描[" + result
.scanMessage + "]") .scanMessage + "]")
} }
}).catch(error => { }).catch(error => {
this.showMessage(error + "<br>扫描[" + result.scanMessage + "]") this.showMessage(error + "\n扫描[" + result.scanMessage + "]")
}) })
} catch (e) { } catch (e) {

11
src/pages/issue/record/directIssue.vue

@ -248,7 +248,7 @@
this.scanPopupGetFocus() this.scanPopupGetFocus()
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + detail.packingNumber + "批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + detail.packingNumber + "批次[" + balance.batch + "]重复扫描")
} }
} }
} }
@ -256,8 +256,13 @@
}, },
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()
}
}); });
}, },
@ -396,7 +401,7 @@
issueRecordSubmit(params).then(res => { issueRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成直接发料记录<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成直接发料记录\n" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

4
src/pages/issue/record/directIssue1.vue

@ -206,7 +206,7 @@
var itemDetail = item.subList.find(r => r.packingNumber == balance.packingNumber && r.batch == var itemDetail = item.subList.find(r => r.packingNumber == balance.packingNumber && r.batch ==
balance.batch); balance.batch);
if (itemDetail != undefined) { if (itemDetail != undefined) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]重复扫描")
} }
} }
// calcTreeHandleQty(this.detailSource); // calcTreeHandleQty(this.detailSource);
@ -388,7 +388,7 @@
issueRecordSubmit(params).then(res => { issueRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成直接发料记录<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成直接发料记录\n" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

7
src/pages/issue/record/directIssue2.vue

@ -353,8 +353,7 @@
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + detail.packingNumber + "]批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + detail.packingNumber + "]批次[" + balance.batch + "]重复扫描 }
}
} }
} }
}, },
@ -401,7 +400,7 @@
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]重复扫描")
} }
} }
} }
@ -582,7 +581,7 @@
issueRecordSubmit(params).then(res => { issueRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成直接发料记录<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成直接发料记录\n" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

4
src/pages/issue/record/issueRecord.vue

@ -304,7 +304,7 @@
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + detail.packingNumber + "]批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + detail.packingNumber + "]批次[" + balance.batch + "]重复扫描")
} }
} }
} }
@ -437,7 +437,7 @@
issueRecordSubmit(params).then(res => { issueRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成直接发料记录<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成直接发料记录\n" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

2
src/pages/issue/record/issueRecordV1.vue

@ -373,7 +373,7 @@
issueRecordSubmit(params).then(res => { issueRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发料记录<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成发料记录\n" + res.data)
} else { } else {
this.showErrorMessage("提交失败:【" + res.msg+"】") this.showErrorMessage("提交失败:【" + res.msg+"】")
} }

2
src/pages/issue/request/issueRequestCreate.vue

@ -188,7 +188,7 @@
issueRequestSubmit(params).then(res => { issueRequestSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发料申请" + res.data) this.showCommitSuccessMessage("提交成功\n生成发料申请" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

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

@ -131,7 +131,7 @@
issueRequestSubmit(params).then(res => { issueRequestSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发料申请[" + res.data+"]") this.showCommitSuccessMessage("提交成功\n生成发料申请[" + res.data+"]")
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }
@ -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();
} }
}, },

4
src/pages/login/index.vue

@ -261,7 +261,9 @@
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() {
const systemInfo = uni.getSystemInfoSync(); const systemInfo = uni.getSystemInfoSync();

2
src/pages/material/materialDowngrade.vue

@ -230,7 +230,7 @@
putawayRecordSubmit(params).then(res => { putawayRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成采购上架记录<br>" + res.data, ) this.showCommitSuccessMessage("提交成功\n生成采购上架记录\n" + res.data, )
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

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

@ -1,16 +1,20 @@
<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' v-show="dataContent.acceptUserName"></view>
<jobAccept :dataContent="dataContent" v-show="dataContent.acceptUserName"></jobAccept>
</job-com-main-card> </job-com-main-card>
</template> </template>
<script> <script>
import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue' import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue'
import jobComMainDetailCard from '@/mycomponents/job/jobComMainDetailCard.vue' import jobComMainDetailCard from '@/mycomponents/job/jobComMainDetailCard.vue'
import jobAccept from '@/mycomponents/job/jobAccept.vue'
export default { export default {
components: { components: {
jobComMainCard, jobComMainCard,
jobComMainDetailCard jobComMainDetailCard,
jobAccept
}, },
data() { data() {
return {}; return {};

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

@ -81,6 +81,7 @@ import { getDirectoryItemArray } from '@/common/directory';
}, },
closeScanPopup() { closeScanPopup() {
this.packLoseFocus()
this.$emit("closeScan") this.$emit("closeScan")
}, },
@ -94,6 +95,17 @@ import { getDirectoryItemArray } from '@/common/directory';
that.fromLocationList = that.getFromLocationList(); that.fromLocationList = that.getFromLocationList();
} }
}, },
//
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);
@ -132,7 +144,7 @@ import { getDirectoryItemArray } from '@/common/directory';
if (item == undefined) { if (item == undefined) {
this.showErrorMessage('未查找到物料【' + itemCode + '】的翻包明细', this.showErrorMessage('未查找到物料【' + itemCode + '】的翻包明细',
res => { res => {
this.getfocus(); this.packGetFocus();
} }
) )
} else { } else {
@ -159,9 +171,10 @@ 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.getfocus(); that.packGetFocus();
} }
) )
return; return;
@ -169,7 +182,7 @@ import { getDirectoryItemArray } from '@/common/directory';
// if(that.packageInfo.packUnit!=item.Locations[0].Batchs[0].fromPackUnit){ // if(that.packageInfo.packUnit!=item.Locations[0].Batchs[0].fromPackUnit){
// that.showErrorMessage(""+that.packageInfo.packUnit+""+item.Locations[0].Batchs[0].fromPackUnit+"", // that.showErrorMessage(""+that.packageInfo.packUnit+""+item.Locations[0].Batchs[0].fromPackUnit+"",
// res => { // res => {
// that.getfocus(); // that.packGetFocus();
// } // }
// ) // )
// return; // return;
@ -240,7 +253,7 @@ import { getDirectoryItemArray } from '@/common/directory';
} else { } else {
that.showErrorMessage('未查找到该箱码【' + packingCode + '】的明细', that.showErrorMessage('未查找到该箱码【' + packingCode + '】的明细',
res => { res => {
that.getfocus(); that.packGetFocus();
} }
) )
} }
@ -251,7 +264,7 @@ import { getDirectoryItemArray } from '@/common/directory';
} else { } else {
that.showErrorMessage('箱码【' + packingCode + '】已经扫描,请继续扫描下一箱', that.showErrorMessage('箱码【' + packingCode + '】已经扫描,请继续扫描下一箱',
res => { res => {
that.getfocus(); that.packGetFocus();
} }
) )
} }
@ -271,21 +284,21 @@ import { getDirectoryItemArray } from '@/common/directory';
} else { } else {
that.showErrorMessage('未查找到批次【' + lot + '】的翻包明细', that.showErrorMessage('未查找到批次【' + lot + '】的翻包明细',
res => { res => {
that.getfocus(); that.packGetFocus();
}); });
} }
} }
} else { } else {
that.showErrorMessage('未查找到推荐库位【' + that.fromLocationCode + '】的翻包明细', that.showErrorMessage('未查找到推荐库位【' + that.fromLocationCode + '】的翻包明细',
res => { res => {
that.getfocus(); that.packGetFocus();
} }
) )
} }
} catch (e) { } catch (e) {
that.showErrorMessage(e.stack, that.showErrorMessage(e.stack,
res => { res => {
that.getfocus(); that.packGetFocus();
} }
) )
} }
@ -340,19 +353,8 @@ 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.getfocus(); this.packGetFocus();
}, this.$emit('refresh');
getfocus() {
if (this.$refs.scanPopup ) {
this.$refs.scanPopup.getfocus();
}
},
losefocus() {
if (this.$refs.scanPopup ) {
this.$refs.scanPopup.losefocus();
}
}, },
swipeClick(e, item, index) { swipeClick(e, item, index) {
@ -399,10 +401,15 @@ import { getDirectoryItemArray } from '@/common/directory';
}, },
packGetFocus() { packGetFocus() {
this.$refs.scanPopup.getfocus(); if(this.$refs.scanPopup){
this.$refs.scanPopup.packGetFocus();
}
}, },
packLoseFocus() { packLoseFocus() {
this.$refs.scanPopup.packLoseFocus(); if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus();
}
}, },
showMessage(message, callback) { showMessage(message, callback) {
setTimeout(r => { setTimeout(r => {

213
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,13 @@
goHome, goHome,
updateTitle updateTitle
} from '@/common/basic.js'; } from '@/common/basic.js';
import {
getBusinessType
} from '@/common/record.js';
import {
planRefreshTime
} from '@/common/config.js';
import { import {
getDetailOption, getDetailOption,
@ -42,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',
@ -49,7 +66,10 @@
comEmptyView, comEmptyView,
jobFilter, jobFilter,
comOverPackJobCard, comOverPackJobCard,
jobInfoPopup jobInfoPopup,
winComScanBalance,
winScanButton,
jobList
}, },
data() { data() {
return { return {
@ -64,7 +84,12 @@
status: '1,2', // status: '1,2', //
detailOptions: [], detailOptions: [],
detailGiveupOptions: [], detailGiveupOptions: [],
title:'' title:'',
businessTypeCode: "OverPackage",
businessType: null,
timer:null,
scanMessage:""
}; };
}, },
@ -73,7 +98,16 @@
}, },
onShow() { onShow() {
this.getList('refresh');
this.timerRefresh();
},
onHide() {
this.stopRefresh();
},
onUnload(){
this.stopRefresh();
}, },
onReady() { onReady() {
@ -112,6 +146,31 @@
}, },
methods: { methods: {
getBusinessTypeFunc() {
getBusinessType(this.businessTypeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.openScanPopup();
} else {
this.showErrorMessage(res.message)
}
});
},
timerRefresh() {
this.getList('refresh')
this.stopRefresh();
var that = this;
this.timer = setInterval(function() {
that.getList('refresh')
console.log('发料刷新');
}, planRefreshTime)
},
stopRefresh() {
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
},
getList(type) { getList(type) {
let that = this; let that = this;
uni.showLoading({ uni.showLoading({
@ -139,11 +198,6 @@
value: this.status value: this.status
}) })
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
var params = { var params = {
filters: filters, filters: filters,
pageNo: this.pageNo, pageNo: this.pageNo,
@ -202,10 +256,8 @@
}, },
openJobDetail(item) { openJobDetail(item,scanMessage = '') {
uni.navigateTo({ this.getJobInfoByNumber(item.number,scanMessage)
url: './overPackageJobDetail?id=' + item.masterId + '&status=' + item.status+'&title='+this.title
});
}, },
showItemList(itemList) { showItemList(itemList) {
@ -213,7 +265,7 @@
}, },
selectedItem(item) { selectedItem(item) {
this.openJobDetail(item); this.openJobDetail(item.number);
}, },
swipeClick(e, dataContent) { swipeClick(e, dataContent) {
@ -306,6 +358,141 @@
} }
}); });
}, },
openScanPopup() {
if (this.businessType == null) {
this.getBusinessTypeFunc()
} else {
this.$refs.scanPopup.openScanPopup(this.businessType);
}
},
getJobInfoByNumber(number,scanMessage){
console.log("扫描",scanMessage)
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
var filters = []
filters.push({
column: "status",
action: "in",
value: '1,2'
})
filters.push({
column: "number",
action: "==",
value: number
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getOverPageJobList(params).then(res => {
uni.hideLoading();
if (res.data.list.length == 0) {
that.showMessage('未查找到' + '【' + number + '】的发料任务');
} else {
var result =res.data.list[0];
if(result.acceptUserId&&result.acceptUserId!=this.$store.state.user.id){
this.$refs.comMessage.showErrorMessage("任务号["+result.number+"]已经被["+result.acceptUserName+"]承接,无法执行", res => {
if (res) {
this.getList('refresh')
}
});
return;
}
uni.navigateTo({
url: './overPackageJobDetail?id=' + result.masterId + '&status=' + result.status+'&title='+this.title+'&scanMessage=' +
scanMessage
});
this.scanMessage=""
}
}).catch(error => {
uni.hideLoading();
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>

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

@ -35,16 +35,16 @@
</scroll-view> </scroll-view>
</view> </view>
<div style="background: white;"> <div style="background: white;">
<uni-collapse> <!-- <uni-collapse>
<uni-collapse-item> <uni-collapse-item>
<template v-slot:title> <template v-slot:title>
<view class="card_itemName" style="padding: 3px 5px; font-size: 28rpx;"> <view class="card_itemName" style="padding: 3px 5px; font-size: 28rpx;">
打印设置 打印设置
</view> </view>
</template> </template>
<!-- <print ref="printService" @printCode="printCode" @templateCode="templateCode"></print> --> <print ref="printService" @printCode="printCode" @templateCode="templateCode"></print>
</uni-collapse-item> </uni-collapse-item>
</uni-collapse> </uni-collapse> -->
</div> </div>
<view class="page-footer"> <view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10" <view class="uni-flex u-col-center space-between padding_10"
@ -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();
@ -329,6 +337,10 @@
var tempHandleQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].handleQty var tempHandleQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].handleQty
var tempQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].qty var tempQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].qty
var toPackQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].toPackQty var toPackQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].toPackQty
if (tempHandleQty == 0) {
this.showErrorMessage("实际数量为0,请先扫描数据")
return
}
if (tempHandleQty > tempQty) { if (tempHandleQty > tempQty) {
// //
this.showCommitMessage("实际数量【" + tempHandleQty + "】大于需求数量" + "【" + tempQty + "】, 是否提交?", tempHandleQty, this.showCommitMessage("实际数量【" + tempHandleQty + "】大于需求数量" + "【" + tempQty + "】, 是否提交?", tempHandleQty,
@ -394,8 +406,7 @@
barcodeBase64: '', barcodeBase64: '',
}) })
}) })
this.showCommitSuccessMessage("提交成功<br>生成翻包记录<br>", list) this.showCommitSuccessMessage("提交成功\n生成翻包记录\n", list)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }
@ -550,11 +561,18 @@
scanPopupGetFocus() { scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) { if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.packGetFocus();
}
},
scanPopupLoseFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.packLoseFocus();
} }
}, },
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()
@ -562,6 +580,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()
@ -576,9 +595,6 @@
}); });
}, },
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
showCommitSuccess() { showCommitSuccess() {
this.$refs.comMessage.showCommitSuccess(); this.$refs.comMessage.showCommitSuccess();

4
src/pages/package/record/mergePackageRecord.vue

@ -168,7 +168,7 @@
item.subList.push(newDetail); item.subList.push(newDetail);
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]重复扫描")
} }
} }
} }
@ -242,7 +242,7 @@
mergePackageRecordSubmit(params).then(res => { mergePackageRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成合包记录<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成合包记录\n" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

10
src/pages/package/record/overPackageRecord.vue

@ -309,7 +309,7 @@
this.scanPopupGetFocus() this.scanPopupGetFocus()
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + detail.packingNumber + "批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + detail.packingNumber + "批次[" + balance.batch + "]重复扫描")
} }
} }
} }
@ -322,6 +322,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()
@ -361,6 +362,11 @@
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
} }
}, },
scanPopupLoseFocus() {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.losefocus();
}
},
commit() { commit() {
// if(!this.dataContent.printerUuid){ // if(!this.dataContent.printerUuid){
// this.showErrorMessage("") // this.showErrorMessage("")
@ -446,7 +452,7 @@
barcodeBase64: '', barcodeBase64: '',
}) })
}) })
this.showCommitSuccessMessage(res.msg) this.showCommitSuccessMessage("提交成功\n生成翻包记录\n", list)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

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

@ -219,7 +219,7 @@
this.closeScanPopup() this.closeScanPopup()
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + detail.packingNumber + "批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + detail.packingNumber + "批次[" + balance.batch + "]重复扫描")
} }
} }
} }
@ -306,7 +306,7 @@
barcodeBase64: '', barcodeBase64: '',
}) })
}) })
this.showCommitSuccessMessage("提交成功<br>生成拆包记录<br>", list) this.showCommitSuccessMessage("提交成功\n生成拆包记录\n", list)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")

77
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++ uni.hideLoading()
if (this.picIndex == this.data.length) { this.isLoadFinish = true
this.isLoadFinish = true; // #ifdef APP
uni.hideLoading() 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,50 +194,21 @@
"mainBody", str); // "mainBody", str); //
}); });
}, },
generateBase64(index) {
//
if (index == this.picUrl.length) {
this.setHtmlData()
let clearInt = setInterval(() => {
if (!this.newHtmlContent.mainBody) {
// #ifdef APP
testModule.doHTMLPrint(this.newHtmlContent)
// #endif
clearInterval(clearInt)
uni.hideLoading()
}
}, 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() { printImage() {
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",
mask: true mask: true
}) })
this.generateBase64(0) this.setHtmlData()
let clearInt = setInterval(() => {
if (!this.newHtmlContent.mainBody) {
// #ifdef APP
testModule.doHTMLPrint(this.newHtmlContent)
// #endif
clearInterval(clearInt)
uni.hideLoading()
}
}, 1000)
}, },
// #ifdef APP // #ifdef APP

126
src/pages/pointPutawayJob/index.vue

@ -7,23 +7,32 @@
</view> </view>
<view class="" :style="{'paddingTop':isHaveOn && data1 && data1.inspectDTOList && data1.inspectDTOList.length>0?'100rpx': '30rpx'}"> <view class="" :style="{'paddingTop':isHaveOn && data1 && data1.inspectDTOList && data1.inspectDTOList.length>0?'100rpx': '30rpx'}">
<view class="box" style="page-break-before:always;" v-if="tabIndex == 1"> <view class="box" style="page-break-before:always;" v-if="tabIndex == 1">
<view class=""> <view class="relative" v-for="(item,index) in showTableInspectDTOList" :key='index'>
<view class="q">Q</view>
<table border='1'> <table border='1'>
<thead> <thead>
<tr class='top1'> <tr class='top1'>
<th>发货单号:</th> <th>物料代码:</th>
<th colspan='2'>{{data1.asnNumber}}</th> <th colspan='3'>{{item.itemCode}}</th>
</tr>
<tr>
<th>物料代码</th>
<th>供应商批次</th>
<th>检验数量</th>
</tr> </tr>
</thead> </thead>
<tbody> <tbody>
<tr v-for="(item,index) in showTableInspectDTOList" :key='index'> <tr>
<td>{{item.itemCode}}</td> <td>物料名称</td>
<td>{{item.itemName}}</td>
<td>发货单号</td>
<td>{{data1.asnNumber}}</td>
</tr>
<tr>
<td>供应商</td>
<td>{{item.supplierCode}}</td>
<td>批次</td>
<td>{{item.supplierBatch}}</td> <td>{{item.supplierBatch}}</td>
</tr>
<tr>
<td>到货数量</td>
<td>{{item.quantityQty}}</td>
<td>抽检数量</td>
<td>{{item.sampleQty}}</td> <td>{{item.sampleQty}}</td>
</tr> </tr>
</tbody> </tbody>
@ -34,7 +43,7 @@
<com-empty-view v-if="data.length==0"></com-empty-view> <com-empty-view v-if="data.length==0"></com-empty-view>
<!-- 只用于展示页面 --> <!-- 只用于展示页面 -->
<view class="" v-if="tabIndex == 2"> <view class="" v-if="tabIndex == 2">
<view class="box" style="margin-bottom: 20rpx;" v-for='(item,index) in showTableSubList' :key='index'> <view class="box1" style="margin-bottom: 20rpx;" v-for='(item,index) in showTableSubList' :key='index'>
<view class="top"> <view class="top">
<view class="mb-kw"> <view class="mb-kw">
目标库位<view>{{item.toLocationCode}}</view> 目标库位<view>{{item.toLocationCode}}</view>
@ -160,7 +169,7 @@
<div class="mb-bo"> <div class="mb-bo">
<div class="mb-left"> <div class="mb-left">
<div class="mb-text"> <div class="mb-text">
物料号<div>${item.itemCode}</div> 物料号<div>${item.itemCode}asjkdhfksjahfkljashfklsdh</div>
</div> </div>
<div class="mb-text"> <div class="mb-text">
托包装号<div>${item.packingNumber}</div> 托包装号<div>${item.packingNumber}</div>
@ -184,44 +193,48 @@
// html // html
getPurchaseReceiptJobHtml() { getPurchaseReceiptJobHtml() {
this.$nextTick(async () => { this.$nextTick(async () => {
let str2 = '' let str = ''
this.readFile(htmlFileUrl1, (htmlContent) => { this.readFile(htmlFileUrl1, (htmlContent) => {
this.newHtmlContent1 = htmlContent this.newHtmlContent1 = htmlContent
str2 = `<div class="box" style="page-break-before:always;" ><br />
<div class="">
<table border='1'>
<thead>
<tr class='top'>
<th>发货单号:</th>
<th colspan='2'>${this.data1.asnNumber}</th>
</tr>
<tr>
<th>物料代码</th>
<th>供应商批次</th>
<th>检验数量</th>
</tr>
</thead>
<tbody>
strBody
</tbody>
</table>
</div>
</div>
`
let str1 = ''
this.data1.inspectDTOList.forEach(item => { this.data1.inspectDTOList.forEach(item => {
str1 += ` str += `
<tr> <div class="box" style="page-break-before:always;"><br />
<td>${item.itemCode}</td> <div class="relative" >
<td>${item.supplierBatch}</td> <div class="q">Q</div>
<td>${item.sampleQty}</td> <table border='1'>
</tr> <thead>
<tr class='top1'>
<th>物料代码:</th>
<th colspan='3'>${item.itemCode}</th>
</tr>
</thead>
<tbody>
<tr>
<td>物料名称</td>
<td>${item.itemName}</td>
<td>发货单号</td>
<td>${this.data1.asnNumber}</td>
</tr>
<tr>
<td>供应商</td>
<td>${item.supplierCode}</td>
<td>批次</td>
<td>${item.supplierBatch}</td>
</tr>
<tr>
<td>到货数量</td>
<td>${item.quantityQty}</td>
<td>抽检数量</td>
<td>${item.sampleQty}</td>
</tr>
</tbody>
</table>
</div>
</div>
` `
}) })
str2 = str2.replace("strBody", str1)
console.log(335, str1)
this.newHtmlContent1 = this.newHtmlContent1.replace( this.newHtmlContent1 = this.newHtmlContent1.replace(
"mainBody", str2); // "mainBody", str); //
}); });
}) })
@ -308,7 +321,7 @@
}, },
onReachBottom() { onReachBottom() {
if (this.tabIndex == 1) { if (this.tabIndex == 1) {
if (this.showTableInspectDTOList.length != this.data1.inspectDTOList.length) { if (this.showTableInspectDTOList != this.data1.inspectDTOList.length) {
this.getTableInspectDTOList() this.getTableInspectDTOList()
} }
} else { } else {
@ -323,7 +336,7 @@
</script> </script>
<style lang="scss"> <style lang="scss">
.box { .box1 {
font-size: 26rpx; font-size: 26rpx;
/* display: flex; */ /* display: flex; */
/* padding: 20rpx; */ /* padding: 20rpx; */
@ -439,7 +452,7 @@
.top1 th { .top1 th {
font-weight: bold; font-weight: bold;
font-size: 16px; font-size: 13px;
padding: 10px; padding: 10px;
} }
@ -458,6 +471,12 @@
td { td {
padding: 10px; padding: 10px;
&:nth-child(2n){
width:290rpx;
}
&:nth-child(2n+1){
width:160rpx;
}
} }
@ -484,4 +503,17 @@
border-bottom: 4rpx solid rgb(60, 156, 255); border-bottom: 4rpx solid rgb(60, 156, 255);
} }
} }
.relative{
margin-bottom: 20rpx;
position: relative;
}
.q{
position: absolute;
left: 50%;
top:50%;
font-size: 400rpx;
transform: translate(-50% ,-50%);
color: rgba(0, 0, 0, 0.1);
}
</style> </style>

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

@ -345,7 +345,7 @@
this.submitJob(); this.submitJob();
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount +
"]箱总共[" + this "]箱总共[" + this
.subList.length + "]箱", res => { .subList.length + "]箱", res => {
if (res) { if (res) {
@ -373,7 +373,7 @@
console.log("提交参数", JSON.stringify(params)); console.log("提交参数", JSON.stringify(params));
// productDismantleJobSubmit(this.id, params).then(res => { // productDismantleJobSubmit(this.id, params).then(res => {
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data.Number, ) // this.showCommitSuccessMessage("\n" + res.data.Number, )
// } else { // } else {
// this.showErrorMessage("[" + res.msg + "]") // this.showErrorMessage("[" + res.msg + "]")
// } // }

2
src/pages/productDismantle/record/productDismantleRecord.vue

@ -243,7 +243,7 @@
// productDismantleRecordSubmit(params).then(res => { // productDismantleRecordSubmit(params).then(res => {
// uni.hideLoading() // uni.hideLoading()
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br>" + res.data, ) // this.showCommitSuccessMessage("\n" + res.data, )
// } else { // } else {
// this.showErrorMessage("[" + res.msg + "]") // this.showErrorMessage("[" + res.msg + "]")
// } // }

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

@ -1,16 +1,20 @@
<template> <template>
<job-com-main-card :dataContent="dataContent"> <job-com-main-card :dataContent="dataContent">
<jobComMainDetailCard :dataContent="dataContent"></jobComMainDetailCard> <jobComMainDetailCard :dataContent="dataContent"></jobComMainDetailCard>
</job-com-main-card> <view class='split_line' v-show="dataContent.acceptUserName"></view>
<jobAccept :dataContent="dataContent" v-show="dataContent.acceptUserName"></jobAccept>
</job-com-main-card>
</template> </template>
<script> <script>
import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue' import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue'
import jobComMainDetailCard from '@/mycomponents/job/jobComMainDetailCard.vue' import jobComMainDetailCard from '@/mycomponents/job/jobComMainDetailCard.vue'
export default { import jobAccept from '@/mycomponents/job/jobAccept.vue'
export default {
components: { components: {
jobComMainCard, jobComMainCard,
jobComMainDetailCard jobComMainDetailCard,
jobAccept
}, },
data() { data() {
return {}; return {};

25
src/pages/productPutaway/job/fgProductPutawayJob.vue

@ -19,18 +19,29 @@
onLoad(option){ onLoad(option){
this.title = option.title this.title = option.title
}, },
onReachBottom() {
this.$refs.productPutawayJob.onReach();
},
onShow() { onShow() {
if(this.$refs.productPutawayJob!=undefined){ if(this.$refs.productPutawayJob){
this.$refs.productPutawayJob.refresh(); this.$refs.productPutawayJob.timerRefresh();
} }
}, },
onHide() {
if(this.$refs.productPutawayJob){
this.$refs.productPutawayJob.stopRefresh();
}
},
onUnload(){
if(this.$refs.productPutawayJob){
this.$refs.productPutawayJob.stopRefresh();
}
},
onPullDownRefresh() { onPullDownRefresh() {
this.$refs.productPutawayJob.refresh(); this.$refs.productPutawayJob.timerRefresh();
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
if (e.index === 0) { if (e.index === 0) {
this.$refs.productPutawayJob.toHome(); this.$refs.productPutawayJob.toHome();

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

@ -407,7 +407,7 @@
this.submitJob(); this.submitJob();
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount +
"]箱总共[" + this "]箱总共[" + this
.subList.length + "]箱", res => { .subList.length + "]箱", res => {
if (res) { if (res) {
@ -456,7 +456,7 @@
productPutawayJobSubmit(params).then(res => { productPutawayJobSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成" + this.hintTitle + "记录<br>" + this.showCommitSuccessMessage("提交成功\n生成" + this.hintTitle + "记录\n" +
res.data) res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")

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

@ -45,6 +45,9 @@
getDetailOption, getDetailOption,
getDetailGiveupOption getDetailGiveupOption
} from '@/common/array.js'; } from '@/common/array.js';
import {
planRefreshTime
} from '@/common/config.js';
import comEmptyView from '@/mycomponents/common/comEmptyView.vue' import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
import jobFilter from '@/mycomponents/job/jobFilter.vue' import jobFilter from '@/mycomponents/job/jobFilter.vue'
@ -79,7 +82,8 @@
status: '1,2', // status: '1,2', //
detailOptions: [], detailOptions: [],
detailGiveupOptions: [], detailGiveupOptions: [],
scanMessage: "" scanMessage: "",
timer:null
}; };
}, },
props: { props: {
@ -90,26 +94,15 @@
} }
}, },
mounted() {
this.getList('refresh');
},
onReady() { onReady() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption(); this.detailGiveupOptions = getDetailGiveupOption();
}, },
onReachBottom() { mounted() {
// this.timerRefresh()
if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return;
}
this.getList("more");
},
onPullDownRefresh() {
this.getList('refresh');
}, },
//退 //退
onBackPress(options) { onBackPress(options) {
@ -121,15 +114,6 @@
} }
}, },
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
} else if (e.index == 1) {
this.$refs.filter.openFilter();
}
},
methods: { methods: {
onReach() { onReach() {
// //
@ -144,8 +128,22 @@
openFilter() { openFilter() {
this.$refs.filter.openFilter(); this.$refs.filter.openFilter();
}, },
refresh() {
timerRefresh() {
this.getList('refresh'); this.getList('refresh');
this.stopRefresh();
var that = this;
this.timer = setInterval(function() {
that.getList('refresh');
console.log('预生产上架刷新');
}, planRefreshTime)
},
stopRefresh() {
console.log('stopRefresh预生产上架刷新');
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
}, },
getList(type) { getList(type) {
let that = this; let that = this;
@ -174,11 +172,6 @@
value: this.status value: this.status
}) })
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
filters.push({ filters.push({
column: "type", column: "type",
action: "==", action: "==",
@ -220,11 +213,58 @@
}, },
openJobDetail(item, scanMessage = '') { openJobDetail(item, scanMessage = '') {
uni.navigateTo({ this.getJobInfoByNumber(item.number,scanMessage)
url: './productPutawayDetail?id=' + item.masterId + '&status=' + item.status + '&type=' + item },
.type + '&scanMessage=' + this.scanMessage + '&title=' + this.title
getJobInfoByNumber(number,scanMessage){
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
}); });
this.scanMessage = "" var filters = []
filters.push({
column: "status",
action: "in",
value: '1,2'
})
filters.push({
column: "number",
action: "==",
value: number
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getProductPutawayJobList(params).then(res => {
uni.hideLoading();
if (res.data.list.length == 0) {
that.showMessage('未查找到' + '【' + number + '】的发料任务');
} else {
var result =res.data.list[0];
if(result.acceptUserId&&result.acceptUserId!=this.$store.state.user.id){
this.$refs.comMessage.showErrorMessage("任务号["+result.number+"]已经被["+result.acceptUserName+"]承接,无法执行", res => {
if (res) {
this.getList('refresh')
}
});
return;
}
uni.navigateTo({
url: './productPutawayDetail?id=' + result.masterId + '&status=' + result.status + '&type=' + result
.type + '&scanMessage=' + this.scanMessage + '&title=' + this.title
});
this.scanMessage = ""
}
}).catch(error => {
uni.hideLoading();
that.showMessage(error);
})
}, },
showItemList(itemList) { showItemList(itemList) {
@ -298,12 +338,6 @@
action: "==", action: "==",
value: code value: code
}) })
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
var params = { var params = {
filters: filters, filters: filters,
pageNo: 1, pageNo: 1,
@ -323,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()
}
} }
}); });
@ -374,11 +414,6 @@
column: "status", column: "status",
action: "in", action: "in",
value: '1,2', value: '1,2',
},
{
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
} }
// { // {
// column: "fromLocationCode", // column: "fromLocationCode",
@ -411,10 +446,10 @@
this.selectItem(list[0]) this.selectItem(list[0])
} }
} else { } else {
this.showMessage("未查找到任务<br>" + "扫描[" + result.scanMessage + "]") this.showMessage("未查找到任务\n" + "扫描[" + result.scanMessage + "]")
} }
}).catch(error => { }).catch(error => {
this.showMessage(error + "<br>扫描[" + result.scanMessage + "]") this.showMessage(error + "\n扫描[" + result.scanMessage + "]")
}) })
} catch (e) { } catch (e) {

25
src/pages/productPutaway/job/semiProductPutawayJob.vue

@ -21,15 +21,30 @@
}, },
onShow() { onShow() {
if(this.$refs.productPutawayJob!=undefined){ if(this.$refs.productPutawayJob){
this.$refs.productPutawayJob.refresh(); this.$refs.productPutawayJob.timerRefresh();
} }
}, },
onReachBottom() {
this.$refs.productPutawayJob.onReach(); onHide() {
if(this.$refs.productPutawayJob){
this.$refs.productPutawayJob.stopRefresh();
}
},
onUnload(){
if(this.$refs.productPutawayJob){
this.$refs.productPutawayJob.stopRefresh();
}
console.log("页面销毁")
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.$refs.productPutawayJob.refresh(); this.$refs.productPutawayJob.timerRefresh();
},
onReachBottom() {
this.$refs.productPutawayJob.onReach();
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
if (e.index === 0) { if (e.index === 0) {

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

@ -182,7 +182,7 @@
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch +
"]已经在列表中") "]重复扫描")
} }
} }
} }
@ -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);
@ -274,6 +277,12 @@
this.$refs.scanPopup.getfocus(); this.$refs.scanPopup.getfocus();
} }
}, },
scanPopupLoseFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus();
}
},
scanLocationCode(location, code) { scanLocationCode(location, code) {
this.toLocationCode = code this.toLocationCode = code
@ -303,7 +312,7 @@
productPutawayRecordSubmit(params).then(res => { productPutawayRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成制品上架记录<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成制品上架记录\n" + res.data)
let removeId = []; let removeId = [];
this.detailSource.forEach(r => { this.detailSource.forEach(r => {
removeId.push(r.expectinNumber); removeId.push(r.expectinNumber);

4
src/pages/productPutaway/request/putawayRequestCreate.vue

@ -206,7 +206,7 @@
// }); // });
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中") this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]重复扫描")
} }
} }
} }
@ -286,7 +286,7 @@
productPutawayRequestSubmit(params).then(res => { productPutawayRequestSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成制品上架申请<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成制品上架申请\n" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

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

@ -1,6 +1,9 @@
<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' v-show="dataContent.acceptUserName"></view>
<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="">
@ -36,10 +39,12 @@
<script> <script>
import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue' import jobComMainCard from '@/mycomponents/job/jobComMainCard.vue'
import jobComMainDetailCard from '@/mycomponents/job/jobComMainDetailCard.vue' import jobComMainDetailCard from '@/mycomponents/job/jobComMainDetailCard.vue'
import jobAccept from '@/mycomponents/job/jobAccept.vue'
export default { export default {
components: { components: {
jobComMainCard, jobComMainCard,
jobComMainDetailCard jobComMainDetailCard,
jobAccept
}, },
data() { data() {
return {}; return {};

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

@ -366,7 +366,7 @@
} }
} else { } else {
// //
this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.subList this.showMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + "]总共[" + this.subList
.length + .length +
"]"); "]");
} }
@ -418,7 +418,7 @@
ccProductReceiptJobsubmit(params).then(res => { ccProductReceiptJobsubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成装配收货记录<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成装配收货记录\n" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

11
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()
}
} }
}); });
}, },
@ -416,10 +421,10 @@
this.selectItem(list[0]) this.selectItem(list[0])
} }
} else { } else {
this.showMessage("未查找到任务<br>" + "扫描[" + result.scanMessage + "]") this.showMessage("未查找到任务\n" + "扫描[" + result.scanMessage + "]")
} }
}).catch(error => { }).catch(error => {
this.showMessage(error + "<br>扫描[" + result.scanMessage + "]") this.showMessage(error + "\n扫描[" + result.scanMessage + "]")
}) })
} catch (e) { } catch (e) {

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

@ -305,7 +305,7 @@
this.submitJob(); this.submitJob();
} else { } else {
// //
this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.subList this.showMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + "]总共[" + this.subList
.length + .length +
"]"); "]");
} }
@ -330,7 +330,7 @@
productReceiptJobsubmit(params).then(res => { productReceiptJobsubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成制品收货记录<br>" + res.data, ) this.showCommitSuccessMessage("提交成功\n生成制品收货记录\n" + res.data, )
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

2
src/pages/productReceipt/job/fgProductReceiptDetail.vue

@ -495,7 +495,7 @@
productReceiptJobsubmit(params).then(res => { productReceiptJobsubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成装配收货记录<br>" + res.data, ) this.showCommitSuccessMessage("提交成功\n生成装配收货记录\n" + res.data, )
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

20
src/pages/productReceipt/job/fgProductReceiptJob.vue

@ -20,15 +20,27 @@
onLoad(option){ onLoad(option){
this.title = option.title this.title = option.title
}, },
onShow() { onShow() {
if(this.$refs.productreceiptjob!=undefined){ if(this.$refs.productreceiptjob){
this.$refs.productreceiptjob.refresh(); this.$refs.productreceiptjob.timerRefresh();
}
},
onHide() {
if(this.$refs.productreceiptjob){
this.$refs.productreceiptjob.stopRefresh();
}
},
onUnload(){
if(this.$refs.productreceiptjob){
this.$refs.productreceiptjob.stopRefresh();
} }
}, },
onPullDownRefresh() { onPullDownRefresh() {
this.$refs.productreceiptjob.refresh(); this.$refs.productreceiptjob.timerRefresh();
}, },
onReachBottom() { onReachBottom() {

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

@ -361,7 +361,7 @@
} }
} else { } else {
// //
this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.subList this.showMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + "]总共[" + this.subList
.length + .length +
"]"); "]");
} }
@ -413,7 +413,7 @@
productReceiptJobsubmit(params).then(res => { productReceiptJobsubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成预生产收货记录<br>" + res.data, ) this.showCommitSuccessMessage("提交成功\n生成预生产收货记录\n" + res.data, )
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

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

@ -38,7 +38,11 @@
goHome, goHome,
updateTitle updateTitle
} from '@/common/basic.js'; } from '@/common/basic.js';
import {
planRefreshTime
} from '@/common/config.js';
import { import {
getDetailOption, getDetailOption,
getDetailGiveupOption getDetailGiveupOption
@ -79,7 +83,8 @@
status: '1,2', // status: '1,2', //
detailOptions: [], detailOptions: [],
detailGiveupOptions: [], detailGiveupOptions: [],
scanMessage: "" scanMessage: "",
timer:null
}; };
}, },
// type = 'assemble' // type = 'assemble'
@ -96,13 +101,7 @@
mounted() { mounted() {
this.detailOptions = getDetailOption(); this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption(); this.detailGiveupOptions = getDetailGiveupOption();
this.getList('refresh'); this.timerRefresh()
},
onPullDownRefresh() {
this.getList('refresh');
}, },
@ -134,8 +133,22 @@
} }
this.getList("more"); this.getList("more");
}, },
refresh() {
timerRefresh() {
this.getList('refresh'); this.getList('refresh');
this.stopRefresh();
var that = this;
this.timer = setInterval(function() {
that.getList('refresh');
console.log('装配刷新');
}, planRefreshTime)
},
stopRefresh() {
console.log('stopRefresh装配刷新');
if (this.timer) {
clearInterval(this.timer);
this.timer = null;
}
}, },
getList(type) { getList(type) {
let that = this; let that = this;
@ -162,11 +175,6 @@
action: "in", action: "in",
value: this.status value: this.status
}) })
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
filters.push({ filters.push({
column: "type", column: "type",
action: "==", action: "==",
@ -210,23 +218,7 @@
}, },
openJobDetail(item, scanMessage = '') { openJobDetail(item, scanMessage = '') {
if (this.type == 'predict') { this.getJobInfoByNumber(item.number,scanMessage)
uni.navigateTo({
url: './productReceiptDetail?id=' + item.masterId + '&status=' + item.status +
'&scanMessage=' + scanMessage + '&title=' + this.title
});
} else if (this.type == 'assemble') {
uni.navigateTo({
url: './fgProductReceiptDetail?id=' + item.masterId + '&status=' + item.status +
'&scanMessage=' + scanMessage + '&title=' + this.title
});
} else {
uni.navigateTo({
url: './scrapReceiptDetail?id=' + item.masterId + '&status=' + item.status +
'&scanMessage=' + scanMessage + '&title=' + this.title
});
}
this.scanMessage = ""
}, },
showItemList(itemList) { showItemList(itemList) {
@ -300,11 +292,6 @@
action: "==", action: "==",
value: code value: code
}) })
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
var params = { var params = {
filters: filters, filters: filters,
@ -325,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()
}
} }
}); });
}, },
@ -382,11 +374,6 @@
column: "status", column: "status",
action: "in", action: "in",
value: '1,2', value: '1,2',
},
{
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
} }
] ]
getProductReceiptJobList({ getProductReceiptJobList({
@ -413,16 +400,78 @@
this.selectItem(list[0]) this.selectItem(list[0])
} }
} else { } else {
this.showMessage("未查找到任务<br>" + "扫描[" + result.scanMessage + "]") this.showMessage("未查找到任务\n" + "扫描[" + result.scanMessage + "]")
} }
}).catch(error => { }).catch(error => {
this.showMessage(error + "<br>扫描[" + result.scanMessage + "]") this.showMessage(error + "\n扫描[" + result.scanMessage + "]")
}) })
} catch (e) { } catch (e) {
this.showMessage(e.message) this.showMessage(e.message)
} }
}, },
getJobInfoByNumber(number,scanMessage){
let that = this;
uni.showLoading({
title: "加载中....",
mask: true
});
var filters = []
filters.push({
column: "status",
action: "in",
value: '1,2'
})
filters.push({
column: "number",
action: "==",
value: number
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getProductReceiptJobList(params).then(res => {
uni.hideLoading();
if (res.data.list.length == 0) {
that.showMessage('未查找到' + '【' + number + '】的发料任务');
} else {
var result =res.data.list[0];
if(result.acceptUserId&&result.acceptUserId!=this.$store.state.user.id){
this.$refs.comMessage.showErrorMessage("任务号["+result.number+"]已经被["+result.acceptUserName+"]承接,无法执行", res => {
if (res) {
this.getList('refresh')
}
});
return;
}
if (this.type == 'predict') {
uni.navigateTo({
url: './productReceiptDetail?id=' + result.masterId + '&status=' + result.status +
'&scanMessage=' + scanMessage + '&title=' + this.title
});
} else if (this.type == 'assemble') {
uni.navigateTo({
url: './fgProductReceiptDetail?id=' + result.masterId + '&status=' + result.status +
'&scanMessage=' + scanMessage + '&title=' + this.title
});
} else {
uni.navigateTo({
url: './scrapReceiptDetail?id=' + result.masterId + '&status=' + result.status +
'&scanMessage=' + scanMessage + '&title=' + this.title
});
}
this.scanMessage = ""
}
}).catch(error => {
uni.hideLoading();
that.showMessage(error);
})
},
} }
} }

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

@ -295,22 +295,40 @@
return return
} }
//
// let str = ''
if (this.scanCount == this.subList.length) { this.detailSource.forEach((item) => {
this.submitJob(); item.subList.forEach(cur => {
} else if (this.scanCount < this.subList.length) { if (cur.qty != cur.handleQty) {
// str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致`
if (this.jobContent.allowPartialComplete == "TRUE") { }
// })
this.submitJob(); })
} else { if (str) {
// str += ',是否确认提交?'
this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.subList this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
.length + if (res) {
"]"); this.submitJob()
} }
});
} else {
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 +
// "]");
// }
// }
}, },
@ -331,7 +349,7 @@
productReceiptJobsubmit(params).then(res => { productReceiptJobsubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成报废收货记录<br>" + res.data, ) this.showCommitSuccessMessage("提交成功\n生成报废收货记录\n" + res.data, )
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

28
src/pages/productReceipt/job/scrapReceiptJob.vue

@ -20,16 +20,30 @@
onLoad(option){ onLoad(option){
this.title = option.title this.title = option.title
}, },
onShow(){ onShow() {
this.$nextTick(()=>{ if(this.$refs.productreceiptjob){
this.$refs.productreceiptjob.refresh() this.$refs.productreceiptjob.timerRefresh();
}) }
}, },
onReachBottom() {
this.$refs.productreceiptjob.onReach(); onHide() {
if(this.$refs.productreceiptjob){
this.$refs.productreceiptjob.stopRefresh();
}
}, },
onUnload(){
if(this.$refs.productreceiptjob){
this.$refs.productreceiptjob.stopRefresh();
}
},
onPullDownRefresh() { onPullDownRefresh() {
this.$refs.productreceiptjob.refresh(); this.$refs.productreceiptjob.timerRefresh();
},
onReachBottom() {
this.$refs.productreceiptjob.onReach();
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
if (e.index === 0) { if (e.index === 0) {

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

@ -305,7 +305,7 @@
this.submitJob(); this.submitJob();
} else { } else {
// //
this.showMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.subList this.showMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount + "]总共[" + this.subList
.length + .length +
"]"); "]");
} }
@ -330,7 +330,7 @@
productReceiptJobsubmit(params).then(res => { productReceiptJobsubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成制品收货记录<br>" + res.data, ) this.showCommitSuccessMessage("提交成功\n生成制品收货记录\n" + res.data, )
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

21
src/pages/productReceipt/job/semiProductReceiptJob.vue

@ -24,14 +24,27 @@
this.$refs.productreceiptjob.onReach(); this.$refs.productreceiptjob.onReach();
}, },
onShow() { onShow() {
if(this.$refs.productreceiptjob!=undefined){ if(this.$refs.productreceiptjob){
this.$refs.productreceiptjob.refresh(); this.$refs.productreceiptjob.timerRefresh();
} }
}, },
onHide() {
if(this.$refs.productreceiptjob){
this.$refs.productreceiptjob.stopRefresh();
}
},
onUnload(){
if(this.$refs.productreceiptjob){
this.$refs.productreceiptjob.stopRefresh();
}
},
onPullDownRefresh() { onPullDownRefresh() {
this.$refs.productreceiptjob.refresh(); this.$refs.productreceiptjob.timerRefresh();
}, },
onNavigationBarButtonTap(e) { onNavigationBarButtonTap(e) {
if (e.index === 0) { if (e.index === 0) {
this.$refs.productreceiptjob.toHome(); this.$refs.productreceiptjob.toHome();

4
src/pages/productReceipt/record/productReceiptRecord.vue

@ -170,7 +170,7 @@
item.subList.push(newDetail); item.subList.push(newDetail);
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + label.packingNumber + "批次[" + label.batch + "]已经在列表中") this.showErrorMessage("箱码[" + label.packingNumber + "批次[" + label.batch + "]重复扫描")
} }
} }
} }
@ -249,7 +249,7 @@
productionReceiptRecordSubmit(params).then(res => { productionReceiptRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成制品收货记录<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成制品收货记录\n" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }

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

@ -249,8 +249,8 @@
if (itemDetail) { if (itemDetail) {
// //
if (itemDetail.scaned) { if (itemDetail.scaned) {
this.showErrorMessage("箱码【" + packingNumber + "】<br>批次【" + batch + "】<br>库位【" + result this.showErrorMessage("箱码【" + packingNumber + "】\n批次【" + batch + "】\n库位【" + result
.fromLocationCode + "】<br>状态【" + balanceStatus + "】<br>已经扫描") .fromLocationCode + "】\n状态【" + balanceStatus + "】\n已经扫描")
return; return;
} else { } else {
itemDetail.scaned = true; itemDetail.scaned = true;
@ -299,8 +299,8 @@
}); });
} }
} else { } else {
this.showErrorMessage("箱码【" + packingNumber + "】<br>批次【" + batch + "】<br>库位【" + result this.showErrorMessage("箱码【" + packingNumber + "】\n批次【" + batch + "】\n库位【" + result
.fromLocationCode + "】<br>状态【" + balanceStatus + "】<br>不在任务列表中") .fromLocationCode + "】\n状态【" + balanceStatus + "】\n不在任务列表中")
} }
} }
@ -318,26 +318,45 @@
this.showErrorMessage("扫描数为0,请先扫描") this.showErrorMessage("扫描数为0,请先扫描")
return; return;
} }
// //
// let str = ''
if (this.scanCount == this.subList.length) { this.detailSource.forEach((item) => {
this.submitJob(); item.subList.forEach(cur => {
} else if (this.scanCount < this.subList.length) { if (cur.qty != cur.handleQty) {
// str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致`
if (this.jobContent.allowPartialComplete == "TRUE") { }
// })
this.submitJob(); })
} else { if (str) {
// str += ',是否确认提交?'
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
"]箱总共[" + this if (res) {
.subList.length + "]箱", res => { this.submitJob()
if (res) { }
this.openScanPopup(); });
} } else {
}); 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() {
@ -423,6 +442,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()
@ -431,6 +451,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()
@ -444,13 +465,15 @@
this.$refs.comMessage.showQuestionMessage(message, res => { this.$refs.comMessage.showQuestionMessage(message, res => {
if (res) { if (res) {
callback(res); callback(res);
}else {
this.scanPopupGetFocus()
} }
}); });
}) })
}, },
showCommitSuccessMessage(number) { showCommitSuccessMessage(number) {
this.$refs.comMessage.showSuccessMessage('提交成功<br>生成制品回收记录<br>:' + number, res => { this.$refs.comMessage.showSuccessMessage('提交成功\n生成制品回收记录\n:' + number, res => {
navigateBack(1) navigateBack(1)
}) })
} }

4
src/pages/productRecycle/record/productRecycleRecord.vue

@ -204,7 +204,7 @@
let newDetail = createDetailInfo(balance, pack); let newDetail = createDetailInfo(balance, pack);
item.subList.push(newDetail); item.subList.push(newDetail);
} else { } else {
this.showErrorMessage('箱码[' + balance.packingNumber + "]已经在列表中") this.showErrorMessage('箱码[' + balance.packingNumber + "]重复扫描")
} }
} }
calcHandleQty(this.detailSource); calcHandleQty(this.detailSource);
@ -251,7 +251,7 @@
productRecycleRecordSubmit(params).then(res => { productRecycleRecordSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成采购退货记录<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成采购退货记录\n" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg+"]") this.showErrorMessage("提交失败[" + res.msg+"]")
} }

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

@ -213,6 +213,32 @@
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){
this.showQuestionMessage("扫描数量["+noCommitInfo.handleQty+"]任务数量["+noCommitInfo.qty+"]不一致,是否提交?",res=>{
if(res){
this.commit()
}
})
}else {
//
this.commit()
}
}, },
// //
@ -332,6 +358,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 +381,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();
} }
} }
} }
@ -384,7 +412,7 @@
this.submitJob(); this.submitJob();
} else { } else {
// //
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount +
"]箱总共[" + this "]箱总共[" + this
.subList.length + "]箱", res => { .subList.length + "]箱", res => {
if (res) { if (res) {
@ -425,7 +453,7 @@
productionReceiptJobSubmit(params).then(res => { productionReceiptJobSubmit(params).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data) { if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发料接收记录<br>" + res.data) this.showCommitSuccessMessage("提交成功\n生成发料接收记录\n" + res.data)
} else { } else {
this.showErrorMessage("提交失败[" + res.msg + "]") this.showErrorMessage("提交失败[" + res.msg + "]")
} }
@ -449,7 +477,7 @@
// productionReceiptJobSubmit(params).then(res => { // productionReceiptJobSubmit(params).then(res => {
// uni.hideLoading() // uni.hideLoading()
// if (res.data) { // if (res.data) {
// this.showCommitSuccessMessage("<br><br>" + res.data) // this.showCommitSuccessMessage("\n\n" + res.data)
// } else { // } else {
// this.showErrorMessage("[" + res.msg + "]") // this.showErrorMessage("[" + res.msg + "]")
// } // }

Some files were not shown because too many files changed in this diff

Loading…
Cancel
Save