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. 118
      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. 99
      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. 70
      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. 85
      src/pages/purchaseReturn/job/returnDetail.vue
  25. 2
      src/pages/repleinsh/coms/comScanReplishPack.vue
  26. 162
      src/pages/scrap/coms/comScrapDetailCardBatch.vue
  27. 71
      src/pages/scrap/job/scrapJobDetail.vue
  28. 211
      src/pages/unPlanned/coms/comReceiptDetailCardBatch.vue
  29. 69
      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({ filters.push({
column: "packingNumber", column: "packingNumber",
action: "==", action: "==",
value: null value: ''
}) })
filters.push({ filters.push({
column: "locationCode", 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 pack from '@/mycomponents/balance/pack.vue'
import detailList from '@/mycomponents/detail/detailList.vue' import detailList from '@/mycomponents/detail/detailList.vue'
import packageList from '@/mycomponents/package/packageList.vue' import packageList from '@/mycomponents/package/packageList.vue'
import packageListBatch from '@/mycomponents/package/packageListBatch.vue'
import location from '@/mycomponents/balance/location.vue' import location from '@/mycomponents/balance/location.vue'
import toLocation from '@/mycomponents/balance/toLocation.vue' import toLocation from '@/mycomponents/balance/toLocation.vue'
import batch from '@/mycomponents/balance/batch.vue' import batch from '@/mycomponents/balance/batch.vue'
@ -52,7 +51,6 @@
receiptDetailInfoPopup, receiptDetailInfoPopup,
detailList, detailList,
packageList, packageList,
packageListBatch,
location, location,
toLocation, toLocation,
batch, 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;"> <view style="word-break: break-all;">
<!-- <container v-if="isShowContainer&&detail.containerNumber!=null" :container="detail.containerNumber"> <!-- <container v-if="isShowContainer&&detail.containerNumber!=null" :container="detail.containerNumber">
</container> --> </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> <batch v-if="isShowBatch && detail.batch!=null" :batch="detail.batch"></batch>
<location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode"> <location v-if="isShowFromLocation" title="来源库位" :locationCode="detail.fromLocationCode">
</location> </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(); uni.hideLoading();
if (res.success) { if (res.success) {
this.managementPrecision = res.managementPrecision this.managementPrecision = res.managementPrecision
if (this.managementPrecision == 'BY_BATCH') {
res.data.list.forEach(item => {
item.packingNumber = ''
})
}
this.chooseWhich = '2' this.chooseWhich = '2'
if (res.data && res.data.list && res.data.list.length > 1) { if (res.data && res.data.list && res.data.list.length > 1) {
this.showBalanceSelect(res.data.list); 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="uni-flex uni-row space-between " style="align-items: center;" >
<view class=""> <view class="">
<item :dataContent="dataContent" style="margin-left: 15rpx;"></item> <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> <batch :batch="dataContent.batch"></batch>
</view> </view>
<view class=""> <view class="">

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

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

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

@ -16,11 +16,15 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <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" <comLableDetailCard :dataContent="item" :settingParam="jobContent"
:isShowStatus="false" :isShowStatus="false"
:isShowLocation="false" :isShowLocation="false"
@remove="updateData" @updateData="updateData" @openDetail="openDetail" @remove="updateData" @updateData="updateData" @openDetail="openDetail"
:locationAreaTypeList="toLocationAreaTypeList"> :locationAreaTypeList="toLocationAreaTypeList" v-else>
</comLableDetailCard > </comLableDetailCard >
</view> </view>
</view> </view>
@ -80,6 +84,7 @@
import winScanPack from '@/mycomponents/scan/winScanPack.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import locationCompare from '@/mycomponents/location/locationCompare.vue' import locationCompare from '@/mycomponents/location/locationCompare.vue'
import comLableDetailCard from "@/mycomponents/detail/comLableDetailCard.vue" import comLableDetailCard from "@/mycomponents/detail/comLableDetailCard.vue"
import comDetailCardBatch from "@/mycomponents/detail/comDetailCardBatch.vue"
import detailInfoPopup from '@/pages/customerReturn/coms/detailInfoPopup.vue' import detailInfoPopup from '@/pages/customerReturn/coms/detailInfoPopup.vue'
import jobTop from '@/mycomponents/job/jobTop.vue' import jobTop from '@/mycomponents/job/jobTop.vue'
@ -90,7 +95,8 @@
winScanPack, winScanPack,
locationCompare, locationCompare,
comLableDetailCard , comLableDetailCard ,
detailInfoPopup detailInfoPopup,
comDetailCardBatch
}, },
data() { data() {
return { return {
@ -100,6 +106,7 @@
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
managementList: [], managementList: [],
managementType:'',
fromLocationCode: "", fromLocationCode: "",
toLocationCode: "", toLocationCode: "",
toLocationAreaTypeList: [], toLocationAreaTypeList: [],
@ -190,6 +197,19 @@
that.toLocationCode = that.subList[0].toLocationCode that.toLocationCode = that.subList[0].toLocationCode
} }
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes) 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 { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
} }
@ -379,6 +399,8 @@
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch); detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber; detail.toPackingNumber = info.packingNumber;
detail.packingNumber = info.packingNumber;
detail.fromPackingNumber = info.packingNumber;
detail.toContainerNumber = detail.containerNumber; detail.toContainerNumber = detail.containerNumber;
detail.toBatch = info.batch; detail.toBatch = info.batch;
detail.toLocationCode = detail.toLocationCode; 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"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <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" <comInventoryDetailCard :dataContent="item" :settingParam="jobContent" @remove="updateData"
@updateData='updateData' :locationAreaTypeList="toLocationAreaTypeList" @updateData='updateData' :locationAreaTypeList="toLocationAreaTypeList"
:allowEditQty ="jobContent.allowModifyQty=='TRUE'?true:false" :allowEditQty ="jobContent.allowModifyQty=='TRUE'?true:false"
@openDetail="openDetail"> @openDetail="openDetail" v-else>
</comInventoryDetailCard> </comInventoryDetailCard>
</view> </view>
</view> </view>
@ -72,6 +77,7 @@
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPack from '@/mycomponents/scan/winScanPack.vue' import winScanPack from '@/mycomponents/scan/winScanPack.vue'
import comInventoryDetailCard from '@/pages/inventoryMove/coms/comInventoryDetailCard.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 winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import detailInfoPopup from '@/pages/inventoryMove/coms/detailInfoPopup.vue' import detailInfoPopup from '@/pages/inventoryMove/coms/detailInfoPopup.vue'
import jobTop from '@/mycomponents/job/jobTop.vue' import jobTop from '@/mycomponents/job/jobTop.vue'
@ -83,6 +89,7 @@
winScanButton, winScanButton,
winScanPack, winScanPack,
comInventoryDetailCard, comInventoryDetailCard,
comInventoryDetailCardBatch,
winScanPackAndLocation, winScanPackAndLocation,
detailInfoPopup, detailInfoPopup,
jobTop jobTop
@ -97,6 +104,7 @@
toLocationInfo: {}, toLocationInfo: {},
businessTypeInfo: {}, businessTypeInfo: {},
managementList: [], managementList: [],
managementType:'',
businessTypeCode: '', businessTypeCode: '',
toLocationCode: '', toLocationCode: '',
toInventoryStatus: '', toInventoryStatus: '',
@ -224,7 +232,7 @@
mask: true mask: true
}); });
getInventoryMoveJobDetail(that.id).then(res => { getInventoryMoveJobDetail(that.id).then(async res => {
uni.hideLoading(); uni.hideLoading();
if (res.data == null) { if (res.data == null) {
that.showMessage('未获取到详情'); that.showMessage('未获取到详情');
@ -234,7 +242,21 @@
that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes); that.toLocationAreaTypeList = getDirectoryItemArray(that.jobContent.toAreaTypes);
that.jobStatus = res.data.status that.jobStatus = res.data.status
that.subList = res.data.subList; 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 { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
} }
@ -490,6 +512,8 @@
var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode, var info = getPackingNumberAndBatchByList(this.managementList, detail.itemCode,
detail.packingNumber, detail.toLocationCode, detail.batch); detail.packingNumber, detail.toLocationCode, detail.batch);
detail.toPackingNumber = info.packingNumber; detail.toPackingNumber = info.packingNumber;
detail.packingNumber = info.packingNumber;
detail.fromPackingNumber = info.packingNumber;
detail.toBatch = info.batch; detail.toBatch = info.batch;
detail.toContainerNumber = ''; detail.toContainerNumber = '';
// detail.toLocationCode = this.toLocationCode; // 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 { } else {
this.getToLocationBalance(result) this.getToLocationBalance(result)
} }
}else{
this.queryBalance(result)
} }
}, },

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

