Browse Source

包装换批次2024/9/13 19:30:14

syhx
zhang_li 4 months ago
parent
commit
22a79a29b3
  1. 2
      src/common/balance.js
  2. 226
      src/mycomponents/detail/comDetailCardBatch.vue
  3. 2
      src/mycomponents/detail/comJobDetailCardBatch.vue
  4. 241
      src/mycomponents/detail/comRecommendDetailCardBatch.vue
  5. 2
      src/mycomponents/recommend/recommend.vue
  6. 168
      src/mycomponents/recommend/recommendBatch.vue
  7. 5
      src/mycomponents/scan/winScanPackAndLocation.vue
  8. 2
      src/pages/count/coms/comCountDetailcards.vue
  9. 90
      src/pages/count/job/countLightDetail.vue
  10. 26
      src/pages/customerReturn/job/returnDetail.vue
  11. 203
      src/pages/inventoryMove/coms/comInventoryDetailCardBatch.vue
  12. 30
      src/pages/inventoryMove/job/inventoryMoveDetail.vue
  13. 183
      src/pages/issue/coms/comIssueDetailCardBatch.vue
  14. 2
      src/pages/issue/coms/comScanIssuePack.vue
  15. 97
      src/pages/issue/job/issueDetail.vue
  16. 33
      src/pages/productPutaway/job/productPutawayDetail.vue
  17. 206
      src/pages/productReceipt/coms/comProductDetailCardBatch.vue
  18. 29
      src/pages/productReceipt/job/ccProductReceiptDetail.vue
  19. 30
      src/pages/productReceipt/job/productReceiptDetail.vue
  20. 48
      src/pages/productRecycle/job/productRecycleJobDetail.vue
  21. 10
      src/pages/productionReceipt/job/productionReceiptDetail.vue
  22. 29
      src/pages/productionReturn/job/okToReturnDetail.vue
  23. 176
      src/pages/purchaseReturn/coms/comReturnDetailCardBatch.vue
  24. 61
      src/pages/purchaseReturn/job/returnDetail.vue
  25. 2
      src/pages/repleinsh/coms/comScanReplishPack.vue
  26. 162
      src/pages/scrap/coms/comScrapDetailCardBatch.vue
  27. 47
      src/pages/scrap/job/scrapJobDetail.vue
  28. 211
      src/pages/unPlanned/coms/comReceiptDetailCardBatch.vue
  29. 43
      src/pages/unPlanned/job/issueJobDetail.vue
  30. 29
      src/pages/unPlanned/job/receiptJobDetail.vue

2
src/common/balance.js

@ -330,7 +330,7 @@ export function byBatch(label, locationCode, fromInventoryStatuses, callback) {
filters.push({
column: "packingNumber",
action: "==",
value: null
value: ''
})
filters.push({
column: "locationCode",

226
src/mycomponents/detail/comDetailCardBatch.vue

@ -0,0 +1,226 @@
<template>
<view style="background-color: #fff;">
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowStdPack="false">
</item-compare-qty>
<view class="" v-for="(item,index) in dataContent.subList" :key="index" :class="item.scaned?'scan_view':''">
<uni-swipe-action ref="swipeAction" v-if='index==0'>
<uni-swipe-action-item
:right-options="(item.scaned&&isEdit)?editAndRemoveOptions : item.scaned? removeOptions:options"
@click="swipeClick($event,item,'parent')" style='padding:0px 0px 5px 0px;align-items: center;'>
<!-- <recommend :detail="item" :isShowStatus="isShowStatus" :isShowToLocation="false" isShowPack='false'>
</recommend> -->
<div style="display: flex;">
<div style="flex: 1;">
<batch v-if="item.batch" :batch="item.batch"></batch>
<location title="来源库位" v-if="item.fromLocationCode" :locationCode="item.fromLocationCode"></location>
</div>
<text style="font-size: 30rpx;color: #2979ff; " @click="copy(item)" v-if="isDevlement()">复制</text>
</div>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" :queryBalance="queryBalance"
@confirm="confirm"></balance-qty-edit>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'
:locationAreaTypeList="locationAreaTypeList"></win-scan-location>
<comMessage ref="message"></comMessage>
</view>
</template>
<script>
import config from '@/static/config.js'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
import {
getDetailOption,
getPurchaseReceiptOption,
getRemoveOption,
getEditRemoveOption
} from '@/common/array.js';
export default {
emits: ['openDetail', "updateData"],
components: {
itemCompareQty,
recommend,
balanceQtyEdit,
winScanLocation,
location,
toLocation,
batch,
},
props: {
dataContent: {
type: Object,
default: null
},
settingParam: {
type: Object,
default: null
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
locationAreaTypeList: {
type: Array,
default: null
},
queryBalance: {
type: Boolean,
default: true
},
isShowStatus: {
type: Boolean,
default: true
},
isEdit: {
type: Boolean,
default: true
},
},
watch: {
dataContent: {
handler(newName, oldName) {
if (this.dataContent.subList.length > 0) {
this.$nextTick(res => {
setTimeout(() => {
if (this.$refs.collapse1) {
this.$refs.collapse1.resize();
}
}, 500)
})
}
},
immediate: true,
deep: true
}
},
data() {
return {
option: [],
showItem: {},
locatonItem: {},
editItem: {},
detailOptions: [],
scanOptions: [],
options: [],
removeOptions: [],
editAndRemoveOptions: []
}
},
mounted() {
if (this.detailOptions.length == 0) {
this.detailOptions = getDetailOption();
}
if (this.scanOptions.length == 0) {
this.scanOptions = getPurchaseReceiptOption(this.settingParam.allowModifyQty, false)
}
this.removeOptions = getRemoveOption();
this.editAndRemoveOptions = getEditRemoveOption()
// this.showLocation();
},
methods: {
swipeClick(e, item) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "库位") {
this.showLocation(item)
} else if (e.content.text == "移除") {
this.remove(item)
}
},
edit(item) {
this.editItem = item;
this.$refs.qtyEdit.openEditPopup(item.balance, item.handleQty);
},
detail(item) {
this.$emit('openDetail', item);
// this.showItem = item;
// this.$refs.jobDetailPopup.openPopup(item)
},
remove(item) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.balance = {}
item.handleQty = null;
this.$forceUpdate()
this.$emit('remove', item)
}
});
},
confirm(qty) {
this.editItem.handleQty = qty;
this.$emit('updateData')
},
showLocation(item) {
this.locatonItem = item;
this.$refs.scanLocationCode.openScanPopup();
},
//
getLocation(location, code) {
this.locatonItem.toLocationCode = code;
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>
<style>
</style>

2
src/mycomponents/detail/comJobDetailCardBatch.vue

@ -29,7 +29,6 @@
import pack from '@/mycomponents/balance/pack.vue'
import detailList from '@/mycomponents/detail/detailList.vue'
import packageList from '@/mycomponents/package/packageList.vue'
import packageListBatch from '@/mycomponents/package/packageListBatch.vue'
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
@ -52,7 +51,6 @@
receiptDetailInfoPopup,
detailList,
packageList,
packageListBatch,
location,
toLocation,
batch,

241
src/mycomponents/detail/comRecommendDetailCardBatch.vue

@ -0,0 +1,241 @@
<template>
<view class="" style="background-color: #fff;">
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowStdPack="false">
</item-compare-qty>
<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&&isEdit)?editAndRemoveOptions : item.scaned? removeOptions:options"
style='padding:0px 0px 5px 0px;align-items: center;'>
<view v-if="item.isRecommend" class="uni-flex" style="flex-direction: row;">
<view class="" style="font-size: 32rpx; color: black; font-weight: bold; text-align: center;background-color: antiquewhite;display: flex;align-items: center;justify-content: center;padding: 0px 10rpx;">
<br/>
</view>
<view class="" style="flex:1;">
<batch v-if="item.batch" :batch="item.batch"></batch>
<location v-if="item.fromLocationCode" title="来源库位" :locationCode="item.fromLocationCode">
</location>
</view>
<text style="font-size: 30rpx;color: #2979ff; " @click="copy(item)" v-if="isDevlement()">复制</text>
</view>
<view v-else class="uni-flex" style="flex-direction: row; margin-top: 5rpx;">
<view class="" style="font-size: 32rpx; color: black; font-weight: bold; text-align: center;background-color: antiquewhite;display: flex;align-items: center;justify-content: center;padding: 0px 10rpx;">
<br/>
</view>
<view class="scan_view" style="flex:1;">
<batch v-if="item.batch" :batch="item.batch"></batch>
<location v-if="item.fromLocationCode" title="来源库位" :locationCode="item.fromLocationCode">
</location>
</view>
<!-- <recommend :detail="item" :isShowStatus="isShowStatus" :isShowToLocation="false">
</recommend> -->
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" :queryBalance="queryBalance" @confirm="confirm"></balance-qty-edit>
<win-scan-location ref="scanLocationCode" title="目标库位" @getLocation='getLocation'
:locationAreaTypeList="locationAreaTypeList"></win-scan-location>
<comMessage ref="message"></comMessage>
</view>
</template>
<script>
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.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
} from '@/common/array.js';
export default {
emits: ['openDetail', "updateData"],
components: {
itemCompareQty,
recommend,
balanceQtyEdit,
winScanLocation,
location,
toLocation,
itemCompareQty,
batch,
},
props: {
dataContent: {
type: Object,
default: null
},
settingParam: {
type: Object,
default: null
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowLocation: {
type: Boolean,
default: true
},
locationAreaTypeList: {
type: Array,
default: null
},
queryBalance: {
type: Boolean,
default: true
},
isShowStatus: {
type: Boolean,
default: true
},
isEdit: {
type: Boolean,
default: true
},
},
watch: {
dataContent: {
handler(newName, oldName) {
if (this.dataContent.subList.length > 0) {
this.$nextTick(res => {
setTimeout(() => {
if (this.$refs.collapse1) {
this.$refs.collapse1.resize();
}
}, 500)
})
}
},
immediate: true,
deep: true
}
},
data() {
return {
option: [],
showItem: {},
locatonItem: {},
editItem: {},
detailOptions: [],
scanOptions: [],
options: [],
removeOptions: [],
editAndRemoveOptions: []
}
},
mounted() {
this.removeOptions = getRemoveOption();
this.editAndRemoveOptions = getEditRemoveOption()
// this.showLocation();
},
methods: {
swipeClick(e, item) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "库位") {
this.showLocation(item)
} else if (e.content.text == "移除") {
this.remove(item)
}
},
edit(item) {
this.editItem = item;
this.$refs.qtyEdit.openEditPopup(item.balance, item.handleQty);
},
detail(item) {
this.$emit('openDetail', item);
// this.showItem = item;
// this.$refs.jobDetailPopup.openPopup(item)
},
remove(item) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.balance = {}
item.handleQty = null;
this.$forceUpdate()
this.$emit('remove', item)
}
});
},
confirm(qty) {
this.editItem.handleQty = qty;
this.$emit('updateData')
},
showLocation(item) {
this.locatonItem = item;
this.$refs.scanLocationCode.openScanPopup();
},
//
getLocation(location, code) {
this.locatonItem.toLocationCode = code;
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>
<style>
</style>

2
src/mycomponents/recommend/recommend.vue

@ -5,7 +5,7 @@
<view style="word-break: break-all;">
<!-- <container v-if="isShowContainer&&detail.containerNumber!=null" :container="detail.containerNumber">
</container> -->
<pack v-if="isShowPack && detail.packingNumber!=null" :packingCode="detail.packingNumber"></pack>
<pack v-if="isShowPack && detail.packingNumber" :packingCode="detail.packingNumber"></pack>
<batch v-if="isShowBatch && detail.batch!=null" :batch="detail.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode">
</location>

168
src/mycomponents/recommend/recommendBatch.vue

@ -0,0 +1,168 @@
<template>
<view :class="detail.scaned?'scan_view':''" style="background-color: #ffffff; border-bottom: 1upx solid #EEEEEE;">
<view class="uni-flex uni-row space-between" style="align-items: center">
<!-- uni-inline-item 暂时拿掉-->
<view style="word-break: break-all;">
<!-- <container v-if="isShowContainer&&detail.containerNumber!=null" :container="detail.containerNumber">
</container> -->
<batch v-if="isShowBatch && detail.batch!=null" :batch="detail.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode">
</location>
<!-- <to-location></to-location> -->
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="detail.toLocationCode">
</to-location>
</view>
<view style="word-break: break-all;" class="uni-flex uni-row center">
<!-- ||detail.handleQty==0 可能会有扫描到0的情况-->
<recommend-qty v-if="detail.handleQty==null || detail.handleQty==undefined" :dataContent="detail"
:isShowStdPack="false" :isShowStatus="isShowStatus"></recommend-qty>
<compare-qty v-else :dataContent="detail" :recommendQty="Number(detail.qty)"
:handleQty="Number(detail.handleQty)" :isShowStdPack="false" :isShowStatus="isShowStatus">
</compare-qty>
<view class="uni-flex uni-row center" style="vertical-align:center ;" v-if="isDevlement()">
<text style="font-size: 30rpx;color: #2979ff; width: 20px; " @click="copy">复制</text>
<!-- <text style="font-size: 30rpx;color: #2979ff;" @click="copyPro">|制品</text> -->
</view>
</view>
</view>
</view>
</template>
<script>
import container from '@/mycomponents/container/container.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 recommendQty from '@/mycomponents/qty/recommendQty.vue'
import compareQty from '@/mycomponents/qty/compareQty.vue'
import config from '@/static/config.js'
export default {
components: {
container,
pack,
location,
toLocation,
batch,
recommendQty,
compareQty
},
data() {
return {
}
},
props: {
detail: {
type: Object,
default: {}
},
isShowContainer: {
type: Boolean,
default: true
},
isShowPack: {
type: Boolean,
default: true
},
isShowBatch: {
type: Boolean,
default: true
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: false
},
isShowStatus: {
type: Boolean,
default: true
},
locationTitle: {
type: String,
default: '库位'
},
},
watch: {
//
detail: {
handler(newVal, oldVal) {
if(newVal.scaned){
newVal.copyContent = "HPQ;V1.0;I" + newVal.itemCode + ";P" + newVal.packingNumber + ";B" + newVal.batch + ";Q" + newVal.qty
}else{
newVal.copyContent = ''
}
console.log('newVal.copyContent',newVal.copyContent)
},
immediate: true,
deep: true
}
},
methods: {
copy() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HPQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.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
},
copyPro() {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
var content = "HMQ;V1.0;I" + this.detail.itemCode + ";P" + this.detail.packingNumber + ";B" + this.detail
.batch + ";Q" + this.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
},
isDevlement() {
return config.isDevelopment;
}
}
}
</script>
<style>
</style>

