剩余模块:生产退料
This commit is contained in:
@@ -2,28 +2,19 @@
|
||||
<view class="app status-bar-gap">
|
||||
<view class="page">
|
||||
<l-header :title="t('home.scfl')" sticky></l-header>
|
||||
<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">
|
||||
<template #prefix>
|
||||
<up-icon name="search" color="#2979ff" size="24"></up-icon>
|
||||
</template>
|
||||
</up-input>
|
||||
</view>
|
||||
</view>
|
||||
<architecture ref="architectureRef" :dataType="t('home.scfl')" :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="data-item" @click.stop="fnToUrl(item)" v-for="(item, index) in state.dataList" :key="index">
|
||||
<view class="tit">{{ t('index.scdd') }}:{{item.FMOBillNO}}</view>
|
||||
<view class="line-p"></view>
|
||||
<view class="b-font">{{ t('receive.rq') }}:{{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>
|
||||
@@ -41,6 +32,7 @@
|
||||
const listBoxRef = ref(null)
|
||||
const getI18n = useI18n()
|
||||
const { t, locale } = getI18n
|
||||
const architectureRef = ref()
|
||||
const state = reactive({
|
||||
queryString: '',
|
||||
dataList: [],
|
||||
@@ -62,11 +54,18 @@
|
||||
}).exec();
|
||||
fnDataList()
|
||||
})
|
||||
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) {
|
||||
debugger
|
||||
state.page.pageIndex ++;
|
||||
state.page.pageIndex++;
|
||||
uni.showLoading({ mask: true });
|
||||
setTimeout(() => {
|
||||
fnDataList();
|
||||
@@ -74,7 +73,7 @@
|
||||
}
|
||||
}
|
||||
const fnToUrl = (item : any) => {
|
||||
toPages('/pages/material/material',{id:item.FID,fBillNo:item.FMOBillNO})
|
||||
toPages('/pages/material/material', { id: item.FID, fBillNo: item.FMOBillNO })
|
||||
}
|
||||
const debounceTimer = ref()
|
||||
const changeFun = (e : any) => {
|
||||
@@ -84,14 +83,14 @@
|
||||
state.page.pageIndex = 1
|
||||
state.dataList = []
|
||||
fnDataList()
|
||||
}, 500)
|
||||
})
|
||||
}
|
||||
const fnDataList = () => {
|
||||
let param = {
|
||||
queryString: state.queryString,
|
||||
pageIndex: state.page.pageIndex,
|
||||
pageSize: state.page.pageSize,
|
||||
FType:'Pick'
|
||||
FType: 'Pick'
|
||||
};
|
||||
if (state.page.pageIndex == 1) {
|
||||
uni.showLoading({ mask: true });
|
||||
@@ -112,10 +111,6 @@
|
||||
state.dataList = state.dataList.concat(dataArray);
|
||||
}
|
||||
state.page.totalCount = result.total;
|
||||
|
||||
if (state.dataList.length == state.page.totalCount) {
|
||||
// more_status.value = 'nomore';
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
@@ -175,25 +170,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;
|
||||
}
|
||||
@@ -202,5 +201,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
Reference in New Issue
Block a user