Browse Source

文件修改 文件迁移Vue2升级Vue3 8/2-10/25

hella_vue3
王志国 2 weeks ago
parent
commit
a1faee9aac
  1. 1
      src/common/style/pdabasic.css
  2. 2
      src/main.ts
  3. 3
      src/mycomponents/balance/batch.vue
  4. 4
      src/mycomponents/balance/location.vue
  5. 7
      src/mycomponents/balance/pack.vue
  6. 2
      src/mycomponents/detail/comDetailCard.vue
  7. 3
      src/mycomponents/detail/comRecommendDetailCard.vue
  8. 9
      src/mycomponents/detail/comRecommendDetailCardBatch.vue
  9. 4
      src/mycomponents/item/itemCompareQty.vue
  10. 2
      src/mycomponents/item/itemQty.vue
  11. 4
      src/mycomponents/recommend/recommend.vue
  12. 7
      src/pages/count/coms/comCountDetailcards.vue
  13. 9
      src/pages/count/job/countLightDetail.vue
  14. 4
      src/pages/deliver/coms/comDeliverJobCard.vue
  15. 4
      src/pages/deliver/job/deliverJob.vue
  16. 2
      src/pages/inventoryMove/coms/comInventoryDetailCard.vue
  17. 10
      src/pages/inventoryMove/coms/comMoveJob.vue
  18. 4
      src/pages/inventoryMove/job/holdToOkMoveJob.vue
  19. 6
      src/pages/inventoryMove/job/holdToScrapMoveJob.vue
  20. 6
      src/pages/inventoryMove/job/holdToWipMoveJob.vue
  21. 2
      src/pages/inventoryMove/job/inventoryMoveDetail.vue
  22. 23
      src/pages/inventoryMove/job/okToHoldMoveJob.vue
  23. 4
      src/pages/inventoryMove/job/okToScrapMoveJob.vue
  24. 9
      src/pages/productReceipt/job/productReceiptDetail.vue
  25. 4
      src/pages/productRecycle/job/productRecycleJob.vue
  26. 7
      src/pages/productRecycle/job/productRecycleJobDetail.vue
  27. 2
      src/pages/purchaseReceipt/job/receiptDetail.vue
  28. 10
      src/pages/purchaseReturn/coms/comReturnDetailCardBatch.vue
  29. 439
      src/pages/purchaseReturn/coms/comScanReturnPack.vue
  30. 2
      src/pages/purchaseReturn/job/returnDetailBatch.vue
  31. 5
      src/pages/purchaseReturn/job/returnJob.vue
  32. 2
      src/pages/putaway/job/putawayDetail.vue
  33. 2
      src/pages/unPlanned/coms/comIssueJobCard.vue
  34. 2
      src/pages/unPlanned/job/issueJobDetail.vue
  35. 4
      src/pages/unPlanned/job/receiptJob.vue
  36. 3
      src/pages/unPlanned/job/receiptJobDetail.vue

1
src/common/style/pdabasic.css

@ -741,7 +741,6 @@ page {
.page-header .header-view .header_item {
/* padding-left: 10rpx; */
padding: 5rpx 10rpx;
font-size: 32rpx;
}

2
src/main.ts

@ -36,7 +36,7 @@ export function createApp() {
app.config.globalProperties.$throttle = noclick.throttle;
// 缓存
app.config.globalProperties.$storage = storage
app.component('com-message', comMessage)
app.component('ComMessage', comMessage)

3
src/mycomponents/balance/batch.vue

@ -14,5 +14,6 @@
})
</script>
<style>
<style scoped>
</style>

4
src/mycomponents/balance/location.vue

@ -18,4 +18,6 @@ const props = defineProps({
})
</script>
<style></style>
<style scoped>
</style>

7
src/mycomponents/balance/pack.vue

@ -25,4 +25,9 @@ onMounted(()=>{
})
</script>
<style></style>
<style lang="scss" scoped>
.card_packing_code {
padding: 0;
}
</style>

2
src/mycomponents/detail/comDetailCard.vue

