Browse Source

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

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

150
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,111 @@ 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 = '接口' + "数据库死锁"
}else if(message.includes('statusCode:-1')){
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;

21
src/common/noclick.js

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

1
src/main.js

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

4
src/manifest.json

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

30
src/mycomponents/common/comMessage.vue

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

32
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">
@ -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 = ''

2
src/mycomponents/qty/balanceQtyEdit.vue

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

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

92
src/mycomponents/scan/winComScan.vue

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

3
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) {

51
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() {
@ -263,6 +297,7 @@
})
},
showErrorMessage(message) {
this.packLoseFocus();
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
if(this.$refs.comscan){

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

3
src/mycomponents/scan/winScanAsnNumber.vue

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

3
src/mycomponents/scan/winScanContainer.vue

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

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

4
src/mycomponents/scan/winScanItem.vue

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

5
src/mycomponents/scan/winScanJobNumber.vue

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

3
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) {

9
src/mycomponents/scan/winScanPack.vue

@ -70,9 +70,10 @@
})
},
openScanPopup() {
this.$refs.popup.open('bottom')
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 200)
this.getfocus()
}, 500)
},
closeScanPopup() {
@ -103,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();
}
},

3
src/mycomponents/scan/winScanPackAndCont.vue

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

55
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) {
@ -417,7 +418,7 @@
balance: datas,
fromLocationCode: this.fromLocationCode,
}
this.packGetFocus();
// this.packGetFocus();
this.$emit("getResult", data);
this.$emit("getCountScanResult", data);
},
@ -433,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();
}
},

38
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,21 +148,23 @@
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) {

16
src/mycomponents/scan/winScanPackAndPosition.vue

@ -105,23 +105,23 @@
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
},
@ -223,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();
}
},

9
src/mycomponents/scan/winScanPackLevel.vue

@ -96,9 +96,10 @@
})
},
openScanPopup() {
this.$refs.popup.open('bottom')
setTimeout(res => {
this.$refs.popup.open('bottom')
}, 200)
this.getfocus();
}, 500)
},
closeScanPopup() {
@ -130,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();
}
},

18
src/mycomponents/scan/winScanPackage.vue

@ -67,18 +67,19 @@
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)
},
@ -223,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();
}
},
@ -240,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",

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

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

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

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

@ -184,8 +184,9 @@
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)
},

13
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("提交成功\n生成装配收货记录\n" + list[0].requestNumber, list)
})
} catch (error) {
uni.hideLoading()
var hint = error.message ? error.message : error

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

@ -49,6 +49,10 @@
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import {
getInventoryStatusName
} from '@/common/directory.js';
import {
inventoryMoveRecordSubmit,
getBasicLocationByCode,
@ -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(detail.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,10 +355,10 @@
this.showErrorMessage("请先选择目标库位")
return;
}
if(this.fromLocationCode==this.toLocationCode){
this.showErrorMessage("来源库位和目标库位不能一致")
return;
}
// if(this.fromLocationCode==this.toLocationCode){
// this.showErrorMessage("")
// return;
// }
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
//

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

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

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

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

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

@ -213,8 +213,9 @@
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)
},
@ -315,7 +316,10 @@
"状态 [" + status + "] \n" +
"库区 [" + areaType + "] \n" +
"未查找到库存余额"
this.showErrorMessage(hint)
this.showErrorMessage(hint,
res => {
that.getfocus();
})
} else if (res.data.length == 1) {
result.balance = res.data[0]
@ -332,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();
}
},

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

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

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

@ -1,7 +1,7 @@
<template>
<view class="">
<com-empty-view v-if="jobList.length==0"></com-empty-view>
<job-filter :isShowFromLocationCode="true" :isShowProductionLineCode="true" :productionline="productionlineList"
<job-filter :isShowFromLocationCode="true" :isShowFromAreaCode="true" :isShowToAreaCode="true" :isShowProductionLineCode="true" :productionline="productionlineList"
ref="filter" otherTitle=""
:checkedToday="checkedToday"
:checkedWaitTask="checkedWaitTask"
@ -109,6 +109,8 @@
title: '',
productionLine: "",
fromLocation: "",
fromAreaCode: '', //
toAreaCode: '', //
filterItemCode: "",
businessTypeCode: "Issue",
businessType: null,
@ -141,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)
},
//退
@ -171,11 +173,11 @@
methods: {
timerRefresh() {
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode)
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
this.stopRefresh();
var that = this;
this.timer = setInterval(function() {
that.getList('refresh', that.fromLocation, that.productionLine, that.filterItemCode)
that.getList('refresh', that.fromLocation, that.productionLine, that.filterItemCode,this.fromAreaCode,this.toAreaCode)
console.log('发料刷新');
}, planRefreshTime)
},
@ -215,7 +217,7 @@
})
},
getList(type, fromLocation = '', productionLine = '',filterItemCode='') {
getList(type, fromLocation = '', productionLine = '',filterItemCode='',fromAreaCode='',toAreaCode='') {
let that = this;
uni.showLoading({
title: "加载中­....",
@ -250,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) {
// 线
@ -357,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,
@ -364,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) {
@ -383,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;
@ -417,7 +457,7 @@
openJobDetail(item, scanMessage = '') {
this.getJobInfoByNumber(item.number,scanMessage = '')
this.getJobInfoByNumber(item.number,scanMessage)
},
@ -461,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: "放弃任务成功"
@ -498,14 +538,14 @@
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;
@ -542,7 +582,7 @@
if (this.$refs.scanPopup) {
this.$refs.scanPopup.getfocus()
}
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode)
this.getList('refresh', this.fromLocation, this.productionLine, this.filterItemCode,this.fromAreaCode,this.toAreaCode)
}
});

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

