Browse Source

计划外出库

intex_online20241111
zhang_li 3 weeks ago
parent
commit
2671100352
  1. 2
      src/common/balance.js
  2. 103
      src/mycomponents/detail/comRecommendDetailCardBatch.vue
  3. 11
      src/pages/unPlanned/coms/comReceiptDetailCard.vue
  4. 10
      src/pages/unPlanned/job/issueJobDetail.vue

2
src/common/balance.js

@ -403,7 +403,7 @@ export function byQuantity(label, locationCode, fromInventoryStatuses, callback)
filters.push({
column: "batch",
action: "==",
value: null
value: label.batch?label.batch:null
})
filters.push({
column: "locationCode",

103
src/mycomponents/detail/comRecommendDetailCardBatch.vue

@ -1,50 +1,45 @@
<template>
<view class="" style="background-color: #fff;">
<uni-collapse ref="collapse1" >
<uni-collapse-item :open="true">
<template v-slot:title>
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowStdPack="false">
</item-compare-qty>
</template>
<view class="" v-for="(item,index) in dataContent.subList" :key="index">
<uni-swipe-action ref="swipeAction">
<uni-swipe-action-item @click="swipeClick($event,item)"
:right-options="(item.scaned&&isEdit)?editAndRemoveOptions : item.scaned? removeOptions:options"
:right-options="item.scaned?scanOptions:detailOptions"
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 v-if="item.isRecommend" class="uni-flex" style="flex-direction: row; align-items: center;background-color: antiquewhite;">
<view class="" style="font-size: 32rpx; color: black; font-weight: bold; text-align: center;">
</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>
<recommend :detail="item" :isShowStatus="isShowStatus" :isShowToLocation="false" style="flex:1">
</recommend>
</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 v-else class="uni-flex" style="flex-direction: row; align-items: center;background-color: antiquewhite; margin-top: 5rpx;">
<view class="" style="font-size: 32rpx; color: red; font-weight: bold; text-align: center;">
</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> -->
<recommend :detail="item" :isShowStatus="isShowStatus" :isShowToLocation="false" style="flex:1">
</recommend>
</view>
</uni-swipe-action-item>
</uni-swipe-action>
</view>
</uni-collapse-item>
</uni-collapse>
<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>
@ -57,14 +52,9 @@
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
getDetailOption,
getPurchaseReceiptOption
} from '@/common/array.js';
export default {
@ -73,11 +63,7 @@
itemCompareQty,
recommend,
balanceQtyEdit,
winScanLocation,
location,
toLocation,
itemCompareQty,
batch,
winScanLocation
},
props: {
dataContent: {
@ -112,10 +98,6 @@
type: Boolean,
default: true
},
isEdit: {
type: Boolean,
default: true
},
},
watch: {
dataContent: {
@ -142,18 +124,18 @@
locatonItem: {},
editItem: {},
detailOptions: [],
scanOptions: [],
options: [],
removeOptions: [],
editAndRemoveOptions: []
scanOptions: []
}
},
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();
},
@ -204,35 +186,6 @@
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>

11
src/pages/unPlanned/coms/comReceiptDetailCard.vue

@ -3,8 +3,11 @@
<uni-collapse ref="collapse1" >
<uni-collapse-item :open="true">
<template v-slot:title>
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :showBalanceQty="false">
</item-qty>
<!-- <item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty" :showBalanceQty="false">
</item-qty> -->
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowStdPack="false">
</item-compare-qty>
</template>
<view class='split_line'></view>
<view class="" v-for="(item,index) in dataContent.subList">
@ -30,6 +33,7 @@
<script>
import itemQty from '@/mycomponents/item/itemQty.vue'
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/job/jobDetailPopup.vue'
@ -47,7 +51,8 @@
recommend,
recommendQtyEdit,
detailInfoPopup,
winScanLocation
winScanLocation,
itemCompareQty
},
props: {
dataContent: {

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

@ -19,7 +19,7 @@
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<comRecommendDetailCardBatch :dataContent="item" :index="index" :settingParam="jobContent"
@remove="updateData" @updateData="updateData" @openDetail="openDetail" v-if="managementType=='BY_BATCH'">
@remove="updateData" @updateData="updateData" @openDetail="openDetail" v-if="managementType=='BY_BATCH' || managementType=='BY_QUANTITY' ">
</comRecommendDetailCardBatch>
<comRecommendDetailCard :dataContent="item" :index="index" :settingParam="jobContent"
@remove="updateData" @updateData="updateData" @openDetail="openDetail" v-else>
@ -200,8 +200,7 @@
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' : ''
this.managementType = this.managementList&& this.managementList[0]&& this.managementList[0].ManagementPrecision ? this.managementList[0].ManagementPrecision : 'BY_PACKAGING'
}
})
} else {
@ -259,13 +258,14 @@
setDataBatch(result){
try {
var packingNumber = result.balance.packingNumber;
var batch = result.balance.batch;
var batch = result.label.batch;
var qty = result.balance.qty;
var itemCode = result.balance.itemCode;
var locationCode = result.balance.locationCode;
var inventoryStatus = result.balance.inventoryStatus;
var detail = this.detailSource.find(r => r.itemCode == itemCode);
console.log(999,detail.subList)
if (detail == undefined) {
this.showErrorMessage("物料号【" + itemCode + "】不在列表中")
} else {
@ -293,7 +293,6 @@
newAdd.balance.packUnit = result.package.packUnit
newAdd.scaned = true;
detail.subList.push(newAdd)
this.calcHandleQty();
} else {
if (itemDetail.scaned) {
itemDetail.handleQty = calc.add(itemDetail.handleQty ,Number(result.label.qty));
@ -301,6 +300,7 @@
// .fromLocationCode + "")
}
}
this.calcHandleQty();
}
} catch (e) {
this.showMessage(e.message)

Loading…
Cancel
Save