5
src/mycomponents/scan/winScanPackAndLocation.vue

@ -328,6 +328,11 @@
uni.hideLoading();
if (res.success) {
this.managementPrecision = res.managementPrecision
if (this.managementPrecision == 'BY_BATCH') {
res.data.list.forEach(item => {
item.packingNumber = ''
})
}
this.chooseWhich = '2'
if (res.data && res.data.list && res.data.list.length > 1) {
this.showBalanceSelect(res.data.list);

2
src/pages/count/coms/comCountDetailcards.vue

@ -3,7 +3,7 @@
<view class="uni-flex uni-row space-between " style="align-items: center;" >
<view class="">
<item :dataContent="dataContent" style="margin-left: 15rpx;"></item>
<pack :packingCode="dataContent.packingNumber"></pack>
<pack v-if="dataContent.packingNumber" :packingCode="dataContent.packingNumber"></pack>
<batch :batch="dataContent.batch"></batch>
</view>
<view class="">

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

@ -37,14 +37,12 @@
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">
<view class="uni-flex uni-row " style="align-items: center;"
:class="item.scaned?'scan_view':'item'">
<view class="uni-flex uni-row " style="align-items: center;" :class="item.scaned?'scan_view':'item'">
<view class="" style="font-size: 30rpx; font-weight: bold;">
{{index+1}}.
</view>
<comCountDetailcards :ref="'countDetail_'+index" :dataContent="item" :index="index"
@editItem="editItem" :settingParam="jobContent" @remove="updateData"
@updateData="updateData">
<comCountDetailcards :ref="'countDetail_'+index" :dataContent="item" :index="index" @editItem="editItem"
:settingParam="jobContent" @remove="updateData" @updateData="updateData">
</comCountDetailcards>
</view>
<view class='split_line'></view>
@ -57,8 +55,7 @@
</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="">
</view>
<view class=" uni-flex uni-row">
@ -68,9 +65,8 @@
</view>
<win-scan-button @goScan='openScanPopup'></win-scan-button>
<win-scan-pack-and-location
:allowModifyLocation="false"
ref="scanPopup" :noShowBalanceMessage="true" @getCountScanResult='getScanResult'>
<win-scan-pack-and-location :allowModifyLocation="false" ref="scanPopup" :noShowBalanceMessage="true"
@getCountScanResult='getScanResult'>
</win-scan-pack-and-location>
<count-qty-edit ref="countQtyEdit" @confirm="editConfirm" @close="editClose" :isShowStatus="true"
:allowEditStatus="editInventoryStatus" :isShowBalance="jobContent.isOpenCount=='TRUE'">
@ -111,6 +107,10 @@
getClearOption
} from '@/common/array.js';
import {
getManagementPrecisions,
} from '@/common/balance.js';
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
@ -155,11 +155,13 @@
allDetails: [],
scanOptions: [],
detailOptions: [],
managementList: [],
managementType: ''
};
},
onLoad(option) {
uni.setNavigationBarTitle({
title: option.title+'详情'
title: option.title + '详情'
})
this.id = option.id;
if (this.id != undefined) {
@ -242,7 +244,7 @@
title: "加载中....",
mask: true
});
getCountJobDetail(that.id).then(res => {
getCountJobDetail(that.id).then(async res => {
uni.hideLoading();
if (res.data == null) {
that.showMessage('未获取到详情');
@ -254,10 +256,30 @@
item.recommendQty = item.qty
item.handleQty = 0
item.countTime = new Date()
item.fromLocationCode =that.fromLocationCode;
item.fromLocationCode = that.fromLocationCode;
})
that.allDetails = res.data.subList;
that.allCount = res.data.subList.length;
//
var itemCodes = []
this.allDetails.forEach(item => {
itemCodes.push(item.itemCode)
item.scaned = false
})
await getManagementPrecisions(itemCodes, that.fromLocationCode, res => {
if (res.success) {
this.managementList = res.list;
this.managementType = this.managementList.some(item => item.ManagementPrecision ==
'BY_BATCH') ? 'BY_BATCH' : ''
if (this.managementType == 'BY_BATCH') {
this.allDetails.forEach(item => {
item.packingNumber = ''
item.toPackingNumber = ''
item.fromPackingNumber = ''
})
}
}
})
that.initList()
}
@ -304,7 +326,7 @@
if (res) {
item.scaned = false;
item.handleQty = 0;
this.showList.splice(index,1)
this.showList.splice(index, 1)
this.$emit('removePack')
}
});
@ -359,7 +381,7 @@
res => {
//
if (res) {
var detail = this.createAddDetailInfo(pack,qty)
var detail = this.createAddDetailInfo(pack, qty)
detail.countTime = new Date();
this.allDetails.push(detail)
this.updateList();
@ -388,13 +410,13 @@
} else {
//
selectItem.scaned = true;
selectItem.balanceQty= Number(qty)
selectItem.balanceQty = Number(qty)
selectItem.handleQty = Number(qty)
selectItem.packQty = pack.packQty
selectItem.packUnit = pack.packUnit
selectItem.parentPackingNumber =pack.parentPackingNumber
selectItem.locationCode =this.fromLocationCode
selectItem.fromLocationCode =this.fromLocationCode
selectItem.parentPackingNumber = pack.parentPackingNumber
selectItem.locationCode = this.fromLocationCode
selectItem.fromLocationCode = this.fromLocationCode
this.$refs.countQtyEdit.openEditPopupShowSeconds(selectItem,
null);
@ -441,7 +463,7 @@
//
createAddDetailInfo(pack,qty) {
createAddDetailInfo(pack, qty) {
var detail = {
masterId: this.jobContent.id, //
scaned: true,
@ -458,7 +480,7 @@
packQty: pack.packQty,
packUnit: pack.packUnit,
projectCode: "",
recommendQty:Number(qty),
recommendQty: Number(qty),
qty: Number(qty),
handleQty: Number(qty),
uom: pack.uom,
@ -467,7 +489,7 @@
countQty: Number(qty),
balanceQty: Number(qty),
fromLocationCode: this.fromLocationCode,
locationCode:this.fromLocationCode,
locationCode: this.fromLocationCode,
creator: this.$store.state.user.id,
countTime: new Date()
}
@ -498,8 +520,8 @@
if (!item.scaned) {
item.scaned = true;
item.handleQty = 0
item.locationCode =this.fromLocationCode
item.fromLocationCode =this.fromLocationCode
item.locationCode = this.fromLocationCode
item.fromLocationCode = this.fromLocationCode
}
})
this.submitJob();
@ -525,11 +547,20 @@
title: "提交中....",
mask: true
});
//
var itemCodes = []
this.allDetails.forEach(item => {
itemCodes.push(item.itemCode)
item.scaned = false
})
getManagementPrecisions(itemCodes, this.fromLocationCode, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
countJobSubmit(params).then(res => {
uni.hideLoading()
const str =res.data || ''
const str = res.data || ''
this.showCommitSuccessMessage("提交成功\n生成盘点记录\n" + str)
// if (res.data) {
// this.showCommitSuccessMessage("\n\n" + res.data)
@ -540,7 +571,8 @@
uni.hideLoading()
this.showErrorMessage(error)
})
}
})
},
setParams() {
@ -550,6 +582,12 @@
this.allDetails.forEach(item => {
if (item.scaned) {
item.countQty = item.handleQty;
var info = getPackingNumberAndBatch(this.managementList, item.itemCode,
item.packingNumber, item.batch);
item.toPackingNumber = info.packingNumber;
item.packingNumber = info.packingNumber;
item.fromPackingNumber = info.packingNumber;
}
subList.push(item)
})

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

@ -16,11 +16,15 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comDetailCardBatch :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData" @openDetail="openDetail"
:locationAreaTypeList="toLocationAreaTypeList" v-if="managementType=='BY_BATCH'">
</comDetailCardBatch>
<comLableDetailCard :dataContent="item" :settingParam="jobContent"
:isShowStatus="false"
:isShowLocation="false"
@remove="updateData" @updateData="updateData" @openDetail="openDetail"
:locationAreaTypeList="toLocationAreaTypeList">
:locationAreaTypeList="toLocationAreaTypeList" v-else>
</comLableDetailCard >
</view>
</view>
@ -80,6 +84,7 @@
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import locationCompare from '@/mycomponents/location/locationCompare.vue'
import comLableDetailCard from "@/mycomponents/detail/comLableDetailCard.vue"
import comDetailCardBatch from "@/mycomponents/detail/comDetailCardBatch.vue"
import detailInfoPopup from '@/pages/customerReturn/coms/detailInfoPopup.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
@ -90,7 +95,8 @@
winScanPack,
locationCompare,
comLableDetailCard ,
detailInfoPopup
detailInfoPopup,
comDetailCardBatch
},
data() {
return {
@ -100,6 +106,7 @@
subList: [], //subList
detailSource: [], //
managementList: [],
managementType:'',
fromLocationCode: "",
toLocationCode: "",
toLocationAreaTypeList: [],
@ -190,6 +197,19 @@
that.toLocationCode = that.subList[0].toLocationCode
}
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes)
//
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
item.scaned = false
})
getManagementPrecisions(itemCodes, that.fromLocationCode, res => {
if (res.success) {
this.managementList = res.list;
this.managementType = this.managementList.some(item => item.ManagementPrecision ==
'BY_BATCH') ? 'BY_BATCH' : ''
}
})
} else {
that.showMessage('列表数据为0');
}
@ -379,6 +399,8 @@
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber;
detail.packingNumber = info.packingNumber;
detail.fromPackingNumber = info.packingNumber;
detail.toContainerNumber = detail.containerNumber;
detail.toBatch = info.batch;
detail.toLocationCode = detail.toLocationCode;

