剩余模块:生产退料

This commit is contained in:
2025-06-03 02:55:34 +08:00
parent eb2c8d2d7a
commit a12f56d2be
100 changed files with 9219 additions and 7499 deletions

View File

@@ -2,19 +2,11 @@
<view class="app status-bar-gap">
<view class="page">
<l-header :title="state.fbillNo" sticky></l-header>
<view class="input-box">
<view class="input-item">
<up-input :placeholder="t('receive.code')" border="none" clearable inputAlign="left"
v-model="state.queryString" @change="changeFun">
<template #prefix>
<up-icon name="search" color="#2979ff" size="24"></up-icon>
</template>
</up-input>
</view>
</view>
<architecture ref="architectureRef" :dataType="t('index.ctllyz')" :placeholder="t('receive.code')"
@scanConfirm="scanConfirmFun" @inputConfirm="changeFun" />
<view class="receive-listBox" ref="listBoxRef">
<scroll-view id="scroll-box" class="scroll-box" scroll-y="true"
:style="{'height':state.scrollHeight+'px'}" @scrolltolower="fnScrollBottom()">
<scroll-view id="scroll-box" class="scroll-box" scroll-y="true" :style="{'height':state.scrollHeight+'px'}"
@scrolltolower="fnScrollBottom()">
<view class="list-box-list" v-if="state.dataList.length > 0">
<view class="data-item" @click.stop="fnToUrl(item)" v-for="(item, index) in state.dataList" :key="index">
<view class="tit">{{ t('index.csllddh') }}{{item.FBillNo}}</view>
@@ -22,7 +14,7 @@
<view class="b-font">{{ t('verify.date') }}{{item.FDateFormat}}</view>
</view>
</view>
<view v-if="state.dataList.length==0">
<view v-if="state.dataList.length==0">
<up-empty mode="list"></up-empty>
</view>
</scroll-view>
@@ -37,12 +29,13 @@
import { useI18n } from 'vue-i18n'
import { parseTime } from '../../utils/tools.js';
import { PRDPPBOMList, PRD_MOList, PRD_PickMtrlList } from '../../common/request/api/api';
const architectureRef = ref()
const listBoxRef = ref(null)
const getI18n = useI18n()
const { t, locale } = getI18n
const state = reactive({
queryString: '',
fbillNo:'',
fbillNo: '',
dataList: [],
scrollHeight: 0,
page: {
@@ -51,7 +44,7 @@
totalCount: 0
}
})
onLoad((pageData:any) => {
onLoad((pageData : any) => {
state.fbillNo = pageData.fBillNo
fnDataList()
})
@@ -61,10 +54,17 @@
state.scrollHeight = data.height
}).exec();
})
const scanConfirmFun = (e : any) => {
state.queryString = e
state.page.pageIndex = 1
state.dataList = []
fnDataList()
architectureRef.value.closeFun()
}
const fnScrollBottom = () => {
console.log(state.page.pageIndex * state.page.pageSize,state.page.totalCount);
console.log(state.page.pageIndex * state.page.pageSize, state.page.totalCount);
if (state.page.pageIndex * state.page.pageSize <= state.page.totalCount) {
state.page.pageIndex ++;
state.page.pageIndex++;
uni.showLoading({ mask: true });
setTimeout(() => {
fnDataList();
@@ -72,7 +72,7 @@
}
}
const fnToUrl = (item : any) => {
toPages('/pages/ruleValidation/verification',{id:item.FID,fBillNo:item.FBillNo})
toPages('/pages/ruleValidation/verification', { id: item.FID, fBillNo: item.FBillNo })
}
const debounceTimer = ref()
const changeFun = (e : any) => {
@@ -82,12 +82,12 @@
state.page.pageIndex = 1
state.dataList = []
fnDataList()
}, 500)
})
}
const fnDataList = () => {
let param = {
queryString: state.queryString,
FbillNo:state.fbillNo,
FbillNo: state.fbillNo,
pageIndex: state.page.pageIndex,
pageSize: state.page.pageSize,
};
@@ -99,7 +99,7 @@
if (res.code == 200) {
let result = res.data;
let dataArray = result.list;
dataArray.forEach((p:any) => {
dataArray.forEach((p : any) => {
p.FDateFormat = parseTime(p.FCREATEDATE, '{y}-{m}-{d}');
});
if (state.page.pageIndex == 1) {
@@ -172,25 +172,29 @@
.receive-listBox {
flex: 1;
.list-box-list{
.list-box-list {
width: 100%;
// margin: 20rpx auto;
.data-item{
.data-item {
border: 1px solid #efeaea;
border-radius: 20rpx;
box-shadow: 0rpx 15rpx 15rpx #efeaea;
box-shadow: 0rpx 15rpx 15rpx #efeaea;
padding: 20rpx 20rpx 0;
margin-bottom: 20rpx;
background-color: #ffffff;
.tit{
.tit {
font-size: 30rpx;
font-weight: bold;
padding: 20rpx 0;
}
.line-p{
.line-p {
border: 1px solid #efeaea;
}
.b-font{
.b-font {
font-size: 25rpx;
padding: 20rpx 0;
}
@@ -199,5 +203,4 @@
}
}
}
</style>

View File

@@ -2,7 +2,7 @@
<view class="app status-bar-gap">
<view class="page">
<l-header :title="t('index.ctllyz')" sticky></l-header>
<view class="input-box">
<!-- <view class="input-box">
<view class="input-item">
<up-input :placeholder="t('index.scdd')" border="none" clearable inputAlign="left"
v-model="state.queryString" @change="changeFun">
@@ -11,10 +11,12 @@
</template>
</up-input>
</view>
</view>
</view> -->
<architecture ref="architectureRef" :dataType="t('index.ctllyz')" :placeholder="t('index.scdd')"
@scanConfirm="scanConfirmFun" @inputConfirm="changeFun" />
<view class="receive-listBox" ref="listBoxRef">
<scroll-view id="scroll-box" class="scroll-box" scroll-y="true"
:style="{'height':state.scrollHeight+'px'}" @scrolltolower="fnScrollBottom()">
<scroll-view id="scroll-box" class="scroll-box" scroll-y="true" :style="{'height':state.scrollHeight+'px'}"
@scrolltolower="fnScrollBottom()">
<view class="list-box-list" v-if="state.dataList.length > 0">
<view class="data-item" @click.stop="fnToUrl(item)" v-for="(item, index) in state.dataList" :key="index">
<view class="tit">{{ t('index.scddbh') }}{{item.FBillNo}}</view>
@@ -22,7 +24,7 @@
<view class="b-font">{{ t('verify.date') }}{{item.FDateFormat}}</view>
</view>
</view>
<view v-if="state.dataList.length==0">
<view v-if="state.dataList.length==0">
<up-empty mode="list"></up-empty>
</view>
</scroll-view>
@@ -37,6 +39,7 @@
import { useI18n } from 'vue-i18n'
import { parseTime } from '../../utils/tools.js';
import { PRDPPBOMList, PRD_MOList } from '../../common/request/api/api';
const architectureRef = ref()
const listBoxRef = ref(null)
const getI18n = useI18n()
const { t, locale } = getI18n
@@ -58,10 +61,16 @@
}).exec();
fnDataList()
})
const scanConfirmFun = (e : any) => {
state.queryString = e
state.page.pageIndex = 1
fnDataList()
architectureRef.value.closeFun()
}
const fnScrollBottom = () => {
console.log(state.page.pageIndex * state.page.pageSize,state.page.totalCount);
console.log(state.page.pageIndex * state.page.pageSize, state.page.totalCount);
if (state.page.pageIndex * state.page.pageSize <= state.page.totalCount) {
state.page.pageIndex ++;
state.page.pageIndex++;
uni.showLoading({ mask: true });
setTimeout(() => {
fnDataList();
@@ -69,7 +78,7 @@
}
}
const fnToUrl = (item : any) => {
toPages('/pages/ruleValidation/checklist',{id:item.FID,fBillNo:item.FBillNo})
toPages('/pages/ruleValidation/checklist', { id: item.FID, fBillNo: item.FBillNo })
}
const debounceTimer = ref()
const changeFun = (e : any) => {
@@ -79,7 +88,7 @@
state.page.pageIndex = 1
state.dataList = []
fnDataList()
}, 500)
})
}
const fnDataList = () => {
let param = {
@@ -95,7 +104,7 @@
if (res.code == 200) {
let result = res.data;
let dataArray = result.list;
dataArray.forEach((p:any) => {
dataArray.forEach((p : any) => {
p.FDateFormat = parseTime(p.FDate, '{y}-{m}-{d}');
});
@@ -169,25 +178,29 @@
.receive-listBox {
flex: 1;
.list-box-list{
.list-box-list {
width: 100%;
// margin: 20rpx auto;
.data-item{
.data-item {
border: 1px solid #efeaea;
border-radius: 20rpx;
box-shadow: 0rpx 15rpx 15rpx #efeaea;
box-shadow: 0rpx 15rpx 15rpx #efeaea;
padding: 20rpx 20rpx 0;
margin-bottom: 20rpx;
background-color: #ffffff;
.tit{
.tit {
font-size: 30rpx;
font-weight: bold;
padding: 20rpx 0;
}
.line-p{
.line-p {
border: 1px solid #efeaea;
}
.b-font{
.b-font {
font-size: 25rpx;
padding: 20rpx 0;
}
@@ -196,5 +209,4 @@
}
}
}
</style>

View File

@@ -4,7 +4,7 @@
<l-header :title="state.FBillNo" sticky #right>
<view style="margin-right: 32rpx;" @click="dataPushNotification">{{ t('receive.tj') }}</view>
</l-header>
<view class="input-box">
<!-- <view class="input-box">
<view class="input-item">
<up-input :placeholder="t('receive.code')" border="none" clearable inputAlign="left" inputmode="none"
v-model="state.queryString" @change="changeFun" ref="inputRef">
@@ -13,10 +13,12 @@
</template>
</up-input>
</view>
</view>
</view> -->
<architecture ref="architectureRef" :dataType="t('home.llyz')" icon="scan" :placeholder="t('verify.tm')"
@scanConfirm="scanConfirmFun" @inputConfirm="changeFun"
:fence="[state.scanFrameRefShow,state.shortcutRefShow]" />
<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'}]"
@@ -62,7 +64,7 @@
</view>
<view style="text-align: center;color: #F5F5F5;height: 20px;"></view>
</view>
<view v-if="state.dataList.length==0">
<view v-if="state.dataList.length==0">
<up-empty mode="list"></up-empty>
</view>
</scroll-view>
@@ -71,8 +73,8 @@
</view>
<scanFrame ref="scanFrameRef" @confirmation="scanFrameCnfirmation"
@scanFrameDataFeedback="(res:object)=>{state.scanFrameDataFeedback = res}"
@fast="(row:any)=>{state.scanFrameDataFeedback = row}" @err="scanFrameErrFun"/>
<shortcut ref="shortcutRef" @dataToscanFrame="dataToscanFrameFun" />
@fast="(row:any)=>{state.scanFrameDataFeedback = row}" @err="scanFrameErrFun" @boxShow="scanFrameBoxShowShow" />
<shortcut ref="shortcutRef" @dataToscanFrame="dataToscanFrameFun" @boxShow="shortcutBoxShowShow" />
<tools ref="toolsRef" @defaultPopup="defaultPopupFun" @scanRecord="scanRecordFun" />
</template>
@@ -86,6 +88,7 @@
import tools from '../../components/tools/tools.vue'
import shortcut from '../../components/tools/shortcut.vue'
import { sqlite } from '../../stores/sqlite'
const architectureRef = ref()
const DB = sqlite()
const inputRef = ref()
const scanFrameRef = ref()
@@ -93,6 +96,9 @@
const getI18n = useI18n()
const { t, locale } = getI18n
const state = reactive({
scanFrameRefShow: false,
shortcutRefShow: false,
queryString: '',
dataList: [],
scrollHeight: 0,
@@ -115,7 +121,7 @@
fnDataList(state.materialId);
})
onShow(() => {
if(state.materialId){
if (state.materialId) {
fnDataList(state.materialId);
}
})
@@ -127,6 +133,15 @@
// scanFrameRef.value.stateShow(true)
})
const scanConfirmFun = (e : any) => {
getReceiveBillScanData(e)
}
const shortcutBoxShowShow = (val : boolean) => {
state.shortcutRefShow = val
}
const scanFrameBoxShowShow = (val : boolean) => {
state.scanFrameRefShow = val
}
/**
* 数据逻辑
*/
@@ -141,7 +156,7 @@
return 'rgb(87 191 254)'
}
}
//防抖输入
const debounceTimer = ref()
const changeFun = (e : any) => {
@@ -172,13 +187,14 @@
uni.$u.toast(t('verify.noDataMessage'))
state.queryString = ''
}
architectureRef.value.closeFun()
})
}
//固定弹窗数据传输
const scanFrameCnfirmation = (row : any) => {
state.scanFrameDataFeedback = row
console.log(row);
postTemporaryScanDraftSaveFun(state.scanFrameDataFeedback)
}
//数据异常窗口弹出
@@ -196,10 +212,10 @@
FVHUBScanQty: item.quantityStr, //扫描数量
FVHUBEntryId: item.id, //行ID
FVHUBFlot: item.batchNumberStr, //批号
FVHUBStock: {
FVHUBStock: {
FNUMBER: "" //仓库编号
},
FVHUBMaterial: {
},
FVHUBMaterial: {
FNUMBER: item.articlesStr //物料编码
},
@@ -264,18 +280,18 @@
//推送数据
PRD_PickMtrlCheck({
EntryIds: EntryIds.toString(),
Ids:state.materialId
Ids: state.materialId
}).then((res : any) => {
console.log();
if(res.code === 200){
fStockFlexDetailDelete({Ids:ids.toString()}).then((res:any) => {
if(res.code === 200) {
if (res.code === 200) {
fStockFlexDetailDelete({ Ids: ids.toString() }).then((res : any) => {
if (res.code === 200) {
fnDataList(state.materialId);
uni.$u.toast(t('public.cg'))
}
})
}
})
} else {
uni.$u.toast(t('verify.noDataMessage'))