Browse Source

Merge branch 'master_hella' of http://dev.ccwin-in.com:3000/sfms3.0/sfms3.0-uniapp into master_hella

hella_online_20240829
lijuncheng 2 months ago
parent
commit
1f5b93e8df
  1. 51
      src/pages/productReceipt/job/fgProductReceiptDetail.vue

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

@ -1,13 +1,11 @@
<template> <template>
<view class="page-wraper"> <view class="page-wraper">
<view class="page-header"> <view class="page-header">
<view class="header-view">
<view class="header_job_top"> <view class="header_job_top">
<job-top :dataContent="jobContent"></job-top> <job-top :dataContent="jobContent"></job-top>
</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="cen_card" style="padding: 5rpx;"> <view class="cen_card" style="padding: 5rpx;">
<view class="cell_box uni-flex uni-row"> <view class="cell_box uni-flex uni-row">
<view class="cell_info"> <view class="cell_info">
@ -19,7 +17,7 @@
<view class="cell_info"> <view class="cell_info">
<view class="text_lightblue">生产线</view> <view class="text_lightblue">生产线</view>
<view> <view>
{{item.subList[0].productionLineCode}} {{productionLineCode}}
</view> </view>
</view> </view>
<view class="cell_info"> <view class="cell_info">
@ -35,8 +33,12 @@
</view> </view>
</view> </view>
</view> </view>
<view class="split_line"></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,7 +231,8 @@
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;
if (that.jobContent.allowModifyLocation == 'FALSE') {
that.toLocationCode = that.subList[0].toLocationCode that.toLocationCode = that.subList[0].toLocationCode
} }
that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes) that.toLocationTypeList = getDirectoryItemArray(that.jobContent.toLocationTypes)
@ -246,8 +252,8 @@
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;
@ -270,7 +276,8 @@
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 + '】已经扫描,是否移除',
confirm => {
subItem.fgList.splice(itemIndex, 1) subItem.fgList.splice(itemIndex, 1)
that.calcFgQty(this.detailSource); that.calcFgQty(this.detailSource);
}) })
@ -283,7 +290,7 @@
} }
} }
} }
}).catch(error=>{ }).catch(error => {
this.showErrorMessage(error) this.showErrorMessage(error)
}) })
@ -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,9 +462,9 @@
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();
@ -520,8 +527,8 @@
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)
} }

Loading…
Cancel
Save