zhang_li
4 months ago
30 changed files with 2313 additions and 208 deletions
@ -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> |
@ -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> |
@ -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> |
@ -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> |
@ -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> |
@ -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> |
@ -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> |
@ -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> |
@ -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> |
Loading…
Reference in new issue