剩余模块:生产入库,销售出库

This commit is contained in:
2025-05-12 09:31:38 +08:00
parent bf88fcb395
commit 14a5fa371b
410 changed files with 11041 additions and 6820 deletions

View File

@@ -2,9 +2,12 @@
<view class="app status-bar-gap">
<view class="page">
<l-header title="生产投产" sticky></l-header>
<view class="input-box">
<up-tabs :scrollable="state.scrollableTabState" :list="state.tabsList" @click="setScrollableTabStateFun"></up-tabs>
</view>
<view class="input-box">
<view class="input-item">
<up-input placeholder="生产订单编号" border="none" clearable inputAlign="left" :focus="state.inputFocus"
<up-input placeholder="生产订单编号" border="none" clearable inputAlign="left"
v-model="state.queryString" @change="changeFun" ref="inputRef">
<template #prefix>
<up-icon name="scan" color="#2979ff" size="24"></up-icon>
@@ -32,7 +35,7 @@
</template>
<script lang="ts" setup>
import { reactive, nextTick, onMounted, ref } from 'vue';
import { reactive, nextTick, onMounted, ref,computed } from 'vue';
import { onLoad, onShow, onReachBottom } from '@dcloudio/uni-app'
import { useI18n } from 'vue-i18n'
import { parseTime } from '../../utils/tools.js';
@@ -45,6 +48,7 @@
const { t, locale } = getI18n
const state = reactive({
queryString: '',
scrollableTabState: locale.value === 'en',
dataList: [],
inputFocus: true,
scrollHeight: 0,
@@ -53,24 +57,26 @@
pageSize: 200,
totalCount: 0
},
type: ''
})
onLoad((pageData : any) => {
state.type = pageData.type
type: '1',
tabsList: [
{ name: computed(() => t('home.kssc')),type: '1' },
{ name: computed(() => t('home.kscs')),type: '3' },
{ name: computed(() => t('home.kshb')),type: '2' },
]
})
onShow(() => {
state.queryString = ''
fnDataList()
console.log(pageDataInfo);
})
onMounted(() => {
const query = uni.createSelectorQuery().in(this);
query.select(".receive-listBox").boundingClientRect((data) => {
state.scrollHeight = data.height
}).exec();
})
const setScrollableTabStateFun = (item:any) => {
state.type = item.type
}
const fnScrollBottom = () => {
console.log(state.page.pageIndex * state.page.pageSize, state.page.totalCount);
if (state.page.pageIndex * state.page.pageSize <= state.page.totalCount) {
@@ -97,8 +103,8 @@
Number: state.queryString
}).then((res : any) => {
if (res.code === 200) {
pageDataInfoCom.putInProdPageData({ ...res.data, ...item, time: new Date().getTime(),type:state.type })
route({url: '/pages/putInProd/details'})
pageDataInfoCom.putInProdPageData({ ...res.data, ...item, time: new Date().getTime(), type: state.type })
route({ url: '/pages/putInProd/details' })
}
})
@@ -131,7 +137,7 @@
if (state.dataList.length == state.page.totalCount) { }
if (scanData && state.dataList.length === 1) {
if(state.dataList[0].FBillNo == state.queryString){
if (state.dataList[0].FBillNo == state.queryString) {
viewIntoProFun(state.dataList[0])
}
}