Browse Source

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

ljc_0803
niexiting 3 months ago
parent
commit
330128d328
  1. 5
      src/mycomponents/scan/winComScanFg.vue
  2. 46
      src/mycomponents/scan/winScanPackage.vue
  3. 47
      src/pages/inventoryMove/coms/comMoveJob.vue
  4. 2
      src/pages/inventoryMove/job/okToHoldMoveJob.vue
  5. 20
      src/pages/issue/job/issueDetail.vue
  6. 20
      src/pages/productPutaway/record/productPutawayRecord.vue
  7. 6
      src/pages/productReceipt/job/productReceiptDetail.vue
  8. 2
      src/pages/productionReceipt/job/productionReceiptDetail.vue
  9. 11
      src/pages/productionReceipt/job/productionReceiptJob.vue

5
src/mycomponents/scan/winComScanFg.vue

@ -188,6 +188,11 @@
// let productDate = content.substr(lengthMat, 8); // let productDate = content.substr(lengthMat, 8);
// let batch = content.substr(lengthMat + 8, 3); // let batch = content.substr(lengthMat + 8, 3);
let order = content.substr(-8); let order = content.substr(-8);
if(content.length!=lengthBc){
that.clear();
throw new Error("解析错误:扫描标签长度与配置条码的长度不一致")
}
if (scanPartNumber != partNumber) { if (scanPartNumber != partNumber) {
that.clear(); that.clear();
throw new Error("解析错误:扫描的客户物料号【" + scanPartNumber + throw new Error("解析错误:扫描的客户物料号【" + scanPartNumber +

46
src/mycomponents/scan/winScanPackage.vue

@ -33,6 +33,12 @@
getBalanceByFilter getBalanceByFilter
} from '@/api/request2.js'; } from '@/api/request2.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray,
getLocationAreaTypeName
} from '@/common/directory.js';
export default { export default {
name: 'winScanPack', name: 'winScanPack',
components: { components: {
@ -55,7 +61,8 @@
data() { data() {
return { return {
show: false, show: false,
businessType: null businessType: null,
scanResult:{}
} }
}, },
created() { created() {
@ -104,6 +111,7 @@
getScanResult(result) { getScanResult(result) {
if (result.success) { if (result.success) {
this.scanResult=result
this.getBalance(result, res => { this.getBalance(result, res => {
result.balance = res; result.balance = res;
this.$emit("getResult", result); this.$emit("getResult", result);
@ -130,14 +138,14 @@
value: this.businessType.outInventoryStatuses value: this.businessType.outInventoryStatuses
}) })
} }
if (this.businessType.outAreaTypes != null) { if (this.businessType.outAreaTypes ) {
filters.push({ filters.push({
column: "areaType", column: "areaType",
action: "in", action: "in",
value: this.businessType.outAreaTypes value: this.businessType.outAreaTypes
}) })
} }
if (this.businessType.outAreaCodes != null) { if (this.businessType.outAreaCodes ) {
filters.push({ filters.push({
column: "areaCode", column: "areaCode",
action: "in", action: "in",
@ -147,6 +155,30 @@
return filters; return filters;
}, },
getQueryCondition() {
let condition = '按照以下条件:\n';
let label = this.scanResult.label;
let status = getInventoryStatusDesc(getDirectoryItemArray(this.businessType.outInventoryStatuses));
let areaType =getLocationAreaTypeName(this.businessType.outAreaTypes)
condition = condition + '物料号=[' + label.itemCode
+ ']\n箱码=[' + label.packingNumber +
']\n批次=[' +
label.batch +
']'
if (status) {
condition = condition + '\n库存状态=[' + status + ']'
}
if (areaType) {
condition = condition + '\n库区类型=[' + areaType + ']'
}
if (this.businessType.outAreaCodes) {
condition = condition + '\n库区代码=[' + this.businessType.outAreaCodes + ']'
}
return condition;
},
getBalance(result, callback) { getBalance(result, callback) {
let filters = []; let filters = [];
let label = result.label; let label = result.label;
@ -201,9 +233,7 @@
params.filters = filters; params.filters = filters;
getBalanceByFilter(params).then(res1 => { getBalanceByFilter(params).then(res1 => {
if (res1.data.list.length == 0) { if (res1.data.list.length == 0) {
this.showErrorMessage('未查找到该包装的库存余额', res => { this.showErrorMessage(this.getQueryCondition()+'\n未查找到该包装的库存余额')
this.packGetFocus();
})
} else { } else {
res1.data.list.forEach(r => r.parentPackingNumber = packageInfo.number) res1.data.list.forEach(r => r.parentPackingNumber = packageInfo.number)
callback(res1.data.list) callback(res1.data.list)
@ -212,9 +242,7 @@
this.showErrorMessage(err.message); this.showErrorMessage(err.message);
}) })
} else { } else {
this.showErrorMessage('未查找到该包装的库存余额', res => { this.showErrorMessage(this.getQueryCondition()+'\n未查找到该包装的库存余额')
this.packGetFocus();
})
} }
} }
}).catch(err => { }).catch(err => {

47
src/pages/inventoryMove/coms/comMoveJob.vue

@ -1,9 +1,9 @@
<template> <template>
<view class=""> <view class="">
<com-empty-view v-if="jobList.length==0"></com-empty-view> <com-empty-view v-if="jobList.length==0"></com-empty-view>
<job-filter ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday" <job-filter ref="filter" :isShowItemCode="isShowItemCode" :isShowQurery="isShowQurery" otherTitle="ASN" @switchChangeToday="switchChangeToday"
@switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" @switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday"
:checkedWaitTask="checkedWaitTask"> :checkedWaitTask="checkedWaitTask" @onQuery="getListByFilter">
</job-filter> </job-filter>
<view v-if="jobList.length>0"> <view v-if="jobList.length>0">
@ -67,7 +67,15 @@
title: { title: {
type: String, type: String,
default: "" default: ""
} },
isShowItemCode: {
type: Boolean,
default: false
},
isShowQurery: {
type: Boolean,
default: false
},
}, },
data() { data() {
return { return {
@ -82,7 +90,8 @@
status: '1,2', // status: '1,2', //
detailOptions: [], detailOptions: [],
detailGiveupOptions: [], detailGiveupOptions: [],
titleName:"" titleName:"",
filterItemCode:''
}; };
}, },
@ -172,6 +181,15 @@
value: this.status value: this.status
}) })
if(this.filterItemCode){
//
filters.push({
column: "itemCode",
action: "like",
value: this.filterItemCode
})
}
filters.push({ filters.push({
column: "accept_user_id", column: "accept_user_id",
action: "==", action: "==",
@ -260,6 +278,27 @@
this.showMessage(error) this.showMessage(error)
}) })
}, },
getListByFilter(params) {
console.log('getListByFilter',params)
if (params.itemCode) {
//
this.filterItemCode = params.itemCode
}else{
this.filterItemCode = ''
}
if (params.status) {
this.status = params.status
}else{
this.status = "1,2"
}
if(params.creationTime==""){
this.checkedToday = false;
}
this.todayTime = params.creationTime
this.getList('refresh')
},
switchChangeToday(state, creationTime) { switchChangeToday(state, creationTime) {
this.checkedToday = state; this.checkedToday = state;

2
src/pages/inventoryMove/job/okToHoldMoveJob.vue

@ -1,6 +1,6 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<comMoveJob :title="title" ref="comMoveJob" businessTypeCode='OkToHold' > </comMoveJob> <comMoveJob :isShowItemCode="true" :isShowQurery="true" :title="title" ref="comMoveJob" businessTypeCode='OkToHold' > </comMoveJob>
</view> </view>
</template> </template>

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

@ -32,7 +32,7 @@
<view class=""> <view class="">
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="submit()">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="autoCommit()">提交</button>
</view> </view>
</view> </view>
</view> </view>
@ -449,9 +449,15 @@
afterScan() { afterScan() {
this.resizeCollapse(); this.resizeCollapse();
let str = "" this.autoCommit()
},
autoCommit(){
var totalQty =0;
var taskQty =0;
this.detailSource.forEach(detail => { this.detailSource.forEach(detail => {
detail.Items.forEach(item => { detail.Items.forEach(item => {
taskQty =calc.add(taskQty,item.qty)
item.Locations.forEach(lco => { item.Locations.forEach(lco => {
lco.Batchs.forEach(batch => { lco.Batchs.forEach(batch => {
batch.Records.forEach(record => { batch.Records.forEach(record => {
@ -466,8 +472,12 @@
str += str +=
`包装号【${record.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${batch.qty}】不一致\n` `包装号【${record.packingNumber}】提交数量【${tempHandleQty}】与任务物料数量【${batch.qty}】不一致\n`
} }
} }
if(record){
var hanleQty =record.qty?record.qty:0
totalQty = calc.add(totalQty,hanleQty)
}
}) })
}) })
}) })
@ -476,6 +486,9 @@
if(str){ if(str){
str = '任务明细未全部完成,是否提交?\n' + str str = '任务明细未全部完成,是否提交?\n' + str
}
if(totalQty!=taskQty){
str ="扫描数量["+totalQty+"]与任务数量不一致["+taskQty+"],是否提交"
this.$refs.comMessage.showQuestionMessage1(str, 'red', res => { this.$refs.comMessage.showQuestionMessage1(str, 'red', res => {
if (res) { if (res) {
// //
@ -487,7 +500,6 @@
}else { }else {
// //
this.$throttle(this.submit, 2000, this)() this.$throttle(this.submit, 2000, this)()
} }
}, },

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

@ -147,6 +147,7 @@
getScanResult(result) { getScanResult(result) {
let label = result.label; let label = result.label;
let pack = result.package; let pack = result.package;
let errorHint=""
result.balance.forEach( result.balance.forEach(
balance => { balance => {
let item = this.detailSource.find(res => { let item = this.detailSource.find(res => {
@ -180,14 +181,19 @@
item.subList.push(newDetail); item.subList.push(newDetail);
} else { } else {
if (detail.scaned == true) { if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + errorHint+="箱码[" + balance.packingNumber + "批次[" + balance.batch +
"]重复扫描") "]重复扫描\n"
} }
} }
} }
this.calcHandleQty(); this.calcHandleQty();
} }
) )
if(errorHint){
this.showErrorMessage(errorHint)
}else {
this.scanPopupGetFocus()
}
}, },
getRecommendLocation(balance) { getRecommendLocation(balance) {
@ -251,9 +257,6 @@
this.$forceUpdate(); this.$forceUpdate();
}, },
updateData() {
this.calcHandleQty();
},
removeItem(index, item) { removeItem(index, item) {
this.removeRecommendLocation([item.expectinNumber]); this.removeRecommendLocation([item.expectinNumber]);
this.detailSource.splice(index, 1) this.detailSource.splice(index, 1)
@ -423,13 +426,6 @@
if (res) {} if (res) {}
}); });
}, },
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
});
},
showScanMessage(message) { showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message); this.$refs.comMessage.showScanMessage(message);

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

@ -228,9 +228,9 @@
that.jobToLocationCode = that.subList[0].toLocationCode; that.jobToLocationCode = that.subList[0].toLocationCode;
that.productionLineCode = that.jobContent.subList[0].productionLineCode; that.productionLineCode = that.jobContent.subList[0].productionLineCode;
if (that.jobContent.allowModifyLocation == 'FALSE') { // if (that.jobContent.allowModifyLocation == 'FALSE') {
that.toLocationCode = that.subList[0].toLocationCode // that.toLocationCode = that.subList[0].toLocationCode
} // }
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes) that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes)
that.detailSource = getDataSource(that.subList) that.detailSource = getDataSource(that.subList)
if (that.scanMessage) { if (that.scanMessage) {

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

@ -34,7 +34,7 @@
:locationAreaTypeList="toLocationAreaTypeList"></locationCompare> :locationAreaTypeList="toLocationAreaTypeList"></locationCompare>
</view> </view>
<view class=" uni-flex uni-row"> <view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button> <button class="btn_single_commit" hover-class="btn_commit_after" @click="autoCommit">提交</button>
</view> </view>
</view> </view>
</view> </view>

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

@ -460,6 +460,17 @@
}else{ }else{
this.filterItemCode = '' this.filterItemCode = ''
} }
if (params.status) {
this.status = params.status
}else{
this.status = "1,2"
}
if(params.creationTime==""){
this.checkedToday = false;
}
this.todayTime = params.creationTime
this.getList('refresh', this.productionLine, this.filterItemCode) this.getList('refresh', this.productionLine, this.filterItemCode)
}, },

Loading…
Cancel
Save