Browse Source

fix: mycomponents 文件修改 Vue2升级Vue3 11-11/11-13

syhx_app_vue3
王志国 1 week ago
parent
commit
871afa348a
  1. 17
      src/common/record.js
  2. 33
      src/mycomponents/detail/comRecommendDetailCard.vue
  3. 2
      src/mycomponents/job/jobComMainDetailCard.vue
  4. 2
      src/mycomponents/job/jobSettingInfo.vue
  5. 2
      src/mycomponents/qty/compareQty.vue
  6. 2
      src/mycomponents/qty/recommendHandleQty.vue
  7. 4
      src/mycomponents/qty/recommendQtyEdit.vue
  8. 8
      src/mycomponents/query/fifoQuery.vue
  9. 33
      src/mycomponents/scan/winScanPackAndLocation.vue

17
src/common/record.js

@ -25,7 +25,22 @@ export function createItemInfo(balance, pack) {
item.containerNumber = pack.parentNumber ? pack.parentNumber : pack.number;
return item;
}
export function createItemInfoForLabel(balance, label) {
let item = {
itemCode: label.itemCode,
itemName: label.itemName,
packQty: '',
packUnit: '',
qty: new Decimal(balance.qty).toNumber(),
handleQty: new Decimal(0).toNumber(),
uom: balance.uom,
subList: [],
// packingNumber: pack.number,
// parentPackingNumber: pack.parentNumber,
}
item.containerNumber = balance.parentNumber ? balance.parentNumber : balance.number;
return item;
}
export function createDetailInfo(balance, pack) {
balance.scaned = true;
// data.toInventoryStatus = this.toInventoryStatus == "" ? data.inventoryStatus : this.toInventoryStatus;

33
src/mycomponents/detail/comRecommendDetailCard.vue

@ -13,20 +13,23 @@
style='padding:0px 0px 5px 0px;align-items: center;'
@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 class="" style="font-size: 32rpx; color: #3c9cff; font-weight: bold; text-align: center;padding: 10px;">
<br/>
</view>
<recommend :detail="item" :isShowStatus="isShowStatus"
:isShowToLocation="false" style="flex: 1">
:isShowFromLocation="isShowFromLocation"
:isShowToLocation="isShowToLocation" style="flex: 1">
</recommend>
</view>
<view v-else class="uni-flex" style="flex-direction: row; align-items: center;background-color: antiquewhite; margin-top: 5rpx;">
<view class="" style="font-size: 32rpx; color: red; font-weight: bold; text-align: center;">
<view v-else class="uni-flex"
:class="item.scaned?'scan_view':''"
style="flex-direction: row; align-items: center;background-color: antiquewhite; margin-top: 5rpx;">
<view class="" style="font-size: 32rpx; color: rgb(107, 196, 78);; font-weight: bold; text-align: center;">
<br/>
</view>
<recommend :detail="item" :isShowStatus="isShowStatus"
:isShowToLocation="false" style="flex: 1">
<recommend :detail="item" :isShowStatus="isShowStatus"
:isShowFromLocation="isShowFromLocation"
:isShowToLocation="isShowToLocation" style="flex: 1">
</recommend>
</view>
</u-swipe-action>
@ -84,8 +87,16 @@ const props = defineProps({
isShowStatus: {
type: Boolean,
default: true
}
});
},
isShowFromLocation: {
type: Boolean,
default: true
},
isShowToLocation: {
type: Boolean,
default: true
},
})
const emit = defineEmits(['openDetail', 'remove', 'updateData']);
const collapse1 = ref(null);

2
src/mycomponents/job/jobComMainDetailCard.vue

@ -7,7 +7,7 @@
></itemCompareQty>
<view>
<pack v-if="isShowPack && dataContent.packingNumber != null" :packingCode="dataContent.packingNumber"> </pack>
<batch v-if="isShowBatch && dataContent.batch != null" :batch="dataContent.batch"></batch>
<batch v-if="isShowBatch && dataContent.batch" :batch="dataContent.batch"></batch>
<view class="u-flex justify-between u-p-b-16">
<location v-if="isShowFromLocation && dataContent.fromLocationCode" title="来源库位" :locationCode="dataContent.fromLocationCode"> </location>
<level title="优先级" :priority="dataContent.priority" v-if="dataContent.priority !== '' && dataContent.priority !== undefined && dataContent.priority !== null"> </level>

2
src/mycomponents/job/jobSettingInfo.vue

@ -29,7 +29,7 @@
</view>
<view class="item">
<text class="item_title">允许修改批次 : </text>
<text class="text_wrap">{{converter(dataContent.allowModifyBach)}} </text>
<text class="text_wrap">{{converter(dataContent.allowModifyBatch)}} </text>
</view>
<view class="item">
<text class="item_title">允许部分完成 : </text>

