Browse Source

物料隔离样式修改

intex_online20241111
zhang_li 3 weeks ago
parent
commit
5a55c1a43e
  1. 10
      src/pages/inventoryMove/coms/comInventoryDetailCard.vue
  2. 203
      src/pages/inventoryMove/coms/comInventoryDetailCardBatch.vue
  3. 11
      src/pages/inventoryMove/job/inventoryMoveDetail.vue

10
src/pages/inventoryMove/coms/comInventoryDetailCard.vue

@ -3,7 +3,11 @@
<uni-collapse ref="collapse1" @change=""> <uni-collapse ref="collapse1" @change="">
<uni-collapse-item :open="true"> <uni-collapse-item :open="true">
<template v-slot:title> <template v-slot:title>
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty> <!-- {{dataContent.handleQty}}
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty> -->
<item-compare-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowStdPack="false">
</item-compare-qty>
</template> </template>
<view class='split_line'></view> <view class='split_line'></view>
<view class="" v-for="(item,index) in dataContent.subList"> <view class="" v-for="(item,index) in dataContent.subList">
@ -27,6 +31,7 @@
<script> <script>
import itemQty from '@/mycomponents/item/itemQty.vue' import itemQty from '@/mycomponents/item/itemQty.vue'
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue' import recommend from '@/mycomponents/recommend/recommend.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import detailInfoPopup from '@/pages/inventoryMove/coms/detailInfoPopup.vue' import detailInfoPopup from '@/pages/inventoryMove/coms/detailInfoPopup.vue'
@ -44,7 +49,8 @@
recommend, recommend,
balanceQtyEdit, balanceQtyEdit,
detailInfoPopup, detailInfoPopup,
winScanLocation winScanLocation,
itemCompareQty
}, },
data() { data() {
return { return {

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

@ -1,203 +0,0 @@
<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>

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

@ -12,15 +12,10 @@
<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" v-else> @openDetail="openDetail">
</comInventoryDetailCard> </comInventoryDetailCard>
</view> </view>
</view> </view>
@ -81,7 +76,6 @@
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'
@ -93,7 +87,6 @@
winScanButton, winScanButton,
winScanPack, winScanPack,
comInventoryDetailCard, comInventoryDetailCard,
comInventoryDetailCardBatch,
winScanPackAndLocation, winScanPackAndLocation,
detailInfoPopup, detailInfoPopup,
jobTop jobTop
@ -292,6 +285,7 @@
calcHandleQty() { calcHandleQty() {
calcHandleQty(this.detailSource) calcHandleQty(this.detailSource)
console.log(this.detailSource)
this.continueScan() this.continueScan()
this.$forceUpdate(); this.$forceUpdate();
}, },
@ -354,6 +348,7 @@
if (itemDetail.scaned) { if (itemDetail.scaned) {
// this.showMessage("" + batch + "") // this.showMessage("" + batch + "")
itemDetail.handleQty =calc.add(itemDetail.handleQty,Number(result.label.qty)); itemDetail.handleQty =calc.add(itemDetail.handleQty,Number(result.label.qty));
this.calcHandleQty();
} else { } else {
let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus); let balanceStatus = getInventoryStatusName(result.balance.inventoryStatus);
let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus); let itemStatus = getInventoryStatusName(itemDetail.inventoryStatus);

Loading…
Cancel
Save