203
src/pages/inventoryMove/coms/comInventoryDetailCardBatch.vue

@ -0,0 +1,203 @@
<template>
<view class="" style="background-color: #fff;">
<!-- <item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty> -->
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowStdPack="false">
</item-compare-qty>
<view class='split_line'></view>
<view class="" v-for="(item,index) in dataContent.subList">
<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)">
<div style="display: flex;">
<div style="flex: 1;">
<batch v-if="item.batch" :batch="item.batch"></batch>
<location v-if="item.fromLocationCode" title="来源库位" :locationCode="item.fromLocationCode">
</location>
<to-location v-if="item.toLocationCode" title="目标库位" :locationCode="item.toLocationCode">
</to-location></div>
<text style="font-size: 30rpx;color: #2979ff; " @click="copy(item)" v-if="isDevlement()">复制</text>
</div>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"
:allowEditStatus="true"></balance-qty-edit>
<win-scan-location ref="scanLocationCode" :locationAreaTypeList="locationAreaTypeList" title="目标库位" @getLocation='getLocation'></win-scan-location>
<detail-info-popup ref="detailInfoPopup"></detail-info-popup>
<comMessage ref="message"></comMessage>
</view>
</template>
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import detailInfoPopup from '@/pages/inventoryMove/coms/detailInfoPopup.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import config from '@/static/config.js'
import {
getRemoveOption,
getEditRemoveOption
} from '@/common/array.js';
export default {
components: {
itemQty,
recommend,
balanceQtyEdit,
detailInfoPopup,
winScanLocation,
location,
toLocation,
itemCompareQty,
batch,
},
data() {
return {
option: [],
title: "推荐详情",
showItem: {},
editItem: {
},
detailOptions: [],
scanOptions: [],
options: [],
removeOptions: [],
editAndRemoveOptions: []
}
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
allowEditQty: {
type: Boolean,
default: false
},
locationAreaTypeList: {
type: Array,
default: []
},
isEdit: {
type: Boolean,
default: true
},
},
watch: {
dataContent: {
handler(newName, oldName) {
if (this.dataContent.subList.length > 0) {
this.$nextTick(res => {
setTimeout(() => {
if (this.$refs.collapse1) {
this.$refs.collapse1.resize();
}
}, 200)
})
}
},
immediate: true,
deep: true
}
},
mounted() {
this.removeOptions = getRemoveOption();
this.editAndRemoveOptions = getEditRemoveOption()
},
methods: {
openDetailCardPopup() {
this.$refs.winHint.openScanPopup()
},
swipeClick(e, item) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "库位") {
this.showLocation(item)
} else if (e.content.text == "移除") {
this.remove(item)
}
},
edit(item) {
this.editItem = item;
this.$refs.qtyEdit.openEditPopup(item.balance, item.handleQty);
},
detail(item) {
this.$emit('openDetail', item);
},
remove(item) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.balance = {}
item.handleQty = 0;
this.$forceUpdate()
this.$emit('remove', item)
}
});
},
confirm(qty) {
this.editItem.handleQty = qty;
this.$emit('updateData')
},
showLocation(item) {
this.locatonItem = item;
this.$refs.scanLocationCode.openScanPopup();
},
//
getLocation(location, code) {
this.locatonItem.toLocationCode = code;
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>
<style>
</style>

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

@ -12,10 +12,15 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comInventoryDetailCardBatch :dataContent="item" :settingParam="jobContent" @remove="updateData"
@updateData='updateData'
:locationAreaTypeList="toLocationAreaTypeList"
@openDetail="openDetail" v-if="managementType=='BY_BATCH'">
</comInventoryDetailCardBatch>
<comInventoryDetailCard :dataContent="item" :settingParam="jobContent" @remove="updateData"
@updateData='updateData' :locationAreaTypeList="toLocationAreaTypeList"
:allowEditQty ="jobContent.allowModifyQty=='TRUE'?true:false"
@openDetail="openDetail">
@openDetail="openDetail" v-else>
</comInventoryDetailCard>
</view>
</view>
@ -72,6 +77,7 @@
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import comInventoryDetailCard from '@/pages/inventoryMove/coms/comInventoryDetailCard.vue'
import comInventoryDetailCardBatch from '@/pages/inventoryMove/coms/comInventoryDetailCardBatch.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import detailInfoPopup from '@/pages/inventoryMove/coms/detailInfoPopup.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
@ -83,6 +89,7 @@
winScanButton,
winScanPack,
comInventoryDetailCard,
comInventoryDetailCardBatch,
winScanPackAndLocation,
detailInfoPopup,
jobTop
@ -97,6 +104,7 @@
toLocationInfo: {},
businessTypeInfo: {},
managementList: [],
managementType:'',
businessTypeCode: '',
toLocationCode: '',
toInventoryStatus: '',
@ -224,7 +232,7 @@
mask: true
});
getInventoryMoveJobDetail(that.id).then(res => {
getInventoryMoveJobDetail(that.id).then(async res => {
uni.hideLoading();
if (res.data == null) {
that.showMessage('未获取到详情');
@ -234,7 +242,21 @@
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes);
that.jobStatus = res.data.status
that.subList = res.data.subList;
that.detailSource = getDataSource(that.subList)
that.detailSource =await getDataSource(that.subList)
//
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
item.scaned = false
})
this.toLocationCode = that.subList[0].toLocationCode
getManagementPrecisions(itemCodes, this.toLocationCode, res => {
if (res.success) {
this.managementList = res.list;
this.managementType = this.managementList.some(item => item.ManagementPrecision ==
'BY_BATCH') ? 'BY_BATCH' : ''
}
})
} else {
that.showMessage('列表数据为0');
}
@ -490,6 +512,8 @@
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode,
detail.packingNumber, detail.toLocationCode, detail.batch);
detail.toPackingNumber = info.packingNumber;
detail.packingNumber = info.packingNumber;
detail.fromPackingNumber = info.packingNumber;
detail.toBatch = info.batch;
detail.toContainerNumber = '';
// detail.toLocationCode = this.toLocationCode;

