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_IMAGE=http://172.22.32.8:81/admin-api
VITE_BASE_URL=http://172.21.32.13:81/api/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_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 {
removeToken
} from '@/common/utils/auth'
function service(options = {}) {
var token = storage.getStorage(storage.constant.token)
var tenantId = storage.getStorage('tenantId')
// if(getApp()!=undefined){
@ -16,63 +16,109 @@ function service(options = {}) {
// }
var requestUrl = ""
requestUrl = import.meta.env.VITE_BASE_URL
options.header = {
"content-type": "application/json",
"Authorization": "Bearer "+token,
"dataType":"json",
"dataSource":"PDA",
"tenant-id":tenantId
"Authorization": "Bearer " + token,
"dataType": "json",
"dataSource": "PDA",
"tenant-id": tenantId
};
options.timeout = 300000
options.url = requestUrl+options.url
options.url = requestUrl + options.url
return new Promise((resolve, reject) => {
options.success = (res) => {
if (res ) {
if(res.statusCode == 200){
if(res.data.code==0){
resolve(res.data);
}else {
if(res.data.code==401){
uni.clearStorageSync()
uni.removeStorageSync('overPackageRecord') // 删除直接翻包中缓存的来源库位
removeToken();
uni.reLaunch({
url: '/pages/login/index'
})
}
reject("系统异常:"+res.data.msg)
console.log("系统异常",res.data.msg)
options.success = (res) => {
if (res) {
if (res.statusCode == 200) {
if (res.data.code == 0) {
resolve(res.data);
} else {
if (res.data.code == 401) {
uni.clearStorageSync()
uni.removeStorageSync('overPackageRecord') // 删除直接翻包中缓存的来源库位
removeToken();
uni.reLaunch({
url: '/pages/login/index'
})
}
if (res.data.msg) {
if (res.data.msg.includes('get lock')) {
reject("系统异常:状态码["+res.statusCode +"]\n"+"数据库死锁")
} else {
reject("系统异常:状态码["+res.statusCode +"]\n"+res.data.msg)
}
}else {
reject("系统异常:"+ res.data.msg)
console.log("系统异常",res.data.msg)
} else {
reject("系统异常:状态码["+res.statusCode+"]")
}
}
} 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 {
reject("系统异常:"+res.data.msg)
console.log("系统异常",res.data.msg)
reject("系统异常:状态码["+res.statusCode+"]")
}
};
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 (res.data.msg) {
if (res.data.msg.includes('get lock')) {
reject("系统异常:状态码["+res.statusCode +"]\n"+ "数据库死锁")
} else {
reject("系统异常:状态码["+res.statusCode +"]\n"+ res.data.msg)
}
reject("系统异常:"+message);
console.log("系统异常",message)
};
uni.request(options);
});
}
} else {
reject("系统异常:状态码["+res.statusCode+"]")
}
}
};
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({
url: baseApi + '/system/user/profile/update-password',
method: 'PUT',
params: data
data: data
})
}

4
src/common/config.js

@ -1,2 +1,4 @@
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
}
.top th {
.top1 th {
font-weight: bold;
font-size: 16px;
font-size: 13px;
padding: 10px;
text-align: left;
}
@ -42,13 +43,33 @@
width: 100%
}
th{
text-align:left;
font-weight: bold;
font-size: 13px;
padding: 10px;
}
td{
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>
</head>
<body>

4
src/manifest.json

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

42
src/mycomponents/common/comMessage.vue

@ -13,8 +13,11 @@
<image class="icon" :src="icon" />
</slot>
<slot name="content">
<rich-text class="content" :nodes="content">
</rich-text>
<text class="content" :style="{'color': textColor?textColor:'#000'}" >
{{content}}
</text>
<!-- <rich-text class="content" :nodes="content" v-else></rich-text> -->
</slot>
<view class='split_line'></view>
<slot name="button">
@ -62,7 +65,9 @@
isDisabled: true, // true
seconds: 0,
success: () => {} ,//
version:""
version:"",
textColor:'',
count:0
}
},
@ -154,7 +159,11 @@
showQuestionMessage(mContent, callback) {
this.showSelectModal("疑问", mContent, callback);
},
// (+
showQuestionMessage1(mContent,textColor, callback) {
console.log(textColor)
this.showSelectModal1("疑问", mContent, callback,textColor);
},
// (+)
showWarningMessage(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) {
@ -396,6 +425,11 @@
this.cancelColor = '#666F83'
}
if (data.textColor) {
this.textColor = data.textColor
} else {
this.textColor = ''
}
if (data.showConfirmButton === false || data.showConfirmButton === true) {
this.showConfirmButton = data.showConfirmButton
} 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"
placeholder="请输入来源库位" @confirm="fromLocationCodeConfirm" />
</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="uni-flex u-row-center" style="margin-top: 30rpx;" v-if="isShowAsn">
@ -59,7 +75,7 @@
</view> -->
<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_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>
@ -125,6 +141,16 @@
isShowQurery: {
type: Boolean,
default: false
},
//
isShowFromAreaCode: {
type: Boolean,
default: false
},
//
isShowToAreaCode: {
type: Boolean,
default: false
}
},
data() {
@ -134,6 +160,8 @@
checkedWaitModel: false,
productionLineCode: '', // 线
fromLocationCode: '', //
fromAreaCode: '', //
toAreaCode: '', //
itemCode: '', //
creationTime: '',
status: ''
@ -161,6 +189,8 @@
let params = {
productionLineCode: this.productionLineCode,
fromLocationCode: this.fromLocationCode,
fromAreaCode: this.fromAreaCode, //
toAreaCode: this.toAreaCode, //
itemCode: this.itemCode,
creationTime: this.creationTime,
status: this.status
@ -170,6 +200,8 @@
reset(){
this.productionLineCode = ''
this.fromLocationCode = ''
this.fromAreaCode = ''//
this.toAreaCode = ''//
this.itemCode = ''
this.creationTime = ''
this.status = ''

40
src/mycomponents/scan/winCheckFgLabel.vue

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

77
src/mycomponents/scan/winComScan.vue

@ -4,11 +4,15 @@
<view>
<view class="pop_tab">
<view class="tab_info">
<view class="conbox">
<textarea inputmode="none" v-model="scanMsg" trim="all" maxlength="1000" style="margin-left: 5px;width: 90%;"
:focus="boxfocus" :placeholder="placeholderValue"
<view class="conbox" >
<textarea
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>
</view>
</view>
<view class="uni-flex uni-row space-between u-col-center">
<!-- <view class="paizhao" @click="scanQRCode()" v-if="true">
@ -16,7 +20,7 @@
</view> -->
<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>
</view>
</view>
@ -73,10 +77,10 @@
type: Boolean,
default: true
},
boxFocus: {
type: Boolean,
default: true
},
// boxFocus: {
// type: Boolean,
// default: true
// },
isShowHistory: {
type: Boolean,
default: true
@ -100,41 +104,7 @@
}
},
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: {
placeholder() {
@ -169,6 +139,7 @@
},
clearScanValue() {
this.scanMsg = ''
this.cursorIndex =0
this.getfocus();
},
clickScanMsg() {
@ -186,10 +157,10 @@
if (index >= 0) {
// that.scanMsg = 'HPQ;V1.0;ICE115F11161AG;PP20230427000027;B20230427002;Q50';
setTimeout(() => {
that.losefocus();
that.losefocus();
let content = uni.$u.trim(that.scanMsg)
if (content == "") {
that.getfocus();
// that.getfocus();
this.$refs.comMessage.showErrorMessage("扫描内容为空,请重新扫描", res => {
if (res) {
that.scanMsg = ""
@ -212,6 +183,7 @@
that.$emit("getResult", scanResult);
} else {
that.clear();
that.losefocus();
this.$refs.comMessage.showErrorMessage(scanResult.message, res => {
if (res) {
that.getfocus();
@ -222,20 +194,25 @@
}, 500);
}
},
handleFocus(){
},
handleBlur(){
// setTimeout(res=>{
// uni.hideKeyboard();
// },200)
},
getfocus() {
let that = this;
this.$nextTick(r => {
console.log("获取焦点")
that.boxfocus = true;
});
// this.hide()
},
losefocus() {
let that = this;
this.$nextTick(r => {
console.log("失去焦点")
that.boxfocus = false;
uni.hideKeyboard();
});
},
clear() {
@ -289,7 +266,7 @@
<script module="textarea" lang="renderjs">
export default {
mounted() {
document.querySelector('textarea').setAttribute('inputmode', 'none')
// document.querySelector('textarea').setAttribute('inputmode', 'none')
},
}
</script>

15
src/mycomponents/scan/winComScanBalance.vue

@ -118,6 +118,9 @@
this.toLocationAreaTypeList = getDirectoryItemArray(businessType.inAreaTypes)
this.itemTypesList = getDirectoryItemArray(businessType.itemTypes)
this.$refs.popup.open('bottom')
setTimeout(res=>{
this.getfocus()
},500)
},
getScanResult(result) {
@ -214,11 +217,11 @@
var status = getInventoryStatusDesc(params.inventoryStatus)
var areaType = getListLocationAreaTypeDesc(params.areaType)
var hint =
"按物料号 [" + params.itemCode + "] <br>" +
"包装号 [" + params.packingNumber + "] <br>" +
"批次 [" + params.batch + "] <br>" +
"状态 [" + status + "] <br>" +
"库区 [" + areaType + "] <br>" +
"按物料号 [" + params.itemCode + "] \n" +
"包装号 [" + params.packingNumber + "] \n" +
"批次 [" + params.batch + "] \n" +
"状态 [" + status + "] \n" +
"库区 [" + areaType + "] \n" +
"未查找到库存余额"
this.showErrorMessage(hint)
} else if (res.data.length == 1) {
@ -282,6 +285,7 @@
},
showErrorMessage(message) {
this.losefocus()
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
if (this.$refs.comscan) {
@ -297,6 +301,7 @@
// this.closeScanPopup()
},
closeScanPopup() {
this.losefocus();
this.$refs.popup.close()
},
getfocus() {

62
src/mycomponents/scan/winComScanBalanceLocation.vue

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

39
src/mycomponents/scan/winComScanFg.vue

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

7
src/mycomponents/scan/winScanAsnNumber.vue

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

23
src/mycomponents/scan/winScanContainer.vue

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

10
src/mycomponents/scan/winScanFgLabel.vue

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

5
src/mycomponents/scan/winScanItem.vue

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

8
src/mycomponents/scan/winScanJobNumber.vue

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

4
src/mycomponents/scan/winScanLocation.vue

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

10
src/mycomponents/scan/winScanPack.vue

@ -70,12 +70,14 @@
})
},
openScanPopup() {
this.$refs.popup.open('bottom')
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 200)
this.getfocus()
}, 500)
},
closeScanPopup() {
this.losefocus();
this.$refs.popup.close();
this.$emit("close", '');
},
@ -102,13 +104,13 @@
},
getfocus() {
if (this.$refs.comscan != undefined) {
if (this.$refs.comscan) {
this.$refs.comscan.getfocus();
}
},
losefocus() {
if (this.$refs.comscan != undefined) {
if (this.$refs.comscan) {
this.$refs.comscan.losefocus();
}
},

4
src/mycomponents/scan/winScanPackAndCont.vue

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

78
src/mycomponents/scan/winScanPackAndLocation.vue

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

41
src/mycomponents/scan/winScanPackAndLocationNoBalance.vue

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

17
src/mycomponents/scan/winScanPackAndPosition.vue

@ -105,28 +105,29 @@
this.showErrorMessage(error)
})
}
this.$refs.popup.open('bottom')
setTimeout(res => {
this.$refs.popup.open('bottom')
this.getfocus()
}, 500)
},
initData(){
initData() {
this.positionInfo = "请选择位置";
this.positionList = [];
this.productionLineCode = '';
this.rawLocationCode = "";
this.fgLocationCode = "";
this.workshopCode = "";
this.workStationCode ="";
this.workStationCode = "";
this.workShopName = "";
this.productionLineName="";
this.workStationName="";
this.productionLineName = "";
this.workStationName = "";
this.show = false;
this.isEditPosition = true
},
closeScanPopup() {
this.losefocus()
this.$refs.popup.close();
this.$emit("close", '');
},
@ -222,4 +223,4 @@
height: auto;
max-height: 300rpx;
}
</style>
</style>

7
src/mycomponents/scan/winScanPackJob.vue

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

10
src/mycomponents/scan/winScanPackLevel.vue

@ -96,12 +96,14 @@
})
},
openScanPopup() {
this.$refs.popup.open('bottom')
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 200)
this.getfocus();
}, 500)
},
closeScanPopup() {
this.losefocus()
this.$refs.popup.close();
this.$emit("close", '');
},
@ -129,13 +131,13 @@
},
getfocus() {
if (this.$refs.comscan != undefined) {
if (this.$refs.comscan) {
this.$refs.comscan.getfocus();
}
},
losefocus() {
if (this.$refs.comscan != undefined) {
if (this.$refs.comscan) {
this.$refs.comscan.losefocus();
}
},

19
src/mycomponents/scan/winScanPackage.vue

@ -67,22 +67,24 @@
this.$refs.comscansimulate.clickScanMsg();
},
openScanPopup() {
this.$refs.popup.open('bottom')
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 200)
this.getfocus()
}, 500)
},
openScanPopupByBusinessType(businessType) {
this.$refs.popup.open('bottom')
setTimeout(res => {
this.$refs.popup.open('bottom')
this.getfocus()
this.businessType = businessType;
}, 200)
}, 500)
},
closeScanPopup() {
this.losefocus()
this.$refs.popup.close();
this.$emit("close", '');
},
@ -222,13 +224,13 @@
},
getfocus() {
if (this.$refs.comscan != undefined) {
if (this.$refs.comscan) {
this.$refs.comscan.getfocus();
}
},
losefocus() {
if (this.$refs.comscan != undefined) {
if (this.$refs.comscan ) {
this.$refs.comscan.losefocus();
}
},
@ -239,9 +241,10 @@
this.show = e.show
},
showErrorMessage(message) {
this.losefocus()
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
this.getfocus();
}
});
},

