Browse Source

YT-575所有pda任务,扫描完成,增加扫描背景色,显示扫描的包装数量和单位,如图

intex_online20241111
zhang_li 3 weeks ago
parent
commit
529b470e43
  1. 73
      src/mycomponents/detail/comJobDetailCardBatch.vue
  2. 128
      src/pages/deliver/coms/comDeliverDetailCardBatch.vue
  3. 785
      src/pages/deliver/coms/comScanDeliverPackBatch.vue
  4. 1322
      src/pages/deliver/job/deliverDetailBatch.vue
  5. 87
      src/pages/inventoryMove/job/inventoryMoveDetail.vue
  6. 1
      src/pages/issue/job/issueDetailBatch.vue
  7. 2
      src/pages/issue/job/issueJob.vue
  8. 117
      src/pages/productReceipt/coms/comProductDetailCardBatch.vue
  9. 5
      src/pages/productReceipt/job/productReceiptDetail.vue
  10. 14
      src/pages/putaway/job/putawayDetail.vue

73
src/mycomponents/detail/comJobDetailCardBatch.vue

@ -1,22 +1,23 @@
<!-- 采购上架任务详情按批次显示详情的组件 -->
<template>
<view class="" style="background-color: #fff;">
<uni-swipe-action>
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowPackUnit="true"></itemCompareQty>
<uni-swipe-action-item
:right-options="(dataContent.scaned&&isEdit)?editAndRemoveOptions : dataContent.scaned? removeOptions:options"
@click="swipeClick($event,dataContent,'parent')">
<view class="" :class="dataContent.scaned?'scan_view':''">
<batch v-if="dataContent.subList[0].batch" :batch="dataContent.subList[0].batch"></batch>
<location title="来源库位" v-if="dataContent.subList[0].fromLocationCode"
:locationCode="dataContent.subList[0].fromLocationCode">
</location>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
<recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm">
<uni-collapse ref="collapse">
<uni-collapse-item :open="true">
<template v-slot:title>
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowPackUnit="true"></itemCompareQty>
</template>
<package-list :dataContent="dataContent.subList"
:isEdit="settingParam.allowModifyQty=='TRUE'"
:settingParam="settingParam"
@collapseChange="collapseChange"
@updateData="updateData"
:isShowStatus="isShowStatus"
:isShowPackListStatus="isShowPackListStatus"
></package-list>
</uni-collapse-item>
</uni-collapse>
<recommend-qty-edit ref=" receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm">
</recommend-qty-edit>
<comMessage ref="message"></comMessage>
</view>
@ -31,13 +32,7 @@
import pack from '@/mycomponents/balance/pack.vue'
import detailList from '@/mycomponents/detail/detailList.vue'
import packageList from '@/mycomponents/package/packageList.vue'
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
import {
getRemoveOption,
getEditRemoveOption
} from '@/common/array.js';
import {
getDetailOption,
getPurchaseReceiptOption
@ -52,10 +47,7 @@
jobDetailPopup,
receiptDetailInfoPopup,
detailList,
packageList,
location,
toLocation,
batch,
packageList
},
props: {
dataContent: {
@ -77,10 +69,6 @@
isShowPackListStatus: {
type: Boolean,
default: true
},
isEdit: {
type: Boolean,
default: true
}
},
watch: {
@ -97,10 +85,7 @@
},
locatonItem: {},
detailOptions: [],
scanOptions: [],
options: [],
removeOptions: [],
editAndRemoveOptions: []
scanOptions: []
}
},
@ -112,9 +97,7 @@
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, this.settingParam
.allowModifyLocation)
}
this.removeOptions = getRemoveOption();
this.editAndRemoveOptions = getEditRemoveOption()
},
@ -122,13 +105,13 @@
console.log('updated')
},
methods: {
collapseChange() {
methods: {
collapseChange(){
setTimeout(() => {
this.resizeCollapse();
}, 500)
},
resizeCollapse() {
this.$nextTick(r => {
this.$refs.collapse.resize()
@ -149,8 +132,8 @@
this.$forceUpdate();
},
swipeClick(e, item, type) {
if (e.content.text == "编辑") {
swipeClick(e, item) {
if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item)
@ -175,7 +158,7 @@
this.editItem.handleQty = qty;
this.$emit('updateData')
},
updateData() {
updateData(){
this.$emit('updateData')
}
}

128
src/pages/deliver/coms/comDeliverDetailCardBatch.vue

@ -1,23 +1,32 @@
<template>
<view>
<!-- <requiredLocation title="需求库位" :locationCode="dataContent.toLocationCode"
:isShowEdit="dataContent.allowModifyLocation==1"></requiredLocation> -->
<view v-for="(item,index) in dataContent.subList" style="margin-bottom: 20rpx;">
<uni-swipe-action ref="swipeAction" :class="item.scaned? 'scan_view':''">
<uni-swipe-action-item
:right-options="(item.scaned&&isEdit)?editAndRemoveOptions : item.scaned? removeOptions:options"
@click="swipeClick($event,item,index)" style='padding:20rpx 0px 5px 0px;align-items: center;'>
<item-qty :dataContent="item" :handleQty="item.handleQty" :isShowBalanceQty="false"></item-qty>
<location :locationCode="item.fromLocationCode"></location>
<recommendBalanceBatch style='margin-left: 20px;' :detail="item" :isShowLocation="false"
:isShowPack="item.packingNumber"></recommendBalanceBatch>
</uni-swipe-action-item>
</uni-swipe-action>
<view>
<uni-collapse ref="collapse">
<uni-collapse-item :open="true" :class="dataContent.scaned?'scan_view':''">
<template v-slot:title>
<view class="split_line"></view>
<!-- 物品 -->
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowBalanceQty='false'></item-qty>
</template>
<uni-swipe-action ref="swipeAction" style="margin-top: 10px;"
v-for="(item,index) in dataContent.subList">
<uni-swipe-action-item
:right-options="(item.scaned&&isEdit)?editAndRemoveOptions : item.scaned? removeOptions:options" @click="itemCoceClick($event,item,index)">
<view class="" :class="item.scaned?'scan_view':''">
<recommend :detail="item" :isShowLocation="false" :isShowFromLocation="true" :isShowToLocation="settingParam.allowModifyLocation=='TRUE'"></recommend>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</uni-collapse-item>
</uni-collapse>
</view>
</view>
<qtyEdit ref="balanceQtyEdit" @confirm="confirm" :isShowStatus="true" :allowBiggerQty='allowBiggerQty'></qtyEdit>
<!-- <balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" :isShowStatus="true"></balance-qty-edit> -->
<recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm">
</recommend-qty-edit>
<detail-info-popup ref="detailInfoPopup"></detail-info-popup>
<comMessage ref="message"></comMessage>
</template>
@ -25,39 +34,42 @@
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import recommendBalanceBatch from '@/mycomponents/balance/recommendBalanceBatch.vue'
import recommendBalance from '@/mycomponents/balance/recommendBalance.vue'
import handleBalance from '@/mycomponents/balance/handleBalance.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import qtyEdit from '@/mycomponents/qty/qtyEdit.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import location from '@/mycomponents/balance/location.vue'
import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue'
import {
import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue'
import batch from '@/mycomponents/balance/batch.vue'
import qtyEdit from '@/mycomponents/qty/qtyEdit.vue'
import {
getDetailOption,
getPurchaseReceiptOption,
getRemoveOption,
getEditRemoveOption
getEditRemoveOption,
getRemoveOption
} from '@/common/array.js';
export default {
emits: ['updateData'],
emits: ['updateData', "removeItemCode"],
components: {
itemQty,
recommend,
recommendBalanceBatch,
recommendBalance,
handleBalance,
recommendQtyEdit,
requiredLocation,
qtyEdit,
balanceQtyEdit,
location,
detailInfoPopup
detailInfoPopup,
comIssueRequestInfo,
batch,
},
props: {
dataContent: {
type: Object,
default: {}
type: Array,
default: []
},
settingParam: {
type: Object,
@ -67,10 +79,6 @@ import {
type: Boolean,
default: true
},
allowBiggerQty: {
type: Boolean,
default: false
},
},
watch: {
@ -83,58 +91,82 @@ import {
editItem: {},
batchItem: {},
detailOptions: [],
scanOptions: []
scanOptions: [],
removeOptions: [],
editAndRemoveOptions:[]
}
},
mounted() {
this.removeOptions = getRemoveOption();
this.detailOptions = getDetailOption();
this.scanOptions = getEditRemoveOption();
this.removeOptions = getRemoveOption()
this.editAndRemoveOptions = getEditRemoveOption()
console.log(888,this.dataContent)
},
methods: {
resizeCollapse() {
this.$nextTick(r => {
this.$refs.collapse.forEach(r => {
r.childrens.forEach(i => {
this.$refs.collapse.resize()
this.$refs.collapse.childrens.forEach(i => {
i.init();
})
r.resize();
})
});
},
swipeClick(e, batch,
record,recordIndex,
batchIndex,
Batchs,
locatonIndex,
Locations) {
if (e.content.text == "编辑") {
this.edit(batch, record)
} else if (e.content.text == "移除") {
this.remove(batch, record, recordIndex,batchIndex,Batchs,locatonIndex,Locations)
}
},
swipeClick(e, item, index) {
itemCoceClick(e, item, index) {
if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item, index)
// this.dataContent.subList.splice(index, 1);
item.scaned = false
item.handleQty=0
this.$emit('updateData')
}
},
edit(item) {
let that = this;
that.editItem = item;
that.$refs.balanceQtyEdit.openEditPopup(item);
this.editItem = item;
this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty, item.labelQty);
},
detail(item) {
this.showItem = item;
this.$refs.receiptHint.openScanPopup()
},
remove(item, index) {
remove(batch, record, recordIndex,batchIndex,Batchs,locatonIndex,Locations) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.handleQty = 0;
item.scaned = false ;
batch.Records.splice(recordIndex, 1);
if(batch.Records.length==0&&Batchs[batchIndex].isNewAdd){
Batchs.splice(batchIndex,1)
}
if(batch.Records.length==0&&Locations[locatonIndex].isNewAdd){
Locations.splice(locatonIndex,1)
}
this.resizeCollapse();
this.$emit('updateData', record)
}
});
},
confirm(val) {
this.editItem.handleQty = Number(val);
this.$emit('updateData', this.editItem)
this.editItem.handleQty = Number(val);
this.$emit('updateData', this.editItem)
}
}
}

785
src/pages/deliver/coms/comScanDeliverPackBatch.vue

@ -3,18 +3,19 @@
<uni-popup ref="popup" :maskClick='false'>
<view class="">
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx;">
扫描箱码
</view>
<view class="">
<image class="fr icons_scan_close" src="/static/icons/icons_scan_close.svg"
@click="closeScanPopup()"></image>
</view>
</view>
<!-- <view class="uni-flex uni-row" style="align-items: center;
<!-- <view class="uni-flex uni-row" style="align-items: center;
background-color: #fff;
margin-left: 20rpx;
margin-right: 20rpx;
@ -32,28 +33,29 @@
@confirm="confirmSelect"></u-select>
</view>
</view>
</view>
<u-line class='line_color'></u-line> -->
</view> -->
<!-- <u-line class='line_color'></u-line> -->
<view class="uni-flex uni-row" style="align-items: center;
<!-- <view class="uni-flex uni-row" style="align-items: center;
background-color: #fff;
margin-left: 20rpx;
margin-right: 20rpx;
margin-top: 8rpx;
border-radius: 8rpx;">
<view class="uni-center" style="width: 25%; ">
<view class="uni-center" style="width: 25%; font-size: 35rpx; ">
来源库位
</view>
<view class="" style="width: 75%; padding: 8rpx;">
<uni-combox :candidates="fromLocationList" v-model="fromLocationCode" placeholder="请选择库位"
@confirm="fromLocationUpdate"></uni-combox>
<uni-combox class="my-combox" :candidates="fromLocationList" v-model="fromLocationCode"
placeholder="请选择库位" @confirm="fromLocationUpdate"
:inputStyle="inputStyleObject"></uni-combox>
</view>
</view>
</view> -->
<view class="">
<view class="">
<win-com-scan ref="comscan" placeholder="箱标签" @getResult="onScan" :clearResult="true"
:headerType="headerType" :isShowHistory="false">
headerType="HPQ,HMQ" :isShowHistory="false">
</win-com-scan>
<view style="width: 100%;">
@ -76,7 +78,7 @@
<uni-swipe-action-item @click="swipeClick($event,record,index)"
:right-options="scanOptions">
<view style="padding: 0px 10px">
<balance :dataContent="record" :isShowLocation="false"
<balance :dataContent="record" :isShowFromLocation="false"
:isShowStdPack="false"></balance>
</view>
</uni-swipe-action-item>
@ -95,6 +97,10 @@
<balance-select ref="balanceSelect" @onSelectItem='selectBalanceItem'></balance-select>
<comMessage ref="comMessage"></comMessage>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" :isShowStatus="true"></balance-qty-edit>
<!-- 模拟扫描功能 -->
<!-- <win-com-scan v-show="false" ref="comscansimulate" placeholder="箱标签" @getResult="onScan" :clearResult="true"
headerType="HPQ,HMQ" :isShowHistory="false">
</win-com-scan> -->
</view>
</template>
@ -108,24 +114,33 @@
getDetailOption,
getDetailEditRemoveOption
} from '@/common/array.js';
import {
getWorkShopLineStation,
getBalanceByFilter,
getBalanceByParams,
} from '@/api/request2.js';
import {
uniqueArray
} from '@/common/basic.js';
import {
getDirectoryItemArray,
} from '@/common/directory.js';
getLabelInfo
} from '@/common/label.js';
import {
calc
} from '@/common/calc.js';
import {
getWorkShopLineStation
} from '@/api/request2.js';
import {
getBalanceByManagementPrecision
} from '@/common/balance.js';
import {
getDirectoryItemArray
} from '../../../common/directory.js';
export default {
name: 'winScanPack',
emits: ["afterScan", "closeScan"],
components: {
winComScan,
balance,
@ -137,12 +152,6 @@
type: String,
default: ''
},
headerType: {
type: String,
default: "HPQ,HMQ"
},
},
data() {
return {
@ -163,9 +172,14 @@
positionInfo: "请选择位置",
positionList: [],
defaultValueList: [],
fromInventoryStatuses: "",
packageInfo: {},
label: {},
fromInventoryStatuses: [],
packageInfo: {}
inputStyleObject: {
fontSize: "100rpx"
},
bussinessCode: 'Issue',
toLocationAreaTypeList: []
}
},
created() {
@ -177,13 +191,29 @@
this.scanOptions = getDetailEditRemoveOption();
},
methods: {
openScanPopupForJobSimulate(content, jobcontent, scanMessage) {
this.issueRecord = [];
this.dataContent = content;
this.jobContent = jobcontent;
this.initData();
getLabelInfo(scanMessage, "HPQ,HMQ", callback => {
if (callback.success) {
this.onScan(callback);
} else {
this.showErrorMessage(callback.message, res => {})
}
})
},
openScanPopup(content, jobcontent) {
this.issueRecord = [];
this.dataContent = content;
this.jobContent = jobcontent;
this.initData();
this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode +
"-" + this.jobContent.subList[0].workStationCode
// this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode +
// "-" + this.jobContent.subList[0].workStationCode
this.$refs.popup.open('bottom')
setTimeout(res => {
this.getfocus();
@ -202,57 +232,58 @@
let that = this;
that.fromLocationList = [];
if (that.dataContent != null) {
that.fromInventoryStatuses = getDirectoryItemArray(this.jobContent.outInventoryStatuses)
that.toLocation =that.dataContent.subList;
that.toLocationCode = that.dataContent.subList[0].toLocationCode;
that.fromLocationList = that.getFromLocationList();
that.fromInventoryStatuses = this.jobContent.outInventoryStatuses
that.toLocation = that.dataContent[0];
that.toLocationCode = that.dataContent[0].toLocationCode;
that.toLocationAreaTypeList = getDirectoryItemArray(this.jobContent.toAreaTypes)
// that.fromLocationList = that.getFromLocationList();
}
},
showBalanceSelect(items, packageInfo) {
this.packageInfo = packageInfo;
showBalanceSelect(items) {
this.$refs.balanceSelect.openPopup(items);
},
getFromLocationList() {
let list = [];
let location = this.dataContent.subList.find(r => r.toLocationCode == this.toLocationCode);
if (location != undefined) {
this.dataContent.subList.forEach(item => {
list.push(item.fromLocationCode)
})
this.fromLocationCode = list[0];
return list;
} else {
this.$refs.comMessage.showErrorMessages('需求库位【' + this.toLocationCode + '】不存在', res => {
this.toLocationCode = '';
});
}
},
// getFromLocationList() {
// let list = [];
// this.dataContent.forEach(location => {
// location.Items.forEach(item => {
// item.Locations.forEach(f => {
// let item = list.find(l => l == f.fromLocationCode);
// if (item == undefined) {
// list.push(f.fromLocationCode)
// }
// })
// })
// });
// //
// list = uniqueArray(list);
// this.fromLocationCode = list[0];
// return list;
// },
fromLocationUpdate(fromlocation) {
let location = this.fromLocationList.find(r => r == fromlocation)
// --
// if (location == undefined) {
this.fromLocationCode = fromlocation
// this.showErrorMessage('' + fromlocation + '')
// }
if (location == undefined) {
this.fromLocationCode = ''
this.showErrorMessage('发货库位【' + fromlocation + '】不存在')
}
},
onScan(result) {
queryBalance(result) {
try {
let that = this;
if (that.fromLocationCode == '') {
that.showErrorMessage('请选择来源库位', res => {
that.$refs.toLocationCombox.onFocus();
});
return;
}
// if (that.fromLocationCode == '') {
// that.showErrorMessage('', res => {
// that.$refs.toLocationCombox.onFocus();
// });
// return;
// }
let packageInfo = result.package;
let itemCode = result.label.itemCode;
let packingCode = result.label.packingNumber;
let lot = result.label.batch;
let item = that.toLocation.find(r => r.itemCode == itemCode);
let item = that.toLocation.Items.find(r => r.itemCode == itemCode);
if (item == undefined) {
that.showErrorMessage('未查找到物料【' + itemCode + '】的发货明细',
res => {
@ -261,89 +292,267 @@
)
return;
} else {
//
var params = {
itemCode: result.package.itemCode,
batch: result.label.batch,
packingNumber: result.label.packingNumber,
parentPackingNumber: result.package.parentNumber,
inventoryStatus: this.jobContent.outInventoryStatuses.split(','),
areaType: this.jobContent.fromAreaTypes.split(','),
bussinessCode: this.jobContent.businessType
}
uni.showLoading({
title: '加载中',
title: '查询中',
mask: true
})
getBalanceByManagementPrecision(result.label, that.fromLocationCode, that.fromInventoryStatuses,
balanceRes => {
if (balanceRes.success) {
if (balanceRes.data.list.length == 0) {
this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],未查找到该包装的库存记录',
res => {
this.packGetFocus();
})
} else if (balanceRes.data.list.length == 1) {
let balance = balanceRes.data.list[0];
this.afterGetBalance(result.label, balance, packageInfo);
} else {
this.label = result.label;
this.showBalanceSelect(balanceRes.data.list, packageInfo);
}
getBalanceByParams(params).then(res => {
if (res.data.length == 0) {
var status = getInventoryStatusDesc(params.inventoryStatus)
var areaType = getListLocationAreaTypeDesc(params.areaType)
var hint =
"按物料号 [" + params.itemCode + "] \n" +
"包装号 [" + params.packingNumber + "] \n" +
"批次 [" + params.batch + "] \n" +
"状态 [" + status + "] \n" +
"库区 [" + areaType + "] \n" +
"未查找到库存余额"
this.showErrorMessage(hint,
res => {
that.getfocus();
})
} else if (res.data.length == 1) {
result.balance = res.data[0]
if (result.label.packingNumber != result.balance.packingNumber) {
result.balance.qty = Number(result.label.qty)
} else {
this.showErrorMessage(balanceRes.message.message);
result.balance.qty = Number(result.balance.qty)
}
uni.hideLoading();
});
this.afterGetBalance(result.label, result.balance, result.package);
} else {
//
this.$refs.balanceSelect.openPopup(res.data);
}
uni.hideLoading()
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error,
res => {
that.getfocus();
})
})
}
} catch (e) {
this.showErrorMessage(e.stack)
this.showErrorMessage(e.stack, res => {
that.getfocus();
})
uni.hideLoading();
}
},
getBalance(label, packageInfo, callback) {
var filters = []
if (packageInfo.parentNumber) {
var packingNumber = packageInfo.parentNumber + "," + label.packingNumber;
filters.push({
column: "packingNumber",
action: "in",
value: packingNumber
})
} else {
filters.push({
column: "packingNumber",
action: "==",
value: label.packingNumber
})
}
filters.push({
column: "itemCode",
action: "==",
value: label.itemCode
})
filters.push({
column: "batch",
action: "==",
value: label.batch
})
if (this.fromInventoryStatuses != null && this.fromInventoryStatuses != "") {
filters.push({
column: "inventoryStatus",
action: "in",
value: this.fromInventoryStatuses
})
}
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getBalanceByFilter(params).then(res => {
callback(res.data)
}).catch(err => {
this.showErrorMessage(err.message);
})
},
onScan(result) {
if (!result.package) {
this.showErrorMessage('扫描数据错误[' + result.label.code + "]",
res => {
this.getfocus();
}
)
return;
}
if (this.toLocation && result.package.packUnit) {
let item = this.toLocation.Items.find(r => r.itemCode == result.package.itemCode);
if (!item) {
this.showErrorMessage('扫描物料代码不属于该任务');
return
}
this.getToLocationBalance(result)
}
},
//
getToLocationBalance(result) {
uni.showLoading({
title: '查询中',
mask: true
})
var filters = []
if (result.package.parentNumber) {
var packingNumber = result.package.parentNumber + "," + result.package.number;
filters.push({
column: "packingNumber",
action: "in",
value: packingNumber
})
} else {
filters.push({
column: "packingNumber",
action: "==",
value: result.package.number
})
}
filters.push({
column: "itemCode",
action: "==",
value: result.package.itemCode
})
filters.push({
column: "batch",
action: "==",
value: result.package.batch
})
filters.push({
column: "areaType",
action: "in",
value: this.toLocationAreaTypeList.join(',')
})
var params = {
filters: filters,
pageNo: 1,
pageSize: 100,
}
getBalanceByFilter(params).then(res => {
uni.hideLoading()
if (res.data.list.length > 0) {
this.showErrorMessage("包装在库位【" + res.data.list[0].locationCode + "】已有库存余额");
} else {
this.queryBalance(result);
}
// callback(res.data)
}).catch(err => {
uni.hideLoading()
this.showErrorMessage(err.message);
})
},
selectBalanceItem(balance) {
this.afterGetBalance(balance, balance, this.packageInfo);
},
afterGetBalance(label, balance, packageInfo) {
let that = this;
try {
let itemCode = label.itemCode;
let packingCode = label.packingNumber;
let lot = label.batch;
let item = that.toLocation.find(r => r.itemCode == itemCode);
// item.scaned =true
let fromLocation = that.toLocation.find(l => l.fromLocationCode == that.fromLocationCode);
// --
if(!fromLocation){
fromLocation = {
Batchs:[{
Recommends:[],
Records: [],
batch: label.batch,
detail:{
...packageInfo,
fromLocationCode: balance.locationCode,
toLocationCode:this.toLocationCode
},
handleQty: 0,
packingNumber: null,
// packingNumber: label.packingNumber,
qty: label.qty,
uom: label.uom
}],
toLocationCode:this.toLocationCode,
fromLocationCode: balance.locationCode,
handleQty: 0,
qty: label.qty,
uom: label.uom
}
item.Locations.push(fromLocation)
}
if (fromLocation != undefined) {
let batch = fromLocation.batch;
let item = that.toLocation.Items.find(r => r.itemCode == itemCode);
that.fromLocationCode = balance.locationCode;
let fromLocation = item.Locations.find(l => l.fromLocationCode == that.fromLocationCode);
//
if (fromLocation){
//
// if(fromLocation.isNewAdd){
// }else {
// //
// }
let batch = fromLocation.Batchs.find(r => r.batch == lot);
if (batch != undefined) {
that.addRecord(item.batch, label, balance, packageInfo)
if (batch.Records == undefined) {
batch.Records = [];
}
let record = batch.Records.find(r => r.packingNumber == packingCode);
if (record == undefined) {
//
if (batch.Recommends != undefined && batch.Recommends.length > 0) {
let recommend = batch.Recommends.find(r => r.packingNumber == packingCode);
if (recommend != undefined) {
that.addRecord(batch, label, balance, packageInfo)
} else {
//
if (this.jobContent.allowModifyPackingNumber == 'TRUE') {
that.addRecord(batch, label, balance, packageInfo);
} else {
that.showErrorMessage('未查找到该箱码【' + packingCode + '】的明细',
res => {
that.getfocus();
return;
}
)
}
}
} else {
that.addRecord(batch, label, balance, packageInfo)
}
} else {
that.showErrorMessage('箱码【' + packingCode + '】已经扫描,请继续扫描下一箱',
res => {
that.getfocus();
}
)
}
} else {
if (this.jobContent.allowModifyBatch == "TRUE") {
this.showQuestionMessage('在【' + that.fromLocationCode + '】库位下,未查找到批次【' + lot +
'】的发货明细,是否要继续发货?', res => {
if (res) {
let batch = that.createBatchInfo(label, balance,packageInfo);
let batch = that.createBatchInfo(label, balance, packageInfo);
//details
if (fromLocation.Batchs.length > 0) {
batch.detail = fromLocation.Batchs[0].detail;
}
fromLocation.Batchs.unshift(batch);
this.getfocus();
that.$emit("afterScan");
}
})
} else {
@ -353,13 +562,168 @@
});
}
}
} else {
that.showErrorMessage('未查找到推荐库位【' + that.fromLocationCode + '】的发货明细',
res => {
that.getfocus();
}
)
}else {
//
if (this.jobContent.allowModifyLocation == "TRUE") {
this.showQuestionMessage("扫描物料[" + itemCode + "]的库位【" + that.fromLocationCode +
"】与推荐的库位不一致,是否要继续发货?", res => {
if (res) {
let locaion = that.createLocationInfo(label, balance, packageInfo);
item.Locations.push(locaion);
this.getfocus();
that.$emit("afterScan");
}
})
} else {
this.showErrorMessage("扫描物料[" + itemCode + "]的库位【" + that.fromLocationCode +
"】与推荐的库位不一致,不允许继续发货?")
}
}
// if (fromLocation && !fromLocation.isNewAdd) {
// let batch = fromLocation.Batchs.find(r => r.batch == lot);
// if (batch != undefined) {
// if (batch.Records == undefined) {
// batch.Records = [];
// }
// let record = batch.Records.find(r => r.packingNumber == packingCode);
// if (record == undefined) {
// //
// if (batch.Recommends != undefined && batch.Recommends.length > 0) {
// let recommend = batch.Recommends.find(r => r.packingNumber == packingCode);
// if (recommend != undefined) {
// that.addRecord(batch, label, balance, packageInfo)
// } else {
// //
// if (this.jobContent.allowModifyPackingNumber == 'TRUE') {
// that.addRecord(batch, label, balance, packageInfo);
// } else {
// that.showErrorMessage('' + packingCode + '',
// res => {
// that.getfocus();
// return;
// }
// )
// }
// }
// } else {
// that.addRecord(batch, label, balance, packageInfo)
// }
// } else {
// that.showErrorMessage('' + packingCode + ',',
// res => {
// that.getfocus();
// }
// )
// }
// } else {
// if (this.jobContent.allowModifyBatch == "TRUE") {
// this.showQuestionMessage('' + that.fromLocationCode + ',' + lot +
// ',?', res => {
// if (res) {
// let batch = that.createBatchInfo(label, balance, packageInfo);
// //details
// if (fromLocation.Batchs.length > 0) {
// batch.detail = fromLocation.Batchs[0].detail;
// }
// fromLocation.Batchs.unshift(batch);
// this.getfocus();
// that.$emit("afterScan");
// }
// })
// } else {
// that.showErrorMessage('' + lot + '',
// res => {
// that.getfocus();
// });
// }
// }
// } else {
// if (fromLocation&&fromLocation.isNewAdd) {
// let batch = fromLocation.Batchs.find(r => r.batch == lot);
// if (batch != undefined) {
// if (batch.Records == undefined) {
// batch.Records = [];
// }
// let record = batch.Records.find(r => r.packingNumber == packingCode);
// if (record == undefined) {
// //
// if (batch.Recommends != undefined && batch.Recommends.length > 0) {
// let recommend = batch.Recommends.find(r => r.packingNumber == packingCode);
// if (recommend != undefined) {
// that.addRecord(batch, label, balance, packageInfo)
// } else {
// //
// if (this.jobContent.allowModifyPackingNumber == 'TRUE') {
// that.addRecord(batch, label, balance, packageInfo);
// } else {
// that.showErrorMessage('' + packingCode + '',
// res => {
// that.getfocus();
// return;
// }
// )
// }
// }
// } else {
// that.addRecord(batch, label, balance, packageInfo)
// }
// } else {
// that.showErrorMessage('' + packingCode + ',',
// res => {
// that.getfocus();
// }
// )
// }
// } else {
// if (this.jobContent.allowModifyBatch == "TRUE") {
// this.showQuestionMessage('' + that.fromLocationCode + ',' + lot +
// ',?', res => {
// if (res) {
// let batch = that.createBatchInfo(label, balance, packageInfo);
// //details
// if (fromLocation.Batchs.length > 0) {
// batch.detail = fromLocation.Batchs[0].detail;
// }
// fromLocation.Batchs.unshift(batch);
// this.getfocus();
// that.$emit("afterScan");
// }
// })
// } else {
// that.showErrorMessage('' + lot + '',
// res => {
// that.getfocus();
// });
// }
// }
// } else {
// if (this.jobContent.allowModifyLocation == "TRUE") {
// this.showQuestionMessage("[" + itemCode + "]" + that.fromLocationCode +
// ",?", res => {
// if (res) {
// let locaion = that.createLocationInfo(label, balance, packageInfo);
// item.Locations.push(locaion);
// this.getfocus();
// that.$emit("afterScan");
// }
// })
// } else {
// this.showErrorMessage("[" + itemCode + "]" + that.fromLocationCode +
// ",?")
// }
// }
// }
} catch (e) {
that.showErrorMessage(e.stack,
res => {
@ -369,27 +733,32 @@
}
},
//
createLocationInfo(label, balance, packageInfo) {
let location = {
fromLocationCode: balance.locationCode,
qty: balance.qty,
uom: balance.uom,
handleQty: 0,
isNewAdd: true,
Batchs: []
}
let batch = this.createBatchInfo(label, balance, packageInfo);
batch.detail = balance;
batch.detail.fromLocationCode = balance.locationCode;
location.Batchs.push(batch);
return location;
},
createBatchInfo(data, balance, packageInfo) {
let batch = {
batch: data.lot||data.batch,
isNewAdd: true,
batch: data.batch,
qty: 0,
uom: data.uom,
handleQty: Number(data.qty),
Records: [],
detail:{
fromLocationCode:this.fromLocationCode, //balance.locationCode
toLocationCode:this.toLocationCode,
itemCode:data.itemCode,
handleQty: Number(data.qty),
packingNumber:data.packingNumber,
qty: 0,
uom:data.uom,
itemName:packageInfo.itemName,
itemDesc1:packageInfo.itemDesc1,
itemDesc2:packageInfo.itemDesc2,
singlePrice:balance.singlePrice,
amount:balance.amount
}
handleQty: Number(balance.qty),
Records: []
}
let record = this.creatRecord(data, balance, packageInfo);
batch.Records.push(record);
@ -401,53 +770,91 @@
balance.packQty = packageInfo.packQty
balance.packUnit = packageInfo.packUnit
let record = {
scaned: true,
itemCode: label.itemCode,
packingNumber: label.packingNumber,
parentPackingNumber: packageInfo.parentNumber,
batch: label.batch,
// qty: Number(balance.qty),
// qty: Number(label.qty) > Number(balance.qty) ? Number(balance.qty) : Number(label.qty),
qty: Number(balance.qty),
handleQty:0,
uom: balance.uom,
inventoryStatus: balance.inventoryStatus,
balance: balance,
toLocationCode: this.toLocationCode,
supplierCode: label.supplierCode,
packUnit: packageInfo.packUnit,
packQty: packageInfo.packQty,
fromLocationCode:balance.locationCode,
scaned: true,
itemCode: label.itemCode,
packingNumber: label.packingNumber,
parentPackingNumber: packageInfo.parentNumber,
batch: label.batch,
// qty: Number(balance.qty),
// qty: Number(label.qty) > Number(balance.qty) ? Number(balance.qty) : Number(label.qty),
qty: Number(balance.qty),
handleQty: Number(balance.qty),
uom: balance.uom,
inventoryStatus: balance.inventoryStatus,
balance: balance,
toLocationCode: this.toLocationCode,
supplierCode: label.supplierCode,
packUnit: packageInfo.packUnit,
packQty: packageInfo.packQty
}
return record;
},
calcBatchHandleQty(batch,label,balance) {
this.dataContent.subList.forEach(item => {
if(item.itemCode == label.itemCode&&item.batch == label.batch){
item.handleQty = item.handleQty || 0
item.handleQty = calc.add(item.handleQty, label.qty);
}
calcBatchHandleQty(batch) {
let handleQty = 0;
batch.Records.forEach(res => {
handleQty = calc.add(handleQty, res.qty)
})
batch.handleQty = handleQty;
},
addRecord(batch, label, balance, packageInfo) {
var checkData = this.dataContent.subList.find(r => {
if (r.batch == balance.batch) {
return r;
if (packageInfo.parentNumber) {
var checkData = batch.Records.find(r => {
if (r.packingNumber == packageInfo.parentNumber &&
r.batch == balance.batch) {
return r;
}
})
if (checkData) {
//
this.showErrorMessage("箱码[" + packageInfo.number + "]批次[" + balance.batch +
"]的父包装已经扫描")
} else {
let record = this.creatRecord(label, balance, packageInfo);
batch.Records.push(record);
this.issueRecord.unshift(record)
this.calcBatchHandleQty(batch);
this.getfocus();
this.$emit("afterScan");
}
})
if (checkData) {
checkData.scaned = true
this.calcBatchHandleQty(batch,label,balance);
this.getfocus();
} else {
let record = this.creatRecord(label, balance, packageInfo);
this.dataContent.subList.push(record);
this.calcBatchHandleQty(batch,label,balance);
this.getfocus();
this.$emit("afterScan");
//
var checkData = batch.Records.find(r => {
if (r.parentPackingNumber == packageInfo.number &&
r.batch == balance.batch) {
return r;
}
})
if (checkData) {
//
this.$refs.comMessage.showQuestionMessage("扫描箱码[" + checkData.parentPackingNumber + "]" + "批次[" +
balance
.batch + "]是父包装,是否移除子包装", res => {
if (res) {
batch.Records = [];
let record = this.creatRecord(label, balance, packageInfo);
batch.Records.push(record);
this.issueRecord.unshift(record)
this.calcBatchHandleQty(batch);
this.getfocus();
this.$emit("afterScan");
}
})
console.log("扫描的是父包装,是否移除子包装")
} else {
let record = this.creatRecord(label, balance, packageInfo);
batch.Records.push(record);
this.issueRecord.unshift(record)
this.calcBatchHandleQty(batch);
this.getfocus();
this.$emit("afterScan");
}
}
},
getfocus() {
@ -496,13 +903,17 @@
let item = this.toLocation.Items.find(r => r.itemCode == record.itemCode);
if (item != undefined) {
item.Locations.forEach(l => {
let batch = l.Batchs.find(b => b.packingNumber == record.packingNumber && b
.batch == record.batch);
let rIndex = batch.Records.findIndex(r => r.packingNumber == record
.packingNumber && r
.batch == record.batch);
batch.Records.splice(rIndex, 1);
if (batch && batch.Records && batch.Records.length > 0) {
let rIndex = batch.Records.findIndex(r => r.packingNumber == record
.packingNumber && r.batch == record.batch);
batch.Records.splice(rIndex, 1);
}
})
}
this.$emit('updateData', item);
@ -511,10 +922,16 @@
},
packGetFocus() {
this.$refs.comscan.getfocus();
if (this.$refs.comscan) {
this.$refs.comscan.getfocus();
}
},
packLoseFocus() {
this.$refs.comscan.losefocus();
if (this.$refs.comscan) {
this.$refs.comscan.losefocus();
}
},
showMessage(message, callback) {
setTimeout(r => {
@ -561,4 +978,8 @@
max-height: 300rpx;
padding: 10rpx;
}
</style>
.my-combox {
font-size: 50px;
}
</style>

1322
src/pages/deliver/job/deliverDetailBatch.vue

File diff suppressed because it is too large

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

@ -73,6 +73,10 @@
getPackingNumberAndBatchByList,
getInventoryStatusName,
} from '@/common/basic.js';
import {
calc
} from '@/common/calc.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
@ -316,6 +320,88 @@
getScanResult(result,managementPrecision) {
if(managementPrecision == 'BY_BATCH'){
this.setDataBatch(result,managementPrecision)
}else{
this.setData(result,managementPrecision)
}
},
setDataBatch(result,managementPrecision){
try {
var packingNumber = result.label.packingNumber;
var batch = result.label.batch;
var qty = result.label.qty;
var itemCode = result.label.itemCode;
var detail = this.detailSource.find(r => r.itemCode == itemCode);
if (detail == undefined) {
this.showMessage("物料号【" + itemCode + "】不在列表中")
} else {
var itemDetail = ''
if(managementPrecision == 'BY_QUANTITY'){
itemDetail = detail.subList.find(r => {
return r.itemCode == result.label.itemCode
})
}else{
itemDetail = detail.subList.find(r => {
return r.batch == batch
})
}
if (itemDetail == undefined && managementPrecision != 'BY_QUANTITY') {
this.showErrorMessage( "批次[" + batch + "]不在列表中")
} else {
if (itemDetail.scaned) {
// this.showMessage("" + batch + "")
itemDetail.handleQty =calc.add(itemDetail.handleQty,Number(result.label.qty));
} else {
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);
if (itemDetail.inventoryStatus != result.balance.inventoryStatus) {
if (this.jobContent.allowModifyInventoryStatus == "TRUE") {
this.showQuestionMessage('任务中允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus +
']不一致,是否继续转移?', res => {
if (res) {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty);
itemDetail.fromInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty);
itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.packUnit = result.package.packUnit
this.calcHandleQty();
} else {
this.scanPopupGetFocus();
}
});
} else {
this.showQuestionMessage('任务中不允许修改库存状态,实际库存状态[' + balanceStatus + ']与推荐库存状态[' +
itemStatus +
']不一致,不允许转移!', res => {
this.scanPopupGetFocus();
});
}
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty);
itemDetail.fromInventoryStatus = result.balance.inventoryStatus;
itemDetail.balance = result.balance;
itemDetail.balance.balanceQty = Number(result.balance.qty);
itemDetail.balance.packQty = Number(result.package.packQty)
itemDetail.balance.packUnit = result.package.packUnit
this.calcHandleQty();
}
}
}
}
this.scanPopupGetFocus();
} catch (e) {
this.showErrorMessage(e.message);
}
},
setData(result,managementPrecision){
try {
var packingNumber = result.label.packingNumber;
var batch = result.label.batch;
@ -388,7 +474,6 @@
}
},
async commit() {
this.scanCount = getScanCount(this.subList);
if (this.scanCount == 0) {

1
src/pages/issue/job/issueDetailBatch.vue

@ -501,7 +501,6 @@
var subList = []
var createTime = getCurrDateTime();
var creator = this.$store.state.user.id
console.log(2343,this.detailSource)
this.detailSource.forEach(toLocationCode => {
let obj = {...toLocationCode}
delete obj.subList

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

@ -484,7 +484,7 @@
if (res.success) {
this.managementList = res.list;
this.managementType = this.managementList&&this.managementList[0]&&this.managementList[0].ManagementPrecision
if(this.managementType == 'BY_BATCH'){
if(this.managementType == 'BY_BATCH'||this.managementType == 'BY_QUANTITY'){
uni.navigateTo({
url: './issueDetailBatch?id=' + result.masterId + '&status=' + result.status +
'&scanMessage=' +

117
src/pages/productReceipt/coms/comProductDetailCardBatch.vue

@ -1,31 +1,28 @@
<template>
<view class="" style="background-color: #fff;">
<uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true">
<template v-slot:title>
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty"></itemCompareQty>
<view class="" v-for="(item,index) in dataContent.subList" :key="index" >
<uni-swipe-action ref="swipeAction" v-if="index==0" :class="item.scaned?'scan_view':''">
<uni-swipe-action-item
:right-options="(item.scaned&&isEdit)?editAndRemoveOptions : item.scaned? removeOptions:options"
@click="swipeClick($event,item,'parent')">
<!-- <div style="display: flex;">
<div style="flex: 1;">
<batch v-if="item.batch" :batch="item.batch"></batch>
<to-location title="目标库位" :locationCode="item.toLocationCode">
</to-location>
</div>
<text style="font-size: 30rpx;color: #2979ff; " @click="copy(item)" v-if="isDevlement()">复制</text>
</div> -->
<recommendBatch :detail="item" :isShowFromLocation="false"
:isShowToLocation="settingParam.allowModifyLocation=='TRUE'"></recommendBatch>
</uni-swipe-action-item>
</uni-swipe-action>
<view v-if="item.fgList!=undefined && item.fgList.length>0" class="card_view " style="margin-left: 20px;"
v-for="(fg, index) in item.fgList" :key="index">
<com-fg-card :detail='fg' class="scan_view"></com-fg-card>
</view>
</view>
</template>
<view class="" v-for="(item,index) in dataContent.subList" :key="index">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">
<recommend :detail="item" :isShowFromLocation="false"
:isShowToLocation="settingParam.allowModifyLocation=='TRUE'"></recommend>
</uni-swipe-action-item>
</uni-swipe-action>
<view v-if="item.fgList!=undefined && item.fgList.length>0" class="card_view "
style="margin-left: 20px;" v-for="(fg, index) in item.fgList" :key="index">
<com-fg-card :detail='fg' class="scan_view"></com-fg-card>
</view>
</view>
</uni-collapse-item>
</uni-collapse>
<recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm" :isNumTips='false'>
<recommend-qty-edit ref="receiptEdit" :dataContent="editItem" :settingParam="settingParam" @confirm="confirm">
</recommend-qty-edit>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'
:locationAreaTypeList="locationAreaTypeList"></win-scan-location>
@ -36,36 +33,27 @@
<script>
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommendBatch from '@/mycomponents/recommend/recommendBatch.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import jobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue'
import productDetailInfoPopup from '@/pages/productReceipt/coms/productDetailInfoPopup.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import comFgCard from "@/pages/productReceipt/coms/comFgCard.vue"
import pack from '@/mycomponents/balance/pack.vue'
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
import config from '@/static/config.js'
import {
getRemoveOption,
getEditRemoveOption
getDetailOption,
getPurchaseReceiptOption
} from '@/common/array.js';
export default {
components: {
itemCompareQty,
recommendBatch,
recommend,
recommendQtyEdit,
jobDetailPopup,
productDetailInfoPopup,
winScanLocation,
comFgCard,
pack,
location,
toLocation,
batch
comFgCard
},
props: {
dataContent: {
@ -80,10 +68,7 @@
type: Array,
default: null
},
isEdit: {
type: Boolean,
default: true
},
},
watch: {
@ -112,17 +97,18 @@ isEdit: {
},
locatonItem: {},
detailOptions: [],
scanOptions: [],
options: [],
removeOptions: [],
editAndRemoveOptions: []
scanOptions: []
}
},
mounted() {
this.removeOptions = getRemoveOption();
this.editAndRemoveOptions = getEditRemoveOption()
if (this.detailOptions.length == 0) {
this.detailOptions = getDetailOption();
}
if (this.scanOptions.length == 0) {
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, this.settingParam
.allowModifyLocation)
}
},
methods: {
@ -161,7 +147,7 @@ isEdit: {
if (res) {
item.scaned = false
item.handleQty = null
item.fgList = []
item.fgList=[]
this.$forceUpdate()
this.$emit('remove', item)
}
@ -170,36 +156,7 @@ isEdit: {
confirm(qty) {
this.editItem.handleQty = qty;
this.$emit('updateData')
},
isDevlement() {
return config.isDevelopment;
},
copy(detail) {
console.log(detail)
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + detail.itemCode + ";P" + detail.packingNumber + ";B" + detail
.batch + ";Q" + detail.qty
// #ifdef H5
this.$copyText(content).then(
res => {
uni.showToast({
title: '复制采购标签成功',
icon: 'none'
})
}
)
// #endif
// #ifndef H5
uni.setClipboardData({
data: content,
success: () => {
uni.showToast({
title: '复制采购标签成功'
})
}
})
// #endif
},
}
}
}
</script>

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

@ -290,17 +290,18 @@
this.showErrorMessage("批次[" + batch + "]不在任务列表中")
} else {
if (itemDetail.scaned) {
this.showErrorMessage("批次[" + batch + "]已经扫描")
// this.showErrorMessage("[" + batch + "]")
itemDetail.handleQty = calc.add(Number(result.label.qty),itemDetail.handleQty);
} else {
itemDetail.scaned = true;
itemDetail.handleQty = Number(result.label.qty);
itemDetail.toLocationCode = this.toLocationCode;
itemDetail.labelQty = Number(result.label.qty);
calcHandleQty(this.detailSource);
this.continueScan()
this.$forceUpdate()
}
calcHandleQty(this.detailSource);
}
}
},

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

@ -87,7 +87,9 @@
calcTreeHandleQty,
getScanCount
} from '@/common/detail.js';
import {
calc
} from '@/common/calc'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import comJobDetailCard from "@/mycomponents/detail/comJobDetailCard.vue"
@ -275,7 +277,7 @@
updateData() {
console.log("updateData")
// this.calcHandleQty();
// calcTreeHandleQty(this.detailSource)
calcTreeHandleQty(this.detailSource)
},
//
openScanPopupSimulate(message) {
@ -470,7 +472,8 @@
.fromLocationCode + "】不在列表中")
} else {
if (!isExit.cancleScanedHiht && isExit.scaned) {
this.showMessage("批次【" + batch + "】已经扫描")
// this.showMessage("" + batch + "")
isExit.handleQty = calc.add(Number(result.label.qty),isExit.handleQty)
} else {
isExit.scaned = true
let qty = 0;
@ -501,7 +504,8 @@
if (!itemDetail.cancleScanedHiht && itemDetail.scaned && scanedLength == itemDetail.packList
.length) {
// this.showMessage("" + packingNumber + "")
this.showMessage("批次【" + batch + "】已经扫描")
// this.showMessage("" + batch + "")
itemDetail.handleQty = calc.add(Number(result.label.qty),itemDetail.handleQty)
} else {
itemDetail.scaned = true;
this.detailSource[0].subList.sort(compareAsc('scaned')); //
@ -513,10 +517,10 @@
pac.toLocationCode = this.toLocationCode;
})
calcTreeHandleQty(this.detailSource);
this.continueScan()
this.$forceUpdate()
}
calcTreeHandleQty(this.detailSource);
}
},

Loading…
Cancel
Save