剩余模块:生产退料
This commit is contained in:
@@ -1,51 +1,49 @@
|
||||
<template>
|
||||
<view class="app status-bar-gap">
|
||||
<l-header :title="t('home.scrk')" sticky #right>
|
||||
<view style="margin-right: 32rpx;" v-if="state.tabsIndex === '1'" @click="submit()">{{ t('verify.tj') }}</view>
|
||||
<view style="margin-right: 32rpx;" v-if="state.tabsIndex === '1'" @click="submit()">{{ t('verify.tj') }}</view>
|
||||
</l-header>
|
||||
<view class="page">
|
||||
<view class="input-box">
|
||||
<up-tabs :scrollable="true" :list="state.tabsList" @click="upTabsItemFun"></up-tabs>
|
||||
<up-tabs :scrollable="true" :list="state.tabsList" @click="upTabsItemFun"></up-tabs>
|
||||
</view>
|
||||
<view class="input-box">
|
||||
<view class="input-item">
|
||||
<up-input :placeholder="t('receive.djbh')" 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>
|
||||
<packing ref="packingRef" v-if="state.tabsIndex === '1'" :queryString="state.queryString" @clearOut="clearOut()"/>
|
||||
<scattered v-if="state.tabsIndex === '2'" :queryString="state.queryString" @clearOut="clearOut()"/>
|
||||
<architecture ref="architectureRef" :dataType="t('home.scrk')" :placeholder="t('receive.djbh')"
|
||||
@scanConfirm="scanConfirmFun" @inputConfirm="changeFun" />
|
||||
<packing ref="packingRef" v-if="state.tabsIndex === '1'" :queryString="state.queryString"
|
||||
@clearOut="clearOut()" />
|
||||
<scattered v-if="state.tabsIndex === '2'" :queryString="state.queryString" @clearOut="clearOut()" />
|
||||
</view>
|
||||
</view>
|
||||
</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 { PRD_MORPTList, receiveBillList } from '../../common/request/api/api';
|
||||
import packing from './packing.vue'
|
||||
import packing from './packing.vue'
|
||||
import scattered from './scattered.vue'
|
||||
const architectureRef = ref()
|
||||
const packingRef = ref()
|
||||
const getI18n = useI18n()
|
||||
const { t, locale } = getI18n
|
||||
const state = reactive({
|
||||
queryString: '',
|
||||
tabsIndex:'1',
|
||||
tabsList: [
|
||||
{ name: computed(() => t('index.bz')), type: '1' },
|
||||
{ name: computed(() => t('index.minbz')), type: '2' },
|
||||
],
|
||||
tabsIndex: '1',
|
||||
tabsList: [
|
||||
{ name: computed(() => t('index.bz')), type: '1' },
|
||||
{ name: computed(() => t('index.minbz')), type: '2' },
|
||||
],
|
||||
})
|
||||
const changeFun = (e : any) => {
|
||||
if(e != '' ) state.queryString = e
|
||||
const scanConfirmFun = (e : any) => {
|
||||
state.queryString = e
|
||||
architectureRef.value.closeFun()
|
||||
}
|
||||
const upTabsItemFun = (e:any) => {
|
||||
const changeFun = (e : any) => {
|
||||
if (e != '') state.queryString = e
|
||||
}
|
||||
const upTabsItemFun = (e : any) => {
|
||||
state.tabsIndex = e.type
|
||||
}
|
||||
const clearOut = () => {
|
||||
@@ -104,25 +102,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;
|
||||
}
|
||||
@@ -131,5 +133,4 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
</style>
|
||||
@@ -4,19 +4,11 @@
|
||||
<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"
|
||||
:focus="state.inputFocus" 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.llyz')" icon="scan" :placeholder="t('verify.tm')"
|
||||
@scanConfirm="scanConfirmFun" @inputConfirm="changeFun"
|
||||
:fence="[state.scanFrameRefShow,state.shortcutRefShow]" />
|
||||
<view class="material-listBox">
|
||||
<scroll-view id="scroll-box1" class="scroll-box" scroll-y="true"
|
||||
:style="{'height':state.scrollHeight+'px'}">
|
||||
<scroll-view id="scroll-box1" 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'}]"
|
||||
@@ -71,8 +63,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" :type="['scanRecord']" @defaultPopup="defaultPopupFun" @scanRecord="scanRecordFun" />
|
||||
</template>
|
||||
|
||||
@@ -86,6 +78,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 +86,9 @@
|
||||
const getI18n = useI18n()
|
||||
const { t, locale } = getI18n
|
||||
const state = reactive({
|
||||
scanFrameRefShow: false,
|
||||
shortcutRefShow: false,
|
||||
|
||||
queryString: '',
|
||||
dataList: [],
|
||||
scrollHeight: 0,
|
||||
@@ -101,7 +97,7 @@
|
||||
pageSize: 200,
|
||||
totalCount: 0
|
||||
},
|
||||
tabsIndex:'1',
|
||||
tabsIndex: '1',
|
||||
FBillNo: '',
|
||||
materialId: '',
|
||||
supplierName: '',
|
||||
@@ -116,7 +112,7 @@
|
||||
fnDataList(state.materialId);
|
||||
})
|
||||
onShow(() => {
|
||||
if(state.materialId){
|
||||
if (state.materialId) {
|
||||
fnDataList(state.materialId);
|
||||
}
|
||||
})
|
||||
@@ -127,6 +123,15 @@
|
||||
}).exec();
|
||||
// scanFrameRef.value.stateShow(true)
|
||||
})
|
||||
const scanConfirmFun = (e : any) => {
|
||||
getReceiveBillScanData(e)
|
||||
}
|
||||
const shortcutBoxShowShow = (val : boolean) => {
|
||||
state.shortcutRefShow = val
|
||||
}
|
||||
const scanFrameBoxShowShow = (val : boolean) => {
|
||||
state.scanFrameRefShow = val
|
||||
}
|
||||
/**
|
||||
* 数据逻辑
|
||||
*/
|
||||
@@ -148,7 +153,7 @@
|
||||
debounceTimer.value = setTimeout(() => {
|
||||
state.queryString = e
|
||||
if (state.queryString !== '') getReceiveBillScanData(e)
|
||||
}, 500)
|
||||
})
|
||||
}
|
||||
//查询录入
|
||||
const getReceiveBillScanData = (val : string) => {
|
||||
@@ -163,6 +168,7 @@
|
||||
} else {
|
||||
uni.$u.toast(t('verify.noDataMessage'))
|
||||
}
|
||||
architectureRef.value.closeFun()
|
||||
})
|
||||
}
|
||||
//固定弹窗数据传输
|
||||
|
||||
Reference in New Issue
Block a user