3
src/pages.json

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -184,12 +184,14 @@
this.initData();
this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode +
"-" + this.jobContent.subList[0].workStationCode
this.$refs.popup.open('bottom')
setTimeout(res => {
this.$refs.popup.open('bottom')
this.getfocus();
}, 500)
},
closeScanPopup() {
this.losefocus()
this.$refs.popup.close();
this.$emit("closeScan")
//

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

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

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

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

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

@ -157,7 +157,7 @@
deliverRequestSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成成品发货申请<br>" + res.data)
this.showCommitSuccessMessage("提交成功\n生成成品发货申请\n" + res.data)
} else {
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.noGoodQty = calc.sub(planeInfo.data.list[0].planQty, planeInfo.data.list[
0].goodQty),
this.dataContent.subList = []
this.dataContent.subList = []
this.showList = [];
this.allList = []
this.index = 1
}
} else {
throw new Error("未查找到单据信息")
}
}
// else {
// throw new Error("")
// }
uni.hideLoading()
if(isAllSubmit){
this.clearData()
@ -366,13 +366,10 @@ import { nextTick } from 'vue';
this.dataContent.handleQty = 0;
}
nextTick(()=>{
this.showCommitSuccessMessage("提交成功<br>生成装配收货记录<br>" + list[0].requestNumber, list)
this.showCommitSuccessMessage("提交成功\n生成装配收货记录\n" + list[0].requestNumber, list)
})
} catch (error) {
uni.hideLoading()
var hint = error.message ? error.message : error

2
src/pages/fg/receiptNoPlan.vue

@ -307,7 +307,7 @@
} else { //
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.showList = [];
this.dataContent.handleQty = 0;

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

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

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

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

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

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

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

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

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

@ -49,6 +49,10 @@
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import {
getInventoryStatusName
} from '@/common/directory.js';
import {
inventoryMoveRecordSubmit,
getBasicLocationByCode,
@ -261,8 +265,8 @@
this.detailSource.push(itemp)
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
if (r.packingNumber == pack.number &&
r.batch == pack.batch &&
r.fromLocationCode == balance.locationCode &&
r.toInventoryStatus == balance.inventoryStatus &&
r.scaned == true) {
@ -278,17 +282,27 @@
} else {
newDetail.toInventoryStatus = this.toInventoryStatus;
}
if (newDetail.packingNumber == '') {
newDetail.packingNumber = pack.number;
}
newDetail.toLocationCode = this.toLocationCode;
newDetail.fromLocationCode = result.fromLocationCode
item.subList.push(newDetail);
} else {
this.showErrorMessage(balance.packingNumber + "已经在列表中")
this.showErrorMessage("包装["+detail.packingNumber+"]\n"+
"批次["+detail.batch+"]\n"+"库位["+detail.fromLocationCode+"]\n"+
"库存状态["+getInventoryStatusName(detail.toInventoryStatus)+"]\n"
+ "重复扫描")
}
}
calcHandleQty(this.detailSource);
},
showErrorMessage(message) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus()
}
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
@ -341,6 +355,11 @@
this.showErrorMessage("请先选择目标库位")
return;
}
// if(this.fromLocationCode==this.toLocationCode){
// this.showErrorMessage("")
// return;
// }
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
//
uni.showLoading({
@ -354,11 +373,11 @@
if (res.success) {
this.managementList = res.list;
var params = this.setParams()
// console.log("" + JSON.stringify(params))
console.log("提交" + JSON.stringify(params))
inventoryMoveRecordSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成" + this.title + "<br>" +
this.showCommitSuccessMessage("提交成功\n生成" + this.title + "\n" +
res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")

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

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

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

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

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

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

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

@ -177,7 +177,8 @@
inputStyleObject: {
fontSize: "100rpx"
},
bussinessCode: 'Issue'
bussinessCode: 'Issue',
toLocationAreaTypeList:[]
}
},
created() {
@ -212,12 +213,14 @@
this.initData();
// this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode +
// "-" + this.jobContent.subList[0].workStationCode
this.$refs.popup.open('bottom')
setTimeout(res => {
this.$refs.popup.open('bottom')
this.getfocus();
}, 500)
},
closeScanPopup() {
this.losefocus()
this.$refs.popup.close();
this.$emit("closeScan")
//
@ -231,6 +234,7 @@
that.fromInventoryStatuses = this.jobContent.outInventoryStatuses
that.toLocation = that.dataContent[0];
that.toLocationCode = that.dataContent[0].toLocationCode;
that.toLocationAreaTypeList=getDirectoryItemArray(this.jobContent.toAreaTypes)
// that.fromLocationList = that.getFromLocationList();
}
},
@ -265,7 +269,7 @@
}
},
onScanResult(result) {
queryBalance(result) {
try {
let that = this;
// if (that.fromLocationCode == '') {
@ -306,20 +310,23 @@
var status = getInventoryStatusDesc(params.inventoryStatus)
var areaType = getListLocationAreaTypeDesc(params.areaType)
var hint =
"按物料号 [" + params.itemCode + "] <br>" +
"包装号 [" + params.packingNumber + "] <br>" +
"批次 [" + params.batch + "] <br>" +
"状态 [" + status + "] <br>" +
"库区 [" + areaType + "] <br>" +
"按物料号 [" + params.itemCode + "] \n" +
"包装号 [" + params.packingNumber + "] \n" +
"批次 [" + params.batch + "] \n" +
"状态 [" + status + "] \n" +
"库区 [" + areaType + "] \n" +
"未查找到库存余额"
this.showErrorMessage(hint)
this.showErrorMessage(hint,
res => {
that.getfocus();
})
} else if (res.data.length == 1) {
result.balance = res.data[0]
if (result.label.packingNumber != result.balance.packingNumber) {
result.balance.handleQty = Number(result.label.qty)
result.balance.qty = Number(result.label.qty)
} else {
result.balance.handleQty = Number(result.balance.qty)
result.balance.qty = Number(result.balance.qty)
}
this.afterGetBalance(result.label, result.balance, result.package);
} else {
@ -329,11 +336,16 @@
uni.hideLoading()
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
this.showErrorMessage(error,
res => {
that.getfocus();
})
})
}
} catch (e) {
this.showErrorMessage(e.stack)
this.showErrorMessage(e.stack,res => {
that.getfocus();
})
uni.hideLoading();
}
},
@ -407,14 +419,73 @@
this.$refs.comMessage.showQuestionMessage(
`扫描物料包装【${result.package.packUnit}】与任务推荐包装规格【${item.packUnit}】不一致.是否要继续发料?`, res => {
if (res) {
this.onScanResult(result)
this.getToLocationBalance(result)
}
});
} 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) {
this.afterGetBalance(this.label, balance, this.packageInfo);
@ -524,7 +595,7 @@
batch: data.batch,
qty: 0,
uom: data.uom,
handleQty: Number(balance.handleQty),
handleQty: Number(balance.qty),
Records: []
}
let record = this.creatRecord(data, balance, packageInfo);
@ -544,8 +615,8 @@
batch: label.batch,
// qty: Number(balance.qty),
// qty: Number(label.qty) > Number(balance.qty) ? Number(balance.qty) : Number(label.qty),
qty: balance.handleQty,
handleQty: balance.handleQty,
qty: Number(balance.qty),
handleQty: Number(balance.qty),
uom: balance.uom,
inventoryStatus: balance.inventoryStatus,
balance: balance,

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

