剩余模块:生产退料

This commit is contained in:
2025-05-26 16:57:56 +08:00
parent b1d8dec263
commit eb2c8d2d7a
161 changed files with 18754 additions and 6607 deletions

View File

@@ -6,17 +6,29 @@
</l-header>
<view class="input-box">
<view class="input-item">
<up-input :placeholder="t('receive.code')" border="none" clearable inputAlign="left" inputmode="none"
:focus="state.inputFocus" v-model="state.queryString" @change="changeFun" ref="inputRef">
<up-input :placeholder="t('receive.code')" border="none" clearable inputAlign="left" :focus="state.inputFocus"
v-model="state.queryString" @change="changeFun" ref="inputRef">
<template #prefix>
<up-icon name="scan" color="#2979ff" size="24"></up-icon>
</template>
<template #suffix>
<up-icon name="edit-pen" color="#2979ff" size="24" @click="() => {state.manualShow = !state.manualShow}"></up-icon>
</template>
</up-input>
</view>
</view>
<view class="input-box" v-show="state.manualShow">
<view class="input-item">
<up-input :placeholder="t('receive.code')" border="none" clearable inputAlign="left" :focus="state.inputFocus"
v-model="state.manualQueryString" @confirm="confirmFun" ref="inputRef">
<template #prefix>
<up-icon name="search" color="#2979ff" size="24"></up-icon>
</template>
</up-input>
</view>
</view>
<view class="material-listBox">
<scroll-view id="scroll-box" class="scroll-box" scroll-y="true"
:style="{'height':state.scrollHeight+'px'}">
<scroll-view id="scroll-box" class="scroll-box" scroll-y="true" :style="{'height':state.scrollHeight+'px'}">
<view class="list-box-list" v-if="state.dataList.length > 0">
<view class="data-item" v-for="(item, index) in state.dataList"
:style="[{'background-color':interpolation(item)},{'margin-bottom':index + 1 === state.dataList.length ? '80px' : '20px'}]"
@@ -89,6 +101,8 @@
const { t, locale } = getI18n
const state = reactive({
queryString: '',
manualQueryString: '',
manualShow: false,
dataList: [],
scrollHeight: 0,
page: {
@@ -97,6 +111,7 @@
totalCount: 0
},
FBillNo: '',
BillNo: '',
materialId: '',
supplierName: '',
inputFocus: true,
@@ -145,21 +160,25 @@
if (state.queryString !== '') getReceiveBillScanData(e)
}, 500)
}
const confirmFun = (e:any) => {
getReceiveBillScanData(e)
}
//查询录入
const getReceiveBillScanData = (val : string) => {
PRDPPBOMScanData({
FBarCode: val,
FBillNo: state.FBillNo,
FBillNo: state.BillNo,
IsFeed: 'true'
}).then((res : any) => {
if (res.data !== null) {
console.log(res);
const scanData = res.data
if( scanData.UnScanQty > scanData.BarCodeQty ) scanData.UnScanQty = scanData.BarCodeQty
scanFrameRef.value.getreceiveBillScanData({
...res.data,
queryString: state.queryString,
scanFrameShowSate: state.shortcutDataFeedback.scanFrameShowSate,
quantityStateSup:'0',
quantityStateSup: '0',
})
if (Object.keys(state.shortcutDataFeedback).length) {
if (state.shortcutDataFeedback.scanFrameShowSate) {
@@ -187,7 +206,7 @@
//数据记录暂存
const postTemporaryScanDraftSaveFun = (item : any) => {
const obj = {};
if (item.warehouseData.FIsOpenLocation && Object.keys(item.locationData).length != 0) {
if (item.warehouseData.FIsOpenLocation && Object.keys(item.locationData).length != 0) {
const key = `FVHUBSTOCKFLEX__FF${item.locationData.FID}`; //仓位Id
obj[key] = { FNumber: item.locationData.FlexEntryId.Number }; //仓位编码
}
@@ -195,7 +214,7 @@
console.log(item);
temporaryScanDraftSave({
FVHUBFormId: "PRD_PPBOM", //数据类型
FVHUBFBillNo: state.FBillNo, //单据编号
FVHUBFBillNo: state.BillNo, //单据编号
FVHUBScanNumber: state.queryString, //条码
FVHUBMaterialNumber: item.articlesStr, //物料编码
FVHUBScanQty: item.quantityStr + '', //扫描数量
@@ -207,6 +226,7 @@
FVHUBMaterial: {
FNUMBER: item.articlesStr
},
FType: "Feed",
...JSON.parse(str),
}).then((res : any) => {
console.log(res);
@@ -231,7 +251,7 @@
const scanRecordFun = () => {
toPages('/pages/records/index', {
FormId: 'PRD_PPBOM',
FbillNo: state.FBillNo
FbillNo: state.BillNo
})
}
/**
@@ -305,13 +325,14 @@
*/
const fnDataList = (FBillNo : any, statesItem : boolean = false) => {
let param = {
id: FBillNo,
IsInStock: 'true'
Id: FBillNo,
IsFeed: 'true',
};
uni.showLoading({ mask: true });
PRDPPBOMView(param).then(res => {
uni.hideLoading();
if (res.code == 200) {
state.BillNo = res.data.BillNo
state.dataList = []
let dataListArray = res.data.Entry;
if (dataListArray.length > 0) {