183
src/pages/issue/coms/comIssueDetailCardBatch.vue

@ -0,0 +1,183 @@
<template>
<view>
<!-- <requiredLocation title="需求库位" :locationCode="dataContent.toLocationCode"
:isShowEdit="dataContent.allowModifyLocation==1"></requiredLocation> -->
<view v-for="(item,index) in dataContent.Items">
<uni-collapse ref="collapse">
<uni-collapse-item :open="true">
<template v-slot:title>
<view class="split_line"></view>
<!-- 物品 -->
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="itemCoceClick($event,item,index)"
:right-options="removeOptions">
<item-qty :dataContent="item" :handleQty="item.handleQty"></item-qty>
</uni-swipe-action-item>
</uni-swipe-action>
<!-- <com-issue-request-info :workShopCode="dataContent.workShopCode" :dataContent="dataContent">
</com-issue-request-info> -->
</template>
<view v-for="(loacation,locatonIndex) in item.Locations">
<view v-if="locatonIndex ==0">
<view class="uni-flex uni-row space-between">
<!-- 推荐库位 -->
<location :locationCode="loacation.fromLocationCode">
</location>
</view>
<view v-for="(batch,batchIndex) in loacation.Batchs">
<batch :batch="batch.detail.batch" v-if="batchIndex ==0"></batch>
</view>
</view>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
</view>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" :isShowStatus="true"></balance-qty-edit>
<detail-info-popup ref="detailInfoPopup"></detail-info-popup>
<comMessage ref="message"></comMessage>
</template>
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
import recommend from '@/mycomponents/recommend/recommend.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 balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import location from '@/mycomponents/balance/location.vue'
import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue'
import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue'
import batch from '@/mycomponents/balance/batch.vue'
import {
getDetailOption,
getEditRemoveOption,
getRemoveOption
} from '@/common/array.js';
export default {
emits: ['updateData', "removeItemCode"],
components: {
itemQty,
recommend,
recommendBalance,
handleBalance,
recommendQtyEdit,
requiredLocation,
balanceQtyEdit,
location,
detailInfoPopup,
comIssueRequestInfo,
batch
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
},
watch: {
},
data() {
return {
option: [],
showItem: {},
editItem: {},
batchItem: {},
detailOptions: [],
scanOptions: [],
removeOptions: []
}
},
mounted() {
this.detailOptions = getDetailOption();
this.scanOptions = getEditRemoveOption();
this.removeOptions = getRemoveOption()
},
methods: {
resizeCollapse() {
this.$nextTick(r => {
this.$refs.collapse.forEach(r => {
r.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)
}
},
itemCoceClick(e, item, index) {
if (e.content.text == "移除") {
this.dataContent.Items.splice(index, 1);
this.$emit('removeItemCode')
}
},
edit(batch, item) {
let that = this;
that.editItem = item;
that.batchItem = batch;
item.balance.balanceQty = item.balance.qty;
that.$refs.balanceQtyEdit.openEditPopup(item.balance, item.qty);
},
detail(item) {
this.showItem = item;
this.$refs.receiptHint.openScanPopup()
},
remove(batch, record, recordIndex,batchIndex,Batchs,locatonIndex,Locations) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
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.qty = val;
this.$emit('updateData', this.editItem)
// let qty = 0;
// this.batchItem.Records.forEach(r => {
// qty += Number(r.qty);
// })
// this.batchItem.handleQty = qty;
}
}
}
</script>
<style>
</style>

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

@ -426,6 +426,8 @@
} else {
this.getToLocationBalance(result)
}
}else{
this.queryBalance(result)
}
},

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

