Browse Source

目标库位 2024/6/27 17:03:11

hella_vue3
zhang_li 3 months ago
parent
commit
584377da42
  1. 6
      src/hybrid/html/point.html
  2. 2
      src/mycomponents/job/jobComMainDetailCard.vue
  3. 61
      src/mycomponents/qty/compareQty.vue
  4. 39
      src/mycomponents/scan/winComScanFg.vue
  5. 12
      src/pages/index/index.vue
  6. 13
      src/pages/point/index.vue
  7. 4
      src/pages/productReceipt/coms/comFgCard.vue
  8. 19
      src/pages/productReceipt/job/fgProductReceiptDetail.vue

6
src/hybrid/html/point.html

@ -29,7 +29,10 @@
.left-item {
display: flex;
}
.bold-font{
font-weight: bold;
font-size: 28rpx;
}
.label {
border-bottom: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1;
@ -64,6 +67,7 @@
border-right: 1px solid #b1b1b1;
}
.image img {
width: 172px;
height: 172px;

2
src/mycomponents/job/jobComMainDetailCard.vue

@ -7,7 +7,7 @@
<batch v-if="isShowBatch && dataContent.batch != null" :batch="dataContent.batch"></batch>
<div class="u-flex justify-between u-p-b-16">
<location v-if="isShowFromLocation && dataContent.fromLocationCode" title="来源库位" :locationCode="dataContent.fromLocationCode"> </location>
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="dataContent.locationCode"> </to-location>
<to-location v-if="isShowToLocation" title="目标库位" :locationCode="dataContent.toLocationCode || dataContent.locationCode"> </to-location>
</div>
<view class="card_view" v-if="isShowDeliverType">
<text class="card_packing_code card_content">发货类型</text>

61
src/mycomponents/qty/compareQty.vue

@ -1,35 +1,36 @@
<template>
<view>
<status v-show="isShowStatus" :status='dataContent.inventoryStatus'></status>
<status v-show="isShowStatus" :status="dataContent.inventoryStatus"></status>
<view class="u-flex u-row center">
<view class="u-flex u-row ">
<view v-if="Number(handleQty)!=0">
<view v-if="isShowRecommendQty" style='font-weight:bold'>
<view v-if="Number(recommendQty)>Number(handleQty)" class="text_greater">
{{Number(handleQty)}}
<view class="u-flex u-row">
<view v-if="Number(handleQty) != 0">
<view v-if="isShowRecommendQty" style="font-weight: bold">
<view v-if="Number(recommendQty) > Number(handleQty)" class="text_greater">
{{ Number(handleQty) }}
</view>
<view v-else-if="Number(recommendQty)<Number(handleQty)" class="text_less">
{{Number(handleQty)}}
<view v-else-if="Number(recommendQty) < Number(handleQty)" class="text_less">
{{ Number(handleQty) }}
</view>
<view v-else-if="Number(recommendQty) ==Number(handleQty)" class="text_equal">
{{Number(handleQty)}}
<view v-else-if="Number(recommendQty) == Number(handleQty)" class="text_equal">
{{ Number(handleQty) }}
</view>
</view>
<view v-else>
<view class="text_balance">
{{Number(handleQty)}}
{{ Number(handleQty) }}
</view>
</view>
</view>
<view class="center" v-if="isShowRecommendQty">
<view v-if="Number(handleQty)!=0" class="std_split">/</view>
<view class="text_recommend ">
{{Number(recommendQty)}}
<view v-if="Number(handleQty) != 0" class="std_split">/</view>
<view class="text_recommend">
{{ Number(recommendQty) }}
</view>
</view>
</view>
<uom :uom="dataContent.uom">
</uom>
<!-- <uom :uom="dataContent.uom">
</uom> -->
<uom v-show="Number(handleQty) != 0 || (isShowRecommendQty && Number(recommendQty) > 0)" :uom="dataContent.uom"> </uom>
</view>
<view>
<pack-unit v-show="isShowPackUnit" :dataContent="dataContent"></pack-unit>
@ -38,17 +39,16 @@
</template>
<script setup lang="ts">
import {
watch
} from 'vue'
// import packQty from '@/mycomponents/qty/packQty.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue'
import uom from '@/mycomponents/qty/uom.vue'
import status from '@/mycomponents/status/status.vue'
const props = defineProps({
import { watch } from 'vue'
// import packQty from '@/mycomponents/qty/packQty.vue'
import packUnit from '@/mycomponents/qty/packUnit.vue'
import uom from '@/mycomponents/qty/uom.vue'
import status from '@/mycomponents/status/status.vue'
const props = defineProps({
type: {
type: String,
default: 'default' //recommend: compare:
default: 'default' // recommend: compare:
},
dataContent: {
@ -77,16 +77,15 @@
type: Boolean,
default: true
}
})
watch(
})
watch(
() => props.handleQty,
(val : boolean) => {},
(val: boolean) => {},
{
immediate: true,
deep: true
}
)
)
</script>
<style lang="scss">
</style>
<style lang="scss"></style>

39
src/mycomponents/scan/winComScanFg.vue

@ -169,26 +169,27 @@ const handelScanMsg = () => {
.then((res) => {
try {
if (res.data.list.length == 0) {
throw new Error(`没有查找到物料号【${itemCode.value}】对应的mes物料号`)
throw new Error(`没有查找到物料号【${itemCode.value}】对应的生产条码配置`)
}
const result = res.data.list[0]
const { partNumber } = result
const result = res.data.list[0] // Mes
const { partNumber } = result //
const { lengthMat } = result
const { lengthBc } = result
let itemCode = content.substr(0, lengthMat)
const productDate = content.substr(lengthMat, 8)
const batch = content.substr(lengthMat + 8, 3)
// Q5,,TypeQ5
if (result.Type == 'P') {
const scanPartNumber = content.substr(0, lengthMat) //
// const productDate = content.substr(lengthMat, 8)
// const batch = content.substr(lengthMat + 8, 3)
const order = content.substr(-8)
if (itemCode != partNumber) {
if (scanPartNumber != partNumber) {
clear()
throw new Error(`解析错误:扫描物料号【${itemCode}】与查询物料号【${partNumber}】不一致`)
throw new Error(`解析错误:扫描的客户物料号【${scanPartNumber}】与生成条码配置表中的客户物料号【${partNumber}】不一致`)
}
const scanResult = {
itemCode,
productDate,
batch,
itemCode: scanPartNumber,
// productDate,
// batch,
order,
qty: 1,
content,
@ -196,6 +197,20 @@ const handelScanMsg = () => {
}
clear()
emit('getResult', scanResult)
} else {
// ,
const scanResult = {
itemCode: itemCode.value,
// productDate: new Date(),
// batch: new Date(),
order: 0,
qty: 1,
content,
success: true
}
clear()
emit('getResult', scanResult)
}
} catch (error) {
comMessageRef.value.showErrorMessage(error.message, (res) => {
if (res) {

12
src/pages/index/index.vue

@ -132,9 +132,21 @@ onHide(() => {
})
onShow(() => {
if (uni.getStorageSync('hasLogin') == null || uni.getStorageSync('hasLogin') == false) {
uni.showModal({
title: '未登录',
content: '您未登录 , 需要登录后才能继续', //
showCancel: !forcedLogin.value,
success: (res) => {
if (res.confirm) {
// 使reLanch
if (forcedLogin.value) {
uni.reLaunch({
url: '../login/index'
})
}
}
}
})
} else {
timerRefresh()
}

13
src/pages/point/index.vue

@ -5,7 +5,7 @@
<view class="left">
<view class="left-item">
<view class="label">物品代码</view>
<view class="value" id="name1">{{ item.itemCode }}</view>
<view class="value bold-font" id="name1">{{ item.itemCode }}</view>
</view>
<view class="left-item">
<view class="label">物品名称</view>
@ -29,7 +29,7 @@
</view>
<view class="left-item">
<view class="label">数量</view>
<view class="value">{{item.qty}}</view>
<view class="value bold-font">{{item.qty}}</view>
</view>
</view>
<view class="right">
@ -118,7 +118,7 @@
<div class="left">
<div class="left-item">
<div class="label">物品代码</div>
<div class="value" id="name1">${item.itemCode}</div>
<div class="value bold-font" id="name1">${item.itemCode}</div>
</div>
<div class="left-item">
<div class="label">物品名称</div>
@ -142,7 +142,7 @@
</div>
<div class="left-item">
<div class="label">数量</div>
<div class="value">${item.qty}</div>
<div class="value bold-font">${item.qty}</div>
</div>
</div>
<div class="right">
@ -258,7 +258,10 @@
.left-item {
display: flex;
}
.bold-font{
font-weight: bold;
font-size: 28rpx;
}
.label {
border-bottom: 1px solid #b1b1b1;
border-right: 1px solid #b1b1b1;

4
src/pages/productReceipt/coms/comFgCard.vue

@ -7,10 +7,10 @@
<text class="card_item_code">零件号</text>
<text class="card_content">{{ detail.itemCode }}</text>
</view>
<view>
<!-- <view>
<text class="card_product_date">生产日期</text>
<text class="card_content">{{ detail.productDate }}</text>
</view>
</view> -->
<!-- <view>
<text class="card_batch card_content ">批次</text>

19
src/pages/productReceipt/job/fgProductReceiptDetail.vue

@ -69,7 +69,7 @@ import { Decimal } from 'decimal.js' // 引入
import { getManagementPrecisions } from '@/common/balance.js'
import { getCurrDateTime, goHome, navigateBack, getPackingNumberAndBatch, getSwitchInfoByCode } from '@/common/basic.js'
import { getProductReceiptJobDetail, takeProductReceiptJob, cancleTakeProductReceiptJob, productReceiptJobsubmit, getPrintProductReceiptList, getBalanceToPackage, batchPrintingLable } from '@/api/request2.js'
import { getProductReceiptJobDetail, takeProductReceiptJob, cancleTakeProductReceiptJob, productReceiptJobsubmit, getPrintProductReceiptList, getBalanceToPackage, batchPrintingLable, isCheckMesCode } from '@/api/request2.js'
import { getDirectoryItemArray, getInventoryStatusName } from '@/common/directory.js'
@ -203,6 +203,10 @@ const getDetail = () => {
const getScanResult = (result) => {
// TODO
// mes
isCheckMesCode(result.content)
.then((res) => {
if (res.data) {
if (detailSource.value.length > 0) {
const item = detailSource.value[0] //
result.uom = item.uom
@ -217,7 +221,7 @@ const getScanResult = (result) => {
subItem.fgList.push(result)
calcFgQty(detailSource.value)
} else {
const itemIndex = subItem.fgList.findIndex((r) => r.itemCode == result.itemCode && r.productDate == result.productDate && r.order == result.order)
const itemIndex = subItem.fgList.findIndex((r) => r.itemCode == result.itemCode && r.order == result.order)
if (itemIndex == -1) {
subItem.fgList.push(result)
calcFgQty(detailSource.value)
@ -234,6 +238,11 @@ const getScanResult = (result) => {
}, 500)
}
}
}
})
.catch((error) => {
showErrorMessage(error)
})
}
const calcFgQty = () => {
@ -391,7 +400,9 @@ const commit = () => {
submitJob()
}
} else {
if (!subitem.handleQty) {
subitem.handleQty = subitem.qty
}
subitem.scaned = true
submitJob()
}
@ -445,9 +456,9 @@ const setParams = () => {
if (detail.fgList) {
detail.fgList.forEach((res) => {
res.outsideItemCode = res.itemCode
res.outsideProduceDate = res.productDate
// res.outsideProduceDate = res.productDate
res.outsideProduceDate = null
res.outsideSerialNumber = res.order
res.lowerLim = res.content
})
}
subList.push(detail)

Loading…
Cancel
Save