Browse Source

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

hella_vue3
王志国 3 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. 5
      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. 53
      src/pages/count/job/countLightDetail.vue
  14. 4
      src/pages/deliver/coms/comDeliverJobCard.vue
  15. 4
      src/pages/deliver/job/deliverJob.vue
  16. 4
      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. 57
      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. 8
      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 { .page-header .header-view .header_item {
/* padding-left: 10rpx; */ /* padding-left: 10rpx; */
padding: 5rpx 10rpx;
font-size: 32rpx; font-size: 32rpx;
} }

2
src/main.ts

@ -36,7 +36,7 @@ export function createApp() {
app.config.globalProperties.$throttle = noclick.throttle; app.config.globalProperties.$throttle = noclick.throttle;
// 缓存 // 缓存
app.config.globalProperties.$storage = storage 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> </script>
<style> <style scoped>
</style> </style>

4
src/mycomponents/balance/location.vue

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

7
src/mycomponents/balance/pack.vue

@ -25,4 +25,9 @@ onMounted(()=>{
}) })
</script> </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() detailOptions.value = getDetailOption()
} }
if (scanOptions.value.length == 0) { if (scanOptions.value.length == 0) {
scanOptions.value = getPurchaseReceiptOption(settingParam.value.allowModifyQty, false) scanOptions.value = getPurchaseReceiptOption(props.settingParam.allowModifyQty, false)
} }
nextTick((res) => { nextTick((res) => {
collapse.value.init() collapse.value.init()

5
src/mycomponents/detail/comRecommendDetailCard.vue

@ -14,10 +14,9 @@
@click="(...event)=>swipeClick(event,item)"> @click="(...event)=>swipeClick(event,item)">
<view v-if="item.isRecommend" class="uni-flex" style="flex-direction: row; align-items: center;background-color: antiquewhite;"> <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 class="" style="font-size: 32rpx; color: black; font-weight: bold; text-align: center;">
</view> </view>
<recommend :detail="item" :isShowStatus="isShowStatus" :isShowToLocation="false"> <recommend :detail="item" :isShowStatus="isShowStatus" :isShowToLocation="false">
</recommend> </recommend>
</view> </view>
<view v-else class="uni-flex" style="flex-direction: row; align-items: center;background-color: antiquewhite; margin-top: 5rpx;"> <view v-else class="uni-flex" style="flex-direction: row; align-items: center;background-color: antiquewhite; margin-top: 5rpx;">

9
src/mycomponents/detail/comRecommendDetailCardBatch.vue

@ -16,8 +16,8 @@
</view> </view>
<view class="" style="flex:1;"> <view class="" style="flex:1;">
<batch v-if="item.batch" :batch="item.batch"></batch> <batch v-if="item.batch" :batch="item.batch"></batch>
<location v-if="item.fromLocationCode" title="来源库位" :locationCode="item.fromLocationCode"> <location v-if="item.fromLocationCode" title="来源库位"
</location> :locationCode="item.fromLocationCode"></location>
</view> </view>
<text style="font-size: 30rpx;color: #2979ff; " @click="copy(item)" v-if="isDevlement()">复制</text> <text style="font-size: 30rpx;color: #2979ff; " @click="copy(item)" v-if="isDevlement()">复制</text>
</view> </view>
@ -28,9 +28,8 @@
</view> </view>
<view class="scan_view" style="flex:1;"> <view class="scan_view" style="flex:1;">
<batch v-if="item.batch" :batch="item.batch"></batch> <location v-if="item.fromLocationCode" title="来源库位"
<location v-if="item.fromLocationCode" title="来源库位" :locationCode="item.fromLocationCode"> :locationCode="item.fromLocationCode"></location>
</location>
</view> </view>
<!-- <recommend :detail="item" :isShowStatus="isShowStatus" :isShowToLocation="false"> <!-- <recommend :detail="item" :isShowStatus="isShowStatus" :isShowToLocation="false">
</recommend> --> </recommend> -->

4
src/mycomponents/item/itemCompareQty.vue

@ -1,9 +1,9 @@
<template> <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> <view>
<item :dataContent="dataContent"></item> <item :dataContent="dataContent"></item>
</view> </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> <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> <compare-qty v-else :dataContent="dataContent" :recommendQty="Number(dataContent.qty)" :handleQty="Number(handleQty)" :isShowStatus="false" :isShowPackUnit="isShowPackUnit"> </compare-qty>
</view> </view>

2
src/mycomponents/item/itemQty.vue

@ -1,5 +1,5 @@
<template> <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"> <view style="flex: 1">
<item :dataContent="dataContent"></item> <item :dataContent="dataContent"></item>
</view> </view>

4
src/mycomponents/recommend/recommend.vue

@ -1,6 +1,6 @@
<template> <template>
<view :class="detail.scaned ? 'scan_view' : ''" class="u-p-t-1 u-p-b-20"> <view :class="detail.scaned ? 'scan_view' : ''" class="" style="flex: 1;background-color: white">
<view class="uni-flex uni-row space-between u-p-t-20" style="align-items: center"> <view class="uni-flex uni-row space-between" style="align-items: center">
<!-- uni-inline-item 暂时拿掉--> <!-- uni-inline-item 暂时拿掉-->
<view style="word-break: break-all"> <view style="word-break: break-all">
<!-- <container v-if="isShowContainer&&detail.containerNumber!=null" :container="detail.containerNumber"> <!-- <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 default: true
} }
}) })
const emit = defineEmits(['editItem'])
const edit = () => { const edit = () => {
emit('editItem', dataContent.value) emit('editItem', props.dataContent)
} }
const isDevlement = () => { const isDevlement = () => {
return config.isDevelopment return config.isDevelopment
} }
const copy = () => { const copy = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 // 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({ uni.setClipboardData({
data: content, data: content,
success: () => { success: () => {
@ -80,7 +81,7 @@ const copy = () => {
} }
const copyPro = () => { const copyPro = () => {
// HPQ;V1.0;ICE115F11161AG;PP20230427000026;B20230427002;Q100 // 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({ uni.setClipboardData({
data: content, data: content,
success: () => { success: () => {

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

@ -1,30 +1,32 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class="header"> <view class="page-header">
<view class=""> <view class="header-view">
<job-top :dataContent="jobContent"></job-top> <view class="header_job_top">
</view> <job-top :dataContent="jobContent"></job-top>
<view class="cen_card" style="padding-top: 10rpx; padding-bottom: 10rpx"> </view>
<view class="cell_box uni-flex uni-row" style="font-weight: bold"> <view class="cen_card" style="padding:10rpx 0">
<view class="cell_info" style="color: #000"> <view class="cell_box uni-flex uni-row" style="font-weight: bold">
<view class="text_lightblue" style="color: #000">阶段</view> <view class="cell_info" style="color: #000">
<view style="color: #000">{{ getCountStageNameValue(jobContent.stage) }}</view> <view class="text_lightblue" style="color: #000">阶段</view>
</view> <view style="color: #000">{{ getCountStageNameValue(jobContent.stage) }}</view>
<view class="cell_info"> </view>
<view class="text_lightblue" style="color: #000">策略</view> <view class="cell_info">
<view style="color: #000">{{ isOpenCount(jobContent.isOpenCount) }}</view> <view class="text_lightblue" style="color: #000">策略</view>
</view> <view style="color: #000">{{ isOpenCount(jobContent.isOpenCount) }}</view>
<view class="cell_info"> </view>
<view class="text_lightblue" style="color: #000">库位</view> <view class="cell_info">
<view style="color: #000">{{ fromLocationCode }}</view> <view class="text_lightblue" style="color: #000">库位</view>
</view> <view style="color: #000">{{ fromLocationCode }}</view>
<view class="cell_info"> </view>
<view class="text_lightblue" style="color: #000">总数</view> <view class="cell_info">
<view style="color: #000"> {{ allCount }}</view> <view class="text_lightblue" style="color: #000">总数</view>
</view> <view style="color: #000"> {{ allCount }}</view>
<view class="cell_info"> </view>
<view class="text_lightblue" style="color: #000">已扫描</view> <view class="cell_info">
<view style="color: #000">{{ scanCount }}</view> <view class="text_lightblue" style="color: #000">已扫描</view>
<view style="color: #000">{{ scanCount }}</view>
</view>
</view> </view>
</view> </view>
</view> </view>
@ -202,6 +204,7 @@ const getDetail = () => {
if (res.data == null) { if (res.data == null) {
showMessage('未获取到详情') showMessage('未获取到详情')
} else { } else {
console.log(res);
jobContent.value = res.data jobContent.value = res.data
jobStatus.value = res.data.status jobStatus.value = res.data.status
fromLocationCode.value = jobContent.value.countSplitCode fromLocationCode.value = jobContent.value.countSplitCode

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

@ -1,8 +1,8 @@
<template> <template>
<job-com-main-card :dataContent="dataContent"> <job-com-main-card :dataContent="dataContent">
<jobComMainDetailCard :isShowDeliverType="isShowDeliverType" :dataContent="dataContent"></jobComMainDetailCard> <jobComMainDetailCard :isShowDeliverType="isShowDeliverType" :dataContent="dataContent"></jobComMainDetailCard>
<view class="card_view" style="margin-left: 10px"> <view class="card_view" style="margin-bottom: 10rpx">
<text class="card_packing_code">发货类型</text> <text class="card_packing_code" style="padding:0;">发货类型</text>
<text class="card_content">{{ dataContent.deliverType == 'CUST' ? '寄售库发货' : '三方库发货' }}</text> <text class="card_content">{{ dataContent.deliverType == 'CUST' ? '寄售库发货' : '三方库发货' }}</text>
</view> </view>
</job-com-main-card> </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') ? managementType = managementList.some(cur => cur.ManagementPrecision == 'BY_BATCH') ?
'BY_BATCH' : '' 'BY_BATCH' : ''
if (managementType == 'BY_BATCH') { if (managementType == 'BY_BATCH') {
proxy.$tab.navigateTo({ uni.navigateTo({
url: './deliverDetailBatch?id=' + item.masterId + '&status=' + item.status+'&title='+this.title url: './deliverDetailBatch?id=' + item.masterId + '&status=' + item.status+'&title='+this.title
}); });
} else { } 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}`)
} }
} }
}) })

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

@ -3,7 +3,9 @@
<u-collapse ref="collapse1" @change=""> <u-collapse ref="collapse1" @change="">
<u-collapse-item :open="true"> <u-collapse-item :open="true">
<template v-slot:title> <template v-slot:title>
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty> <view style="flex: 1">
<item-qty :dataContent="dataContent" :handleQty="dataContent.handleQty"></item-qty>
</view>
</template> </template>
<view class="split_line"></view> <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)"> <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"> <script setup lang="ts">
import { ref, getCurrentInstance, onMounted, nextTick, watch } from 'vue' import { ref, getCurrentInstance, onMounted, nextTick, watch } from 'vue'
import { getInventoryMoveJobList, cancleTakeInventoryMoveJob } from '@/api/request2.js' import { getInventoryMoveJobList, cancleTakeInventoryMoveJob } from '@/api/request2.js'
import {onShow} from '@dcloudio/uni-app'
import { goHome, getCurrDate } from '@/common/basic.js' import { goHome, getCurrDate } from '@/common/basic.js'
import { getDetailOption, getDetailGiveupOption } from '@/common/array.js' import { getDetailOption, getDetailGiveupOption } from '@/common/array.js'
@ -77,7 +77,12 @@ onMounted(() => {
nextTick(() => { nextTick(() => {
detailOptions.value = getDetailOption() detailOptions.value = getDetailOption()
detailGiveupOptions.value = getDetailGiveupOption() detailGiveupOptions.value = getDetailGiveupOption()
// refresh()
})
})
onShow(()=>{
setTimeout(()=>{
getList('refresh')
}) })
}) })
const updateTitle = () => { const updateTitle = () => {
@ -167,7 +172,6 @@ const getList = (type) => {
loadingType.value = 'nomore' loadingType.value = 'nomore'
return return
} }
console.log(jobList.value)
pageNo.value++ pageNo.value++
updateTitle() updateTitle()
}) })

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

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

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

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

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

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

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

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

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

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

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

@ -1,37 +1,36 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class="page-header"> <view class="page-header">
<view class="page-header-box"> <view class="header-view">
<view class="header_job_top"> <view class="header_job_top">
<job-top :dataContent="jobContent"></job-top> <job-top :dataContent="jobContent"></job-top>
</view> <view class="cen_card" style="padding: 20rpx 0px 0px">
</view> <view class="cell_box uni-flex uni-row">
</view> <view class="cell_info">
<view class="text_lightblue">车间</view>
<view class="cen_card" style="padding: 20rpx 0px 0px"> <view>
<view class="cell_box uni-flex uni-row"> {{ jobContent.workShopCode }}
<view class="cell_info"> </view>
<view class="text_lightblue">车间</view> </view>
<view> <view class="cell_info">
{{ jobContent.workShopCode }} <view class="text_lightblue">生产线</view>
</view> <view>
</view> {{ productionLineCode }}
<view class="cell_info"> </view>
<view class="text_lightblue">生产线</view> </view>
<view> <view class="cell_info">
{{ productionLineCode }} <view class="text_lightblue">班组</view>
</view> <view>
</view> {{ jobContent.team }}
<view class="cell_info"> </view>
<view class="text_lightblue">班组</view> </view>
<view> <view class="cell_info">
{{ jobContent.team }} <view class="text_lightblue">班次</view>
</view> <view>
</view> {{ jobContent.shiftName }}
<view class="cell_info"> </view>
<view class="text_lightblue">班次</view> </view>
<view> </view>
{{ jobContent.shiftName }}
</view> </view>
</view> </view>
</view> </view>

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

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

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

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

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

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

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

@ -1,15 +1,13 @@
<template> <template>
<view> <view>
<view v-for="(item,index) in dataContent.subList"> <view v-for="(item,index) in dataContent.subList">
<view class="split_line"></view> <view class="split_line"></view>
<!-- 物品 --> <!-- 物品 -->
<u-swipe-action ref="swipeAction" :class="item.scaned?'scan_view':''" <u-swipe-action ref="swipeAction" :class="item.scaned?'scan_view':''"
:options="(item.scaned&&isEdit)?editAndRemoveOptions : item.scaned? removeOptions:options" :options="(item.scaned&&isEdit)?editAndRemoveOptions : item.scaned? removeOptions:options"
@click="(...event)=>itemCoceClick(event,item,index)" > @click="(...event)=>itemCoceClick(event,item,index)" >
<item-qty :dataContent="item" :isShowBalanceQty="false" :handleQty="item.handleQty"></item-qty> <item-qty :dataContent="item" :isShowBalanceQty="false" :handleQty="item.handleQty"></item-qty>
<location :locationCode="item.fromLocationCode"> <location :locationCode="item.fromLocationCode"></location>
</location>
<batch :batch="item.batch"></batch> <batch :batch="item.batch"></batch>
</u-swipe-action> </u-swipe-action>
</view> </view>
@ -29,8 +27,8 @@
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue' import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.vue'
import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue' import jobDetailPopup from '@/mycomponents/job/jobDetailPopup.vue'
import requiredLocation from '@/mycomponents/location/requiredLocation.vue' import requiredLocation from '@/mycomponents/location/requiredLocation.vue'
import balanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue' import BalanceQtyEdit from '@/mycomponents/qty/balanceQtyEdit.vue'
import location from '@/mycomponents/balance/location.vue' import Location from '@/mycomponents/balance/location.vue'
import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue' import detailInfoPopup from '@/pages/productionReceipt/coms/detailInfoPopup.vue'
import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue' import comIssueRequestInfo from '@/pages/issue/coms/comIssueRequestInfo.vue'
import batch from '@/mycomponents/balance/batch.vue' import batch from '@/mycomponents/balance/batch.vue'
@ -73,7 +71,7 @@ const collapse = ref(null);
const balanceQtyEdit = ref(null); const balanceQtyEdit = ref(null);
const receiptHint = ref(null); const receiptHint = ref(null);
const message = ref(null); const message = ref(null);
const options = ref([])
onMounted(() => { onMounted(() => {
removeOptions.value = getRemoveOption(); removeOptions.value = getRemoveOption();
editAndRemoveOptions.value = getEditRemoveOption(); editAndRemoveOptions.value = getEditRemoveOption();

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

@ -576,445 +576,6 @@ const cancle = () => {
const emit = defineEmits(['closeScan', 'updateData']); const emit = defineEmits(['closeScan', 'updateData']);
</script> </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"> <style lang="scss">
button { button {
border: none; border: none;

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Loading…
Cancel
Save