剩余模块:生产退料
This commit is contained in:
@@ -3,23 +3,17 @@
|
||||
<view class="page">
|
||||
<l-header :title="t('home.sctc')" 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="t('index.scddbh')" 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>
|
||||
</template>
|
||||
</up-input>
|
||||
</view>
|
||||
<up-tabs :scrollable="state.scrollableTabState" :list="state.tabsList"
|
||||
@click="setScrollableTabStateFun"></up-tabs>
|
||||
</view>
|
||||
<architecture ref="architectureRef" :dataType="t('home.sctc')" :placeholder="t('index.scddbh')"
|
||||
@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" v-for="(item, index) in state.dataList" :key="index" @click="clickPRD_MOViewIntoPro(item)">
|
||||
<view class="data-item" v-for="(item, index) in state.dataList" :key="index"
|
||||
@click="clickPRD_MOViewIntoPro(item)">
|
||||
<view class="tit">{{ t('index.scddbh') }}:{{item.FBillNo}}</view>
|
||||
<view class="line-p"></view>
|
||||
<view class="b-font">{{ t('receive.rq') }}:{{item.FDateFormat}}</view>
|
||||
@@ -35,13 +29,14 @@
|
||||
</template>
|
||||
|
||||
<script lang="ts" setup>
|
||||
import { reactive, nextTick, onMounted, ref,computed } 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';
|
||||
import { route } from '@/uni_modules/uview-plus';
|
||||
import { PRDPPBOMList, PRD_MOList, PRD_MOViewIntoPro } from '../../common/request/api/api';
|
||||
import { pageDataInfo } from '../../stores/info.js';
|
||||
const architectureRef = ref()
|
||||
const pageDataInfoCom = pageDataInfo()
|
||||
const listBoxRef = ref(null)
|
||||
const getI18n = useI18n()
|
||||
@@ -59,9 +54,9 @@
|
||||
},
|
||||
type: '1',
|
||||
tabsList: [
|
||||
{ name: computed(() => t('home.kssc')),type: '1' },
|
||||
{ name: computed(() => t('home.kscs')),type: '3' },
|
||||
{ name: computed(() => t('home.kshb')),type: '2' },
|
||||
{ name: computed(() => t('home.kssc')), type: '1' },
|
||||
{ name: computed(() => t('home.kscs')), type: '3' },
|
||||
{ name: computed(() => t('home.kshb')), type: '2' },
|
||||
]
|
||||
})
|
||||
onShow(() => {
|
||||
@@ -74,7 +69,14 @@
|
||||
state.scrollHeight = data.height
|
||||
}).exec();
|
||||
})
|
||||
const setScrollableTabStateFun = (item:any) => {
|
||||
const scanConfirmFun = (e : any) => {
|
||||
state.queryString = e
|
||||
state.page.pageIndex = 1
|
||||
state.dataList = []
|
||||
fnDataList()
|
||||
architectureRef.value.closeFun()
|
||||
}
|
||||
const setScrollableTabStateFun = (item : any) => {
|
||||
state.type = item.type
|
||||
}
|
||||
const fnScrollBottom = () => {
|
||||
@@ -95,31 +97,31 @@
|
||||
state.page.pageIndex = 1
|
||||
state.dataList = []
|
||||
fnDataList(true)
|
||||
}, 500)
|
||||
})
|
||||
}
|
||||
const viewIntoProFun = (item : object,typeVertical:string = 'details') => {
|
||||
const viewIntoProFun = (item : object, typeVertical : string = 'details') => {
|
||||
PRD_MOViewIntoPro({
|
||||
Number: state.queryString
|
||||
}).then((res : any) => {
|
||||
if (res.code === 200) {
|
||||
if(typeVertical === 'details'){
|
||||
if (typeVertical === 'details') {
|
||||
pageDataInfoCom.putInProdPageData({ ...res.data, ...item, time: new Date().getTime(), type: state.type })
|
||||
route({ url: '/pages/putInProd/details' })
|
||||
}
|
||||
if(typeVertical === 'item'){
|
||||
if(state.type === '2'){
|
||||
toPages('/pages/putInProd/print',{...res.data})
|
||||
}
|
||||
if (typeVertical === 'item') {
|
||||
if (state.type === '2') {
|
||||
toPages('/pages/putInProd/print', { ...res.data })
|
||||
}
|
||||
}
|
||||
}
|
||||
})
|
||||
}
|
||||
const clickPRD_MOViewIntoPro = (item:any) => {
|
||||
const clickPRD_MOViewIntoPro = (item : any) => {
|
||||
PRD_MOViewIntoPro({
|
||||
Number: item.FBillNo
|
||||
}).then((res : any) => {
|
||||
if(state.type === '2'){
|
||||
toPages('/pages/putInProd/print',{...res.data})
|
||||
if (state.type === '2') {
|
||||
toPages('/pages/putInProd/print', { ...res.data })
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user