Browse Source

直接补料扫描数量2024/7/11 19:27:31uni_modules组件没写

hella_vue3
zhang_li 3 months ago
parent
commit
88613d0eb2
  1. 33
      src/common/basic.js
  2. 3
      src/mycomponents/scan/winComScanBalance.vue
  3. 5
      src/pages/container/record/containerBindRecord.vue
  4. 282
      src/pages/container/record/containerUnBindRecord.vue
  5. 13
      src/pages/fg/receiptByPlan.vue
  6. 263
      src/pages/package/record/mergePackageRecord.vue
  7. 32
      src/pages/package/record/overPackageRecord.vue
  8. 453
      src/pages/package/record/splitPackageRecord.vue
  9. 1
      src/pages/productPutaway/job/productPutawayDetail.vue
  10. 6
      src/pages/repleinsh/record/directRepleinshRecord.vue

33
src/common/basic.js

@ -726,23 +726,22 @@ export function getPackingNumberAndBatch(managementList, itemCode, packingNumber
return itemInfo;
}
// //提示是否消息
// export function showConfirmMsg(content, callback) {
// uni.showModal({
// title: '提示',
// cancelText: '否',
// confirmText: '是',
// content: content,
// success: function(res) {
// if (res.confirm) {
// callback(true);
// } else {
// callback(false);
// }
// },
// })
// scanErrorAudio();
// }
// 提示是否消息
export function showConfirmMsg(content, callback) {
uni.showModal({
title: '提示',
cancelText: '否',
confirmText: '是',
content: content,
success: function(res) {
if (res.confirm) {
callback(true);
} else {
callback(false);
}
},
})
}
export function compare(key) {
return function(a, b) {
var val1 = a[key];

3
src/mycomponents/scan/winComScanBalance.vue

@ -124,6 +124,9 @@ export default {
this.showErrorMessage(hint)
} else if (res.data.length == 1) {
result.balance = res.data[0]
if (result.label.packingNumber != result.balance.packingNumber) {
result.balance.lableQty = result.label.qty
}
this.$emit('getBalance', result)
// this.closeScanPopup()
} else {

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

@ -79,6 +79,11 @@ const scanLocationPopup = ref()
const scanContainer = ref()
const scanPopup = ref()
const comMessageRef = ref()
onLoad((option) => {
uni.setNavigationBarTitle({
title: option.title
})
})
onNavigationBarButtonTap((e) => {
if (e.index === 0) {
goHome()

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

@ -1,80 +1,58 @@
<template>
<view class="page-wraper">
<view class="">
<com-blank-view @goScan='showContainerPopup' v-if="containerCode==''"></com-blank-view>
<com-blank-view @goScan="showContainerPopup" v-if="containerCode == ''"></com-blank-view>
</view>
<view class="page-wraper" v-if="containerCode != ''">
<view class="" style="margin-left: 20rpx;">
<targetContainer ref="targetContainer" title="托盘" :containerCode="containerCode" :isShowEdit="false"
@getContainer="getContainer"></targetContainer>
<view class="" style="margin-left: 20rpx">
<targetContainer ref="targetContainer" title="托盘" :containerCode="containerCode" :isShowEdit="false" @getContainer="getContainer"></targetContainer>
</view>
<view class='split_line'></view>
<view class="split_line"></view>
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<!-- {{item.contentNumber}} -->
<comPalletRecord :dataContent="item" :index="index"
:isShowPatch="false" @removeItem="removeItem(index,item)" @updateData="updateData"
@removePack="removePack">
</comPalletRecord>
<comPalletRecord :dataContent="item" :index="index" :isShowPatch="false" @removeItem="removeItem(index, item)" @updateData="updateData" @removePack="removePack"> </comPalletRecord>
</view>
</view>
</scroll-view>
</view>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
</view>
<view class="uni-flex u-col-center space-between padding_10" style="background-color: ghostwhite; width: 100%">
<view class=""> </view>
<view class="uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
</view>
</view>
</view>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-button @goScan="openScanPopup"></win-scan-button>
</view>
<win-scan-pack ref="scanPopup" @getResult='getScanResult'></win-scan-pack>
<win-scan-pack ref="scanPopup" @getResult="getScanResult"></win-scan-pack>
<comMessage ref="comMessage"></comMessage>
<winScanContainer ref="scanContainer" title="托盘" @getContainer='getContainer'></winScanContainer>
<winScanContainer ref="scanContainer" title="托盘" @getContainer="getContainer"></winScanContainer>
</view>
</template>
<script>
import {
containerUnBindRecordSubmit,
getContainerDetailByNumber
} from '@/api/request2.js';
import {
goHome
} from '@/common/basic.js';
import {
calc
} from '@/common/calc.js';
import {
getDirectoryItemArray
} from '@/common/directory.js';
import {
createItemInfo,
createDetailInfo,
calcHandleQty
} from '@/common/record.js';
import {
getScanCount
} from '@/common/detail.js';
import { containerUnBindRecordSubmit, getContainerDetailByNumber } from '@/api/request2.js'
import { goHome } from '@/common/basic.js'
import { calc } from '@/common/calc.js'
import { getDirectoryItemArray } from '@/common/directory.js'
import { createItemInfo, createDetailInfo, calcHandleQty } from '@/common/record.js'
import { getScanCount } from '@/common/detail.js'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import targetContainer from "@/mycomponents/container/targetContainer.vue"
import winScanContainer from "@/mycomponents/scan/winScanContainer.vue"
import targetContainer from '@/mycomponents/container/targetContainer.vue'
import winScanContainer from '@/mycomponents/scan/winScanContainer.vue'
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import comPalletRecord from '@/pages/container/coms/comPalletRecord.vue'
@ -95,16 +73,18 @@
detailSource: [], //
businessTypeInfo: {},
fromLocationInfo: {},
containerCode: "",
};
containerCode: ''
}
},
onLoad(option) {
uni.setNavigationBarTitle({
title: option.title
})
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
goHome()
}
},
//
@ -113,75 +93,71 @@
onPullDownRefresh() {},
mounted() {
this.showContainerPopup();
this.showContainerPopup()
},
methods: {
getScanResult(result) {
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);
const { packingNumber } = result.label
const { batch } = result.label
const { qty } = result.label
const { itemCode } = result.label
const detail = this.detailSource.find((r) => r.itemCode == itemCode)
if (detail == undefined) {
this.showMessage("物料号【" + itemCode + "】不在列表中")
this.showMessage(`物料号【${itemCode}】不在列表中`)
} else {
var itemDetail = detail.subList.find(r => r.packingNumber == packingNumber && r.batch == batch);
const itemDetail = detail.subList.find((r) => r.packingNumber == packingNumber && r.batch == batch)
if (itemDetail == undefined) {
this.showMessage("箱码【" + packingNumber + "】,批次【" + batch + "】不在列表中")
this.showMessage(`箱码【${packingNumber}】,批次【${batch}】不在列表中`)
} else if (itemDetail.scaned) {
this.showMessage(`箱码【${packingNumber}】,批次【${batch}】已经扫描`)
} else {
if (itemDetail.scaned) {
this.showMessage("箱码【" + packingNumber + "】,批次【" + batch + "】已经扫描")
} else {
itemDetail.scaned = true;
itemDetail.record = this.createRecordInfo(itemDetail, result.label);
itemDetail.scaned = true
itemDetail.record = this.createRecordInfo(itemDetail, result.label)
// this.calcHandleQty();
}
}
}
} catch (e) {
this.showErrorMessage(e.message)
}
},
createRecordInfo(detail, label) {
var record = {}
detail.scaned = true;
const record = {}
detail.scaned = true
// let record = JSON.parse(JSON.stringify(detail));
//
Object.assign(record, detail)
record.qty = Number(label.qty);
return record;
record.qty = Number(label.qty)
return record
},
calcHandleQty() {
calcHandleQty(this.detailSource);
this.scanPopupGetFocus();
this.$forceUpdate();
calcHandleQty(this.detailSource)
this.scanPopupGetFocus()
this.$forceUpdate()
},
getDataSource(subList) {
let items = [];
subList.forEach(detail => {
var item = items.find(r =>
r.itemCode == detail.itemCode)
const items = []
subList.forEach((detail) => {
let item = items.find((r) => r.itemCode == detail.itemCode)
if (item == undefined) {
item = this.createItemInfo(detail);
let newDetail = this.createDetailInfo(detail); //
item.subList.push(newDetail);
item = this.createItemInfo(detail)
const newDetail = this.createDetailInfo(detail) //
item.subList.push(newDetail)
items.push(item)
} else {
item.qty = calc.add(item.qty, detail.qty)
let newDetail = this.createDetailInfo(detail); //
item.subList.push(newDetail);
const newDetail = this.createDetailInfo(detail) //
item.subList.push(newDetail)
}
})
return items;
return items
},
updateData() {
this.calcHandleQty();
this.calcHandleQty()
},
removeItem(index, item) {
@ -189,7 +165,7 @@
},
createItemInfo(res) {
let item = {
const item = {
itemCode: res.itemCode,
itemName: res.itemName,
packQty: res.packQty,
@ -199,54 +175,53 @@
uom: res.uom,
subList: []
}
return item;
return item
},
createDetailInfo(data) {
data.scaned = false;
data.scaned = false
data.packingNumber = data.contentNumber
data.qty = Number(data.qty)
data.handleQty =0;
let detail = data;
return detail;
data.handleQty = 0
const detail = data
return detail
},
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
for (let i = 0; i < this.detailSource.length; i++) {
const item = this.detailSource[i]
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
this.updateData();
this.updateData()
},
openScanPopup() {
if (this.containerCode == "") {
this.showContainerPopup();
if (this.containerCode == '') {
this.showContainerPopup()
return
}
this.$refs.scanPopup.openScanPopup();
this.$refs.scanPopup.openScanPopup()
},
showContainerPopup() {
this.$nextTick(() => {
this.$refs.scanContainer.openScanPopup();
this.$refs.scanContainer.openScanPopup()
})
},
closeScanPopup() {
this.$refs.scanPopup.closeScanPopup();
this.$refs.scanPopup.closeScanPopup()
},
scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
this.$refs.scanPopup.getfocus()
}
},
scanPopupLoseFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.losefocus();
this.$refs.scanPopup.losefocus()
}
},
@ -256,128 +231,125 @@
mask: true
})
this.scanCount = getScanCount(this.detailSource[0].subList);
this.scanCount = getScanCount(this.detailSource[0].subList)
if (this.scanCount == 0) {
this.showErrorMessage("扫描数为0,请先扫描要解绑的箱码")
return;
this.showErrorMessage('扫描数为0,请先扫描要解绑的箱码')
return
}
let params = this.getParams();
console.log("提交" + JSON.stringify(params))
const params = this.getParams()
console.log(`提交${JSON.stringify(params)}`)
containerUnBindRecordSubmit(params).then(res => {
containerUnBindRecordSubmit(params)
.then((res) => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成器具绑定记录<br>" + res.data)
this.clear();
this.showCommitSuccessMessage(`提交成功<br>生成器具绑定记录<br>${res.data}`)
this.clear()
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
this.showErrorMessage(`提交失败[${res.msg}]`)
}
}).catch(error => {
})
.catch((error) => {
uni.hideLoading()
this.showErrorMessage(error)
})
},
getParams() {
var subList = []
var creator = this.$store.state.user.id
let params = {
const subList = []
const creator = this.$store.state.user.id
const params = {
number: this.containerCode,
type: 'bind',
status: 'USED',
creator: creator
};
creator
}
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
this.detailSource.forEach((item) => {
item.subList.forEach((detail) => {
if (detail.scaned) {
detail.containerContentType = 'PACKAGE';
detail.contentNumber = detail.packingNumber;
detail.itemCode = detail.itemCode;
detail.batch = detail.batch;
detail.inventoryStatus = detail.inventoryStatus;
detail.qty =detail.handleQty;
detail.package = null;
detail.containerContentType = 'PACKAGE'
detail.contentNumber = detail.packingNumber
detail.itemCode = detail.itemCode
detail.batch = detail.batch
detail.inventoryStatus = detail.inventoryStatus
detail.qty = detail.handleQty
detail.package = null
subList.push(detail)
}
})
})
params.subList = subList
return params;
return params
},
showMessage(message) {
setTimeout(r => {
this.scanPopupLoseFocus();
this.$refs.comMessage.showMessage(message, res => {
setTimeout((r) => {
this.scanPopupLoseFocus()
this.$refs.comMessage.showMessage(message, (res) => {
if (res) {
this.scanPopupGetFocus();
this.scanPopupGetFocus()
}
});
})
})
},
showErrorMessage(message) {
setTimeout(r => {
this.scanPopupLoseFocus();
this.$refs.comMessage.showErrorMessage(message, res => {
setTimeout((r) => {
this.scanPopupLoseFocus()
this.$refs.comMessage.showErrorMessage(message, (res) => {
if (res) {
this.scanPopupGetFocus();
this.scanPopupGetFocus()
}
});
})
})
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
this.$refs.comMessage.showScanMessage(message)
},
afterCloseMessage() {
this.scanPopupGetFocus();
this.scanPopupGetFocus()
},
closeScanMessage() {
this.scanPopupGetFocus();
this.scanPopupGetFocus()
},
getContainer(containerInfo) {
this.containerCode = containerInfo.number;
getContainerDetailByNumber(this.containerCode).then(res => {
this.containerCode = containerInfo.number
getContainerDetailByNumber(this.containerCode)
.then((res) => {
if (res.data != null && res.data.subList.length > 0) {
this.detailSource = this.getDataSource(res.data.subList)
}
}).catch(error => {
})
.catch((error) => {
this.showErrorMessage(error.message)
})
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.containerCode = '';
this.$refs.comMessage.showSuccessMessage(hint, (res) => {
this.containerCode = ''
})
},
updateData() {
this.calcHandleQty();
for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i];
this.calcHandleQty()
for (let i = 0; i < this.detailSource.length; i++) {
const item = this.detailSource[i]
if (item.qty == 0) {
this.detailSource.splice(i, 1)
}
}
},
clear()
{
}
clear() {}
}
}
</script>
<style scoped lang="scss">
</style>
<style scoped lang="scss"></style>

13
src/pages/fg/receiptByPlan.vue

@ -1,5 +1,14 @@
<template></template>
<template>
<view class="">
<com-blank-view @goScan="openFg" v-if="detailSource.length == 0"></com-blank-view>
</view>
</template>
<script></script>
<script setup lang="ts">
import { ref, onMounted, nextTick, watch, getCurrentInstance } from 'vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
const detailSource = ref([])
</script>
<style></style>

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

@ -1,7 +1,7 @@
<template>
<view class="page-wraper">
<view class="">
<com-blank-view @goScan='showFromLocationPopup' v-if="detailSource.length==0"></com-blank-view>
<com-blank-view @goScan="showFromLocationPopup" v-if="detailSource.length == 0"></com-blank-view>
</view>
<view class="page-wraper" v-if="detailSource.length > 0">
@ -9,64 +9,46 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<record-com-detail-card :dataContent="item" :index="index"
@removeItem="removeItem(index,item)" @updateData="updateData" @removePack="removePack">
</record-com-detail-card>
<record-com-detail-card :dataContent="item" :index="index" @removeItem="removeItem(index, item)" @updateData="updateData" @removePack="removePack"> </record-com-detail-card>
</view>
<view class='split_line'></view>
<view class="split_line"></view>
</view>
</scroll-view>
</view>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="uni-flex u-col-center space-between padding_10" style="background-color: ghostwhite; width: 100%">
<view class="">
<packageTarget title="目标箱码" :isShowEdit="true" :packingNumber="toPackingNumber"
@getScanResult='getToPackingNumber'></packageTarget>
<packageTarget title="目标箱码" :isShowEdit="true" :packingNumber="toPackingNumber" @getScanResult="getToPackingNumber"></packageTarget>
</view>
<view class="uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
</view>
</view>
</view>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-button @goScan="openScanPopup"></win-scan-button>
</view>
<win-scan-pack-and-location ref="scanPopup" @getResult='getScanResult' :allowModifyLocation="false">
</win-scan-pack-and-location>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation='getLocation'
:locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
<win-scan-pack-and-location ref="scanPopup" @getResult="getScanResult" :allowModifyLocation="false"> </win-scan-pack-and-location>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation="getLocation" :locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import {
mergePackageRecordSubmit
} from '@/api/request2.js';
import {
goHome
} from '@/common/basic.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
} from '@/common/directory.js';
import {
getBusinessType,
createItemInfo,
createDetailInfo,
calcHandleQty
} from '@/common/record.js';
import { mergePackageRecordSubmit } from '@/api/request2.js'
import { goHome } from '@/common/basic.js'
import { getInventoryStatusDesc, getDirectoryItemArray } from '@/common/directory.js'
import { getBusinessType, createItemInfo, createDetailInfo, calcHandleQty } from '@/common/record.js'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
import winScanPackAndLocation from '@/mycomponents/scan/winScanPackAndLocation.vue'
import recommendBalance from '@/mycomponents/balance/recommendBalance.vue'
import packageTarget from '@/mycomponents/package/packageTarget.vue'
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
@ -88,34 +70,37 @@
id: '',
scanCount: 0,
detailSource: [], //
fromLocationCode: "",
fromLocationCode: '',
isShowLocation: false,
fromLocationAreaTypeList: [],
inInventoryStatus: "", //
outInventoryStatus: "", //
inInventoryStatus: '', //
outInventoryStatus: '', //
businessType: {},
toPackingNumber: "",
toBatch:"",
currentItemCode: "",
toPackingNumber: '',
toBatch: '',
currentItemCode: '',
dataContent: {}
};
}
},
onLoad(option) {
var typeCode = "MergePackage"
getBusinessType(typeCode, res => {
uni.setNavigationBarTitle({
title: option.title
})
const typeCode = 'MergePackage'
getBusinessType(typeCode, (res) => {
if (res.success) {
this.businessType = res.businessType;
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.showFromLocationPopup();
this.businessType = res.businessType
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList
this.showFromLocationPopup()
} else {
this.showErrorMessage(res.message)
}
});
})
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome();
goHome()
}
},
//
@ -127,212 +112,202 @@
methods: {
scanPopupPack() {
this.$refs.scanPopupPack.openScanPopup();
this.$refs.scanPopupPack.openScanPopup()
},
getScanResult(result) {
let balance = result.balance;
let label = result.label;
let pack = result.package;
var item = this.detailSource.find(res => {
const { balance } = result
const { label } = result
const pack = result.package
const item = this.detailSource.find((res) => {
if (res.itemCode == balance.itemCode) {
return res
}
})
if (item == undefined) {
if (this.currentItemCode != "" && this.currentItemCode != balance.itemCode) {
this.showErrorMessage("合包当前物料号[" + this.currentItemCode + "与扫描物料号[" + balance.itemCode +
"]不一致,请扫描相同物料号")
return;
if (this.currentItemCode != '' && this.currentItemCode != balance.itemCode) {
this.showErrorMessage(`合包当前物料号[${this.currentItemCode}与扫描物料号[${balance.itemCode}]不一致,请扫描相同物料号`)
return
}
var itemp = createItemInfo(balance, pack);
let newDetail = createDetailInfo(balance, pack); //
itemp.subList.push(newDetail);
this.currentItemCode = balance.itemCode;
const itemp = createItemInfo(balance, pack)
const newDetail = createDetailInfo(balance, pack) //
itemp.subList.push(newDetail)
this.currentItemCode = balance.itemCode
this.detailSource.push(itemp)
} else {
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
r.inventoryStatus == balance.inventoryStatus) {
return r;
const detail = item.subList.find((r) => {
if (r.packingNumber == balance.packingNumber && r.batch == balance.batch && r.locationCode == balance.locationCode && r.inventoryStatus == balance.inventoryStatus) {
return r
}
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
item.subList.push(newDetail);
} else {
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
const newDetail = createDetailInfo(balance, pack)
item.subList.push(newDetail)
} else if (detail.scaned == true) {
this.showErrorMessage(`箱码[${balance.packingNumber}批次[${balance.batch}]已经在列表中`)
}
}
}
this.calcHandleQty();
this.calcHandleQty()
},
calcHandleQty() {
calcHandleQty(this.detailSource)
this.$forceUpdate();
this.$forceUpdate()
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
this.$refs.comMessage.showErrorMessage(message, (res) => {
if (res) {
}
});
})
},
updateData() {
this.calcHandleQty();
this.calcHandleQty()
},
removeItem(index, item) {
this.detailSource.splice(index, 1)
},
removePack() {
for (var i = 0; i < this.detailSource.length; i++) {
var item = this.detailSource[i];
for (let i = 0; i < this.detailSource.length; i++) {
const item = this.detailSource[i]
if (item.subList.length == 0) {
this.detailSource.splice(i, 1)
}
}
this.updateData();
this.updateData()
},
openScanPopup() {
if (this.fromLocationCode == "") {
this.showFromLocationPopup();
if (this.fromLocationCode == '') {
this.showFromLocationPopup()
return
}
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType);
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType)
},
showFromLocationPopup() {
this.$nextTick(() => {
this.$refs.scanLocationCode.openScanPopup();
this.$refs.scanLocationCode.openScanPopup()
})
},
closeScanPopup() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup();
this.$refs.scanPopup.closeScanPopup()
}
},
scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus();
this.$refs.scanPopup.getfocus()
}
},
commit() {
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
uni.showLoading({
title: "提交中....",
title: '提交中....',
mask: true
});
})
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
mergePackageRecordSubmit(params).then(res => {
const params = this.setParams()
console.log(`提交${JSON.stringify(params)}`)
mergePackageRecordSubmit(params)
.then((res) => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功<br>生成合包记录<br>" + res.data)
this.showCommitSuccessMessage(`提交成功<br>生成合包记录<br>${res.data}`)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
this.showErrorMessage(`提交失败[${res.msg}]`)
}
}).catch(error => {
})
.catch((error) => {
uni.hideLoading()
this.showErrorMessage(error)
})
} else {
this.showErrorMessage("没有要扫描的数据")
this.showErrorMessage('没有要扫描的数据')
}
},
setParams() {
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
const subList = []
const creator = this.$store.state.user.id
this.detailSource.forEach((item) => {
item.subList.forEach((detail) => {
if (detail.scaned) {
detail.itemCode = detail.itemCode;
detail.itemName = detail.package.itemName;
detail.itemDesc1 = detail.package.itemDesc1;
detail.itemDesc2 = detail.package.itemDesc2;
detail.itemCode = detail.itemCode
detail.itemName = detail.package.itemName
detail.itemDesc1 = detail.package.itemDesc1
detail.itemDesc2 = detail.package.itemDesc2
detail.fromInventoryStatus = detail.inventoryStatus;
detail.toInventoryStatus = detail.inventoryStatus;
detail.fromInventoryStatus = detail.inventoryStatus
detail.toInventoryStatus = detail.inventoryStatus
detail.fromQty = detail.handleQty
detail.fromPackingNumber = detail.packingNumber;
detail.toPackingNumber = this.toPackingNumber;
detail.fromPackingNumber = detail.packingNumber
detail.toPackingNumber = this.toPackingNumber
detail.fromBatch = detail.batch;
detail.toBatch = detail.batch;
detail.fromBatch = detail.batch
detail.toBatch = detail.batch
detail.fromLocationCode = detail.locationCode;
detail.fromLocationCode = detail.locationCode
// detail.toLocationCode = detail.toLocationCode;
subList.push(detail)
}
})
})
this.dataContent.subList = subList;
this.dataContent.creator = creator;
return this.dataContent;
this.dataContent.subList = subList
this.dataContent.creator = creator
return this.dataContent
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, res => {
if (res) {}
});
this.$refs.comMessage.showMessage(message, (res) => {
if (res) {
}
})
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, res => {
this.$refs.comMessage.showErrorMessage(message, (res) => {
if (res) {
}
});
})
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message);
this.$refs.comMessage.showScanMessage(message)
},
afterCloseMessage() {
this.scanPopupGetFocus();
this.scanPopupGetFocus()
},
closeScanMessage() {
this.scanPopupGetFocus();
this.scanPopupGetFocus()
},
getLocation(location, code) {
this.getFromLocationCode(location, code)
},
getFromLocationCode(location, code) {
this.fromLocationCode = code;
this.openScanPopup();
this.fromLocationCode = code
this.openScanPopup()
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.$refs.comMessage.showSuccessMessage(hint, (res) => {
this.detailSource = []
this.fromLocationCode = '';
this.toPackingNumber =""
this.toBatch =""
this.currentItemCode =""
this.fromLocationCode = ''
this.toPackingNumber = ''
this.toBatch = ''
this.currentItemCode = ''
this.dataContent = {}
})
},
updateData() {
this.calcHandleQty();
for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i];
this.calcHandleQty()
for (let i = 0; i < this.detailSource.length; i++) {
const item = this.detailSource[i]
if (item.qty == 0) {
this.detailSource.splice(i, 1)
}
@ -340,13 +315,11 @@
},
getToPackingNumber(result) {
if (this.currentItemCode != result.label.itemCode) {
this.showErrorMessage("合包当前物料号[" + this.currentItemCode + "与目标物料号[" + result.label.itemCode +
"]不一致,请扫描相同物料号")
return;
this.showErrorMessage(`合包当前物料号[${this.currentItemCode}与目标物料号[${result.label.itemCode}]不一致,请扫描相同物料号`)
return
}
this.toPackingNumber = result.label.packingNumber;
this.toPackingNumber = result.label.packingNumber
this.toBatch = result.label.batch
}
}
}
@ -366,7 +339,6 @@
height: 100%;
}
.page-main {
flex: 1;
position: relative;
@ -385,6 +357,5 @@
line-height: 80rpx; */
text-align: center;
background: #e0e0e0;
}
</style>

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