@ -19,11 +19,14 @@
:productionLineCode="toLocation.productionLineCode"
:workStationCode="toLocation.workStationCode" :rawLocationCode="toLocation.toLocationCode">
</work-station> -->
<comIssueDetailCardBatch ref='comIssueDetailCard' :dataContent="toLocation" :settingParam="jobContent"
@updateData='updateData' v-if="managementType == 'BY_BATCH'">
</comIssueDetailCardBatch>
<com-issue-detail-card
ref='comIssueDetailCard'
:dataContent="toLocation"
:settingParam="jobContent"
@updateData='updateData'>
@updateData='updateData' v-else>
</com-issue-detail-card>
<view class="split_line"></view>
</view>
@ -82,6 +85,7 @@
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import comIssueDetailCard from '@/pages/issue/coms/comIssueDetailCard.vue'
import comIssueDetailCardBatch from '@/pages/issue/coms/comIssueDetailCardBatch.vue'
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import comScanIssuePack from '@/pages/issue/coms/comScanIssuePack.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
@ -97,7 +101,8 @@
comScanIssuePack,
jobTop,
workStation,
balanceSelect
balanceSelect,
comIssueDetailCardBatch
},
data() {
return {
@ -108,7 +113,9 @@
detailOptions: [],
scanOptions: [],
jobStatus: "",
scanMessage: ''
scanMessage: '',
managementList: [],
managementType: ""
};
},
@ -206,11 +213,27 @@
that.subList = res.data.subList;
that.detailSource = getDataSource(that.detailSource, that.subList)
that.jobContent.detailToLocationCode = res.data.subList[0].toLocationCode
that.fromLocationCode = that.subList[0].fromLocationCode
//
if (this.scanMessage) {
this.openScanPopupSimulate(this.scanMessage);
}
//
var itemCodes = []
that.detailSource.forEach(item => {
item.Items.forEach((cur) => {
itemCodes.push(cur.itemCode)
})
item.scaned = false
})
getManagementPrecisions(itemCodes, that.fromLocationCode, res => {
if (res.success) {
this.managementList = res.list;
this.managementType = this.managementList.some(item => item.ManagementPrecision ==
'BY_BATCH') ? 'BY_BATCH' : ''
}
})
setTimeout(r => {
that.resizeCollapse();
}, 100)
@ -241,35 +264,8 @@
this.resizeCollapse();
},
// submit() {
//3.
//:XXX
// var isOutIn = getApp().globalData.feed_configList.filter(
// res => {
// if (res.name == 'feed_isOutIn') {
// return res;
// }
// });
// this.dataContent.itemCodeList.forEach(res => {
// if (res.handleQty > res.recommendQty) {
// this.$refs.modal.showConfirmMessageModal(',?', confirm => {
// if (confirm) {
// //
// uni.showToast({
// title: ""
// })
// }
// })
// } else {
// uni.showToast({
// title: "" + res.handleQty + "][" + res.recommendQty + "]"
// })
// }
// })
// },
submit() {
uni.showLoading({
title: "提交中....",
@ -334,50 +330,33 @@
let record = {};
record.handleQty = r.qty;
record.fromPackingNumber = r
.packingNumber;
record.fromPackingNumber = r.packingNumber;
record.fromBatch = r.batch;
record.fromContainerNumber = r
.ContainerNumber;
record.toContainerNumber = r
.ContainerNumber;
record.toInventoryStatus = r
.inventoryStatus;
// record.toLocationCode = subItem
// .toLocationCode;
record.fromContainerNumber = r.ContainerNumber;
record.toLocationCode = this.jobContent
.detailToLocationCode;
record.toContainerNumber = r.ContainerNumber;
record.toInventoryStatus = r.inventoryStatus;
record.toLocationCode = this.jobContent.detailToLocationCode;
record.supplierCode = r.supplierCode;
let single_price = r.balance
.singlePrice == null ? 0 : r
.balance
.singlePrice;
let single_price = r.balance.singlePrice == null ? 0 : r.balance.singlePrice;
record.singlePrice = single_price;
record.amount = single_price * r.qty;
//使
if (item.onTheWayLocationCode) {
record.toPackingNumber = r
.packingNumber;
record.toPackingNumber = r.packingNumber;
record.toBatch = r.batch;
} else {
var info =
getPackingNumberAndBatch(
this.managementList, r
.itemCode,
r.packingNumber, r
.batch);
record.toPackingNumber = info
.packingNumber;
var info =getPackingNumberAndBatch(this.managementList, r.itemCode,r.packingNumber, r.batch);
record.toPackingNumber = info.packingNumber;
record.packingNumber = info.packingNumber;
record.fromPackingNumber = info.packingNumber;
record.toBatch = info.batch;
}
record.fromParentPackingNumber = r
.parentPackingNumber;
record.fromParentPackingNumber = r.parentPackingNumber;
subItem.recordList.push(record);
})
subList.push(deepCopyData(subItem));

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

@ -14,9 +14,13 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comDetailCardBatch :dataContent="item" :index="index" :settingParam="jobContent"
:isShowStatus="false" @remove="updateData" @updateData="updateData" @openDetail="openDetail"
:locationAreaTypeList='toLocationAreaTypeList' v-if="managementType=='BY_BATCH'">
</comDetailCardBatch>
<com-detail-card :dataContent="item" :index="index" :settingParam="jobContent"
:isShowStatus="false" @remove="updateData" @updateData="updateData" @openDetail="openDetail"
:locationAreaTypeList='toLocationAreaTypeList'>
:locationAreaTypeList='toLocationAreaTypeList' v-else>
</com-detail-card>
</view>
</view>
@ -86,6 +90,7 @@
import locationCompare from '@/mycomponents/location/locationCompare.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import comDetailCardBatch from "@/mycomponents/detail/comDetailCardBatch.vue"
import detailInfoPopup from '@/pages/productPutaway/coms/detailInfoPopup.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
@ -96,6 +101,7 @@
winScanPackAndLocation,
locationCompare,
comDetailCard,
comDetailCardBatch,
detailInfoPopup,
jobTop
},
@ -107,6 +113,7 @@
subList: [], //subList
detailSource: [], //
managementList: [],
managementType:'',
fromLocationCode: "",
toLocationCode: "",
toLocationAreaTypeList: [],
@ -201,7 +208,7 @@
title: "加载中....",
mask: true
});
getProductPutawayJobDetail(that.id).then(res => {
getProductPutawayJobDetail(that.id).then(async res => {
uni.hideLoading();
if (res.data == null) {
that.showMessage('未获取到详情');
@ -213,7 +220,7 @@
that.fromLocationCode = that.subList[0].fromLocationCode
that.jobToLocationCode = that.subList[0].toLocationCode
that.toLocationAreaTypeList = getLocationTypeArray(that.jobContent.toAreaTypes)
that.detailSource = getDataSource(that.subList)
that.detailSource =await getDataSource(that.subList)
that.isCheckLocation = getSwitchInfoByCode(that.switchCode)
if (that.isCheckLocation) {
@ -224,7 +231,19 @@
if (this.scanMessage) {
this.openScanPopupSimulate(this.scanMessage)
}
//
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
item.scaned = false
})
getManagementPrecisions(itemCodes, that.jobToLocationCode, res => {
if (res.success) {
this.managementList = res.list;
this.managementType = this.managementList.some(item => item.ManagementPrecision ==
'BY_BATCH') ? 'BY_BATCH' : ''
}
})
} else {
that.showMessage('列表数据为0');
}
@ -252,7 +271,7 @@
},
updateData() {
this.calcHandleQty();
// this.calcHandleQty();
},
openDetail(item) {
@ -328,7 +347,7 @@
this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【" + result
.fromLocationCode + "】不在列表中")
} else {
detail.scaned = true
if (!itemDetail.cancleScanedHiht && itemDetail.scaned) {
this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【" + result
.fromLocationCode + "】已经扫描")
@ -485,6 +504,8 @@
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber;
detail.packingNumber = info.packingNumber;
detail.fromPackingNumber = info.packingNumber;
detail.toBatch = info.batch;
detail.toContainerNumber = '';
detail.toLocationCode = this.toLocationCode;

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

@ -0,0 +1,206 @@
<template>
<view class="" style="background-color: #fff;">
<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="dataContent.scaned?'scan_view':''">
<uni-swipe-action-item
:right-options="(dataContent.scaned&&isEdit)?editAndRemoveOptions : dataContent.scaned? removeOptions:options"
@click="swipeClick($event,dataContent,'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>
</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>
<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>
<productDetailInfoPopup ref="jobDetailPopup" :dataContent="showItem"></productDetailInfoPopup>
<comMessage ref="message"></comMessage>
</view>
</template>
<script>
import itemCompareQty from '@/mycomponents/item/itemCompareQty.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
} from '@/common/array.js';
export default {
components: {
itemCompareQty,
recommend,
recommendQtyEdit,
jobDetailPopup,
productDetailInfoPopup,
winScanLocation,
comFgCard,
pack,
location,
toLocation,
batch
},
props: {
dataContent: {
type: Object,
default: null
},
settingParam: {
type: Object,
default: null
},
locationAreaTypeList: {
type: Array,
default: null
},
isEdit: {
type: Boolean,
default: true
},
},
watch: {
dataContent: {
handler(newName, oldName) {
if (this.dataContent.subList.length > 0) {
if (this.$refs.collapse1 != undefined && this.$refs.collapse1 != null) {
this.$nextTick(res => {
this.$refs.collapse1.resize()
})
}
}
},
immediate: true,
deep: true
}
},
data() {
return {
showItem: {},
editItem: {
record: {
}
},
locatonItem: {},
detailOptions: [],
scanOptions: [],
options: [],
removeOptions: [],
editAndRemoveOptions: []
}
},
mounted() {
this.removeOptions = getRemoveOption();
this.editAndRemoveOptions = getEditRemoveOption()
},
methods: {
swipeClick(e, item) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "库位") {
this.showLocation(item)
} else if (e.content.text == "移除") {
this.remove(item)
}
},
edit(item) {
this.editItem = item;
this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty, item.labelQty);
},
showLocation(item) {
this.locatonItem = item;
this.$refs.scanLocationCode.openScanPopup();
},
//
getLocation(location, code) {
this.locatonItem.toLocationCode = code;
this.$emit('updateData')
},
detail(item) {
this.showItem = item;
this.$refs.jobDetailPopup.openPopup(item)
},
remove(item) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.handleQty = null
item.fgList = []
this.$forceUpdate()
this.$emit('remove', item)
}
});
},
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>
<style>
</style>

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

@ -42,9 +42,13 @@
<view class="">
<comProductDetailCardBatch :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData"
:locationAreaTypeList='toLocationAreaTypeList' v-if="managementType=='BY_BATCH'">
</comProductDetailCardBatch>
<comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData"
:locationAreaTypeList='toLocationAreaTypeList'>
:locationAreaTypeList='toLocationAreaTypeList' v-else>
</comProductDetailCard>
</view>
</view>
@ -112,6 +116,7 @@
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import jobTop from '@/mycomponents/job/jobTop.vue'
import comProductDetailCard from "@/pages/productReceipt/coms/comProductDetailCard.vue"
import comProductDetailCardBatch from "@/pages/productReceipt/coms/comProductDetailCardBatch.vue"
export default {
@ -122,7 +127,8 @@
locationCompare,
winScanPack,
jobTop,
comProductDetailCard
comProductDetailCard,
comProductDetailCardBatch
},
data() {
return {
@ -140,6 +146,7 @@
jobToLocationCode: "",
scanMessage: "",
status: '',
managementType:''
};
},
onLoad(option) {
@ -233,6 +240,19 @@
if (that.scanMessage) {
this.$refs.scanPopup.simulateScan(that.scanMessage);
}
//
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
item.scaned = false
})
getManagementPrecisions(itemCodes, that.jobToLocationCode, res => {
if (res.success) {
this.managementList = res.list;
this.managementType = this.managementList.some(item => item.ManagementPrecision ==
'BY_BATCH') ? 'BY_BATCH' : ''
}
})
} else {
that.showMessage('列表数据为0');
}
@ -255,6 +275,7 @@
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
detail.scaned = true
var itemDetail = detail.subList.find(r =>
r.packingNumber == packingNumber &&
r.batch == batch);
@ -289,7 +310,7 @@
updateData() {
calcHandleQty(this.detailSource);
// calcHandleQty(this.detailSource);
},
@ -457,6 +478,8 @@
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber;
detail.packingNumber = info.packingNumber;
detail.fromPackingNumber = info.packingNumber;
detail.toBatch = info.batch;
detail.toContainerNumber = '';
detail.toInventoryStatus = detail.inventoryStatus

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

