Browse Source

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

hella_vue3
王志国 2 weeks ago
parent
commit
a574a49984
  1. 1
      src/mycomponents/balance/pack.vue
  2. 11
      src/mycomponents/qty/qtyEdit.vue
  3. 6
      src/mycomponents/scan/winComScanBalance.vue
  4. 2
      src/mycomponents/scan/winScanItem.vue
  5. 259
      src/mycomponents/scan/winScanPackLevel.vue
  6. 7
      src/pages/inventoryMove/coms/comMoveJob.vue
  7. 2
      src/pages/inventoryMove/coms/comMoveRecord.vue
  8. 1
      src/pages/inventoryMove/record/holdToOkRecord.vue
  9. 1
      src/pages/inventoryMove/record/holdToScrapRecord.vue
  10. 2
      src/pages/inventoryMove/record/moveFreeRecord.vue
  11. 2
      src/pages/inventoryMove/record/okToHoldRecord.vue
  12. 2
      src/pages/issue/request/issueRequest.vue
  13. 2
      src/pages/package/record/splitPackageRecord.vue
  14. 6
      src/pages/productReceipt/job/productReceiptJob.vue
  15. 4
      src/pages/purchaseReceipt/job/receiptJob.vue
  16. 2
      src/pages/query/pack.vue

1
src/mycomponents/balance/pack.vue

