剩余模块:生产退料
This commit is contained in:
@@ -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-box" class="scroll-box" scroll-y="true"
|
||||
:style="{'height':state.scrollHeight+'px'}">
|
||||
<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">
|
||||
<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'}]"
|
||||
@@ -72,7 +64,7 @@
|
||||
</view>
|
||||
<view style="text-align: center;color: #F5F5F5;height: 20px;"></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>
|
||||
@@ -81,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>
|
||||
|
||||
@@ -96,6 +88,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()
|
||||
@@ -103,6 +96,9 @@
|
||||
const getI18n = useI18n()
|
||||
const { t, locale } = getI18n
|
||||
const state = reactive({
|
||||
scanFrameRefShow: false,
|
||||
shortcutRefShow: false,
|
||||
|
||||
queryString: '',
|
||||
dataList: [],
|
||||
scrollHeight: 0,
|
||||
@@ -125,7 +121,7 @@
|
||||
fnDataList(state.materialId);
|
||||
})
|
||||
onShow(() => {
|
||||
if(state.materialId){
|
||||
if (state.materialId) {
|
||||
fnDataList(state.materialId);
|
||||
}
|
||||
})
|
||||
@@ -137,6 +133,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
|
||||
}
|
||||
/**
|
||||
* 数据逻辑
|
||||
*/
|
||||
@@ -151,7 +156,7 @@
|
||||
return 'rgb(87 191 254)'
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
//防抖输入
|
||||
const debounceTimer = ref()
|
||||
const changeFun = (e : any) => {
|
||||
@@ -170,7 +175,7 @@
|
||||
}).then((res : any) => {
|
||||
if (res.data !== null) {
|
||||
console.log(res);
|
||||
scanFrameRef.value.getreceiveBillScanData({ ...res.data, queryString: state.queryString, scanFrameShowSate: state.shortcutDataFeedback.scanFrameShowSate,stashVerify:true })
|
||||
scanFrameRef.value.getreceiveBillScanData({ ...res.data, queryString: state.queryString, scanFrameShowSate: state.shortcutDataFeedback.scanFrameShowSate, stashVerify: true })
|
||||
if (Object.keys(state.shortcutDataFeedback).length) {
|
||||
if (state.shortcutDataFeedback.scanFrameShowSate) {
|
||||
scanFrameRef.value.stateShow(true)
|
||||
@@ -184,6 +189,7 @@
|
||||
uni.$u.toast(t('index.bmygtsj'))
|
||||
state.queryString = ''
|
||||
}
|
||||
architectureRef.value.closeFun()
|
||||
})
|
||||
}
|
||||
//固定弹窗数据传输
|
||||
@@ -220,7 +226,7 @@
|
||||
FVHUBMaterial: {
|
||||
FNUMBER: item.articlesStr
|
||||
},
|
||||
FVHUBStockFlex:{
|
||||
FVHUBStockFlex: {
|
||||
...JSON.parse(str),
|
||||
}
|
||||
|
||||
@@ -293,15 +299,15 @@
|
||||
}
|
||||
}).then((res : any) => {
|
||||
console.log();
|
||||
if(res.code === 200){
|
||||
fStockFlexDetailDelete({Ids:ids.toString()}).then((res:any) => {
|
||||
if(res.code === 200) {
|
||||
if (res.code === 200) {
|
||||
fStockFlexDetailDelete({ Ids: ids.toString() }).then((res : any) => {
|
||||
if (res.code === 200) {
|
||||
fnDataList(state.materialId);
|
||||
uni.$u.toast(t('public.cg'))
|
||||
}
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
})
|
||||
} else {
|
||||
uni.$u.toast(t('verify.noDataMessage'))
|
||||
@@ -323,7 +329,7 @@
|
||||
const fnDataList = (FBillNo : any, statesItem : boolean = false) => {
|
||||
let param = {
|
||||
id: FBillNo,
|
||||
IsInStock:'true'
|
||||
IsInStock: 'true'
|
||||
};
|
||||
uni.showLoading({ mask: true });
|
||||
PURReceiveBillView(param).then(res => {
|
||||
|
||||
Reference in New Issue
Block a user