@ -41,9 +41,13 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comProductDetailCardBatch :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData"
:locationAreaTypeList='toLocationAreaTypeList' v-if="managementType=='BY_BATCH'">
</comProductDetailCardBatch>
<comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData"
:locationAreaTypeList='toLocationAreaTypeList'>
:locationAreaTypeList='toLocationAreaTypeList' v-else>
</comProductDetailCard>
</view>
</view>
@ -111,6 +115,7 @@
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import jobTop from '@/mycomponents/job/jobTop.vue'
import comProductDetailCard from "@/pages/productReceipt/coms/comProductDetailCard.vue"
import comProductDetailCardBatch from "@/pages/productReceipt/coms/comProductDetailCardBatch.vue"
export default {
@ -121,7 +126,8 @@
locationCompare,
winScanPack,
jobTop,
comProductDetailCard
comProductDetailCard,
comProductDetailCardBatch
},
data() {
return {
@ -135,6 +141,7 @@
detailSource: [], //
toLocationAreaTypeList: [],
managementList: [],
managementType:'',
jobStatus: "",
jobToLocationCode: "",
status: '',
@ -241,7 +248,19 @@
if (that.scanMessage) {
this.$refs.scanPopup.simulateScan(that.scanMessage);
}
//
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
item.scaned = false
})
getManagementPrecisions(itemCodes, that.jobToLocationCode, res => {
if (res.success) {
this.managementList = res.list;
this.managementType = this.managementList.some(item => item.ManagementPrecision ==
'BY_BATCH') ? 'BY_BATCH' : ''
}
})
} else {
that.showMessage('列表数据为0');
}
@ -264,6 +283,7 @@
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
detail.scaned = true
var itemDetail = detail.subList.find(r =>
r.packingNumber == packingNumber &&
r.batch == batch);
@ -298,7 +318,7 @@
updateData() {
calcHandleQty(this.detailSource);
// calcHandleQty(this.detailSource);
},
@ -447,6 +467,8 @@
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber;
detail.packingNumber = info.packingNumber;
detail.fromPackingNumber = info.packingNumber;
detail.toBatch = info.batch;
detail.toContainerNumber = '';
detail.toInventoryStatus = detail.inventoryStatus

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

@ -12,8 +12,12 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comDetailCardBatch :dataContent="item" :index="index" :settingParam="jobContent" :isShowStatus="false"
@remove="updateData" @updateData="updateData" @openDetail="openDetail"
:locationAreaTypeList='toLocationAreaTypeList' v-if="managementType == 'BY_BATCH'">
</comDetailCardBatch>
<com-detail-card :dataContent="item" :settingParam="jobContent" @remove="updateData"
@updateData='updateData' @openDetail="openDetail">
@updateData='updateData' @openDetail="openDetail" v-else>
</com-detail-card>
</view>
</view>
@ -71,6 +75,7 @@
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import comDetailCardBatch from "@/mycomponents/detail/comDetailCardBatch.vue"
import recycleDetailInfoPopup from '@/pages/productRecycle/coms/recycleDetailInfoPopup.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
@ -80,6 +85,7 @@
winScanButton,
winScanPackAndLocation,
comDetailCard,
comDetailCardBatch,
recycleDetailInfoPopup,
jobTop
},
@ -92,7 +98,8 @@
detailSource: [], //
businessTypeInfo: {},
managementList: [],
jobStatus: ""
jobStatus: "",
managementType: ''
};
},
onLoad(option) {
@ -170,7 +177,7 @@
mask: true
});
getProductRecycleDetail(that.id).then(res => {
getProductRecycleDetail(that.id).then(async res => {
uni.hideLoading();
if (res.data == null) {
that.showMessage('未获取到详情');
@ -183,7 +190,21 @@
res.fromLocationCode = res.toLocationCode
})
that.toLocationCode = that.jobContent.toLocationCode
that.detailSource = getDataSource(that.subList);
that.detailSource =await getDataSource(that.subList);
//
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
item.scaned = false
})
that.fromLocationCode = that.subList[0].fromLocationCode
getManagementPrecisions(itemCodes, that.fromLocationCode, res => {
if (res.success) {
this.managementList = res.list;
this.managementType = this.managementList.some(item => item.ManagementPrecision ==
'BY_BATCH') ? 'BY_BATCH' : ''
}
})
} else {
that.showMessage('列表数据为0');
}
@ -223,7 +244,7 @@
},
updateData() {
this.calcHandleQty();
// this.calcHandleQty();
},
getScanResult(result) {
@ -237,6 +258,7 @@
if (detail == undefined) {
this.showMessage("物料号【" + itemCode + "】不在列表中")
} else {
detail.scaned = true
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
//
itemDetail = detail.subList.find(r => {
@ -372,7 +394,13 @@
title: "提交中....",
mask: true
});
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
})
getManagementPrecisions(itemCodes, this.fromLocationCode, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
productRecycleJobsubmit(params).then(res => {
@ -386,7 +414,8 @@
uni.hideLoading()
this.showErrorMessage(error)
})
}
})
},
setParams() {
@ -401,6 +430,11 @@
detail.toBatch = detail.batch;
detail.toLocationCode = detail.toLocationCode;
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber;
detail.packingNumber = info.packingNumber;
detail.fromPackingNumber = info.packingNumber;
subList.push(detail)
}
})

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