2
src/mycomponents/qty/compareQty.vue

@ -1,6 +1,6 @@
<template>
<view>
<status v-show="isShowStatus" :status="dataContent.inventoryStatus"></status>
<status v-show="isShowStatus && dataContent.inventoryStatus" :status="dataContent.inventoryStatus"></status>
<view class="u-flex u-row center">
<view class="u-flex u-row">
<view v-if="Number(handleQty) != 0">

2
src/mycomponents/qty/recommendHandleQty.vue

@ -10,7 +10,7 @@
{{ Number(dataContent.qty) }}
</view>
</view>
<uom :uom="dataContent.uom"></uom>
<view>
<pack-unit :dataContent="dataContent"></pack-unit>
<!-- <std-pack-qty v-show="isShowStdPack" :dataContent="dataContent"></std-pack-qty> -->

4
src/mycomponents/qty/recommendQtyEdit.vue

@ -21,8 +21,8 @@
{{ handleGetPackUnitName(dataContent.packUnit) }}
</view>
</view>
<view class="split_line"></view>
<view class="uni-flex uni-row space-between padding title u-col-center">
<view class="split_line" v-if="dataContent.packQty"></view>
<view class="uni-flex uni-row space-between padding title u-col-center" v-if="dataContent.packQty">
<text>包装规格 : </text>
<view class="uni-flex u-col-center uni-row">
<packUnit :dataContent="dataContent"></packUnit>

8
src/mycomponents/query/fifoQuery.vue

@ -241,10 +241,10 @@ const query = () => {
return;
}
if (warehouseCode.value === '') {
showErrorMessage('仓库代码为空,请输入仓库代码');
return;
}
// if (warehouseCode.value === '') {
// showErrorMessage(',');
// return;
// }
uni.showLoading({
title: '查询中',

33
src/mycomponents/scan/winScanPackAndLocation.vue

@ -16,7 +16,12 @@
placeholder-style="font-size:12px" style="padding: 5px;" @confirm="scanLocation" /> -->
<view v-if="allowModifyLocation">
<uni-combox :candidates="fromLocationList" v-model="fromLocationCode" placeholder="请扫描来源库位" @confirm="handleConfirm" style="height: 30rpx; border: 1px solid #fff"></uni-combox>
<uni-combox :candidates="fromLocationList" disabled
v-model="fromLocationCode"
placeholder="请扫描来源库位"
@confirm="handleConfirm"
style="height: 30rpx; border: 1px solid #fff">
</uni-combox>
</view>
<view v-else>
<text style="padding: 5px; font-size: 40rpx">
@ -94,6 +99,11 @@ const props = defineProps({
type: String,
default: ""
},
//
isJustReplay: {
type: Boolean,
default: false
},
})
const scanResult = ref({})
const show = ref(false)
@ -225,8 +235,14 @@ const scanLocation = (scanResult) => {
if (available == 'TRUE') {
if (checkDirectoryItemExist(fromLocationAreaTypeList.value, type)) {
location.value = result
//
if(props.isJustReplay){
emit("getResult",scanResult);
uni.hideLoading()
}else{
checkPackage(scanResult)
}
// this.packGetFocus();
checkPackage(scanResult)
} else {
uni.hideLoading()
const hint = getListLocationAreaTypeDesc(fromLocationAreaTypeList.value)
@ -253,13 +269,23 @@ const scanLocation = (scanResult) => {
})
})
}
const getScanResult = (result) => {
const getScanResult = (result,businessType) => {
// if (this.fromLocationCode == '' || this.fromLocationCode == null) {
// this.showMessage('', callback => {
// this.locationGetFocus();
// })
// return;
// } else
//
console.log(88,businessType)
if(businessType){
businessType.value = businessType;
fromInventoryStatuses.value = getDirectoryItemArray(businessType.value.outInventoryStatuses)
inventoryStatus.value = getDirectoryItemArray(businessType.value.outInventoryStatuses); //
fromLocationAreaTypeList.value = getDirectoryItemArray(businessType.value.outAreaTypes); //
console.log(99,this.fromInventoryStatuses)
console.log(99,this.balanceFromInventoryStatuses)
}
scanLocation(result)
// debugger
// if(this.isCheck){
@ -286,7 +312,6 @@ const checkPackage = async (result) => {
chooseWhich.value = '2'
if(!result.label.itemCode){
showErrorMessage('扫描标签不对,请重新扫描')
emit('clearItemCode',result.label)
return
}
if (res.data && res.data.list && res.data.list.length > 1) {

Loading…
Cancel
Save