Browse Source

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

hella_vue3
王志国 2 weeks ago
parent
commit
ce11ed696e
  1. 2
      src/mycomponents/scan/winScanItem.vue
  2. 2
      src/pages/count/job/countJob.vue
  3. 10
      src/pages/count/job/fuzzyCountJob.vue
  4. 43
      src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue
  5. 2
      src/pages/purchaseReceipt/job/purchaseReceipt.vue
  6. 10
      src/pages/purchaseReceipt/job/receiptDetail.vue
  7. 4
      src/pages/purchaseReceipt/job/receiptJob.vue

2
src/mycomponents/scan/winScanItem.vue

@ -52,8 +52,8 @@ const scan = ref()
const expendIcon = ref('arrow-down')
const comMessageRef = ref()
const openScanPopup = () => {
isShow.value = true
setTimeout((res) => {
isShow.value = true
getfocus()
}, 500)
}

2
src/pages/count/job/countJob.vue

@ -78,7 +78,7 @@ const queryParams = reactive({
fromLocationCode: ""
} )
onShow(() => {
nextTick(() => {
setTimeout(()=>{
getList('refresh')
})
})

10
src/pages/count/job/fuzzyCountJob.vue

@ -3,12 +3,10 @@
<com-empty-view v-if="jobList.length == 0"></com-empty-view>
<job-filter ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday" @switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" :checkedWaitTask="checkedWaitTask"> </job-filter>
<view v-if="jobList.length > 0">
<uni-swipe-action ref="swipeAction">
<view v-for="(item, index) in jobList" :key="index">
<uni-swipe-action-item :right-options="item.status == '2' ? detailGiveupOptions : detailOptions" @click="swipeClick($event, item)">
<com-fuzzy-count-job-card :dataContent="item" @click="openJobDetail(item)"></com-fuzzy-count-job-card>
</uni-swipe-action-item>
</view>
<uni-swipe-action ref="swipeAction" v-for="(item, index) in jobList" :key="index"
@click="(...event)=>swipeClick(event, item)"
:options="item.status == '2' ? detailGiveupOptions : detailOptions">
<com-fuzzy-count-job-card :dataContent="item" @click="openJobDetail(item)"></com-fuzzy-count-job-card>
</uni-swipe-action>
<job-list-popup ref="jobListPopup" @selectedItem="selectedItem"></job-list-popup>

43
src/pages/purchaseReceipt/coms/comReceiptDetailCardBacth.vue

@ -2,17 +2,19 @@
<view class="" style="background-color: #fff;">
<u-collapse ref="collapse">
<u-collapse-item :open="true">
<template v-slot:title>
<u-swipe-action @click="(...event)=>swipeClick(event,dataContent)"
options="dataContent.handleQty>0? removeOptions:options"
:class="dataContent.scaned?'scan_view':''">
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowPackUnit="false"></itemCompareQty>
<batch v-if="dataContent.subList[0].batch" :batch="dataContent.subList[0].batch"></batch>
<location title="来源库位" v-if="dataContent.subList[0].fromLocationCode"
:locationCode="dataContent.subList[0].fromLocationCode">
</location>
</u-swipe-action>
<template #title>
<view style="flex: 1">
<u-swipe-action @click="(...event)=>swipeClick(event,dataContent)"
:options="dataContent.handleQty>0? removeOptions:options"
:class="dataContent.scaned?'scan_view':''">
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty"
:isShowPackUnit="false"></itemCompareQty>
<batch v-if="dataContent.subList[0].batch" :batch="dataContent.subList[0].batch"></batch>
<location title="来源库位" v-if="dataContent.subList[0].fromLocationCode"
:locationCode="dataContent.subList[0].fromLocationCode">
</location>
</u-swipe-action>
</view>
</template>
</u-collapse-item>
</u-collapse>
@ -30,7 +32,7 @@
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 JobDetailPopup from '@/mycomponents/detail/jobDetailPopup.vue'
import receiptDetailInfoPopup from '@/pages/purchaseReceipt/coms/receiptDetailInfoPopup.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import detailList from '@/mycomponents/detail/detailList.vue'
@ -50,10 +52,11 @@ import {
import {ref, onMounted, watch, nextTick} from 'vue';
const props = defineProps({
dataContent: {
type: Object,
default: null
default: ()=>{}
},
settingParam: {
type: Object,
@ -76,9 +79,19 @@ const removeOptions = ref([]);
const collapse = ref(null);
const receiptEdit = ref(null);
const scanLocationCode = ref(null);
const jobDetailPopup = ref(null);
const message = ref(null);
const jobDetailPopup = ref(null);
watch(() => props.dataContent, (newDataContent, oldDataContent) => {
if (newDataContent?.subList.length > 0) {
nextTick(() => {
setTimeout(() => {
if (collapse.value) {
collapse.value.init();
}
}, 500);
});
}
}, { immediate: true, deep: true });
onMounted(() => {
if (detailOptions.value.length === 0) {
detailOptions.value = getDetailOption();

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

@ -12,7 +12,7 @@ import receiptJob from '@/pages/purchaseReceipt/job/receiptJob.vue'
const receiptjob = ref()
const title = ref('')
onShow(() => {
nextTick(() => {
setTimeout(()=>{
if (receiptjob.value != undefined) {
receiptjob.value.refresh()
}

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

@ -13,7 +13,7 @@
</view>
<view class="" v-if="operation == 'reject'">
<uni-section title="拒收原因" type="line">
<uni-easyinput v-model="reasonText" placeholder="请输入拒收原因"></uni-easyinput>
<u-input v-model="reasonText" placeholder="请输入拒收原因"></u-input>
</uni-section>
</view>
</view>
@ -113,6 +113,7 @@ const comReceiptDetailCardRef = ref()
const count = ref(0)
const managementType = ref('')
const switchCode1 = ref('')
const scanedPackingNumber = ref('')
onLoad((option) => {
id.value = option.id
scanMessage.value = option.scanMessage
@ -205,7 +206,7 @@ const getDetail = () => {
detailSource.value.forEach(item => {
itemCodes.push(item.itemCode)
})
getManagementPrecisions(itemCodes, that.jobToLocationCode, res => {
getManagementPrecisions(itemCodes, jobToLocationCode.value, res => {
if (res.success) {
managementList.value = res.list;
managementType.value = managementList.value.some(item => item.ManagementPrecision ==
@ -262,15 +263,14 @@ const getScanResultAfter = (result) => {
} else if (result.label.labelType == 'PurchaseLabel') {
let packingNumber = result.package.number
const parentpackingNumber = result.package.parentNumber
const { packingNumber } = result.label
const { batch } = result.label
const { qty } = result.label
var detail = detailSource.value.find((r) => r.itemCode == itemCode)
let detail = detailSource.value.find((r) => r.itemCode == itemCode)
if (detail == undefined) {
showMessage(`物料号【${itemCode}】不在列表中`)
} else {
//
var itemDetail = detail.subList.find((r) => r.packingNumber == packingNumber && r.batch == batch)
let itemDetail = detail.subList.find((r) => r.packingNumber == packingNumber && r.batch == batch)
if (itemDetail == undefined) {
itemDetail = detail.subList.find((r) => r.packingNumber == parentpackingNumber && r.batch == batch)
if (itemDetail == undefined) {

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

@ -214,8 +214,8 @@ const getDataListByType = (code, type) => {
showMessage(error)
})
}
const openJobDetail = (item, scanMessage = '') => {
proxy.$tab.navigateTo(`./receiptDetail?id=${item.masterId}&status=${item.status}&operation=${this.operation}&scanMessage=${scanMessage}`)
const openJobDetail = (item, scanMessageMes = '') => {
proxy.$tab.navigateTo(`./receiptDetail?id=${item.masterId}&status=${item.status}&operation=${props.operation}&scanMessage=${scanMessageMes}`)
scanMessage.value = ''
}
const showItemList = (itemList) => {

Loading…
Cancel
Save