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

2
src/mycomponents/job/jobComMainDetailCard.vue

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

61
src/mycomponents/qty/compareQty.vue

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

39
src/mycomponents/scan/winComScanFg.vue

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

12
src/pages/index/index.vue

@ -132,9 +132,21 @@ onHide(() => {
}) })
onShow(() => { onShow(() => {
if (uni.getStorageSync('hasLogin') == null || uni.getStorageSync('hasLogin') == false) { 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({ uni.reLaunch({
url: '../login/index' url: '../login/index'
}) })
}
}
}
})
} else { } else {
timerRefresh() timerRefresh()
} }

13
src/pages/point/index.vue

@ -5,7 +5,7 @@
<view class="left"> <view class="left">
<view class="left-item"> <view class="left-item">
<view class="label">物品代码</view> <view class="label">物品代码</view>
<view class="value" id="name1">{{ item.itemCode }}</view> <view class="value bold-font" id="name1">{{ item.itemCode }}</view>
</view> </view>
<view class="left-item"> <view class="left-item">
<view class="label">物品名称</view> <view class="label">物品名称</view>
@ -29,7 +29,7 @@
</view> </view>
<view class="left-item"> <view class="left-item">
<view class="label">数量</view> <view class="label">数量</view>
<view class="value">{{item.qty}}</view> <view class="value bold-font">{{item.qty}}</view>
</view> </view>
</view> </view>
<view class="right"> <view class="right">
@ -118,7 +118,7 @@
<div class="left"> <div class="left">
<div class="left-item"> <div class="left-item">
<div class="label">物品代码</div> <div class="label">物品代码</div>
<div class="value" id="name1">${item.itemCode}</div> <div class="value bold-font" id="name1">${item.itemCode}</div>
</div> </div>
<div class="left-item"> <div class="left-item">
<div class="label">物品名称</div> <div class="label">物品名称</div>
@ -142,7 +142,7 @@
</div> </div>
<div class="left-item"> <div class="left-item">
<div class="label">数量</div> <div class="label">数量</div>
<div class="value">${item.qty}</div> <div class="value bold-font">${item.qty}</div>
</div> </div>
</div> </div>
<div class="right"> <div class="right">
@ -258,7 +258,10 @@
.left-item { .left-item {
display: flex; display: flex;
} }
.bold-font{
font-weight: bold;
font-size: 28rpx;
}
.label { .label {
border-bottom: 1px solid #b1b1b1; border-bottom: 1px solid #b1b1b1;
border-right: 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_item_code">零件号</text>
<text class="card_content">{{ detail.itemCode }}</text> <text class="card_content">{{ detail.itemCode }}</text>
</view> </view>
<view> <!-- <view>
<text class="card_product_date">生产日期</text> <text class="card_product_date">生产日期</text>
<text class="card_content">{{ detail.productDate }}</text> <text class="card_content">{{ detail.productDate }}</text>
</view> </view> -->
<!-- <view> <!-- <view>
<text class="card_batch card_content ">批次</text> <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 { getManagementPrecisions } from '@/common/balance.js'
import { getCurrDateTime, goHome, navigateBack, getPackingNumberAndBatch, getSwitchInfoByCode } from '@/common/basic.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' import { getDirectoryItemArray, getInventoryStatusName } from '@/common/directory.js'
@ -203,6 +203,10 @@ const getDetail = () => {
const getScanResult = (result) => { const getScanResult = (result) => {
// TODO // TODO
// mes
isCheckMesCode(result.content)
.then((res) => {
if (res.data) {
if (detailSource.value.length > 0) { if (detailSource.value.length > 0) {
const item = detailSource.value[0] // const item = detailSource.value[0] //
result.uom = item.uom result.uom = item.uom
@ -217,7 +221,7 @@ const getScanResult = (result) => {
subItem.fgList.push(result) subItem.fgList.push(result)
calcFgQty(detailSource.value) calcFgQty(detailSource.value)
} else { } 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) { if (itemIndex == -1) {
subItem.fgList.push(result) subItem.fgList.push(result)
calcFgQty(detailSource.value) calcFgQty(detailSource.value)
@ -234,6 +238,11 @@ const getScanResult = (result) => {
}, 500) }, 500)
} }
} }
}
})
.catch((error) => {
showErrorMessage(error)
})
} }
const calcFgQty = () => { const calcFgQty = () => {
@ -391,7 +400,9 @@ const commit = () => {
submitJob() submitJob()
} }
} else { } else {
if (!subitem.handleQty) {
subitem.handleQty = subitem.qty subitem.handleQty = subitem.qty
}
subitem.scaned = true subitem.scaned = true
submitJob() submitJob()
} }
@ -445,9 +456,9 @@ const setParams = () => {
if (detail.fgList) { if (detail.fgList) {
detail.fgList.forEach((res) => { detail.fgList.forEach((res) => {
res.outsideItemCode = res.itemCode res.outsideItemCode = res.itemCode
res.outsideProduceDate = res.productDate // res.outsideProduceDate = res.productDate
res.outsideProduceDate = null
res.outsideSerialNumber = res.order res.outsideSerialNumber = res.order
res.lowerLim = res.content
}) })
} }
subList.push(detail) subList.push(detail)

Loading…
Cancel
Save