@ -14,10 +14,14 @@
<scroll-view scroll-y="true">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comDetailCardBatch :dataContent="item" :index="index" :settingParam="jobContent"
@remove="updateData" @updateData="updateData" @openDetail="openDetail"
:locationAreaTypeList='toLocationAreaTypeList'>
</comDetailCardBatch>
<com-detail-card :dataContent="item" :index="index" :settingParam="jobContent"
@remove="updateData" @updateData="updateData" @openDetail="openDetail"
:locationAreaTypeList='toLocationAreaTypeList'>
</com-detail-card>
</com-detail-card v-else>
<view class='split_line'></view>
</view>
@ -82,6 +86,7 @@
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import comDetailCardBatch from "@/mycomponents/detail/comDetailCardBatch.vue"
import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue'
import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
@ -94,7 +99,8 @@
comDetailCard,
detailInfoPopup,
comIssueRequestInfo,
jobTop
jobTop,
comDetailCardBatch
},
data() {
return {

29
src/pages/productionReturn/job/okToReturnDetail.vue

@ -179,7 +179,7 @@
title: "加载中....",
mask: true
});
getProductionReturnJobDetail(that.id).then(res => {
getProductionReturnJobDetail(that.id).then((async res => {
uni.hideLoading();
if (res.data == null) {
that.showMessage('未获取到详情');
@ -188,14 +188,35 @@
that.jobContent = res.data;
that.jobStatus = res.data.status
that.subList = res.data.subList;
that.detailSource = getDataSource(that.subList)
that.detailSource =await getDataSource(that.subList)
that.fromLocationCode = that.subList[0].fromLocationCode
that.jobToLocationCode = that.subList[0].toLocationCode
that.titleInfo = that.subList[0];
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes);
//
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
item.scaned = false
})
await getManagementPrecisions(itemCodes, that.fromLocationCode, res => {
if (res.success) {
this.managementList = res.list;
this.managementType = this.managementList.some(item => item.ManagementPrecision ==
'BY_BATCH') ? 'BY_BATCH' : ''
if(this.managementType == 'BY_BATCH'){
that.detailSource.forEach(item=>{
item.subList.forEach(cur=>{
cur.packingNumber=''
cur.toPackingNumber=''
cur.fromPackingNumber=''
})
})
}
}
})
} else {
that.showMessage('列表数据为0');
}
@ -414,6 +435,8 @@
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
detail.toPackingNumber = detail.packingNumber;
detail.packingNumber = detail.packingNumber;
detail.fromPackingNumber = detail.packingNumber;
detail.toContainerNumber = detail.containerNumber;
detail.toBatch = detail.batch;

176
src/pages/purchaseReturn/coms/comReturnDetailCardBatch.vue

@ -0,0 +1,176 @@
<template>
<view>
<view v-for="(item,index) in dataContent.Items">
<uni-collapse ref="collapse">
<uni-collapse-item :open="true">
<template v-slot:title>
<view class="split_line"></view>
<!-- 物品 -->
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="itemCoceClick($event,item,index)"
:right-options="removeOptions">
<item-qty :dataContent="item" :isShowBalanceQty="false" :handleQty="item.handleQty"></item-qty>
</uni-swipe-action-item>
</uni-swipe-action>
</template>
<view v-for="(loacation,locatonIndex) in item.Locations">
<view v-if="locatonIndex ==0">
<view class="uni-flex uni-row space-between">
<!-- 推荐库位 -->
<location :locationCode="loacation.fromLocationCode">
</location>
</view>
<view v-for="(batch,batchIndex) in loacation.Batchs">
<batch :batch="batch.detail.batch" v-if="batchIndex ==0"></batch>
</view>
</view>
</view>
</uni-collapse-item>
</uni-collapse>
</view>
</view>
<balance-qty-edit ref="balanceQtyEdit" @confirm="confirm" :isShowStatus="true"></balance-qty-edit>
<detail-info-popup ref="detailInfoPopup"></detail-info-popup>
<comMessage ref="message"></comMessage>
</template>
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
import recommend from '@/mycomponents/recommend/recommend.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 balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import location from '@/mycomponents/balance/location.vue'
import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue'
import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue'
import batch from '@/mycomponents/balance/batch.vue'
import {
getDetailOption,
getEditRemoveOption,
getRemoveOption
} from '@/common/array.js';
export default {
emits: ['updateData', "removeItemCode"],
components: {
itemQty,
recommend,
recommendBalance,
handleBalance,
recommendQtyEdit,
requiredLocation,
balanceQtyEdit,
location,
detailInfoPopup,
comIssueRequestInfo,
batch
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
},
watch: {
},
data() {
return {
option: [],
showItem: {},
editItem: {},
batchItem: {},
detailOptions: [],
scanOptions: [],
removeOptions: []
}
},
mounted() {
this.detailOptions = getDetailOption();
this.scanOptions = getEditRemoveOption();
this.removeOptions = getRemoveOption()
},
methods: {
resizeCollapse() {
this.$nextTick(r => {
this.$refs.collapse.forEach(r => {
r.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)
}
},
itemCoceClick(e, item, index) {
if (e.content.text == "移除") {
this.dataContent.Items.splice(index, 1);
this.$emit('removeItemCode')
}
},
edit(batch, item) {
let that = this;
that.editItem = item;
that.batchItem = batch;
item.balance.balanceQty = item.balance.qty;
that.$refs.balanceQtyEdit.openEditPopup(item.balance, item.qty);
},
detail(item) {
this.showItem = item;
this.$refs.receiptHint.openScanPopup()
},
remove(batch, record, recordIndex,batchIndex,Batchs,locatonIndex,Locations) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
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.qty = val;
this.$emit('updateData', this.editItem)
// let qty = 0;
// this.batchItem.Records.forEach(r => {
// qty += Number(r.qty);
// })
// this.batchItem.handleQty = qty;
}
}
}
</script>
<style>
</style>

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

@ -27,12 +27,18 @@
:productionLineCode="toLocation.productionLineCode"
:workStationCode="toLocation.workStationCode" :rawLocationCode="toLocation.toLocationCode">
</work-station> -->
<comReturnDetailCardBatch
ref='comIssueDetailCard'
:dataContent="toLocation"
:settingParam="jobContent"
@updateData='updateData' v-if="managementType == 'BY_BATCH'">
</comReturnDetailCardBatch>
<comReturnDetailCard
ref='comIssueDetailCard'
:dataContent="toLocation"
:settingParam="jobContent"
@updateData='updateData'>
</comReturnDetailCard>
</comReturnDetailCard v-else>
<view class="split_line"></view>
</view>
</scroll-view>
@ -98,6 +104,7 @@
import returnDetailInfoPopup from '@/pages/purchaseReturn/coms/returnDetailInfoPopup.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
import comReturnDetailCard from '@/pages/purchaseReturn/coms/comReturnDetailCard.vue'
import comReturnDetailCardBatch from '@/pages/purchaseReturn/coms/comReturnDetailCardBatch.vue'
import comScanReturnPack from '@/pages/purchaseReturn/coms/comScanReturnPack.vue'
export default {
@ -108,7 +115,8 @@
comReturnDetailCard,
returnDetailInfoPopup,
jobTop,
comScanReturnPack
comScanReturnPack,
comReturnDetailCardBatch
},
data() {
@ -122,7 +130,9 @@
managementList: [],
jobStatus: "",
poNumber:"",
fromLocationCode:""
fromLocationCode:"",
managementList:[],
managementType:''
};
},
onLoad(option) {
@ -213,6 +223,23 @@
that.detailSource = getDataSource(that.detailSource,that.subList);
that.fromLocationCode =that.subList[0].fromLocationCode
that.poNumber =that.subList[0].poNumber
//
var itemCodes = []
that.detailSource.forEach(item => {
item.Items.forEach((cur)=>{
itemCodes.push(cur.itemCode)
})
item.scaned = false
})
console.log(that.detailSource)
getManagementPrecisions(itemCodes, that.fromLocationCode, res => {
if (res.success) {
this.managementList = res.list;
this.managementType = this.managementList.some(item => item.ManagementPrecision ==
'BY_BATCH') ? 'BY_BATCH' : ''
}
})
} else {
that.showMessage('列表数据为0');
}
@ -350,7 +377,16 @@
title: "提交中....",
mask: true
});
var itemCodes = []
this.detailSource.forEach(item => {
item.Items.forEach(cur=>{
itemCodes.push(cur.itemCode)
})
})
//
getManagementPrecisions(itemCodes, this.fromLocationCode, res => {
if (res.success) {
this.managementList = res.list;
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
purchaseReturnJobsubmit(params).then(res => {
@ -364,6 +400,8 @@
uni.hideLoading()
this.showErrorMessage(error)
})
}
})
},
@ -382,17 +420,16 @@
batch.Records.forEach(r => {
let record = {};
record.handleQty = r.qty;
record.toContainerNumber = r
.ContainerNumber;
record.inventoryStatus = r
.inventoryStatus;
record.toLocationCode = subItem
.toLocationCode;
record.toContainerNumber = r.ContainerNumber;
record.inventoryStatus = r.inventoryStatus;
record.toLocationCode = subItem.toLocationCode;
record.supplierCode = r.supplierCode;
//使
record.toPackingNumber = r
.packingNumber;
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,record.packingNumber, detail.batch);
record.toPackingNumber = info.packingNumber;
record.packingNumber = info.packingNumber;
record.fromPackingNumber = info.packingNumber;
record.fromBatch = r.batch;
record.fromPackingNumber = r.packingNumber
subItem.recordList.push(record);

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

@ -265,6 +265,8 @@
} else {
this.getToLocationBalance(result)
}
}else{
this.getToLocationBalance(result)
}
},

162
src/pages/scrap/coms/comScrapDetailCardBatch.vue

@ -0,0 +1,162 @@
<template>
<view class="" style="background-color: #fff;">
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
<view class='split_line'></view>
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="item.scaned?scanOptions:detailOptions">
<recommendBatch :detail="item" ></recommendBatch>
</uni-swipe-action-item>
</uni-swipe-action>
<view class='split_line'></view>
</view>
<balance-qty-edit ref="qtyEdit" :settingParam="settingParam" @confirm="confirm"></balance-qty-edit>
<scrap-detail-info-popup ref="jobDetailPopup" :dataContent="showItem"></scrap-detail-info-popup>
<comMessage ref="message"></comMessage>
</view>
</template>
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import recommendBatch from '@/mycomponents/recommend/recommendBatch.vue'
import jobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue'
import scrapDetailInfoPopup from '@/pages/scrap/coms/scrapDetailInfoPopup.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import config from '@/static/config.js'
import {
getRemoveOption,
getEditRemoveOption
} from '@/common/array.js';
export default {
components: {
itemQty,
recommendBatch,
jobDetailPopup,
scrapDetailInfoPopup,
balanceQtyEdit,
location,
toLocation,
itemCompareQty,
batch,
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
isEdit: {
type: Boolean,
default: true
},
},
watch: {
},
data() {
return {
showItem: {},
editItem: {
record: {
}
},
detailOptions: [],
scanOptions: [],
options: [],
removeOptions: [],
editAndRemoveOptions: []
}
},
mounted() {
this.removeOptions = getRemoveOption();
this.editAndRemoveOptions = getEditRemoveOption()
},
methods: {
swipeClick(e, item) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item)
}
},
edit(item) {
this.editItem = item;
this.$refs.qtyEdit.openEditPopup(item.balance, item.handleQty);
},
detail(item) {
this.showItem = item;
console.log("提交参数", JSON.stringify(item));
this.$refs.jobDetailPopup.openPopup(item)
},
remove(item) {
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
this.$forceUpdate()
this.$emit('remove', item)
}
});
},
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>
<style>
</style>

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

@ -14,8 +14,11 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comScrapDetailCardBatch :dataContent="item" :index="index" :settingParam="jobContent" @remove="updateData"
@updateData="updateData" v-if="managementType=='BY_BATCH'">
</comScrapDetailCardBatch>
<com-scrap-detail-card :dataContent="item" :index="index" :settingParam="jobContent"
@remove="updateData" @updateData="updateData">
@remove="updateData" @updateData="updateData" v-else>
</com-scrap-detail-card>
</view>
<view class='split_line'></view>
@ -68,6 +71,7 @@
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import comScrapDetailCard from '@/pages/scrap/coms/comScrapDetailCard.vue'
import comScrapDetailCardBatch from '@/pages/scrap/coms/comScrapDetailCardBatch.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import jobTop from '@/mycomponents/job/jobTop.vue'
@ -77,6 +81,7 @@
winScanButton,
winScanPack,
comScrapDetailCard,
comScrapDetailCardBatch,
winScanPackAndLocation,
jobTop
},
@ -91,7 +96,9 @@
toLocationInfo: {},
businessTypeInfo: {},
managementList: [],
jobStatus:""
jobStatus:"",
managementType: '',
jobStatus: ""
};
},
onLoad(option) {
@ -166,7 +173,7 @@
title: "加载中....",
mask: true
});
getScrapJobDetail(that.id).then(res => {
getScrapJobDetail(that.id).then(async res => {
uni.hideLoading();
if (res.data == null) {
that.showMessage('未获取到详情');
@ -175,7 +182,21 @@
that.jobContent = res.data;
that.jobStatus = res.data.status
that.subList = res.data.subList;
that.detailSource = getDataSource(that.subList)
that.detailSource = await getDataSource(that.subList)
//
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
item.scaned = false
})
that.fromLocationCode = that.subList[0].fromLocationCode
await getManagementPrecisions(itemCodes, that.fromLocationCode, res => {
if (res.success) {
this.managementList = res.list;
this.managementType = this.managementList.some(item => item.ManagementPrecision ==
'BY_BATCH') ? 'BY_BATCH' : ''
}
})
} else {
that.showMessage('列表数据为0');
}
@ -336,11 +357,20 @@
}
},
submitJob() {
async submitJob() {
uni.showLoading({
title: "提交中....",
mask: true
});
//
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
item.scaned = false
})
await getManagementPrecisions(itemCodes, that.fromLocationCode, res => {
if (res.success) {
this.managementList = res.list;
//
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
@ -355,7 +385,8 @@
uni.hideLoading()
this.showErrorMessage(error)
})
}
})
},
setParams() {
@ -369,6 +400,10 @@
detail.toInventoryStatus = "";
detail.toLocationCode = "";
detail.toBatch = detail.batch;
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber;
detail.packingNumber = info.packingNumber;
detail.fromPackingNumber = info.packingNumber;
subList.push(detail)
}
})

