Browse Source

修改装配收货明细样式

hella_online_20240829
niexiting 4 months ago
parent
commit
4853bc97c7
  1. 159
      src/pages/productReceipt/job/fgProductReceiptDetail.vue

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

@ -1,42 +1,44 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class="page-header"> <view class="page-header">
<view class="header_job_top"> <view class="header-view">
<job-top :dataContent="jobContent"></job-top> <view class="header_job_top">
</view> <job-top :dataContent="jobContent"></job-top>
</view> </view>
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll"> <view class="cen_card" style="padding: 5rpx;">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id"> <view class="cell_box uni-flex uni-row">
<view class="cen_card" style="padding: 5rpx;"> <view class="cell_info">
<view class="cell_box uni-flex uni-row"> <view class="text_lightblue">车间</view>
<view class="cell_info"> <view>
<view class="text_lightblue">车间</view> {{jobContent.workShopCode}}
<view>
{{jobContent.workShopCode}}
</view>
</view> </view>
<view class="cell_info"> </view>
<view class="text_lightblue">生产线</view> <view class="cell_info">
<view> <view class="text_lightblue">生产线</view>
{{item.subList[0].productionLineCode}} <view>
</view> {{productionLineCode}}
</view> </view>
<view class="cell_info"> </view>
<view class="text_lightblue">班组</view> <view class="cell_info">
<view> <view class="text_lightblue">班组</view>
{{jobContent.team}} <view>
</view> {{jobContent.team}}
</view> </view>
<view class="cell_info"> </view>
<view class="text_lightblue">班次</view> <view class="cell_info">
<view> <view class="text_lightblue">班次</view>
{{jobContent.shift}} <view>
</view> {{jobContent.shift}}
</view> </view>
</view> </view>
<view class="split_line"></view>
</view> </view>
</view>
</view>
</view>
<view class="page-main">
<scroll-view scroll-y="true" class="page-main-scroll">
<view class="detail-list" v-for="(item, index) in detailSource" :key="item.id">
<view class=""> <view class="">
<com-product-detail-card :dataContent="item" :settingParam="jobContent" :isShowLocation="false" <com-product-detail-card :dataContent="item" :settingParam="jobContent" :isShowLocation="false"
@remove="updateData" @updateData="updateData" :locationTypeList='toLocationTypeList'> @remove="updateData" @updateData="updateData" :locationTypeList='toLocationTypeList'>
@ -70,7 +72,9 @@
import { import {
getManagementPrecisions getManagementPrecisions
} from '@/common/balance.js'; } from '@/common/balance.js';
import { getCurrDateTime} from '@/common/basic.js'; import {
getCurrDateTime
} from '@/common/basic.js';
import { import {
getProductReceiptJobDetail, getProductReceiptJobDetail,
@ -143,15 +147,16 @@
jobToLocationCode: "", jobToLocationCode: "",
fgList: [], fgList: [],
itemCode: "", itemCode: "",
productionLineCode: "",
scanMessage: "", scanMessage: "",
}; };
}, },
onLoad(option) { onLoad(option) {
uni.setNavigationBarTitle({ uni.setNavigationBarTitle({
title: option.title+'详情' title: option.title + '详情'
}) })
this.id = option.id; this.id = option.id;
this.scanMessage = option.scanMessage ; this.scanMessage = option.scanMessage;
if (this.id != undefined) { if (this.id != undefined) {
// //
if (option.status == "1") { if (option.status == "1") {
@ -226,8 +231,9 @@
that.subList = res.data.subList; that.subList = res.data.subList;
that.jobStatus = res.data.status that.jobStatus = res.data.status
that.jobToLocationCode = that.subList[0].toLocationCode that.jobToLocationCode = that.subList[0].toLocationCode
if(that.jobContent.allowModifyLocation=='FALSE'){ that.productionLineCode = that.subList[0].productionLineCode;
that.toLocationCode = that.subList[0].toLocationCode if (that.jobContent.allowModifyLocation == 'FALSE') {
that.toLocationCode = that.subList[0].toLocationCode
} }
that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes)
that.detailSource = getDataSource(that.subList) that.detailSource = getDataSource(that.subList)
@ -243,11 +249,11 @@
}, },
getScanResult(result) { getScanResult(result) {
let that = this; let that = this;
//TODO //TODO
//mes //mes
isCheckMesCode(result.content).then(res=>{ isCheckMesCode(result.content).then(res => {
if(res.data){ if (res.data) {
if (that.detailSource.length > 0) { if (that.detailSource.length > 0) {
let item = that.detailSource[0]; // let item = that.detailSource[0]; //
result.uom = item.uom; result.uom = item.uom;
@ -257,7 +263,7 @@
if (subItem.fgList == undefined) { if (subItem.fgList == undefined) {
subItem.fgList = []; subItem.fgList = [];
} }
if (subItem.fgList.length == 0) { if (subItem.fgList.length == 0) {
subItem.fgList.push(result); subItem.fgList.push(result);
that.calcFgQty(this.detailSource); that.calcFgQty(this.detailSource);
@ -270,23 +276,24 @@
subItem.fgList.push(result); subItem.fgList.push(result);
that.calcFgQty(this.detailSource); that.calcFgQty(this.detailSource);
} else { } else {
this.showQuestionMessage("标签【" + result.content + '】已经扫描,是否移除', confirm => { this.showQuestionMessage("标签【" + result.content + '】已经扫描,是否移除',
subItem.fgList.splice(itemIndex, 1) confirm => {
that.calcFgQty(this.detailSource); subItem.fgList.splice(itemIndex, 1)
}) that.calcFgQty(this.detailSource);
})
} }
} }
setTimeout(r => { setTimeout(r => {
this.scanPopupGetFocus(); this.scanPopupGetFocus();
}, 500) }, 500)
} }
} }
} }
}).catch(error=>{ }).catch(error => {
this.showErrorMessage(error) this.showErrorMessage(error)
}) })
}, },
calcFgQty() { calcFgQty() {
@ -359,9 +366,9 @@
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.subList.forEach(detail => { item.subList.forEach(detail => {
if (detail.scaned) { if (detail.scaned) {
// var info = getPackingNumberAndBatch(this.managementList, detail.itemCode, // var info = getPackingNumberAndBatch(this.managementList, detail.itemCode,
// detail.packingNumber, detail.batch); // detail.packingNumber, detail.batch);
// detail.toPackingNumber = info.packingNumber; // detail.toPackingNumber = info.packingNumber;
packingNumber.push(detail.packingNumber) packingNumber.push(detail.packingNumber)
} }
}) })
@ -374,19 +381,19 @@
console.log('打印', res) console.log('打印', res)
let pointData = [] let pointData = []
res.data.forEach(item => { res.data.forEach(item => {
pointData.push({ pointData.push({
barcodeString: item.barcodeString, // barcodeString: item.barcodeString, //
itemCode: item.itemCode || '', // itemCode: item.itemCode || '', //
itemName: item.itemName || '', // itemName: item.itemName || '', //
packName: item.packName || '', // packName: item.packName || '', //
itemType: item.itemType || '', // itemType: item.itemType || '', //
itemDesc1: item.itemDesc1 || '', // itemDesc1: item.itemDesc1 || '', //
relateNumber: item.relateNumber || '', //relateNumber relateNumber: item.relateNumber || '', //relateNumber
batch: item.batch || '', // batch: item.batch || '', //
productionLineCode: item.productionLineCode || '', //线 productionLineCode: item.productionLineCode || '', //线
shiftCode: item.shiftCode || '', // shiftCode: item.shiftCode || '', //
qty: item.qty || '', // qty: item.qty || '', //
printTimes: getCurrDateTime() // printTimes: getCurrDateTime() //
}) })
}) })
console.log('pointData', pointData) console.log('pointData', pointData)
@ -414,7 +421,7 @@
}, },
getH5BatchPrintingLable( number) { getH5BatchPrintingLable(number) {
let _this = this let _this = this
batchPrintingLable(number).then(resLable => { batchPrintingLable(number).then(resLable => {
console.log('batchPrintingLable', resLable) console.log('batchPrintingLable', resLable)
@ -438,10 +445,10 @@
if (!this.checkLocation()) { if (!this.checkLocation()) {
return return
} }
var valiDate =getSwitchInfoByCode("fgProductReceipCommitValidate") var valiDate = getSwitchInfoByCode("fgProductReceipCommitValidate")
this.detailSource.forEach(item => { this.detailSource.forEach(item => {
item.subList.forEach(subitem => { item.subList.forEach(subitem => {
if(valiDate){ if (valiDate) {
if (subitem.handleQty == undefined) { if (subitem.handleQty == undefined) {
this.showMessage("还没扫码成品不能提交") this.showMessage("还没扫码成品不能提交")
} else { } else {
@ -455,14 +462,14 @@
this.submitJob(); this.submitJob();
} }
} }
}else { } else {
if(!subitem.handleQty){ if (!subitem.handleQty) {
subitem.handleQty=subitem.qty subitem.handleQty = subitem.qty
} }
subitem.scaned = true subitem.scaned = true
this.submitJob(); this.submitJob();
} }
}) })
}) })
}, },
@ -511,22 +518,22 @@
detail.toBatch = info.batch; detail.toBatch = info.batch;
detail.toContainerNumber = ''; detail.toContainerNumber = '';
detail.toInventoryStatus = detail.inventoryStatus detail.toInventoryStatus = detail.inventoryStatus
detail.toLocationCode = this.toLocationCode detail.toLocationCode = this.toLocationCode
detail.available = 'TRUE' detail.available = 'TRUE'
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.outsideProduceDate = null
res.outsideSerialNumber = res.order res.outsideSerialNumber = res.order
}) })
}else { } else {
detail.fgList=[] detail.fgList = []
} }
subList.push(detail) subList.push(detail)
} }
}) })
}) })
this.jobContent.available = 'TRUE' this.jobContent.available = 'TRUE'
this.jobContent.subList = subList this.jobContent.subList = subList
this.jobContent.creator = creator; this.jobContent.creator = creator;

Loading…
Cancel
Save