@ -8,6 +8,7 @@
<script setup lang="ts">
import {getSwitchInfoByCode} from '@/common/basic.js';
import {onMounted} from "vue";
import {ref} from "vue";
const props = defineProps({
packingCode: {
type: String,

11
src/mycomponents/qty/qtyEdit.vue

@ -32,7 +32,7 @@
</view>
</view>
</u-popup>
<comMessage ref="comMessage"></comMessage>
<comMessage ref="comMessageRef"></comMessage>
</view>
</template>
@ -64,10 +64,7 @@ const props = defineProps({
});
const emit = defineEmits(['confirm']);
const popup = ref(null);
const comMessage = ref(null);
const comMessageRef = ref(null);
const allQty = ref(0);
const balanceQty = ref(0);
@ -107,11 +104,11 @@ const calcQty = (val) => {
const setValue = () => {
const balanceQtyValue = Number(dataContent.value.qty);
if (allQty.value === 0) {
comMessage.value.showConfirmWarningModal('数量必须大于0', () => {
comMessageRef.value.showConfirmWarningModal('数量必须大于0', () => {
allQty.value = balanceQtyValue;
});
} else if (allQty.value > balanceQtyValue) {
comMessage.value.showConfirmWarningModal(`数量[${allQty.value}]不允许大于库存数量[${balanceQtyValue}]`, () => {
comMessageRef.value.showConfirmWarningModal(`数量[${allQty.value}]不允许大于库存数量[${balanceQtyValue}]`, () => {
allQty.value = balanceQtyValue;
});
} else {

6
src/mycomponents/scan/winComScanBalance.vue

@ -20,7 +20,7 @@
</view>
</view>
</u-popup>
<balance-select ref="balanceSelect" @onSelectItem='selectBalanceItem'></balance-select>
<balance-select ref="balanceSelectRef" @onSelectItem='selectBalanceItem'></balance-select>
</view>
<comMessage ref="comMessage"></comMessage>
</template>
@ -100,7 +100,7 @@ const resultData = ref({})
const popup = ref(null)
const comMessage = ref(null)
const comscan = ref(null)
const balanceSelect = ref(null)
const balanceSelectRef = ref(null)
//
const openScanPopup = (businessTypeValue) => {
@ -218,7 +218,7 @@ const queryBalance = (result) => {
}
emit('getBalance', result)
} else {
balanceSelect.value.openPopup(res.data)
balanceSelectRef.value.openPopup(res.data)
}
}).catch(error => {
uni.hideLoading()

2
src/mycomponents/scan/winScanItem.vue

@ -11,7 +11,7 @@
<view class="">
<view class="">
<win-com-scan ref="scan" @getResult="getScanResult" :placeholder='title' :clearResult="false"
headerType="HMQ,HPQ">
headerType="HMQ,HPQ"></win-com-scan>
</view>
</view>
</view>

259
src/mycomponents/scan/winScanPackLevel.vue

@ -1,143 +1,156 @@
<template>
<view>
<u-popup v-model="show" mode="bottom" :mask-close-able="false">
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx"> 扫描{{ title }} </view>
<view>
<u-popup v-model="show" mode="bottom">
<view class="popup_box">
<view class="pop_title uni-flex space-between">
<view class="" style="font-size: 35rpx"> 扫描{{ title }}</view>
<view class="">
<image class="fr icons_scan_close" src="/static/icons/icons_scan_close.svg" @click="closeScanPopup()">
</image>
</view>
</view>
<view class="uni-flex uni-row"
style="align-items: center; background-color: #fff; margin-left: 20rpx; margin-right: 20rpx; border-radius: 8rpx">
<view class="uni-center" style="width: 25%; font-size: 32rpx; font-weight: bold"> 优先级 </view>
<view style="width: 100%">
<uni-data-select style="padding: 20rpx;" v-model="priorityCode" :localdata="priorityList" @change="change"
:clear="false"></uni-data-select>
</view>
</view>
<view class="">
<view class="">
<win-com-scan ref="comscan" :placeholder="title" @getResult="getScanResult" :headerType="headerType"
:isShowHistory="isShowHistory" :clearResult="true"></win-com-scan>
</view>
</view>
</view>
</u-popup>
<com-message ref="comMessageRef" />
</view>
<view class="">
<image class="fr icons_scan_close" src="/static/icons/icons_scan_close.svg" @click="closeScanPopup()">
</image>
</view>
</view>
<view class="uni-flex uni-row"
style="align-items: center; background-color: #fff; margin-left: 20rpx; margin-right: 20rpx; border-radius: 8rpx">
<view class="uni-center" style="width: 25%; font-size: 32rpx; font-weight: bold"> 优先级</view>
<view style="width: 100%">
<uni-data-select style="padding: 20rpx;" v-model="priorityCode" :localdata="priorityList" @change="change"
:clear="false"></uni-data-select>
</view>
</view>
<view class="">
<view class="">
<win-com-scan ref="comscan" :placeholder="title" @getResult="getScanResult" :headerType="headerType"
:isShowHistory="isShowHistory" :clearResult="true"></win-com-scan>
</view>
</view>
</view>
</u-popup>
<com-message ref="comMessageRef"/>
</view>
</template>
<script setup lang="ts">
import { ref, getCurrentInstance, nextTick } from 'vue'
import { onLoad, onNavigationBarButtonTap, onPullDownRefresh } from '@dcloudio/uni-app'
import { getLabelInfo } from '@/common/label.js'
import winComScan from '@/mycomponents/scan/winComScan.vue'
import {ref, getCurrentInstance, nextTick} from 'vue'
import {onLoad, onNavigationBarButtonTap, onPullDownRefresh} from '@dcloudio/uni-app'
import {getLabelInfo} from '@/common/label.js'
import winComScan from '@/mycomponents/scan/winComScan.vue'
const props = defineProps({
title: {
type: String,
default: '箱标签'
},
isShowHistory: {
type: Boolean,
default: true
},
headerType: {
type: String,
default: 'HPQ'
}
})
const emit = defineEmits(['close'])
const show = ref(false)
const priorityList = ref([
{
value: 0,
text: '低'
},
{
value: 1,
text: '中'
},
{
value: 2,
text: '高'
}
])
const priorityCode = ref(1)
const comscan = ref()
const simulateScan = (scanMessage) => {
getLabelInfo(scanMessage, headerType.value, (callback) => {
if (callback.success) {
getScanResult(callback)
} else {
showMessage(callback.message)
}
})
}
const openScanPopup = () => {
show.value = true
setTimeout((res) => {
getfocus()
}, 200)
}
const closeScanPopup = () => {
losefocus()
show.value = false
emit('close', '')
}
const props = defineProps({
title: {
type: String,
default: '箱标签'
},
isShowHistory: {
type: Boolean,
default: true
},
headerType: {
type: String,
default: 'HPQ'
}
})
const emit = defineEmits(['close'])
const show = ref(false)
const comMessageRef = ref(null)
const priorityList = ref([
{
value: 0,
text: '低'
},
{
value: 1,
text: '中'
},
{
value: 2,
text: '高'
}
])
const priorityCode = ref(1)
const comscan = ref()
const simulateScan = (scanMessage) => {
getLabelInfo(scanMessage, headerType.value, (callback) => {
if (callback.success) {
getScanResult(callback)
} else {
showMessage(callback.message)
}
})
}
const openScanPopup = () => {
show.value = true
setTimeout((res) => {
getfocus()
}, 200)
}
const closeScanPopup = () => {
losefocus()
show.value = false
emit('close', '')
}
const scanClick = () => {
if (comscan.value) {
comscan.value.clickScanMsg()
}
}
const scanClick = () => {
if (comscan.value) {
comscan.value.clickScanMsg()
}
}
const cancelClick = () => {
if (comscan.value) {
comscan.value.clearScanValue()
}
}
const cancelClick = () => {
if (comscan.value) {
comscan.value.clearScanValue()
}
}
const getScanResult = (result) => {
if (result.success) {
result.priorityCode = priorityCode.value
emit('getResult', result)
} else {
showMessage(result.message)
}
}
const getScanResult = (result) => {
if (result.success) {
result.priorityCode = priorityCode.value
emit('getResult', result)
} else {
showMessage(result.message)
}
}
const getfocus = () => {
if (comscan.value) {
comscan.value.getfocus()
}
}
const getfocus = () => {
if (comscan.value) {
comscan.value.getfocus()
}
}
const losefocus = () => {
if (comscan.value) {
comscan.value.losefocus()
}
}
const showMessage = (message) => {
comMessageRef.value.showMessage(message)
}
const change = (e) => {
console.log(e)
}
const losefocus = () => {
if (comscan.value) {
comscan.value.losefocus()
}
}
const showMessage = (message) => {
comMessageRef.value.showMessage(message)
}
const change = (e) => {
console.log(e)
}
defineExpose({
simulateScan,
openScanPopup,
closeScanPopup,
scanClick,
cancelClick,
getScanResult,
getfocus,
losefocus,
showMessage,
change
})
</script>
<style lang="scss">
.scroll-view {
overflow-y: scroll;
height: auto;
max-height: 300rpx;
}
.scroll-view {
overflow-y: scroll;
height: auto;
max-height: 300rpx;
}
</style>

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

@ -79,13 +79,6 @@ onMounted(() => {
// refresh()
})
})
const onReach = ()=> {
//
if (loadingType.value == 'loading' || loadingType.value == 'nomore') {
return;
}
getList("more");
}
const updateTitle = () => {
let title = ''
const name = props.title

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

@ -141,7 +141,7 @@ const initData = () => {
// this.toLocationCode = "HOLD"
toLocationCode.value = ''
}
title.value = myTitle.value
title.value = props.myTitle
uni.setNavigationBarTitle({
title: title.value
})

1
src/pages/inventoryMove/record/holdToOkRecord.vue

@ -7,6 +7,7 @@
<script setup lang="ts">
import { ref, getCurrentInstance, nextTick } from 'vue'
import comMoveRecord from '@/pages/inventoryMove/coms/comMoveRecord.vue'
import {onLoad} from "@dcloudio/uni-app";
const title = ref('')
onLoad((option) => {

1
src/pages/inventoryMove/record/holdToScrapRecord.vue

@ -7,6 +7,7 @@
<script setup lang="ts">
import { ref, getCurrentInstance, nextTick } from 'vue'
import comMoveRecord from '@/pages/inventoryMove/coms/comMoveRecord.vue'
import {onLoad} from "@dcloudio/uni-app";
const title = ref('')
onLoad((option) => {

2
src/pages/inventoryMove/record/moveFreeRecord.vue

@ -7,7 +7,7 @@
<script setup lang="ts">
import { ref, getCurrentInstance, nextTick } from 'vue'
import comMoveRecord from '@/pages/inventoryMove/coms/comMoveRecord.vue'
import {onLoad} from '@dcloudio/uni-app'
const title = ref('')
onLoad((option) => {
title.value = option.title

2
src/pages/inventoryMove/record/okToHoldRecord.vue

@ -7,7 +7,7 @@
<script setup lang="ts">
import { ref, getCurrentInstance, nextTick } from 'vue'
import comMoveRecord from '@/pages/inventoryMove/coms/comMoveRecord.vue'
import { onLoad } from '@dcloudio/uni-app'
const title = ref('')
onLoad((option) => {
title.value = option.title

2
src/pages/issue/request/issueRequest.vue

@ -16,7 +16,7 @@
<script setup lang="ts">
import { ref, getCurrentInstance, nextTick } from 'vue'
import { onShow, onNavigationBarButtonTap, onReady, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
import {onLoad, onShow, onNavigationBarButtonTap, onReady, onReachBottom, onPullDownRefresh } from '@dcloudio/uni-app'
import requestFilter from '@/mycomponents/request/requestFilter.vue'
import comEmptyView from '@/mycomponents/common/comEmptyView.vue'
import comIssueRequestCard from '@/pages/issue/coms/comIssueRequestCard.vue'

2
src/pages/package/record/splitPackageRecord.vue

@ -35,7 +35,7 @@
<winComScanBalance ref="scanPopup" @getBalance="getScanResult"
:bussinessCode="typeCode" :isCheckLocationBalance="false">
</winComScanBalance>
<comMessage ref="comMessage"></comMessage>
<comMessage ref="comMessageRef"></comMessage>
</view>
</template>

6
src/pages/productReceipt/job/productReceiptJob.vue

@ -64,7 +64,6 @@ const status = ref('1,2') // 待处理 、进行中
const detailOptions = ref([])
const detailGiveupOptions = ref([])
const scanMessage = ref('')
const scanMessage = ref('')
const filter = ref()
const comMessageRef = ref()
const jobInfoPopupRef = ref()
@ -133,7 +132,7 @@ const getList = (type) => {
const { list } = res.data
totalCount.value = res.data.total
updateTitle(`${title.value}(${totalCount.value})`)
updateTitle(`${props.title}(${totalCount.value})`)
loadingType.value = 'loadmore'
if (list == null || list.length == 0) {
@ -413,7 +412,8 @@ const getJobInfoByNumber = (number,scanMessage)=>{
})
}
defineExpose({
refresh,
timerRefresh,
stopRefresh,
toHome,
onReach,
openFilter

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

@ -156,9 +156,9 @@ const getList = (type) => {
uni.stopPullDownRefresh()
}
loadingType.value = ''
updateTitle(title.value)
updateTitle(props.title)
uni.hideLoading()
showErrorMessage(error)
showMessage(error)
})
}
const getScanAsnNumber = (code) => {

2
src/pages/query/pack.vue

@ -76,7 +76,7 @@ onLoad((option) => {
title: option.title
})
})
mounted(() => {
onMounted(() => {
openScanPopup()
})
onPullDownRefresh(() => {

Loading…
Cancel
Save