@ -310,7 +310,7 @@
issueJobSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发料记录<br>" + res.data)
this.showCommitSuccessMessage("提交成功\n生成发料记录\n" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
@ -481,6 +481,8 @@
'】不一致,是否继续提交', res => {
if (res) {
this.submit();
}else {
this.scanPopupGetFocus()
}
});
}
@ -489,8 +491,8 @@
},
scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
if (this.$refs.comScanIssuePack) {
this.$refs.comScanIssuePack.getfocus();
}
},

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -131,7 +131,7 @@
issueRequestSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发料申请[" + res.data+"]")
this.showCommitSuccessMessage("提交成功\n生成发料申请[" + res.data+"]")
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
@ -151,6 +151,9 @@
this.$refs.scanPopup.closeScanPopup();
},
showErrorMessage(message) {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.losefocus();
}
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
this.scanPopupGetFocus()
@ -158,7 +161,7 @@
});
},
scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
if (this.$refs.scanPopup) {
this.$refs.scanPopup.getfocus();
}
},

4
src/pages/login/index.vue

@ -261,7 +261,9 @@
this.imageSrc = base64.replace(/[\r\n]/g, "")
this.uuid = res.data.uuid
}
})
}).catch(error => {
this.showErrorMessage(error);
})
},
getAppVersion() {
const systemInfo = uni.getSystemInfoSync();

2
src/pages/material/materialDowngrade.vue

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

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

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

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

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

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

@ -19,6 +19,13 @@
<uni-load-more :status="loadingType" v-if="jobList.length>0" />
</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>
</view>
</template>
@ -32,6 +39,13 @@
goHome,
updateTitle
} from '@/common/basic.js';
import {
getBusinessType
} from '@/common/record.js';
import {
planRefreshTime
} from '@/common/config.js';
import {
getDetailOption,
@ -42,6 +56,9 @@
import jobFilter from '@/mycomponents/job/jobFilter.vue'
import comOverPackJobCard from '@/pages/package/coms/comOverPackJobCard.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 {
name: 'issue',
@ -49,7 +66,10 @@
comEmptyView,
jobFilter,
comOverPackJobCard,
jobInfoPopup
jobInfoPopup,
winComScanBalance,
winScanButton,
jobList
},
data() {
return {
@ -64,7 +84,12 @@
status: '1,2', //
detailOptions: [],
detailGiveupOptions: [],
title:''
title:'',
businessTypeCode: "OverPackage",
businessType: null,
timer:null,
scanMessage:""
};
},
@ -73,7 +98,16 @@
},
onShow() {
this.getList('refresh');
this.timerRefresh();
},
onHide() {
this.stopRefresh();
},
onUnload(){
this.stopRefresh();
},
onReady() {
@ -112,6 +146,31 @@
},
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) {
let that = this;
uni.showLoading({
@ -139,11 +198,6 @@
value: this.status
})
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
var params = {
filters: filters,
pageNo: this.pageNo,
@ -202,10 +256,8 @@
},
openJobDetail(item) {
uni.navigateTo({
url: './overPackageJobDetail?id=' + item.masterId + '&status=' + item.status+'&title='+this.title
});
openJobDetail(item,scanMessage = '') {
this.getJobInfoByNumber(item.number,scanMessage)
},
showItemList(itemList) {
@ -213,7 +265,7 @@
},
selectedItem(item) {
this.openJobDetail(item);
this.openJobDetail(item.number);
},
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>

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

@ -35,16 +35,16 @@
</scroll-view>
</view>
<div style="background: white;">
<uni-collapse>
<!-- <uni-collapse>
<uni-collapse-item>
<template v-slot:title>
<view class="card_itemName" style="padding: 3px 5px; font-size: 28rpx;">
打印设置
</view>
</template>
<!-- <print ref="printService" @printCode="printCode" @templateCode="templateCode"></print> -->
<print ref="printService" @printCode="printCode" @templateCode="templateCode"></print>
</uni-collapse-item>
</uni-collapse>
</uni-collapse> -->
</div>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
@ -58,7 +58,7 @@
</view>
<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>
<comMessage ref="comMessage"></comMessage>
</view>
@ -128,6 +128,7 @@
detailOptions: [],
scanOptions: [],
jobStatus: "",
scanMessage: ''
// printDeafult: {}, //
// templateDeafult: {} //
@ -143,6 +144,7 @@
title: option.title + '详情'
})
this.id = option.id;
this.scanMessage = option.scanMessage || '';
if (this.id != undefined) {
//
if (option.status == "1") {
@ -229,6 +231,9 @@
that.jobStatus = res.data.status
that.subList = res.data.subList;
that.detailSource = getDataSource(that.detailSource, that.subList)
if (this.scanMessage) {
this.openScanPopupSimulate(this.scanMessage);
}
// this.$nextTick(() => {
// if (uni.getStorageSync('overPackageJobDetailPointParams')) {
// const overPackageJobDetailPointParams = uni.getStorageSync(
@ -255,6 +260,9 @@
this.showErrorMessage(error)
})
},
openScanPopupSimulate(scanMessage) {
this.$refs.comScanPackagePack.openScanPopupForJobSimulate(this.detailSource, this.jobContent, scanMessage);
},
closeScan() {
this.resizeCollapse();
@ -329,6 +337,10 @@
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 toPackQty = this.detailSource[0].Items[0].Locations[0].Batchs[0].toPackQty
if (tempHandleQty == 0) {
this.showErrorMessage("实际数量为0,请先扫描数据")
return
}
if (tempHandleQty > tempQty) {
//
this.showCommitMessage("实际数量【" + tempHandleQty + "】大于需求数量" + "【" + tempQty + "】, 是否提交?", tempHandleQty,
@ -394,8 +406,7 @@
barcodeBase64: '',
})
})
this.showCommitSuccessMessage("提交成功<br>生成翻包记录<br>", list)
this.showCommitSuccessMessage("提交成功\n生成翻包记录\n", list)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
@ -550,11 +561,18 @@
scanPopupGetFocus() {
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) {
this.scanPopupLoseFocus()
this.$refs.comMessage.showMessage(message, res => {
if (res) {
this.afterCloseMessage()
@ -562,6 +580,7 @@
});
},
showErrorMessage(message) {
this.scanPopupLoseFocus()
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
this.afterCloseMessage()
@ -576,9 +595,6 @@
});
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
},
showCommitSuccess() {
this.$refs.comMessage.showCommitSuccess();

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

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

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

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

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

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

77
src/pages/point/index.vue

@ -39,7 +39,7 @@
</view>
<view class="right">
<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>
</view>
<view class="left-item">
@ -93,13 +93,25 @@
},
methods: {
success(img) {
this.picUrl.push(img)
this.picIndex++
if (this.picIndex == this.data.length) {
this.isLoadFinish = true;
uni.hideLoading()
}
success(img,item) {
item.barcodeBase641 = img
uni.hideLoading()
this.isLoadFinish = true
// #ifdef APP
plus.io.resolveLocalFileSystemURL(item.barcodeBase641, (entry) => {
// entrytest.html
entry.file((file) => {
let fileReader = new plus.io.FileReader();
fileReader.onloadend = (evt) => {
console.log("文件路径" + evt.target.result)
item.barcodeBase64 = evt.target.result
}
fileReader.readAsDataURL(file);
});
}, (e) => {
console.log("失败" + e)
});
// #endif
},
setHtmlData() {
let str = ''
@ -182,50 +194,21 @@
"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() {
uni.showLoading({
title: "加载中",
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

126
src/pages/pointPutawayJob/index.vue

@ -7,23 +7,32 @@
</view>
<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="">
<view class="relative" v-for="(item,index) in showTableInspectDTOList" :key='index'>
<view class="q">Q</view>
<table border='1'>
<thead>
<tr class='top1'>
<th>发货单号:</th>
<th colspan='2'>{{data1.asnNumber}}</th>
</tr>
<tr>
<th>物料代码</th>
<th>供应商批次</th>
<th>检验数量</th>
<th>物料代码:</th>
<th colspan='3'>{{item.itemCode}}</th>
</tr>
</thead>
<tbody>
<tr v-for="(item,index) in showTableInspectDTOList" :key='index'>
<td>{{item.itemCode}}</td>
<tr>
<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>
</tr>
<tr>
<td>到货数量</td>
<td>{{item.quantityQty}}</td>
<td>抽检数量</td>
<td>{{item.sampleQty}}</td>
</tr>
</tbody>
@ -34,7 +43,7 @@
<com-empty-view v-if="data.length==0"></com-empty-view>
<!-- 只用于展示页面 -->
<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="mb-kw">
目标库位<view>{{item.toLocationCode}}</view>
@ -160,7 +169,7 @@
<div class="mb-bo">
<div class="mb-left">
<div class="mb-text">
物料号<div>${item.itemCode}</div>
物料号<div>${item.itemCode}asjkdhfksjahfkljashfklsdh</div>
</div>
<div class="mb-text">
托包装号<div>${item.packingNumber}</div>
@ -184,44 +193,48 @@
// html
getPurchaseReceiptJobHtml() {
this.$nextTick(async () => {
let str2 = ''
let str = ''
this.readFile(htmlFileUrl1, (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 => {
str1 += `
<tr>
<td>${item.itemCode}</td>
<td>${item.supplierBatch}</td>
<td>${item.sampleQty}</td>
</tr>
str += `
<div class="box" style="page-break-before:always;"><br />
<div class="relative" >
<div class="q">Q</div>
<table border='1'>
<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(
"mainBody", str2); //
"mainBody", str); //
});
})
@ -308,7 +321,7 @@
},
onReachBottom() {
if (this.tabIndex == 1) {
if (this.showTableInspectDTOList.length != this.data1.inspectDTOList.length) {
if (this.showTableInspectDTOList != this.data1.inspectDTOList.length) {
this.getTableInspectDTOList()
}
} else {
@ -323,7 +336,7 @@
</script>
<style lang="scss">
.box {
.box1 {
font-size: 26rpx;
/* display: flex; */
/* padding: 20rpx; */
@ -439,7 +452,7 @@
.top1 th {
font-weight: bold;
font-size: 16px;
font-size: 13px;
padding: 10px;
}
@ -458,6 +471,12 @@
td {
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);
}
}
.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>

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

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

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

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

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

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

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

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

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

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

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

@ -45,6 +45,9 @@
getDetailOption,
getDetailGiveupOption
} from '@/common/array.js';
import {
planRefreshTime
} from '@/common/config.js';
import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
import jobFilter from '@/mycomponents/job/jobFilter.vue'
@ -79,7 +82,8 @@
status: '1,2', //
detailOptions: [],
detailGiveupOptions: [],
scanMessage: ""
scanMessage: "",
timer:null
};
},
props: {
@ -90,26 +94,15 @@
}
},
mounted() {
this.getList('refresh');
},
onReady() {
this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption();
},
onReachBottom() {
//
if (this.loadingType == 'loading' || this.loadingType == 'nomore') {
return;
}
this.getList("more");
},
onPullDownRefresh() {
this.getList('refresh');
mounted() {
this.timerRefresh()
},
//退
onBackPress(options) {
@ -121,15 +114,6 @@
}
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
} else if (e.index == 1) {
this.$refs.filter.openFilter();
}
},
methods: {
onReach() {
//
@ -144,8 +128,22 @@
openFilter() {
this.$refs.filter.openFilter();
},
refresh() {
timerRefresh() {
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) {
let that = this;
@ -174,11 +172,6 @@
value: this.status
})
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
filters.push({
column: "type",
action: "==",
@ -220,11 +213,58 @@
},
openJobDetail(item, scanMessage = '') {
uni.navigateTo({
url: './productPutawayDetail?id=' + item.masterId + '&status=' + item.status + '&type=' + item
.type + '&scanMessage=' + this.scanMessage + '&title=' + this.title
this.getJobInfoByNumber(item.number,scanMessage)
},
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) {
@ -298,12 +338,6 @@
action: "==",
value: code
})
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
var params = {
filters: filters,
pageNo: 1,
@ -323,8 +357,14 @@
},
showMessage(message) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus()
}
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus()
}
}
});
@ -374,11 +414,6 @@
column: "status",
action: "in",
value: '1,2',
},
{
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
}
// {
// column: "fromLocationCode",
@ -411,10 +446,10 @@
this.selectItem(list[0])
}
} else {
this.showMessage("未查找到任务<br>" + "扫描[" + result.scanMessage + "]")
this.showMessage("未查找到任务\n" + "扫描[" + result.scanMessage + "]")
}
}).catch(error => {
this.showMessage(error + "<br>扫描[" + result.scanMessage + "]")
this.showMessage(error + "\n扫描[" + result.scanMessage + "]")
})
} catch (e) {

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

@ -21,15 +21,30 @@
},
onShow() {
if(this.$refs.productPutawayJob!=undefined){
this.$refs.productPutawayJob.refresh();
if(this.$refs.productPutawayJob){
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() {
this.$refs.productPutawayJob.refresh();
this.$refs.productPutawayJob.timerRefresh();
},
onReachBottom() {
this.$refs.productPutawayJob.onReach();
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {

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

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

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

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

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

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

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

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

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

@ -322,9 +322,14 @@
},
showMessage(message) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus()
}
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packGetFocus()
}
}
});
},
@ -416,10 +421,10 @@
this.selectItem(list[0])
}
} else {
this.showMessage("未查找到任务<br>" + "扫描[" + result.scanMessage + "]")
this.showMessage("未查找到任务\n" + "扫描[" + result.scanMessage + "]")
}
}).catch(error => {
this.showMessage(error + "<br>扫描[" + result.scanMessage + "]")
this.showMessage(error + "\n扫描[" + result.scanMessage + "]")
})
} catch (e) {

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

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

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

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

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

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

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

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

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

@ -38,7 +38,11 @@
goHome,
updateTitle
} from '@/common/basic.js';
import {
planRefreshTime
} from '@/common/config.js';
import {
getDetailOption,
getDetailGiveupOption
@ -79,7 +83,8 @@
status: '1,2', //
detailOptions: [],
detailGiveupOptions: [],
scanMessage: ""
scanMessage: "",
timer:null
};
},
// type = 'assemble'
@ -96,13 +101,7 @@
mounted() {
this.detailOptions = getDetailOption();
this.detailGiveupOptions = getDetailGiveupOption();
this.getList('refresh');
},
onPullDownRefresh() {
this.getList('refresh');
this.timerRefresh()
},
@ -134,8 +133,22 @@
}
this.getList("more");
},
refresh() {
timerRefresh() {
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) {
let that = this;
@ -162,11 +175,6 @@
action: "in",
value: this.status
})
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
filters.push({
column: "type",
action: "==",
@ -210,23 +218,7 @@
},
openJobDetail(item, scanMessage = '') {
if (this.type == 'predict') {
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 = ""
this.getJobInfoByNumber(item.number,scanMessage)
},
showItemList(itemList) {
@ -300,11 +292,6 @@
action: "==",
value: code
})
filters.push({
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
})
var params = {
filters: filters,
@ -325,9 +312,14 @@
},
showMessage(message) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packLoseFocus()
}
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
if(this.$refs.scanPopup){
this.$refs.scanPopup.packGetFocus()
}
}
});
},
@ -382,11 +374,6 @@
column: "status",
action: "in",
value: '1,2',
},
{
column: "accept_user_id",
action: "==",
value: this.$store.state.user.id
}
]
getProductReceiptJobList({
@ -413,16 +400,78 @@
this.selectItem(list[0])
}
} else {
this.showMessage("未查找到任务<br>" + "扫描[" + result.scanMessage + "]")
this.showMessage("未查找到任务\n" + "扫描[" + result.scanMessage + "]")
}
}).catch(error => {
this.showMessage(error + "<br>扫描[" + result.scanMessage + "]")
this.showMessage(error + "\n扫描[" + result.scanMessage + "]")
})
} catch (e) {
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
}
//
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('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount + "]总共[" + this.subList
.length +
"]");
}
//
let str = ''
this.detailSource.forEach((item) => {
item.subList.forEach(cur => {
if (cur.qty != cur.handleQty) {
str += `包装号【${cur.packingNumber}】提交数量【${cur.handleQty}】与任务物料数量【${cur.qty}】不一致`
}
})
})
if (str) {
str += ',是否确认提交?'
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
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 => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成报废收货记录<br>" + res.data, )
this.showCommitSuccessMessage("提交成功\n生成报废收货记录\n" + res.data, )
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}

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

