剩余模块:生产退料

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,16 +2,7 @@
<view class="app status-bar-gap">
<view class="page">
<l-header :title="t('home.cgrk')" sticky></l-header>
<view class="input-box">
<view class="input-item">
<up-input :placeholder="t('verify.grn')" 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('home.cgrk')" :placeholder="t('verify.grn')" @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()">
@@ -38,6 +29,7 @@
import { useI18n } from 'vue-i18n'
import { parseTime } from '../../utils/tools.js';
import { PURReceiveBillList, receiveBillList } from '../../common/request/api/api';
const architectureRef = ref()
const listBoxRef = ref(null)
const getI18n = useI18n()
const { t, locale } = getI18n
@@ -52,9 +44,7 @@
}
})
onShow(() => {
})
onShow(() => { })
onMounted(() => {
const query = uni.createSelectorQuery().in(this);
query.select(".receive-listBox").boundingClientRect((data) => {
@@ -62,6 +52,12 @@
}).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);
if (state.page.pageIndex * state.page.pageSize <= state.page.totalCount) {
@@ -84,7 +80,7 @@
state.page.pageIndex = 1
state.dataList = []
fnDataList()
}, 500)
})
}
const fnDataList = () => {
let param = {
@@ -111,10 +107,6 @@
state.dataList = state.dataList.concat(dataArray);
}
state.page.totalCount = result.total;
if (state.dataList.length == state.page.totalCount) {
// more_status.value = 'nomore';
}
}
});
}

View File

@@ -4,16 +4,9 @@
<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-item">
<up-input :placeholder="t('receive.code')" border="none" clearable inputAlign="left" inputmode="none"
v-model="state.queryString" @change="changeFun" ref="inputRef">
<template #prefix>
<up-icon name="scan" color="#2979ff" size="24"></up-icon>
</template>
</up-input>
</view>
</view>
<architecture ref="architectureRef" :dataType="t('home.cgrk')" icon="scan" :placeholder="t('receive.code')"
@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'}">
<view class="list-box-list" v-if="state.dataList.length > 0">
@@ -80,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>
@@ -98,11 +91,16 @@
const getI18n = useI18n()
const { t, locale } = getI18n
const DB = sqlite()
const architectureRef = ref()
const inputRef = ref()
const scanFrameRef = ref()
const shortcutRef = ref()
const state = reactive({
scanFrameRefShow: false,
shortcutRefShow: false,
queryString: '',
dataList: [],
scrollHeight: 0,
@@ -137,6 +135,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
}
/**
* 数据逻辑
*/
@@ -159,7 +166,7 @@
debounceTimer.value = setTimeout(() => {
state.queryString = e
if (state.queryString !== '') getReceiveBillScanData(e)
}, 500)
})
}
//查询录入
const getReceiveBillScanData = (val : string) => {
@@ -184,6 +191,7 @@
uni.$u.toast(t('index.bmygtsj'))
state.queryString = ''
}
architectureRef.value.closeFun()
})
}
//固定弹窗数据传输