|
|
@ -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> |
|
|
|