@ -107,7 +107,7 @@ const scanPopup = ref()
const scanLocationCode = ref()
const toPackUnit = ref()
const comMessageRef = ref()
onShow(() => {
onLoad(() => {
getBusinessType()
})
onLoad((option) => {
@ -205,6 +205,9 @@ const setData = (result) => {
}
const itemp = createItemInfo(balance, pack)
const newDetail = createDetailInfo(balance, pack) //
if (balance.lableQty) {
newDetail.handleQty = balance.lableQty
}
itemp.subList.push(newDetail)
detailSource.value.push(itemp)
itemCode.value = balance.itemCode
@ -219,6 +222,9 @@ const setData = (result) => {
console.log(detail)
if (detail == undefined) {
const newDetail = createDetailInfo(balance, pack)
if (balance.lableQty) {
newDetail.handleQty = balance.lableQty
}
item.subList.push(newDetail)
scanPopupGetFocus()
} else if (detail.scaned == true) {
@ -261,18 +267,6 @@ const openScanPopup = () => {
}
}
const showFromLocationPopup = () => {
nextTick(() => {
const overPackageRecord = uni.getStorageSync('overPackageRecord')
if (overPackageRecord) {
scanLocationCode.value.openScanPopupSimulate(overPackageRecord)
} else {
scanLocationCode.value.openScanPopup()
}
})
}
const closeScanPopup = () => {
if (scanPopup.value) {
scanPopup.value.closeScanPopup()
@ -404,22 +398,14 @@ const afterCloseMessage = () => {
const closeScanMessage = () => {
scanPopupGetFocus()
}
const getLocation = (location, code) => {
if (code) {
uni.setStorageSync('overPackageRecord', code)
}
getFromLocationCode(location, code)
}
const getFromLocationCode = (location, code) => {
fromLocationCode.value = code
openScanPopup()
}
const showCommitSuccessMessage = (hint, pointData) => {
comMessageRef.value.showSuccessMessage(hint, (res) => {
if (res) {
detailSource.value = []
fromLocationCode.value = ''
dataContent.value = {}
itemCode.value = ''
if (pointData.length > 0) {
uni.navigateTo({
url: `/pages/point/index?points=${JSON.stringify(pointData)}`

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

@ -1,7 +1,7 @@
<template>
<view class="page-wraper">
<view class="">
<com-blank-view @goScan="showFromLocationPopup" v-if="detailSource.length == 0"></com-blank-view>
<com-blank-view @goScan='getBusinessType' v-if="detailSource.length==0"></com-blank-view>
</view>
<view class="page-wraper" v-if="detailSource.length>0">
@ -9,50 +9,77 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<com-package-record :dataContent="item" @removeItem="removeItem(index, item)" @updateData="updateData" @removePack="updateData"> </com-package-record>
<record-com-detail-card :dataContent="item" @removeItem="removeItem(index,item)"
@updateData="updateData" @removePack='updateData' :isShowToLocation="false">
</record-com-detail-card>
</view>
</view>
<view class="uni-flex uni-row" style="margin-left: 30rpx;margin-top: 10rpx; ">
<text style="font-size: 35rpx; margin-right: 20rpx;">拆出数量 :</text>
<uni-number-box @change="calcQty($event,splitCount)" :value="splitCount">
</uni-number-box>
<uom :uom="detailSource[0].uom"></uom>
</view>
</scroll-view>
</view>
<view class="page-footer">
<view class="uni-flex u-col-center space-between padding_10" style="background-color: ghostwhite; width: 100%">
<view class=""> </view>
<view class="uni-flex u-col-center space-between padding_10"
style="background-color:ghostwhite; width: 100%; ">
<view class="">
</view>
<view class=" uni-flex uni-row">
<button class="btn_single_commit" hover-class="btn_commit_after" @click="commit">提交</button>
</view>
</view>
</view>
<win-scan-button @goScan="showScanPopupPack"></win-scan-button>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
</view>
<win-scan-pack-and-location ref="scanPopup" @getResult="getScanResult" :allowModifyLocation="false"> </win-scan-pack-and-location>
<win-scan-location ref="scanLocationCode" title="来源库位" @getLocation="getLocation" :locationAreaTypeList="fromLocationAreaTypeList"></win-scan-location>
<win-scan-pack title="拆分标签" ref="scanPopupPack" @getResult="getScanPackResult"></win-scan-pack>
<winComScanBalance ref="scanPopup" @getBalance='getScanResult' :bussinessCode="typeCode">
</winComScanBalance>
<comMessage ref="comMessage"></comMessage>
</view>
</template>
<script>
import { goHome } from '@/common/basic.js'
import { splitPackageRecordSubmit } from '@/api/request2.js'
import { calc } from '@/common/calc.js'
import { getInventoryStatusDesc, getDirectoryItemArray } from '@/common/directory.js'
import { getBusinessType, createItemInfo, createDetailInfo, calcHandleQty } from '@/common/record.js'
import {
goHome,
showConfirmMsg
} from '@/common/basic.js';
import {
splitPackageRecordSubmit
} from '@/api/request2.js';
import {
calc
} from '@/common/calc.js';
import {
getInventoryStatusDesc,
getDirectoryItemArray
} from '@/common/directory.js';
import {
getBusinessType,
createItemInfo,
createDetailInfo,
calcHandleQty
} from '@/common/record.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import recordComDetailCard from '@/mycomponents/record/recordComDetailCard.vue'
import comBlankView from '@/mycomponents/common/comBlankView.vue'
import winScanLocation from '@/mycomponents/scan/winScanLocation.vue'
import winScanPackAndLocation from '@/mycomponents/scan/winScanPackAndLocation.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import recommendBalance from '@/mycomponents/balance/recommendBalance.vue'
import comPackageRecord from '@/pages/package/coms/comPackageRecord.vue'
import winComScanBalance from '@/mycomponents/scan/winComScanBalance.vue'
import uom from '@/mycomponents/qty/uom.vue'
export default {
components: {
@ -64,39 +91,51 @@ export default {
winScanPackAndLocation,
recommendBalance,
recordComDetailCard,
comPackageRecord
comPackageRecord,
winComScanBalance,
uom
},
data() {
return {
id: '',
detailSource: [], //
fromLocationCode: '',
toLocationCode: '',
fromLocationCode: "",
toLocationCode: "",
fromLocationAreaTypeList: [],
inInventoryStatus: '', //
outInventoryStatus: '', //
inInventoryStatus: "", //
outInventoryStatus: "", //
businessType: {},
dataContent: {},
currentItemCode: '',
toPackingNumber: ''
}
currentItemCode: "",
toPackingNumber: "",
itemCode:"",
splitCount:1,
typeCode:"SplitPackage"
};
},
onLoad(option) {
const typeCode = 'SplitPackage'
getBusinessType(typeCode, (res) => {
<<<<<<< Updated upstream
uni.setNavigationBarTitle({
title: option.title
})
var typeCode = "SplitPackage"
getBusinessType(typeCode, res => {
if (res.success) {
this.businessType = res.businessType
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList
this.showFromLocationPopup()
this.businessType = res.businessType;
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList;
this.showFromLocationPopup();
} else {
this.showErrorMessage(res.message)
}
})
});
=======
this.getBusinessType();
>>>>>>> Stashed changes
},
//
onNavigationBarButtonTap(e) {
if (e.index === 0) {
goHome()
goHome();
}
},
//
@ -104,248 +143,276 @@ export default {
onPullDownRefresh() {},
mounted() {
// this.showFromLocationPopup();
},
mounted() {},
methods: {
showScanPopupPack() {
this.$refs.scanPopupPack.openScanPopup()
getBusinessType() {
getBusinessType(this.typeCode, res => {
if (res.success) {
this.businessType = res.businessType;
this.fromInventoryStatuses = getDirectoryItemArray(res.fromInventoryStatuses);
this.fromLocationAreaTypeList = res.fromLocationAreaTypeList
this.openScanPopup();
} else {
this.showErrorMessage(res.message)
}
});
},
openScanPopup() {
if (this.businessType) {
if(this.detailSource.length>0){
showConfirmMsg("拆包信息还没提交,是否要重新扫描?",res=>{
if(res){
this.clearData();
this.$refs.scanPopup.openScanPopup(this.businessType);
}
})
}else {
this.$refs.scanPopup.openScanPopup(this.businessType);
}
} else {
this.getBusinessType()
}
},
getScanResult(result) {
const { balance } = result
const { label } = result
const pack = result.package
const item = this.detailSource.find((res) => {
this.setData(result);
},
setData(result) {
let balance = result.balance;
let label = result.label;
let pack = result.package;
this.fromPackUnit = pack.packUnit;
this.fromPack = pack;
if (this.fromLocationCode && this.fromLocationCode != balance.locationCode) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]在库位[" + this
.fromLocationCode + "]没有库存余额")
return;
}
var item = this.detailSource.find(res => {
if (res.itemCode == balance.itemCode) {
return res
}
})
if (item == undefined) {
const itemp = createItemInfo(balance, pack)
const newDetail = createDetailInfo(balance, pack) //
newDetail.scaned = false
newDetail.Records = []
if (this.itemCode != "" && this.itemCode != balance.itemCode) {
this.showErrorMessage("请扫描物料为【" + this.itemCode + "】的箱码")
return;
}
var itemp = createItemInfo(balance, pack);
itemp.handleQty=0
let newDetail = createDetailInfo(balance, pack); //
newDetail.handleQty=0
itemp.subList.push(newDetail)
newDetail.scaned=false
itemp.subList.push(newDetail);
this.detailSource.push(itemp)
this.itemCode = balance.itemCode;
this.fromLocationCode = balance.locationCode
this.closeScanPopup()
} else {
this.showErrorMessage(`箱码[${balance.packingNumber}批次[${balance.batch}]已经在列表中`)
var detail = item.subList.find(r => {
if (r.packingNumber == balance.packingNumber &&
r.batch == balance.batch &&
r.locationCode == balance.locationCode &&
r.inventoryStatus == balance.inventoryStatus) {
return r;
}
this.$refs.scanPopup.closeScanPopup()
this.showScanPopupPack()
},
getScanPackResult(result) {
const { packingNumber } = result.label
const { batch } = result.label
const { qty } = result.label
const { itemCode } = result.label
const { uom } = result.package
const item = this.detailSource.find((r) => r.itemCode == itemCode)
if (item == undefined) {
this.showErrorMessage(`物料号【${itemCode}】不在列表中`)
})
if (detail == undefined) {
let newDetail = createDetailInfo(balance, pack);
newDetail.handleQty=0
item.subList.push(newDetail);
this.closeScanPopup()
} else {
const temp = {
scaned: true,
packingNumber,
batch,
qty: Number(qty),
LabelQty: Number(qty),
stdPackUnit: result.package.stdPackUnit,
stdPackQty: result.package.stdPackQty,
uom
if (detail.scaned == true) {
this.showErrorMessage("箱码[" + balance.packingNumber + "批次[" + balance.batch + "]已经在列表中")
}
}
let sumQty = 0
item.subList[0].Records.forEach(function (item1, index) {
sumQty = calc.add(sumQty, item1.qty)
})
// if (calc.add(qty,sumQty)> item.subList[0].qty) {
// this.showErrorMessage("" + (Number(qty) + sumQty) + "(" + qty + "+" +
// sumQty +
// ")" + Number(item.subList[0].qty) + "!");
// return;
// }
item.subList[0].Records.push(temp)
this.$forceUpdate()
}
this.calcHandleQty()
this.calcHandleQty();
},
calcHandleQty() {
for (const detail of this.detailSource[0].subList) {
let hQty = 0
if (detail.Records.length > 0) {
detail.Records.forEach((r) => {
hQty = calc.add(hQty, r.qty)
})
}
detail.handleQty = hQty
}
this.$forceUpdate()
calcHandleQty(this.detailSource)
this.$forceUpdate();
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, (res) => {
this.$refs.comMessage.showErrorMessage(message, res => {
if (res) {
}
})
});
},
updateData() {
this.calcHandleQty()
this.calcHandleQty();
for (var i = 0; i < this.detailSource.length; i++) {
let item = this.detailSource[i];
if (item.qty == 0) {
this.detailSource.splice(i, 1)
}
}
},
removeItem(index, item) {
this.detailSource.splice(index, 1)
},
openScanPopup() {
if (this.fromLocationCode == '') {
this.showFromLocationPopup()
return
}
this.$refs.scanPopup.openScanPopupForType(this.fromLocationCode, this.businessType)
},
showFromLocationPopup() {
this.$nextTick(() => {
this.$refs.scanLocationCode.openScanPopup()
})
},
closeScanPopup() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.closeScanPopup()
this.$refs.scanPopup.closeScanPopup();
}
},
scanPopupGetFocus() {
if (this.$refs.scanPopup != undefined) {
this.$refs.scanPopup.getfocus()
this.$refs.scanPopup.getfocus();
}
},
commit() {
if (this.detailSource.length > 0 && this.detailSource[0].subList.length > 0) {
uni.showLoading({
title: '提交中....',
mask: true
})
const params = this.setParams()
console.log(`提交${JSON.stringify(params)}`)
splitPackageRecordSubmit(params)
.then((res) => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage(`提交成功<br>生成拆包记录<br>${res.data}`)
} else {
this.showErrorMessage(`提交失败[${res.msg}]`)
if(this.splitCount==0){
this.showErrorMessage("拆出数量不能等于0")
return;
}
})
.catch((error) => {
uni.hideLoading()
this.showErrorMessage(error)
})
if(this.splitCount>this.detailSource[0].qty){
this.showErrorMessage("拆出数量不能大于库存数量")
return;
}
uni.showLoading({
title: "提交中....",
mask: true
});
var params = this.setParams();
console.log("提交" + JSON.stringify(params))
// splitPackageRecordSubmit(params).then(res => {
// uni.hideLoading()
// if (res.data) {
// let list = []
// res.data.forEach(item => {
// list.push({
// itemCode: item.itemCode, //
// itemName: item.itemName, //
// packName: item.packName, //
// packageCode: item.toPackingNumber, //
// batch: item.toBatch, //
// parentNumber: item.parentNumber, //
// itemType: item.itemType, //
// asnNumber: item.asnNumber, //ASN
// supplierCode: item.supplierCode, //
// qty: item.qty, //
// printTimes: getCurrDateTime(), //
// productionLineCode: item.productionLineCode, //线
// barcodeString: item.barcodeString, //
// barcodeBase64: '',
// })
// })
// this.showCommitSuccessMessage("<br><br>", list)
// } else {
// this.showErrorMessage("[" + res.msg + "]")
// }
// }).catch(error => {
// uni.hideLoading()
// this.showErrorMessage(error)
// })
} else {
this.showErrorMessage('没有要提交的数据')
this.showErrorMessage("没有要提交的数据")
}
},
setParams() {
const subList = []
const creator = this.$store.state.user.id
this.detailSource.forEach((item) => {
item.subList.forEach((detail) => {
detail.Records.forEach((record) => {
if (record.scaned) {
const subItem = {}
var subList = []
var creator = this.$store.state.user.id
this.detailSource.forEach(item => {
item.subList.forEach(detail => {
var subItem = {};
Object.assign(subItem, detail)
subItem.itemCode = subItem.itemCode
subItem.itemName = detail.package.itemName
subItem.itemDesc1 = detail.package.itemDesc1
subItem.itemDesc2 = detail.package.itemDesc2
subItem.itemCode = subItem.itemCode;
subItem.itemName = detail.package.itemName;
subItem.itemDesc1 = detail.package.itemDesc1;
subItem.itemDesc2 = detail.package.itemDesc2;
subItem.fromInventoryStatus = subItem.inventoryStatus
subItem.toInventoryStatus = subItem.inventoryStatus
subItem.fromInventoryStatus = subItem.inventoryStatus;
subItem.toInventoryStatus = subItem.inventoryStatus;
subItem.fromQty = subItem.qty
subItem.toQty = record.qty
subItem.toQty = subItem.qty
subItem.fromPackingNumber = subItem.packingNumber
subItem.toPackingNumber = record.packingNumber
subItem.fromPackingNumber = subItem.packingNumber;
subItem.toPackingNumber = subItem.packingNumber;
subItem.fromBatch = subItem.batch
subItem.toBatch = record.batch
subItem.fromLocationCode = subItem.fromLocationCode
subItem.package = ''
subItem.Records = ''
subItem.fromBatch = subItem.batch;
subItem.toBatch = subItem.batch;
subItem.fromLocationCode = subItem.fromLocationCode;
subItem.package = ""
subItem.Records = ""
subList.push(subItem)
}
})
})
})
this.dataContent.subList = subList
this.dataContent.creator = creator
return this.dataContent
this.dataContent.subList = subList;
this.dataContent.creator = creator;
return this.dataContent;
},
showMessage(message) {
this.$refs.comMessage.showMessage(message, (res) => {
if (res) {
}
})
},
showErrorMessage(message) {
this.$refs.comMessage.showErrorMessage(message, (res) => {
if (res) {
}
})
this.$refs.comMessage.showMessage(message, res => {
if (res) {}
});
},
showScanMessage(message) {
this.$refs.comMessage.showScanMessage(message)
this.$refs.comMessage.showScanMessage(message);
},
afterCloseMessage() {
this.scanPopupGetFocus()
this.scanPopupGetFocus();
},
closeScanMessage() {
this.scanPopupGetFocus()
},
getLocation(location, code) {
this.getFromLocationCode(location, code)
this.scanPopupGetFocus();
},
getFromLocationCode(location, code) {
this.fromLocationCode = code
this.openScanPopup()
},
getToLocationCode(location, code) {
if (this.fromLocationCode == code) {
uni.showToast({
title: `来源库位[${this.fromLocationCode}]不能与目标库位[${code}]一致`,
duration: 2000
})
return
showCommitSuccessMessage(hint, pointData) {
this.$refs.comMessage.showSuccessMessage(hint, res => {
this.clearData();
if (pointData.length > 0) {
uni.navigateTo({
url: `/pages/point/index?points=${JSON.stringify(pointData)}`
});
}
this.toLocationCode = code
})
},
showCommitSuccessMessage(hint) {
this.$refs.comMessage.showSuccessMessage(hint, (res) => {
clearData(){
this.detailSource = []
this.fromLocationCode = ''
this.currentItemCode = ''
this.fromLocationCode = '';
this.currentItemCode = ""
this.dataContent = {}
})
this.itemCode=""
this.splitCount=1
},
calcQty(val) {
this.splitCount =val;
// if(val<=0){
// this.showErrorMessage("0")
// }
},
updateData() {
this.calcHandleQty()
}
}
}
</script>
<style scoped lang="scss"></style>
<style scoped lang="scss">
</style>

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

@ -274,6 +274,7 @@ const getScanResult = (result) => {
} else if (!itemDetail.cancleScanedHiht && itemDetail.scaned) {
showErrorMessage(`箱码【${packingNumber}】,批次【${batch}】库位【${result.fromLocationCode}】已经扫描`)
} else {
itemDetail.cancleScanedHiht = false
addDetail(itemDetail, result)
return
}

6
src/pages/repleinsh/record/directRepleinshRecord.vue

@ -197,6 +197,9 @@ const setData = (result) => {
newDetail.packingNumber = pack.number
newDetail.packUnit = pack.packUnit
newDetail.packQty = pack.packQty
if (balance.lableQty) {
newDetail.handleQty = balance.lableQty
}
itemp.subList.push(newDetail)
detailSource.value.push(itemp)
itemCode.value = balance.itemCode
@ -213,6 +216,9 @@ const setData = (result) => {
newDetail.packingNumber = pack.number
newDetail.packUnit = pack.packUnit
newDetail.packQty = pack.packQty
if (balance.lableQty) {
newDetail.handleQty = balance.lableQty
}
item.subList.push(newDetail)
scanPopupGetFocus()
} else if (detail.scaned == true) {

Loading…
Cancel
Save