Browse Source

修改无计划完工

hella_online_20240829
niexiting 4 months ago
parent
commit
2e1b4bb68f
  1. 129
      src/pages/fg/coms/comNoReceiptPopup.vue
  2. 27
      src/pages/fg/receiptNoPlan.vue

129
src/pages/fg/coms/comNoReceiptPopup.vue

@ -34,8 +34,8 @@
<view class="customerBorder" @click="showSelectDate"> <view class="customerBorder" @click="showSelectDate">
{{planDate}} {{planDate}}
</view> </view>
<u-select v-model="showDateSelect" mode="mutil-column-auto" <u-select v-model="showDateSelect" mode="mutil-column-auto" :list="planDateList"
:list="planDateList" @confirm="confirmSelectDate"></u-select> @confirm="confirmSelectDate"></u-select>
<view class=""> <view class="">
<image src="/static/icons/down.svg" mode="" <image src="/static/icons/down.svg" mode=""
@ -49,14 +49,21 @@
<view class="customerBorder"> <view class="customerBorder">
{{itemCode}} {{itemCode}}
</view> </view>
<view v-if="planQty>0">{{planQty}}({{getUomInfo(uom)}})</view>
<u-select v-model="showItemCodeSelect" mode="single-column" :list="itemCodeList" <u-select v-model="showItemCodeSelect" mode="single-column" :list="itemCodeList"
@confirm="confirmSelectItem"></u-select> @confirm="confirmSelectItem"></u-select>
<view class="" > <view class="">
<image src="/static/icons/down.svg" mode=""
<image src="" mode=""
style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;" style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;"
> @click="showSelectItemCode">
</image>
</view>
</view>
<view class="title " style="display: flex;align-items: center;padding: 10rpx;">
<text style=" flex-shrink: 0; width: 25%;">数量</text>
<uni-easyinput v-model="planQty"></uni-easyinput><view v-if="uom">({{getUomInfo(uom)}})</view>
<view class="">
<image src="" mode="" style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;">
</image> </image>
</view> </view>
</view> </view>
@ -82,13 +89,10 @@
<text style=" flex-shrink: 0; width: 25%;">批次</text> <text style=" flex-shrink: 0; width: 25%;">批次</text>
<uni-easyinput v-model="batch"></uni-easyinput> <uni-easyinput v-model="batch"></uni-easyinput>
<view class=""> <view class="">
<image src="" mode="" style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;" <image src="" mode="" style=" width: 40rpx;height: 40rpx;margin-left: 20rpx;">
@click="showSelectLine">
</image> </image>
</view> </view>
</view> </view>
<view class='split_line'></view>
</view> </view>
</view> </view>
</view> </view>
@ -107,7 +111,8 @@
getIssueJobByProductionline, getIssueJobByProductionline,
getPlaneInfoByproductLine, getPlaneInfoByproductLine,
getPackUnitByItemCode, getPackUnitByItemCode,
getProductionlineAndWorkStation getProductionlineAndWorkStation,
getProductionlineItem
} from '@/api/request2.js'; } from '@/api/request2.js';
import { import {
getPackUnitName, getPackUnitName,
@ -161,10 +166,10 @@
showItemCodeSelect: false, showItemCodeSelect: false,
workStationCode: "", workStationCode: "",
planDate: '', planDate: '',
showDateSelect:false, showDateSelect: false,
planDateList:[], planDateList: [],
fgLocationCode:"", fgLocationCode: "",
rawLocationCode:"" rawLocationCode: ""
} }
}, },
props: { props: {
@ -181,7 +186,7 @@
openRequestPopup() { openRequestPopup() {
this.initData(); this.initData();
this.planDate =getCurrDate() this.planDate = getCurrDate()
this.batch = getBatch8() this.batch = getBatch8()
this.$refs.popup.open('bottom') this.$refs.popup.open('bottom')
}, },
@ -200,17 +205,17 @@
this.batch = "" this.batch = ""
this.packUnitName = "请选择包装规格" this.packUnitName = "请选择包装规格"
this.packUnit = "", this.packUnit = "",
this.packQtyHint = "" this.packQtyHint = ""
this.showPackUnitSelect = false this.showPackUnitSelect = false
// this.packUnitList = [] // this.packUnitList = []
this.itemCodeList = [] this.itemCodeList = []
this.showItemCodeSelect = false this.showItemCodeSelect = false
this.workStationCode = "" this.workStationCode = ""
this.planDate="" this.planDate = ""
this.showDateSelect =false this.showDateSelect = false
this.planDateList=[] this.planDateList = []
this.fgLocationCode="" this.fgLocationCode = ""
this.rawLocationCode="" this.rawLocationCode = ""
}, },
@ -242,6 +247,11 @@
return return
} }
if (this.planQty <= 0) {
this.showErrorMessage("请输入完工数量")
return
}
if (this.packUnitName == "请选择包装规格") { if (this.packUnitName == "请选择包装规格") {
this.showErrorMessage("请选择包装规格") this.showErrorMessage("请选择包装规格")
return return
@ -252,9 +262,10 @@
callback() { callback() {
let item = { let item = {
productionLineName: this.productionLineName, productionLineName: "",
productionLineCode: this.productionLineCode, //线 productionLineCode: "", //线
itemCode: this.itemCode, itemCode: this.itemCode,
itemName:this.itemName,
uom: this.getUomInfo(this.uom), uom: this.getUomInfo(this.uom),
batch: this.batch, batch: this.batch,
packUnitName: this.packUnitName, packUnitName: this.packUnitName,
@ -263,10 +274,10 @@
packQty: this.packQty, packQty: this.packQty,
planQty: this.planQty, planQty: this.planQty,
goodQty: this.goodQty, goodQty: this.goodQty,
planNumber: this.planNumber, planNumber: "",
workStationCode: this.workStationCode, workStationCode: this.workStationCode,
fgLocationCode:this.fgLocationCode, fgLocationCode: this.fgLocationCode,
rawLocationCode:this.rawLocationCode rawLocationCode: this.rawLocationCode
}; };
this.closeRequestPopup(); this.closeRequestPopup();
this.$emit("confirm", item); this.$emit("confirm", item);
@ -285,16 +296,16 @@
this.productionLineName = data[0].label + "—" + data[1].label this.productionLineName = data[0].label + "—" + data[1].label
this.productionLineCode = data[0].value this.productionLineCode = data[0].value
this.workStationCode = data[1].value this.workStationCode = data[1].value
var parent =this.productLineList.filter(res=>res.value==this.productionLineCode) var parent = this.productLineList.filter(res => res.value == this.productionLineCode)
var fgLocation =parent[0].children.filter(children=>children.value==this.workStationCode) var fgLocation = parent[0].children.filter(children => children.value == this.workStationCode)
this.fgLocationCode= fgLocation[0].fgLocationCode; this.fgLocationCode = fgLocation[0].fgLocationCode;
this.clearItemCode() this.clearItemCode()
this.clearPackUnit() this.clearPackUnit()
}, },
clearItemCode(){ clearItemCode() {
this.planDate =getCurrDate() this.planDate = getCurrDate()
this.itemCode ="请选择物料信息" this.itemCode = "请选择物料信息"
this.uom = "" this.uom = ""
this.planQty = 0; this.planQty = 0;
this.goodQty = 0 this.goodQty = 0
@ -302,17 +313,17 @@
}, },
confirmSelectDate(data) { confirmSelectDate(data) {
this.planDate=data[0].label this.planDate = data[0].label
}, },
showSelectDate(){ showSelectDate() {
this.showDateSelect =true; this.showDateSelect = true;
var list =lastThreeDays(3); var list = lastThreeDays(3);
this.planDateList=[] this.planDateList = []
list.forEach(res=>{ list.forEach(res => {
this.planDateList.push({ this.planDateList.push({
label :res, label: res,
value:"" value: ""
}) })
}) })
}, },
@ -347,39 +358,37 @@
this.showErrorMessage('请先选择计划日期'); this.showErrorMessage('请先选择计划日期');
return; return;
} }
if (!this.productionLineCode) {
this.showErrorMessage('请先选择生产线');
return;
}
uni.showLoading({ uni.showLoading({
title: "加载中", title: "加载中",
mask: true mask: true
}) })
getPlaneInfoByproductLine(this.productionLineCode, this.planDate).then(res => { let param = {
pageSize: 20,
pageNo: 1,
productionLineCode: this.productionLineCode
};
getProductionlineItem(param).then(res => {
uni.hideLoading() uni.hideLoading()
if (res.data && res.data.length > 0) { if (res.data.list && res.data.list.length > 0) {
res.data.forEach(item => { res.data.list.forEach(item => {
item.label = item.itemCode + "(" + item.planQty + this.getUomInfo(item.uom) + ")" item.label = item.itemCode
item.value = item item.value = item
}) })
this.itemCodeList = res.data this.itemCodeList = res.data.list
this.showItemCodeSelect = true this.showItemCodeSelect = true
} else { } else {
this.showErrorMessage('未查找到物料信息'); this.showErrorMessage('未查找到物料信息');
} }
}).catch(error => { }).catch(error => {
uni.hideLoading() uni.hideLoading()
this.showErrorMessage(error); this.showErrorMessage(error);
}) })
}, },
confirmSelectItem(data) { confirmSelectItem(data) {
let productionPlan = data[0].value; let itemInfo = data[0].value;
this.itemCode = productionPlan.itemCode; this.itemCode = itemInfo.itemCode;
this.uom = productionPlan.uom this.uom = itemInfo.uom
this.planQty = productionPlan.planQty;
this.goodQty = productionPlan.goodQty
this.planNumber = productionPlan.number
// //
this.clearPackUnit(); this.clearPackUnit();
@ -396,7 +405,7 @@
.getUomInfo(item.uom) + ")"; .getUomInfo(item.uom) + ")";
}) })
this.packUnitList = res.data.list this.packUnitList = res.data.list
var defaultData =res.data.list.filter(item=>item.defaultPackageunit=="TRUE") var defaultData = res.data.list.filter(item => item.defaultPackageunit == "TRUE")
this.confirmSelectPackUnit(defaultData) this.confirmSelectPackUnit(defaultData)
} }
@ -405,7 +414,7 @@
}) })
}, },
clearPackUnit(){ clearPackUnit() {
this.packUnitName = "请选择包装规格" this.packUnitName = "请选择包装规格"
this.packUnit = "" this.packUnit = ""
let pack = this.packUnitList.filter(r => r.packUnit == this.packUnit); let pack = this.packUnitList.filter(r => r.packUnit == this.packUnit);

27
src/pages/fg/receiptNoPlan.vue

@ -6,11 +6,6 @@
<com-blank-view @goScan='openFg' v-if="!dataContent"></com-blank-view> <com-blank-view @goScan='openFg' v-if="!dataContent"></com-blank-view>
</view> </view>
<view class="" v-if="dataContent"> <view class="" v-if="dataContent">
<view class="" style="font-size: 35rpx;padding: 10rpx; padding-left: 15rpx;">
生产计划{{dataContent.planNumber}}
</view>
<view class='split_line'></view>
<view class="cell_box uni-flex uni-row"> <view class="cell_box uni-flex uni-row">
<view class="cell_info"> <view class="cell_info">
<view class="text_lightblue">完工库位</view> <view class="text_lightblue">完工库位</view>
@ -22,14 +17,6 @@
<view class="text_lightblue">计划数</view> <view class="text_lightblue">计划数</view>
<view>{{dataContent.planQty}}{{dataContent.uom}}</view> <view>{{dataContent.planQty}}{{dataContent.uom}}</view>
</view> </view>
<view class="cell_info">
<view class="text_lightblue">已完工</view>
<view>{{ dataContent.goodQty }}{{dataContent.uom}}</view>
</view>
<view class="cell_info">
<view class="text_lightblue">未完工</view>
<view>{{dataContent.noGoodQty}}{{dataContent.uom}}</view>
</view>
</view> </view>
<view class='split_line'></view> <view class='split_line'></view>
@ -49,19 +36,11 @@
<text v-if="dataContent.handleQty>0" style="color: #FFA500;">{{dataContent.handleQty}}/</text> <text v-if="dataContent.handleQty>0" style="color: #FFA500;">{{dataContent.handleQty}}/</text>
{{dataContent.packQtyHint}} {{dataContent.packQtyHint}}
</view> </view>
</view> </view>
<view class='split_line' v-if="dataContent"></view>
</view> </view>
</view> </view>
<view style="margin-top: 350rpx; padding-bottom: 160rpx;" v-if="dataContent">
<view style="margin-top: 480rpx; padding-bottom: 160rpx;" v-if="dataContent">
<scroll-view scroll-y="true" class=""> <scroll-view scroll-y="true" class="">
<view class="scan_view" v-for="(item, index) in showList" :key="index"> <view class="scan_view" v-for="(item, index) in showList" :key="index">
<uni-swipe-action> <uni-swipe-action>
@ -388,10 +367,8 @@
isCheckMesCode(result.content).then(res => { isCheckMesCode(result.content).then(res => {
if (res.data) { if (res.data) {
if (that.dataContent) { if (that.dataContent) {
var itemIndex = this.allList.findIndex(r => var itemIndex = this.allList.findIndex(r =>
r.itemCode == result.itemCode && r.content == result.content);
r.order == result.order);
// //
if (itemIndex == -1) { if (itemIndex == -1) {
// if (this.allList.length > this.dataContent.packQty) { // if (this.allList.length > this.dataContent.packQty) {

Loading…
Cancel
Save