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 expendIcon = ref('arrow-down')
const comMessageRef = ref() const comMessageRef = ref()
const openScanPopup = () => { const openScanPopup = () => {
isShow.value = true
setTimeout((res) => { setTimeout((res) => {
isShow.value = true
getfocus() getfocus()
}, 500) }, 500)
} }

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

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

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

@ -3,12 +3,10 @@
<com-empty-view v-if="jobList.length == 0"></com-empty-view> <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> <job-filter ref="filter" otherTitle="ASN" @switchChangeToday="switchChangeToday" @switchChangeWait="switchChangeWait" @onScanNumber="getScanNumber" :checkedToday="checkedToday" :checkedWaitTask="checkedWaitTask"> </job-filter>
<view v-if="jobList.length > 0"> <view v-if="jobList.length > 0">
<uni-swipe-action ref="swipeAction"> <uni-swipe-action ref="swipeAction" v-for="(item, index) in jobList" :key="index"
<view v-for="(item, index) in jobList" :key="index"> @click="(...event)=>swipeClick(event, item)"
<uni-swipe-action-item :right-options="item.status == '2' ? detailGiveupOptions : detailOptions" @click="swipeClick($event, item)"> :options="item.status == '2' ? detailGiveupOptions : detailOptions">
<com-fuzzy-count-job-card :dataContent="item" @click="openJobDetail(item)"></com-fuzzy-count-job-card> <com-fuzzy-count-job-card :dataContent="item" @click="openJobDetail(item)"></com-fuzzy-count-job-card>
</uni-swipe-action-item>
</view>
</uni-swipe-action> </uni-swipe-action>
<job-list-popup ref="jobListPopup" @selectedItem="selectedItem"></job-list-popup> <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;"> <view class="" style="background-color: #fff;">
<u-collapse ref="collapse"> <u-collapse ref="collapse">
<u-collapse-item :open="true"> <u-collapse-item :open="true">
<template v-slot:title> <template #title>
<u-swipe-action @click="(...event)=>swipeClick(event,dataContent)" <view style="flex: 1">
options="dataContent.handleQty>0? removeOptions:options" <u-swipe-action @click="(...event)=>swipeClick(event,dataContent)"
:class="dataContent.scaned?'scan_view':''"> :options="dataContent.handleQty>0? removeOptions:options"
<itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty" :class="dataContent.scaned?'scan_view':''">
:isShowPackUnit="false"></itemCompareQty> <itemCompareQty :dataContent="dataContent" :handleQty="dataContent.handleQty"
<batch v-if="dataContent.subList[0].batch" :batch="dataContent.subList[0].batch"></batch> :isShowPackUnit="false"></itemCompareQty>
<location title="来源库位" v-if="dataContent.subList[0].fromLocationCode" <batch v-if="dataContent.subList[0].batch" :batch="dataContent.subList[0].batch"></batch>
:locationCode="dataContent.subList[0].fromLocationCode"> <location title="来源库位" v-if="dataContent.subList[0].fromLocationCode"
</location> :locationCode="dataContent.subList[0].fromLocationCode">
</u-swipe-action> </location>
</u-swipe-action>
</view>
</template> </template>
</u-collapse-item> </u-collapse-item>
</u-collapse> </u-collapse>
@ -30,7 +32,7 @@
import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue' import itemCompareQty from '@/mycomponents/item/itemCompareQty.vue'
import recommend from '@/mycomponents/recommend/recommend.vue' import recommend from '@/mycomponents/recommend/recommend.vue'
import recommendQtyEdit from '@/mycomponents/qty/recommendQtyEdit.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 receiptDetailInfoPopup from '@/pages/purchaseReceipt/coms/receiptDetailInfoPopup.vue'
import winScanLocation from "@/mycomponents/scan/winScanLocation.vue" import winScanLocation from "@/mycomponents/scan/winScanLocation.vue"
import detailList from '@/mycomponents/detail/detailList.vue' import detailList from '@/mycomponents/detail/detailList.vue'
@ -50,10 +52,11 @@ import {
import {ref, onMounted, watch, nextTick} from 'vue'; import {ref, onMounted, watch, nextTick} from 'vue';
const props = defineProps({ const props = defineProps({
dataContent: { dataContent: {
type: Object, type: Object,
default: null default: ()=>{}
}, },
settingParam: { settingParam: {
type: Object, type: Object,
@ -76,9 +79,19 @@ const removeOptions = ref([]);
const collapse = ref(null); const collapse = ref(null);
const receiptEdit = ref(null); const receiptEdit = ref(null);
const scanLocationCode = ref(null); const scanLocationCode = ref(null);
const jobDetailPopup = ref(null);
const message = 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(() => { onMounted(() => {
if (detailOptions.value.length === 0) { if (detailOptions.value.length === 0) {
detailOptions.value = getDetailOption(); 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 receiptjob = ref()
const title = ref('') const title = ref('')
onShow(() => { onShow(() => {
nextTick(() => { setTimeout(()=>{
if (receiptjob.value != undefined) { if (receiptjob.value != undefined) {
receiptjob.value.refresh() receiptjob.value.refresh()
} }

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

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

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

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

Loading…
Cancel
Save