@ -19,11 +19,14 @@
:productionLineCode="toLocation.productionLineCode" :productionLineCode="toLocation.productionLineCode"
:workStationCode="toLocation.workStationCode" :rawLocationCode="toLocation.toLocationCode"> :workStationCode="toLocation.workStationCode" :rawLocationCode="toLocation.toLocationCode">
</work-station> --> </work-station> -->
<comIssueDetailCardBatch ref='comIssueDetailCard' :dataContent="toLocation" :settingParam="jobContent"
@updateData='updateData' v-if="managementType == 'BY_BATCH'">
</comIssueDetailCardBatch>
<com-issue-detail-card <com-issue-detail-card
ref='comIssueDetailCard' ref='comIssueDetailCard'
:dataContent="toLocation" :dataContent="toLocation"
:settingParam="jobContent" :settingParam="jobContent"
@updateData='updateData'> @updateData='updateData' v-else>
</com-issue-detail-card> </com-issue-detail-card>
<view class="split_line"></view> <view class="split_line"></view>
</view> </view>
@ -82,6 +85,7 @@
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue' import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import comIssueDetailCard from '@/pages/issue/coms/comIssueDetailCard.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 winScanButton from '@/mycomponents/scan/winScanButton.vue'
import comScanIssuePack from '@/pages/issue/coms/comScanIssuePack.vue' import comScanIssuePack from '@/pages/issue/coms/comScanIssuePack.vue'
import jobTop from '@/mycomponents/job/jobTop.vue' import jobTop from '@/mycomponents/job/jobTop.vue'
@ -97,7 +101,8 @@
comScanIssuePack, comScanIssuePack,
jobTop, jobTop,
workStation, workStation,
balanceSelect balanceSelect,
comIssueDetailCardBatch
}, },
data() { data() {
return { return {
@ -108,7 +113,9 @@
detailOptions: [], detailOptions: [],
scanOptions: [], scanOptions: [],
jobStatus: "", jobStatus: "",
scanMessage: '' scanMessage: '',
managementList: [],
managementType: ""
}; };
}, },
@ -206,11 +213,27 @@
that.subList = res.data.subList; that.subList = res.data.subList;
that.detailSource = getDataSource(that.detailSource, that.subList) that.detailSource = getDataSource(that.detailSource, that.subList)
that.jobContent.detailToLocationCode = res.data.subList[0].toLocationCode that.jobContent.detailToLocationCode = res.data.subList[0].toLocationCode
that.fromLocationCode = that.subList[0].fromLocationCode
// //
if (this.scanMessage) { if (this.scanMessage) {
this.openScanPopupSimulate(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 => { setTimeout(r => {
that.resizeCollapse(); that.resizeCollapse();
}, 100) }, 100)
@ -241,34 +264,7 @@
this.resizeCollapse(); 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() { submit() {
uni.showLoading({ uni.showLoading({
@ -334,50 +330,33 @@
let record = {}; let record = {};
record.handleQty = r.qty; record.handleQty = r.qty;
record.fromPackingNumber = r record.fromPackingNumber = r.packingNumber;
.packingNumber;
record.fromBatch = r.batch; record.fromBatch = r.batch;
record.fromContainerNumber = r record.fromContainerNumber = r.ContainerNumber;
.ContainerNumber;
record.toContainerNumber = r
.ContainerNumber;
record.toInventoryStatus = r
.inventoryStatus;
// record.toLocationCode = subItem
// .toLocationCode;
record.toLocationCode = this.jobContent record.toContainerNumber = r.ContainerNumber;
.detailToLocationCode; record.toInventoryStatus = r.inventoryStatus;
record.toLocationCode = this.jobContent.detailToLocationCode;
record.supplierCode = r.supplierCode; record.supplierCode = r.supplierCode;
let single_price = r.balance let single_price = r.balance.singlePrice == null ? 0 : r.balance.singlePrice;
.singlePrice == null ? 0 : r
.balance
.singlePrice;
record.singlePrice = single_price; record.singlePrice = single_price;
record.amount = single_price * r.qty; record.amount = single_price * r.qty;
//使 //使
if (item.onTheWayLocationCode) { if (item.onTheWayLocationCode) {
record.toPackingNumber = r record.toPackingNumber = r.packingNumber;
.packingNumber;
record.toBatch = r.batch; record.toBatch = r.batch;
} else { } else {
var info = var info =getPackingNumberAndBatch(this.managementList, r.itemCode,r.packingNumber, r.batch);
getPackingNumberAndBatch( record.toPackingNumber = info.packingNumber;
this.managementList, r record.packingNumber = info.packingNumber;
.itemCode, record.fromPackingNumber = info.packingNumber;
r.packingNumber, r
.batch);
record.toPackingNumber = info
.packingNumber;
record.toBatch = info.batch; record.toBatch = info.batch;
} }
record.fromParentPackingNumber = r record.fromParentPackingNumber = r.parentPackingNumber;
.parentPackingNumber;
subItem.recordList.push(record); subItem.recordList.push(record);
}) })
subList.push(deepCopyData(subItem)); subList.push(deepCopyData(subItem));

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

@ -14,9 +14,13 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <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" <com-detail-card :dataContent="item" :index="index" :settingParam="jobContent"
:isShowStatus="false" @remove="updateData" @updateData="updateData" @openDetail="openDetail" :isShowStatus="false" @remove="updateData" @updateData="updateData" @openDetail="openDetail"
:locationAreaTypeList='toLocationAreaTypeList'> :locationAreaTypeList='toLocationAreaTypeList' v-else>
</com-detail-card> </com-detail-card>
</view> </view>
</view> </view>
@ -86,6 +90,7 @@
import locationCompare from '@/mycomponents/location/locationCompare.vue' import locationCompare from '@/mycomponents/location/locationCompare.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue" import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import comDetailCardBatch from "@/mycomponents/detail/comDetailCardBatch.vue"
import detailInfoPopup from '@/pages/productPutaway/coms/detailInfoPopup.vue' import detailInfoPopup from '@/pages/productPutaway/coms/detailInfoPopup.vue'
import jobTop from '@/mycomponents/job/jobTop.vue' import jobTop from '@/mycomponents/job/jobTop.vue'
@ -96,6 +101,7 @@
winScanPackAndLocation, winScanPackAndLocation,
locationCompare, locationCompare,
comDetailCard, comDetailCard,
comDetailCardBatch,
detailInfoPopup, detailInfoPopup,
jobTop jobTop
}, },
@ -107,6 +113,7 @@
subList: [], //subList subList: [], //subList
detailSource: [], // detailSource: [], //
managementList: [], managementList: [],
managementType:'',
fromLocationCode: "", fromLocationCode: "",
toLocationCode: "", toLocationCode: "",
toLocationAreaTypeList: [], toLocationAreaTypeList: [],
@ -201,7 +208,7 @@
title: "加载中....", title: "加载中....",
mask: true mask: true
}); });
getProductPutawayJobDetail(that.id).then(res => { getProductPutawayJobDetail(that.id).then(async res => {
uni.hideLoading(); uni.hideLoading();
if (res.data == null) { if (res.data == null) {
that.showMessage('未获取到详情'); that.showMessage('未获取到详情');
@ -213,7 +220,7 @@
that.fromLocationCode = that.subList[0].fromLocationCode that.fromLocationCode = that.subList[0].fromLocationCode
that.jobToLocationCode = that.subList[0].toLocationCode that.jobToLocationCode = that.subList[0].toLocationCode
that.toLocationAreaTypeList = getLocationTypeArray(that.jobContent.toAreaTypes) that.toLocationAreaTypeList = getLocationTypeArray(that.jobContent.toAreaTypes)
that.detailSource = getDataSource(that.subList) that.detailSource =await getDataSource(that.subList)
that.isCheckLocation = getSwitchInfoByCode(that.switchCode) that.isCheckLocation = getSwitchInfoByCode(that.switchCode)
if (that.isCheckLocation) { if (that.isCheckLocation) {
@ -224,7 +231,19 @@
if (this.scanMessage) { if (this.scanMessage) {
this.openScanPopupSimulate(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 { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
} }
@ -252,7 +271,7 @@
}, },
updateData() { updateData() {
this.calcHandleQty(); // this.calcHandleQty();
}, },
openDetail(item) { openDetail(item) {
@ -328,7 +347,7 @@
this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【" + result this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【" + result
.fromLocationCode + "】不在列表中") .fromLocationCode + "】不在列表中")
} else { } else {
detail.scaned = true
if (!itemDetail.cancleScanedHiht && itemDetail.scaned) { if (!itemDetail.cancleScanedHiht && itemDetail.scaned) {
this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【" + result this.showErrorMessage("箱码【" + packingNumber + "】,批次【" + batch + "】库位【" + result
.fromLocationCode + "】已经扫描") .fromLocationCode + "】已经扫描")
@ -485,6 +504,8 @@
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch); detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber; detail.toPackingNumber = info.packingNumber;
detail.packingNumber = info.packingNumber;
detail.fromPackingNumber = info.packingNumber;
detail.toBatch = info.batch; detail.toBatch = info.batch;
detail.toContainerNumber = ''; detail.toContainerNumber = '';
detail.toLocationCode = this.toLocationCode; 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=""> <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" <comProductDetailCard :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData" @remove="updateData" @updateData="updateData"
:locationAreaTypeList='toLocationAreaTypeList'> :locationAreaTypeList='toLocationAreaTypeList' v-else>
</comProductDetailCard> </comProductDetailCard>
</view> </view>
</view> </view>
@ -112,6 +116,7 @@
import comDetailCard from "@/mycomponents/detail/comDetailCard.vue" import comDetailCard from "@/mycomponents/detail/comDetailCard.vue"
import jobTop from '@/mycomponents/job/jobTop.vue' import jobTop from '@/mycomponents/job/jobTop.vue'
import comProductDetailCard from "@/pages/productReceipt/coms/comProductDetailCard.vue" import comProductDetailCard from "@/pages/productReceipt/coms/comProductDetailCard.vue"
import comProductDetailCardBatch from "@/pages/productReceipt/coms/comProductDetailCardBatch.vue"
export default { export default {
@ -122,7 +127,8 @@
locationCompare, locationCompare,
winScanPack, winScanPack,
jobTop, jobTop,
comProductDetailCard comProductDetailCard,
comProductDetailCardBatch
}, },
data() { data() {
return { return {
@ -140,6 +146,7 @@
jobToLocationCode: "", jobToLocationCode: "",
scanMessage: "", scanMessage: "",
status: '', status: '',
managementType:''
}; };
}, },
onLoad(option) { onLoad(option) {
@ -233,6 +240,19 @@
if (that.scanMessage) { if (that.scanMessage) {
this.$refs.scanPopup.simulateScan(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 { } else {
that.showMessage('列表数据为0'); that.showMessage('列表数据为0');
} }
@ -255,6 +275,7 @@
if (detail == undefined) { if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中") this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else { } else {
detail.scaned = true
var itemDetail = detail.subList.find(r => var itemDetail = detail.subList.find(r =>
r.packingNumber == packingNumber && r.packingNumber == packingNumber &&
r.batch == batch); r.batch == batch);
@ -289,7 +310,7 @@
updateData() { updateData() {
calcHandleQty(this.detailSource); // calcHandleQty(this.detailSource);
}, },
@ -457,6 +478,8 @@
var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
detail.packingNumber, detail.batch); detail.packingNumber, detail.batch);
detail.toPackingNumber = info.packingNumber; detail.toPackingNumber = info.packingNumber;
detail.packingNumber = info.packingNumber;
detail.fromPackingNumber = info.packingNumber;
detail.toBatch = info.batch; detail.toBatch = info.batch;
detail.toContainerNumber = ''; detail.toContainerNumber = '';
detail.toInventoryStatus = detail.inventoryStatus detail.toInventoryStatus = detail.inventoryStatus

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

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

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

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

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

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

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

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

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

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

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

@ -265,6 +265,8 @@
} else { } else {
this.getToLocationBalance(result) 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>

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

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

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

@ -18,8 +18,11 @@
<scroll-view scroll-y="true" class="page-main-scroll"> <scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <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" <comRecommendDetailCard :dataContent="item" :index="index" :settingParam="jobContent"
@remove="updateData" @updateData="updateData" @openDetail="openDetail"> @remove="updateData" @updateData="updateData" @openDetail="openDetail" v-else>
</comRecommendDetailCard> </comRecommendDetailCard>
</view> </view>
</view> </view>
@ -81,6 +84,7 @@
import winScanButton from '@/mycomponents/scan/winScanButton.vue' import winScanButton from '@/mycomponents/scan/winScanButton.vue'
import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue" import winScanPackAndLocation from "@/mycomponents/scan/winScanPackAndLocation.vue"
import comRecommendDetailCard from "@/mycomponents/detail/comRecommendDetailCard.vue" import comRecommendDetailCard from "@/mycomponents/detail/comRecommendDetailCard.vue"
import comRecommendDetailCardBatch from "@/mycomponents/detail/comRecommendDetailCardBatch.vue"
import detailInfoPopup from '@/pages/unPlanned/coms/detailInfoPopup.vue' import detailInfoPopup from '@/pages/unPlanned/coms/detailInfoPopup.vue'
import jobTop from '@/mycomponents/job/jobTop.vue' import jobTop from '@/mycomponents/job/jobTop.vue'
@ -90,6 +94,7 @@
winScanButton, winScanButton,
winScanPackAndLocation, winScanPackAndLocation,
comRecommendDetailCard, comRecommendDetailCard,
comRecommendDetailCardBatch,
detailInfoPopup, detailInfoPopup,
jobTop jobTop
}, },
@ -102,6 +107,7 @@
detailSource: [], // detailSource: [], //
businessTypeInfo: {}, businessTypeInfo: {},
managementList: [], managementList: [],
managementType: '',
jobStatus: "" jobStatus: ""
}; };
}, },
@ -171,7 +177,7 @@
title: "加载中....", title: "加载中....",
mask: true mask: true
}); });
getUnPlannedIssueJobDetail(that.id).then(res => { getUnPlannedIssueJobDetail(that.id).then(async res => {
uni.hideLoading(); uni.hideLoading();
if (res.data == null) { if (res.data == null) {
that.showMessage('未获取到详情'); that.showMessage('未获取到详情');
@ -183,7 +189,21 @@
that.subList.forEach(item=>{ that.subList.forEach(item=>{
item.isRecommend = true 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 { } else {
that.showErrorMessage('列表数据为0'); that.showErrorMessage('列表数据为0');
} }
@ -346,20 +366,33 @@
title: "提交中....", title: "提交中....",
mask: true mask: true
}); });
// var itemCodes = []
var params = this.setParams() this.detailSource.forEach(item => {
console.log("提交参数", JSON.stringify(params)); itemCodes.push(item.itemCode)
unPlannedIssueJobSubmit(params).then(res => { item.scaned = false
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功\n生成计划外出库记录\n" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
}) })
getManagementPrecisions(itemCodes, this.fromLocationCode, res => {
if (res.success) {
this.managementList = res.list;
//
var params = this.setParams()
console.log("提交参数", JSON.stringify(params));
unPlannedIssueJobSubmit(params).then(res => {
uni.hideLoading()
if (res.data) {
this.showCommitSuccessMessage("提交成功\n生成计划外出库记录\n" + res.data)
} else {
this.showErrorMessage("提交失败[" + res.msg + "]")
}
}).catch(error => {
uni.hideLoading()
this.showErrorMessage(error)
})
} else {
uni.hideLoading();
this.showErrorMessage(res.message);
}
});
}, },
@ -373,6 +406,10 @@
detail.toPackingNumber = detail.packingNumber; detail.toPackingNumber = detail.packingNumber;
detail.toContainerNumber = ''; detail.toContainerNumber = '';
detail.toBatch = detail.batch; 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) subList.push(detail)
} }
}) })

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

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

Loading…
Cancel
Save