@ -104,7 +104,7 @@ onMounted(() => {
detailOptions.value = getDetailOption()
}
if (scanOptions.value.length == 0) {
scanOptions.value = getPurchaseReceiptOption(settingParam.value.allowModifyQty, false)
scanOptions.value = getPurchaseReceiptOption(props.settingParam.allowModifyQty, false)
}
nextTick((res) => {
collapse.value.init()

3
src/mycomponents/detail/comRecommendDetailCard.vue

@ -14,8 +14,7 @@
@click="(...event)=>swipeClick(event,item)">
<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>
<recommend :detail="item" :isShowStatus="isShowStatus" :isShowToLocation="false">
</recommend>

9
src/mycomponents/detail/comRecommendDetailCardBatch.vue

@ -16,8 +16,8 @@
</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>
<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>
@ -28,9 +28,8 @@
</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>
<location v-if="item.fromLocationCode" title="来源库位"
:locationCode="item.fromLocationCode"></location>
</view>
<!-- <recommend :detail="item" :isShowStatus="isShowStatus" :isShowToLocation="false">
</recommend> -->

4
src/mycomponents/item/itemCompareQty.vue

@ -1,9 +1,9 @@
<template>
<view class="uni-flex uni-row space-between uni-inline-item" style="margin-left: 10px;">
<view class="uni-flex uni-row space-between uni-inline-item" style="margin-left: 10px; flex: 1">
<view>
<item :dataContent="dataContent"></item>
</view>
<view style="width: 40%; display: flex; flex-direction: column; justify-content: flex-end; margin-right: 10rpx; word-break: break-word">
<view style="flex:1;display: flex; flex-direction: column; justify-content: flex-end; margin-right: 10rpx; word-break: break-word">
<recommend-qty v-if="handleQty == 0" :dataContent="dataContent" :isShowStatus="false" :isShowStdPack="true"></recommend-qty>
<compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" :handleQty="Number(handleQty)" :isShowStatus="false" :isShowPackUnit="isShowPackUnit"> </compare-qty>
</view>

2
src/mycomponents/item/itemQty.vue

@ -1,5 +1,5 @@
<template>
<view class="uni-flex uni-row space-between center u-p-t-20 u-p-b-20" style="width: 100%; border-bottom: 1px solid rgba(230, 230, 2300.5)">
<view class="uni-flex uni-row space-between center u-p-t-20 u-p-b-20" style="padding-left:10px;: 100%; border-bottom: 1px solid rgba(230, 230, 2300.5)">
<view style="flex: 1">
<item :dataContent="dataContent"></item>
</view>

4
src/mycomponents/recommend/recommend.vue

@ -1,6 +1,6 @@
<template>
<view :class="detail.scaned ? 'scan_view' : ''" class="u-p-t-1 u-p-b-20">
<view class="uni-flex uni-row space-between u-p-t-20" style="align-items: center">
<view :class="detail.scaned ? 'scan_view' : ''" class="" style="flex: 1;background-color: white">
<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">

7
src/pages/count/coms/comCountDetailcards.vue

@ -60,15 +60,16 @@ const props = defineProps({
default: true
}
})
const emit = defineEmits(['editItem'])
const edit = () => {
emit('editItem', dataContent.value)
emit('editItem', props.dataContent)
}
const isDevlement = () => {
return config.isDevelopment
}
const copy = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
const content = `HPQ;V1.0;I${dataContent.value.itemCode};P${dataContent.value.packingNumber};B${dataContent.value.batch};Q${dataContent.value.qty}`
const content = `HPQ;V1.0;I${props.dataContent.itemCode};P${props.dataContent.packingNumber};B${props.dataContent.batch};Q${props.dataContent.qty}`
uni.setClipboardData({
data: content,
success: () => {
@ -80,7 +81,7 @@ const copy = () => {
}
const copyPro = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100
const content = `HMQ;V1.0;I${dataContent.value.itemCode};P${dataContent.value.packingNumber};B${dataContent.value.batch};Q${dataContent.value.qty}`
const content = `HMQ;V1.0;I${props.dataContent.itemCode};P${props.dataContent.packingNumber};B${props.dataContent.batch};Q${props.dataContent.qty}`
uni.setClipboardData({
data: content,
success: () => {

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

@ -1,10 +1,11 @@
<template>
<view class="page-wraper">
<view class="header">
<view class="">
<view class="page-header">
<view class="header-view">
<view class="header_job_top">
<job-top :dataContent="jobContent"></job-top>
</view>
<view class="cen_card" style="padding-top: 10rpx; padding-bottom: 10rpx">
<view class="cen_card" style="padding:10rpx 0">
<view class="cell_box uni-flex uni-row" style="font-weight: bold">
<view class="cell_info" style="color: #000">
<view class="text_lightblue" style="color: #000">阶段</view>
@ -29,6 +30,7 @@
</view>
</view>
</view>
</view>
<u-line color="#D8D8D8" style="margin-bottom: 10rpx"></u-line>
<view style="margin-top: 160rpx; padding-bottom: 130rpx">
<u-line color="#D8D8D8" style="margin-bottom: 15rpx"></u-line>
@ -202,6 +204,7 @@ const getDetail = () => {
if (res.data == null) {
showMessage('未获取到详情')
} else {
console.log(res);
jobContent.value = res.data
jobStatus.value = res.data.status
fromLocationCode.value = jobContent.value.countSplitCode

4
src/pages/deliver/coms/comDeliverJobCard.vue

@ -1,8 +1,8 @@
<template>
<job-com-main-card :dataContent="dataContent">
<jobComMainDetailCard :isShowDeliverType="isShowDeliverType" :dataContent="dataContent"></jobComMainDetailCard>
<view class="card_view" style="margin-left: 10px">
<text class="card_packing_code">发货类型</text>
<view class="card_view" style="margin-bottom: 10rpx">
<text class="card_packing_code" style="padding:0;">发货类型</text>
<text class="card_content">{{ dataContent.deliverType == 'CUST' ? '寄售库发货' : '三方库发货' }}</text>
</view>
</job-com-main-card>

4
src/pages/deliver/job/deliverJob.vue

@ -168,11 +168,11 @@ const openJobDetail = (item) => {
managementType = managementList.some(cur => cur.ManagementPrecision == 'BY_BATCH') ?
'BY_BATCH' : ''
if (managementType == 'BY_BATCH') {
proxy.$tab.navigateTo({
uni.navigateTo({
url: './deliverDetailBatch?id=' + item.masterId + '&status=' + item.status+'&title='+this.title
});
} else {
proxy.$tab.navigateTo(`./deliverDetail?id=${item.masterId}&status=${item.status}&title=${title.value}`)
uni.navigateTo(`./deliverDetail?id=${item.masterId}&status=${item.status}&title=${title.value}`)
}
}
})

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

@ -3,7 +3,9 @@
<u-collapse ref="collapse1" @change="">
<u-collapse-item :open="true">
<template v-slot:title>
<view style="flex: 1">
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</view>
</template>
<view class="split_line"></view>
<u-swipe-action :show="detail.show" :index="index" v-for="(detail, index) in dataContent.subList" :key="index" :options="detail.scaned ? scanOptions : detailOptions" bg-color="rgba(255,255,255,0)" class="u-m-b-20" @click="(...event) => swipeClick(event, detail)">

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

@ -21,7 +21,7 @@
<script setup lang="ts">
import { ref, getCurrentInstance, onMounted, nextTick, watch } from 'vue'
import { getInventoryMoveJobList, cancleTakeInventoryMoveJob } from '@/api/request2.js'
import {onShow} from '@dcloudio/uni-app'
import { goHome, getCurrDate } from '@/common/basic.js'
import { getDetailOption, getDetailGiveupOption } from '@/common/array.js'
@ -77,7 +77,12 @@ onMounted(() => {
nextTick(() => {
detailOptions.value = getDetailOption()
detailGiveupOptions.value = getDetailGiveupOption()
// refresh()
})
})
onShow(()=>{
setTimeout(()=>{
getList('refresh')
})
})
const updateTitle = () => {
@ -167,7 +172,6 @@ const getList = (type) => {
loadingType.value = 'nomore'
return
}
console.log(jobList.value)
pageNo.value++
updateTitle()
})

4
src/pages/inventoryMove/job/holdToOkMoveJob.vue

@ -12,9 +12,9 @@ import comMoveJob from '@/pages/inventoryMove/coms/comMoveJob.vue'
const receiptjob = ref()
const title = ref('')
onShow(() => {
if(receiptjob.value){
setTimeout(()=>{
receiptjob.value.refresh()
}
},100)
})
onLoad((option) => {
title.value = option.title

6
src/pages/inventoryMove/job/holdToScrapMoveJob.vue

@ -9,12 +9,12 @@ import { ref, getCurrentInstance, nextTick } from 'vue'
import { onShow, onNavigationBarButtonTap, onReady, onReachBottom, onPullDownRefresh ,onLoad} from '@dcloudio/uni-app'
import comMoveJob from '@/pages/inventoryMove/coms/comMoveJob.vue'
const receiptjob = ref()
const receiptjob = ref(null)
const title = ref('')
onShow(() => {
if(receiptjob.value){
setTimeout(()=>{
receiptjob.value.refresh()
}
},100)
})
onLoad((option) => {
title.value = option.title

6
src/pages/inventoryMove/job/holdToWipMoveJob.vue

@ -7,7 +7,7 @@
<script lang="ts" setup>
import {ref} from 'vue'
import {onLoad, onShow, onPullDownRefresh, onReachBottom, onNavigationBarButtonTap} from '@dcloudio/uni-app'
import comMoveJob from '@/pages/inventoryMove/coms/comMoveJob.vue'
import ComMoveJob from '@/pages/inventoryMove/coms/comMoveJob.vue'
const title = ref('')
const comMoveJob = ref('')
@ -15,9 +15,9 @@ onLoad((option) => {
title.value = option.title
})
onShow(()=> {
if (comMoveJob.value) {
setTimeout(()=>{
comMoveJob.value.refresh();
}
},100)
})
onPullDownRefresh(()=> {
if (comMoveJob.value) {

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

@ -1,7 +1,7 @@
<template>
<view class="page-wraper">
<view class="page-header">
<view class="page-header-box">
<view class="header-view">
<view class="header_job_top">
<job-top :dataContent="jobContent"></job-top>
</view>

23
src/pages/inventoryMove/job/okToHoldMoveJob.vue

@ -7,34 +7,33 @@
<script setup lang="ts">
import { ref, getCurrentInstance, nextTick } from 'vue'
import { onShow, onNavigationBarButtonTap, onReady, onReachBottom, onPullDownRefresh ,onLoad} from '@dcloudio/uni-app'
import comMoveJob from '@/pages/inventoryMove/coms/comMoveJob.vue'
import ComMoveJob from '@/pages/inventoryMove/coms/comMoveJob.vue'
const receiptjob = ref()
const comMoveJob = ref()
const title = ref('')
onShow(() => {
if(receiptjob.value){
receiptjob.value.refresh()
}
setTimeout(()=>{
comMoveJob.value.refresh()
},100)
})
onLoad((option) => {
title.value = option.title
})
onPullDownRefresh(() => {
if(receiptjob.value){
receiptjob.value.refresh()
if(comMoveJob.value){
comMoveJob.value.refresh()
}
})
onReachBottom(() => {
if(receiptjob.value){
receiptjob.value.onReach()
if(comMoveJob.value){
comMoveJob.value.onReach()
}
})
onNavigationBarButtonTap((e) => {
if (e.index === 0) {
receiptjob.value.goHome1()
// this.$refs.receiptjob.refresh();
comMoveJob.value.goHome1()
} else if (e.index == 1) {
receiptjob.value.openFilter()
comMoveJob.value.openFilter()
}
})
</script>

4
src/pages/inventoryMove/job/okToScrapMoveJob.vue

@ -12,9 +12,9 @@ import comMoveJob from '@/pages/inventoryMove/coms/comMoveJob.vue'
const receiptjob = ref()
const title = ref('')
onShow(() => {
if(receiptjob.value){
setTimeout(()=>{
receiptjob.value.refresh()
}
},100)
})
onLoad((option) => {
title.value = option.title

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

@ -1,13 +1,9 @@
<template>
<view class="page-wraper">
<view class="page-header">
<view class="page-header-box">
<view class="header-view">
<view class="header_job_top">
<job-top :dataContent="jobContent"></job-top>
</view>
</view>
</view>
<view class="cen_card" style="padding: 20rpx 0px 0px">
<view class="cell_box uni-flex uni-row">
<view class="cell_info">
@ -36,6 +32,9 @@
</view>
</view>
</view>
</view>
</view>
</view>
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">

4
src/pages/productRecycle/job/productRecycleJob.vue

@ -52,9 +52,9 @@ const comMessageRef = ref()
const jobInfoPopupRef = ref()
const jobListPopupRef = ref()
onShow(() => {
nextTick(() => {
setTimeout(()=>{
getList('refresh')
})
},100)
})
onLoad((option) => {
title.value = option.title

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

@ -1,7 +1,7 @@
<template>
<view class="page-wraper">
<view class="page-header">
<view class="page-header-box">
<view class="header-view">
<view class="header_job_top">
<job-top :dataContent="jobContent"></job-top>
</view>
@ -13,7 +13,7 @@
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class="">
<view class="" v-if="managementType.length > 0">
<comDetailCardBatch :dataContent="item" :index="index" :settingParam="jobContent" :isShowStatus="false"
@remove="updateData" @updateData="updateData" @openDetail="openDetail"
:locationAreaTypeList='toLocationAreaTypeList' v-if="managementType == 'BY_BATCH'">
@ -75,6 +75,7 @@ const scanPopup = ref()
const comMessageRef = ref()
const jobDetailPopup = ref()
const fromLocationCode = ref()
const toLocationAreaTypeList = ref([])
onLoad((option) => {
uni.setNavigationBarTitle({
title: `${option.title}详情`
@ -153,7 +154,7 @@ const getDetail = () => {
detailSource.value = await getDataSource(subList.value);
//
let itemCodes = []
this.detailSource.forEach(item => {
detailSource.value.forEach(item => {
itemCodes.push(item.itemCode)
item.scaned = false
})

2
src/pages/purchaseReceipt/job/receiptDetail.vue

@ -1,7 +1,7 @@
<template>
<view class="page-wraper">
<view class="page-header">
<view class="page-header-box">
<view class="header-view">
<view class="header_job_top">
<jobTopAsn :dataContent="jobContent"></jobTopAsn>
</view>

10
src/pages/purchaseReturn/coms/comReturnDetailCardBatch.vue

@ -1,15 +1,13 @@
<template>
<view>
<view v-for="(item,index) in dataContent.subList">
<view class="split_line"></view>
<!-- 物品 -->
<u-swipe-action ref="swipeAction" :class="item.scaned?'scan_view':''"
:options="(item.scaned&&isEdit)?editAndRemoveOptions : item.scaned? removeOptions:options"
@click="(...event)=>itemCoceClick(event,item,index)" >
<item-qty :dataContent="item" :isShowBalanceQty="false" :handleQty="item.handleQty"></item-qty>
<location :locationCode="item.fromLocationCode">
</location>
<location :locationCode="item.fromLocationCode"></location>
<batch :batch="item.batch"></batch>
</u-swipe-action>
</view>
@ -29,8 +27,8 @@
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 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'
@ -73,7 +71,7 @@ const collapse = ref(null);
const balanceQtyEdit = ref(null);
const receiptHint = ref(null);
const message = ref(null);
const options = ref([])
onMounted(() => {
removeOptions.value = getRemoveOption();
editAndRemoveOptions.value = getEditRemoveOption();

439
src/pages/purchaseReturn/coms/comScanReturnPack.vue

@ -576,445 +576,6 @@ const cancle = () => {
const emit = defineEmits(['closeScan', 'updateData']);
</script>
export default {
name: 'winScanPack',
components: {
winComScan,
balance,
balanceQtyEdit,
balanceSelect
},
props: {
title: {
type: String,
default: ''
},
headerType: {
type: String,
default: "HPQ,HMQ"
},
allowModifyLocation:{
type:Boolean,
default:false
}
},
data() {
return {
dataContent: {},
jobContent: {},
expendIcon: 'arrow-down',
show: false,
scanList: [],
toLocation: null,
toLocationCode: '',
fromLocationList: [],
fromLocationCode: '',
fromLocation: null,
issueRecord: [], //退
expand: true,
scanOptions: {},
editItem: {},
positionInfo: "请选择位置",
positionList: [],
defaultValueList: [],
label: {},
fromInventoryStatuses: [],
packageInfo: {}
}
},
created() {
},
watch: {},
mounted() {
this.detailOptions = getDetailOption();
this.scanOptions = getDetailEditRemoveOption();
},
methods: {
openScanPopup(content, jobcontent) {
this.issueRecord = [];
this.dataContent = content;
this.jobContent = jobcontent;
this.initData();
this.positionInfo = this.jobContent.workShopCode + "-" + this.jobContent.subList[0].productionLineCode +
"-" + this.jobContent.subList[0].workStationCode
this.$refs.popup.open('bottom')
setTimeout(res => {
this.getfocus();
}, 500)
},
closeScanPopup() {
this.losefocus()
this.$refs.popup.close();
this.$emit("closeScan")
//
// Object.assign(this.$data, this.$options.data());
},
initData() {
let that = this;
that.fromLocationList = [];
if (that.dataContent != null) {
that.fromInventoryStatuses = getDirectoryItemArray(this.jobContent.outInventoryStatuses)
that.toLocation = that.dataContent[0];
that.toLocationCode = that.dataContent[0].toLocationCode;
that.fromLocationList = that.getFromLocationList();
}
},
showBalanceSelect(items, packageInfo) {
this.packageInfo = packageInfo;
this.$refs.balanceSelect.openPopup(items);
},
getFromLocationList() {
let list = [];
this.dataContent.forEach(location=>{
location.Items.forEach(item => {
item.Locations.forEach(f => {
list.push(f.fromLocationCode)
})
})
})
this.fromLocationCode = list[0];
return list;
},
fromLocationUpdate(fromlocation) {
let location = this.fromLocationList.find(r => r == fromlocation)
// 退--
// if (location == undefined) {
this.fromLocationCode = fromlocation
// this.showErrorMessage('退' + fromlocation + '')
// }
},
onScan(result) {
try {
let that = this;
if (that.fromLocationCode == '') {
that.showErrorMessage('请选择来源库位', res => {
that.$refs.toLocationCombox.onFocus();
});
return;
}
let packageInfo = result.package;
let itemCode = result.label.itemCode;
let packingCode = result.label.packingNumber;
let lot = result.label.batch;
let item = that.toLocation.Items.find(r => r.itemCode == itemCode);
if (item == undefined) {
that.showErrorMessage('未查找到物料【' + itemCode + '】的退货明细',
res => {
that.getfocus();
}
)
return;
} else {
//
uni.showLoading({
title: '加载中',
mask: true
})
getBalanceByManagementPrecision(result.label, that.fromLocationCode, that.fromInventoryStatuses,
balanceRes => {
if (balanceRes.success) {
if (balanceRes.data.list.length == 0) {
this.showErrorMessage('在来源库位[' + this.fromLocationCode + '],未查找到该包装的库存记录',
res => {
this.packGetFocus();
})
} else if (balanceRes.data.list.length == 1) {
let balance = balanceRes.data.list[0];
this.afterGetBalance(result.label, balance, packageInfo);
} else {
this.label = result.label;
this.showBalanceSelect(balanceRes.data.list, packageInfo);
}
} else {
this.showErrorMessage(balanceRes.message.message);
}
uni.hideLoading();
});
}
} catch (e) {
this.showErrorMessage(e.stack)
uni.hideLoading();
}
},
selectBalanceItem(balance) {
this.afterGetBalance(balance, balance, this.packageInfo);
},
afterGetBalance(label, balance, packageInfo) {
let that = this;
try {
let itemCode = label.itemCode;
let packingCode = label.packingNumber;
let lot = label.batch;
let item = that.toLocation.Items.find(r => r.itemCode == itemCode);
let fromLocation = item.Locations.find(l => l.fromLocationCode == that.fromLocationCode);
// 退--
if(!fromLocation){
fromLocation = {
Batchs:[{
Recommends:[],
Records: [],
batch: label.batch,
detail:{
...packageInfo,
fromLocationCode: balance.locationCode,
toLocationCode:this.toLocationCode
},
handleQty: 0,
packingNumber: null,
// packingNumber: label.packingNumber,
qty: label.qty,
uom: label.uom
}],
toLocationCode:this.toLocationCode,
fromLocationCode: balance.locationCode,
handleQty: 0,
qty: label.qty,
uom: label.uom
}
item.Locations.push(fromLocation)
}
if (fromLocation != undefined) {
let batch = fromLocation.Batchs.find(r => r.batch == lot);
if (batch != undefined) {
if (batch.Records == undefined) {
batch.Records = [];
}
let record = batch.Records.find(r => r.packingNumber == packingCode);
if (record == undefined) {
//
if (batch.Recommends&&batch.Recommends.length > 0) {
let recommend = batch.Recommends.find(r => r.packingNumber == packingCode);
if (recommend != undefined) {
that.addRecord(batch, label, balance, packageInfo)
} else {
//
if (this.jobContent.allowModifyPackingNumber == 'TRUE') {
that.addRecord(batch, label, balance, packageInfo);
} else {
that.showErrorMessage('未查找到该箱码【' + packingCode + '】的明细',
res => {
that.getfocus();
}
)
}
}
} else {
that.addRecord(batch, label, balance, packageInfo)
}
} else {
that.showErrorMessage('箱码【' + packingCode + '】已经扫描,请继续扫描下一箱',
res => {
that.getfocus();
}
)
}
} else {
if (this.jobContent.allowModifyBatch == "TRUE") {
this.showQuestionMessage('在【' + that.fromLocationCode + '】库位下,未查找到批次【' + lot +
'】的退货明细,是否要继续退货?', res => {
if (res) {
let batch = that.createBatchInfo(label, balance,packageInfo);
fromLocation.Batchs.unshift(batch);
}
})
} else {
that.showErrorMessage("未查找到\n物料【"+itemCode+"】批次【" + lot +" 】的退货明细",
res => {
that.getfocus();
});
}
}
} else {
that.showErrorMessage('未查找到推荐库位【' + that.fromLocationCode + '】的退货明细',
res => {
that.getfocus();
}
)
}
} catch (e) {
that.showErrorMessage(e.stack,
res => {
that.getfocus();
}
)
}
},
createBatchInfo(data, balance, packageInfo) {
let batch = {
batch: data.lot||data.batch,
qty: 0,
uom: data.uom,
handleQty: Number(data.qty),
Records: [],
detail:{
fromLocationCode:this.fromLocationCode, //balance.locationCode
toLocationCode:this.toLocationCode,
itemCode:data.itemCode,
handleQty: Number(data.qty),
packingNumber:data.packingNumber,
qty: 0,
uom:data.uom,
itemName:packageInfo.itemName,
itemDesc1:packageInfo.itemDesc1,
itemDesc2:packageInfo.itemDesc2,
singlePrice:balance.singlePrice,
amount:balance.amount
}
}
let record = this.creatRecord(data, balance, packageInfo);
batch.Records.push(record);
this.issueRecord.unshift(record)
return batch;
},
creatRecord(label, balance, packageInfo) {
balance.packQty = packageInfo.packQty
balance.packUnit = packageInfo.packUnit
let record = {
scaned: true,
itemCode: label.itemCode,
packingNumber: label.packingNumber,
batch: label.batch,
qty: Number(label.qty) > Number(balance.qty) ? Number(balance.qty) : Number(label.qty),
uom: balance.uom,
inventoryStatus: balance.inventoryStatus,
balance: balance,
toLocationCode: this.toLocationCode,
supplierCode: label.supplierCode,
packUnit: packageInfo.packUnit,
packQty: packageInfo.packQty,
singlePrice:balance.singlePrice,
amount:balance.amount
}
return record;
},
calcBatchHandleQty(batch) {
let handleQty = 0;
batch.Records.forEach(res => {
handleQty = calc.add(handleQty, res.qty)
})
batch.handleQty = handleQty;
},
addRecord(batch, label, balance, packageInfo) {
let record = this.creatRecord(label, balance, packageInfo);
batch.Records.push(record);
this.issueRecord.unshift(record)
this.calcBatchHandleQty(batch);
this.$emit('updateData', "");
this.getfocus();
},
getfocus() {
if (this.$refs.comscan != undefined) {
this.$refs.comscan.getfocus();
}
},
losefocus() {
if (this.$refs.comscan != undefined) {
this.$refs.comscan.losefocus();
}
},
expands() {
this.expand = !this.expand;
this.expendIcon = this.expand == true ? "arrow-down" : "arrow-up"
},
swipeClick(e, item, index) {
if (e.content.text == "详情") {
this.detail(item)
} else if (e.content.text == "编辑") {
this.edit(item)
} else if (e.content.text == "移除") {
this.remove(item, index)
}
},
edit(item) {
this.editItem = item;
// item.balance.balanceQty = item.balance.qty;
item.balance.balanceQty = item.balance.qty;
this.$refs.balanceQtyEdit.openEditPopup(item.balance, item.qty);
},
detail(item) {
this.showItem = item;
this.$refs.receiptHint.openScanPopup()
},
remove(record, index) {
this.showQuestionMessage("确定移除扫描信息?",
res => {
if (res) {
record.qty = 0;
this.issueRecord.splice(index, 1)
let item = this.toLocation.Items.find(r => r.itemCode == record.itemCode);
if (item != undefined) {
item.Locations.forEach(l => {
let batch = l.Batchs.find(b => b.packingNumber == record.packingNumber && b
.batch == record.batch);
let rIndex = batch.Records.findIndex(r => r.packingNumber == record
.packingNumber && r
.batch == record.batch);
batch.Records.splice(rIndex, 1);
})
}
this.$emit('updateData', item);
}
});
},
packGetFocus() {
this.$refs.comscan.getfocus();
},
packLoseFocus() {
this.$refs.comscan.losefocus();
},
showMessage(message, callback) {
setTimeout(r => {
this.packLoseFocus();
this.$refs.comMessageRef.showMessage(message, callback);
})
},
showErrorMessage(message, callback) {
setTimeout(r => {
this.packLoseFocus();
this.$refs.comMessageRef.showErrorMessage(message, callback);
})
},
showQuestionMessage(message, callback) {
setTimeout(r => {
this.packLoseFocus();
this.$refs.comMessageRef.showQuestionMessage(message, callback);
})
},
confirm(val) {
this.editItem.qty = Number(val);
this.$emit('updateData', this.editItem)
},
cancle() {
this.closeScanPopup()
}
}
}
</script>
<style lang="scss">
button {
border: none;

2
src/pages/purchaseReturn/job/returnDetailBatch.vue

@ -22,9 +22,11 @@
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list">
<comReturnDetailCardBatch ref='comIssueDetailCard' :dataContent="detailSource" :settingParam="jobContent"
@updateData='updateData' v-if="managementType == 'BY_BATCH'">
</comReturnDetailCardBatch>
</view>
</scroll-view>
</view>

5
src/pages/purchaseReturn/job/returnJob.vue

@ -53,9 +53,10 @@ const managementType = ref('')
const managementList = ref([])
const jobListPopup = ref(null)
onShow(() => {
nextTick(() => {
setTimeout(()=>{
getList('refresh')
})
},100)
})
onLoad((option) => {
title.value = option.title

2
src/pages/putaway/job/putawayDetail.vue

@ -1,7 +1,7 @@
<template>
<view class="page-wraper">
<view class="page-header">
<view class="page-header-box">
<view class="header-view">
<view class="header_job_top">
<job-top :dataContent="jobContent"></job-top>
</view>

2
src/pages/unPlanned/coms/comIssueJobCard.vue

@ -1,7 +1,7 @@
<template>
<job-com-main-card :dataContent="dataContent">
<jobComMainDetailCard :dataContent="dataContent" :isShowToLocation="false"></jobComMainDetailCard>
<view class="task_item" style="margin-left:22rpx;">
<view class="task_item">
<view class="task_text">
<view class="card_view">
<text class="card_packing_code ">目的地</text>

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

@ -1,7 +1,7 @@
<template>
<view class="page-wraper">
<view class="page-header">
<view class="page-header-box">
<view class="header-view">
<view class="header_job_top">
<job-top :dataContent="jobContent"></job-top>
</view>

4
src/pages/unPlanned/job/receiptJob.vue

@ -63,9 +63,9 @@ const jobInfoPopupRef = ref()
const jobListPopupRef = ref()
const scanPopup = ref()
onShow(() => {
nextTick(() => {
setTimeout(()=>{
getList('refresh')
})
},100)
})
onLoad((option) => {
title.value = option.title

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

@ -1,12 +1,11 @@
<template>
<view class="page-wraper">
<view class="page-header">
<view class="page-header-box">
<view class="header-view">
<view class="header_job_top">
<job-top :dataContent="jobContent"></job-top>
</view>
<view class="header_item"> 申请单号 : {{ jobContent.requestNumber }} </view>
<view class="split_line"></view>
</view>
</view>

Loading…
Cancel
Save