211
src/pages/unPlanned/coms/comReceiptDetailCardBatch.vue

@ -0,0 +1,211 @@
<template>
<view class="" style="background-color: #fff;">
<!-- <item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :showBalanceQty="false">
</item-qty> -->
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :isShowStdPack="false">
</item-compare-qty>
<view class="" v-for="(item,index) in dataContent.subList">
<uni-swipe-action ref="swipeAction" v-if="index == 0" :class="item.scaned?'scan_view':''">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="(item.scaned&&isEdit)?editAndRemoveOptions : item.scaned? removeOptions:options">
<!-- <recommend :detail="item" :isShowFromLocation="false" :isShowToLocation="true">
</recommend> -->
<view style="display: flex;">
<view style="flex: 1;">
<batch v-if="item.batch" :batch="item.batch"></batch>
<location v-if="item.fromLocationCode" title="来源库位" :locationCode="item.fromLocationCode">
</location>
<to-location v-if="item.toLocationCode" title="目标库位" :locationCode="item.toLocationCode">
</to-location>
</view>
<text style="font-size: 30rpx;color: #2979ff; " @click="copy(item)" v-if="isDevlement()">复制</text>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
<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>
<detail-info-popup ref="detailInfoPopup"></detail-info-popup>
<comMessage ref="message"></comMessage>
</view>
</template>
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import detailInfoPopup from '@/pages/unPlanned/coms/detailInfoPopup.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import config from '@/static/config.js'
import {
getRemoveOption,
getEditRemoveOption
} from '@/common/array.js';
export default {
components: {
itemQty,
recommend,
recommendQtyEdit,
detailInfoPopup,
winScanLocation,
location,
toLocation,
itemCompareQty,
batch,
},
props: {
dataContent: {
type: Object,
default: {}
},
settingParam: {
type: Object,
default: {}
},
isShowLocation: {
type: Boolean,
default: false
},
locationAreaTypeList: {
type: Object,
default: null
},
isEdit: {
type: Boolean,
default: true
},
},
watch: {
dataContent: {
handler(newName, oldName) {
if (this.dataContent.subList.length > 0) {
this.$nextTick(res => {
setTimeout(() => {
if (this.$refs.collapse1) {
this.$refs.collapse1.resize();
}
}, 500)
})
}
},
immediate: true,
deep: true
}
},
data() {
return {
showItem: {},
editItem: {
record: {
}
},
detailOptions: [],
scanOptions: [],
options: [],
removeOptions: [],
editAndRemoveOptions: []
}
},
mounted() {
this.removeOptions = getRemoveOption();
this.editAndRemoveOptions = getEditRemoveOption()
},
methods: {
swipeClick(e, item) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "库位") {
this.showLocation(item)
} else if (e.content.text == "移除") {
this.remove(item)
}
},
edit(item) {
this.editItem = item;
this.$refs.receiptEdit.openTaskEditPopup(item.qty, item.handleQty, item.labelQty);
},
showLocation(item) {
this.locatonItem = item;
this.$refs.scanLocationCode.openScanPopup();
},
//
getLocation(location, code) {
this.locatonItem.toLocationCode = code;
this.$emit('updateData')
},
detail(item) {
this.showItem = item;
this.$refs.detailInfoPopup.openPopup(item)
},
remove(item) {
console.log(item)
this.$refs.message.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
item.scaned = false
item.handleQty = null
this.$forceUpdate()
this.$emit('remove', item)
}
});
},
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>
<style>
</style>

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

@ -18,8 +18,11 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comRecommendDetailCardBatch :dataContent="item" :index="index" :settingParam="jobContent"
@remove="updateData" @updateData="updateData" @openDetail="openDetail" v-if="managementType=='BY_BATCH'">
</comRecommendDetailCardBatch>
<comRecommendDetailCard :dataContent="item" :index="index" :settingParam="jobContent"
@remove="updateData" @updateData="updateData" @openDetail="openDetail">
@remove="updateData" @updateData="updateData" @openDetail="openDetail" v-else>
</comRecommendDetailCard>
</view>
</view>
@ -81,6 +84,7 @@
import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import comRecommendDetailCard from "@/mycomponents/detail/comRecommendDetailCard.vue"
import comRecommendDetailCardBatch from "@/mycomponents/detail/comRecommendDetailCardBatch.vue"
import detailInfoPopup from '@/pages/unPlanned/coms/detailInfoPopup.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
@ -90,6 +94,7 @@
winScanButton,
winScanPackAndLocation,
comRecommendDetailCard,
comRecommendDetailCardBatch,
detailInfoPopup,
jobTop
},
@ -102,6 +107,7 @@
detailSource: [], //
businessTypeInfo: {},
managementList: [],
managementType: '',
jobStatus: ""
};
},
@ -171,7 +177,7 @@
title: "加载中....",
mask: true
});
getUnPlannedIssueJobDetail(that.id).then(res => {
getUnPlannedIssueJobDetail(that.id).then(async res => {
uni.hideLoading();
if (res.data == null) {
that.showMessage('未获取到详情');
@ -183,7 +189,21 @@
that.subList.forEach(item=>{
item.isRecommend = true
})
that.detailSource = getDataSource(that.subList)
that.detailSource = await getDataSource(that.subList)
//
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
item.scaned = false
})
that.fromLocationCode = that.subList[0].fromLocationCode
await getManagementPrecisions(itemCodes, that.fromLocationCode, res => {
if (res.success) {
this.managementList = res.list;
this.managementType = this.managementList.some(item => item.ManagementPrecision ==
'BY_BATCH') ? 'BY_BATCH' : ''
}
})
} else {
that.showErrorMessage('列表数据为0');
}
@ -346,6 +366,14 @@
title: "提交中....",
mask: true
});
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
item.scaned = false
})
getManagementPrecisions(itemCodes, this.fromLocationCode, res => {
if (res.success) {
this.managementList = res.list;
//
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
@ -360,6 +388,11 @@
uni.hideLoading()
this.showErrorMessage(error)
})
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
}
});
},
@ -373,6 +406,10 @@
detail.toPackingNumber = detail.packingNumber;
detail.toContainerNumber = '';
detail.toBatch = detail.batch;
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber;
detail.packingNumber = info.packingNumber;
detail.fromPackingNumber = info.packingNumber;
subList.push(detail)
}
})

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

@ -12,9 +12,13 @@
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comReceiptDetailCardBatch :dataContent="item" :index="index" :settingParam="jobContent"
@remove="updateData" @updateData="updateData"
:locationAreaTypeList='toLocationAreaTypeList' v-if="managementType=='BY_BATCH'">
</comReceiptDetailCardBatch>
<com-receipt-detail-card :dataContent="item" :index="index" :settingParam="jobContent"
@remove="updateData" @updateData="updateData"
:locationAreaTypeList='toLocationAreaTypeList'>
:locationAreaTypeList='toLocationAreaTypeList' v-else>
</com-receipt-detail-card>
</view>
<view class='split_line'></view>
@ -71,6 +75,7 @@
import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import locationCompare from '@/mycomponents/location/locationCompare.vue'
import comReceiptDetailCard from '@/pages/unPlanned/coms/comReceiptDetailCard.vue'
import comReceiptDetailCardBatch from '@/pages/unPlanned/coms/comReceiptDetailCardBatch.vue'
import jobTop from '@/mycomponents/job/jobTop.vue'
export default {
@ -79,6 +84,7 @@
winScanButton,
winScanPack,
comReceiptDetailCard,
comReceiptDetailCardBatch,
locationCompare,
jobTop
},
@ -94,6 +100,7 @@
toLocationInfo: {},
businessTypeInfo: {},
managementList: [],
managementType:'',
jobStatus: "",
jobToLocationCode: ""
};
@ -160,7 +167,7 @@
title: "加载中....",
mask: true
});
getUnPlannedReceiptJobDetail(that.id).then(res => {
getUnPlannedReceiptJobDetail(that.id).then(async res => {
uni.hideLoading();
if (res.data == null) {
that.showMessage('未获取到详情');
@ -168,10 +175,22 @@
if (res.data.subList.length > 0) {
that.jobContent = res.data;
that.jobStatus = res.data.status
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes);
that.toLocationAreaTypeList =getDirectoryItemArray(that.jobContent.toAreaTypes);
that.subList = res.data.subList;
that.jobToLocationCode = that.subList[0].toLocationCode
that.detailSource = getDataSource(that.subList)
that.detailSource =await getDataSource(that.subList)
//
var itemCodes = []
this.detailSource.forEach(item => {
itemCodes.push(item.itemCode)
item.scaned = false
})
getManagementPrecisions(itemCodes, that.jobToLocationCode, res => {
if (res.success) {
this.managementList = res.list;
this.managementType = this.managementList.some(item => item.ManagementPrecision == 'BY_BATCH') ? 'BY_BATCH' : ''
}
})
} else {
that.showErrorMessage('列表数据为0');
}
@ -342,6 +361,8 @@
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber;
detail.packingNumber = info.packingNumber;
detail.fromPackingNumber = info.packingNumber;
detail.toBatch = info.batch;
detail.toLocationCode = this.toLocationCode
detail.toContainerNumber = '';

Loading…
Cancel
Save