@ -151,6 +151,9 @@
this.$refs.scanPopup.closeScanPopup();
},
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();
}
},

27
src/pages/login/index.vue

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

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

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

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

@ -95,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);
@ -160,6 +171,7 @@ 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.packGetFocus();
@ -341,7 +353,10 @@ import { getDirectoryItemArray } from '@/common/directory';
let record = this.creatRecord(label, balance, packageInfo);
batch.Records.push(record);
this.calcBatchHandleQty(batch);
this.packGetFocus();
this.$emit('refresh');
setTimeout(res=>{
this.packGetFocus();
},100)
},
swipeClick(e, item, index) {

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

@ -19,6 +19,13 @@
<uni-load-more :status="loadingType" v-if="jobList.length>0" />
</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,10 @@
goHome,
updateTitle
} from '@/common/basic.js';
import {
getBusinessType
} from '@/common/record.js';
import {
planRefreshTime
} from '@/common/config.js';
@ -45,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',
@ -52,7 +66,10 @@
comEmptyView,
jobFilter,
comOverPackJobCard,
jobInfoPopup
jobInfoPopup,
winComScanBalance,
winScanButton,
jobList
},
data() {
return {
@ -68,7 +85,11 @@
detailOptions: [],
detailGiveupOptions: [],
title:'',
timer:null
businessTypeCode: "OverPackage",
businessType: null,
timer:null,
scanMessage:""
};
},
@ -125,6 +146,16 @@
},
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();
@ -225,8 +256,8 @@
},
openJobDetail(item) {
this.getJobInfoByNumber(item.number)
openJobDetail(item,scanMessage = '') {
this.getJobInfoByNumber(item.number,scanMessage)
},
showItemList(itemList) {
@ -327,8 +358,16 @@
}
});
},
openScanPopup() {
if (this.businessType == null) {
this.getBusinessTypeFunc()
} else {
this.$refs.scanPopup.openScanPopup(this.businessType);
}
},
getJobInfoByNumber(number){
getJobInfoByNumber(number,scanMessage){
console.log("扫描",scanMessage)
let that = this;
uni.showLoading({
title: "加载中....",
@ -367,14 +406,93 @@
return;
}
uni.navigateTo({
url: './overPackageJobDetail?id=' + result.masterId + '&status=' + result.status+'&title='+this.title
url: './overPackageJobDetail?id=' + result.masterId + '&status=' + result.status+'&title='+this.title+'&scanMessage=' +
scanMessage
});
this.scanMessage=""
}
}).catch(error => {
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>

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

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

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

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

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

4
src/pages/pointPutawayJob/index.vue

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

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

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

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

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

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

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

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

@ -213,7 +213,7 @@
},
openJobDetail(item, scanMessage = '') {
this.getJobInfoByNumber(item.number,scanMessage = '')
this.getJobInfoByNumber(item.number,scanMessage)
},
getJobInfoByNumber(number,scanMessage){
@ -357,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()
}
}
});

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

@ -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

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

@ -2,8 +2,8 @@
<job-com-main-card :dataContent="dataContent">
<jobComMainDetailCard :dataContent="dataContent"></jobComMainDetailCard>
<view class='split_line'></view>
<jobAccept :dataContent="dataContent"></jobAccept>
<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="">

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

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

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

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

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

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

@ -218,7 +218,7 @@
},
openJobDetail(item, scanMessage = '') {
this.getJobInfoByNumber(item.number,scanMessage = '')
this.getJobInfoByNumber(item.number,scanMessage)
},
showItemList(itemList) {
@ -312,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()
}
}
});
},

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

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

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

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

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

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

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

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

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

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

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

@ -159,8 +159,6 @@
this.scanOptions = getDetailEditRemoveOption();
},
methods: {
openScanPopup(content, jobcontent) {
this.issueRecord = [];
this.dataContent = content;
@ -168,8 +166,9 @@
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')
that.getfocus();
}, 500)
},

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

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

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

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

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

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

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

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

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

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

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

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

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

@ -308,9 +308,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()
}
}
});
},

6
src/pages/query/pack.vue

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

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

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

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

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

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

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

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

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

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

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

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

@ -182,8 +182,9 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
this.initData();
this.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)
},
@ -420,17 +421,16 @@ import { getDirectoryItemArray } from '../../../common/directory.js';
batch.Records.push(record);
this.issueRecord.unshift(record)
this.calcBatchHandleQty(batch);
this.getfocus();
},
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();
}
},

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

12
src/store/modules/user.js

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

Loading…
Cancel
Save