@ -20,16 +20,30 @@
onLoad(option){
this.title = option.title
},
onShow(){
this.$nextTick(()=>{
this.$refs.productreceiptjob.refresh()
})
onShow() {
if(this.$refs.productreceiptjob){
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() {
this.$refs.productreceiptjob.refresh();
this.$refs.productreceiptjob.timerRefresh();
},
onReachBottom() {
this.$refs.productreceiptjob.onReach();
},
onNavigationBarButtonTap(e) {
if (e.index === 0) {

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

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

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

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

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

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

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

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

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

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

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

@ -213,6 +213,32 @@
calcHandleQty(this.detailSource);
this.continueScan()
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.packUnit = result.package.packUnit
this.calcHandleQty();
this.autoCommit();
} else {
this.scanPopupGetFocus();
}
@ -354,6 +381,7 @@
itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.packUnit = result.package.packUnit
this.calcHandleQty();
this.autoCommit();
}
}
}
@ -384,7 +412,7 @@
this.submitJob();
} else {
//
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交<br>' + "已经扫描[" + this.scanCount +
this.$refs.comMessage.showErrorMessage('请完成扫描后,再进行提交\n' + "已经扫描[" + this.scanCount +
"]箱总共[" + this
.subList.length + "]箱", res => {
if (res) {
@ -425,7 +453,7 @@
productionReceiptJobSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成发料接收记录<br>" + res.data)
this.showCommitSuccessMessage("提交成功\n生成发料接收记录\n" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
@ -449,7 +477,7 @@
// productionReceiptJobSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
// this.showCommitSuccessMessage("<br><br>" + res.data)
// this.showCommitSuccessMessage("\n\n" + res.data)
// } else {
// this.showErrorMessage("[" + res.msg + "]")
// }

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

Loading…
Cancel
Save