生产补料验证
This commit is contained in:
@@ -82,7 +82,7 @@
|
||||
import { fStockFlexDetailList } from '../../common/request/api/api';
|
||||
const getI18n = useI18n()
|
||||
const { t, locale } = getI18n
|
||||
const eimts = defineEmits(['dataToscanFrame','boxShow'])
|
||||
const eimts = defineEmits(['dataToscanFrame', 'boxShow'])
|
||||
const state = reactive({
|
||||
show: false,
|
||||
warehouse: false,
|
||||
@@ -92,6 +92,7 @@
|
||||
NoLocationListText: t('public.xzcw'),
|
||||
NoLocationList: true,
|
||||
specialModule: '',
|
||||
modeTyoeStr: '',
|
||||
shortcut: {
|
||||
warehouseStr: '',
|
||||
locationStr: '',
|
||||
@@ -139,12 +140,32 @@
|
||||
const open = () => {
|
||||
eimts('boxShow', state.show)
|
||||
}
|
||||
|
||||
const dataToscanFrameFun = () => {
|
||||
if (state.shortcut.warehouseStr !== '' && state.NoLocationList && state.shortcut.locationStr === '') {
|
||||
uni.$u.toast(t('public.qxzcw'))
|
||||
state.show = true
|
||||
return
|
||||
}
|
||||
if(state.modeTyoeStr !== ''){
|
||||
let shortcutObjList : any = [...uni.getStorageSync('shortcutObj')]
|
||||
let shortcutObjItem : any = uni.getStorageSync('shortcutObj').find((item : any) => item.key === state.modeTyoeStr)
|
||||
if (Object.keys(shortcutObjItem).length !== 0) {
|
||||
shortcutObjList.forEach((item : any) => {
|
||||
if(item.key === state.modeTyoeStr){
|
||||
item.warehouseData = state.warehouseData
|
||||
item.locationData = state.locationData
|
||||
}
|
||||
})
|
||||
} else {
|
||||
shortcutObjList.push({
|
||||
key: state.modeTyoeStr,
|
||||
warehouseData: state.warehouseData,
|
||||
locationData: state.locationData
|
||||
})
|
||||
}
|
||||
uni.setStorageSync('shortcutObj',shortcutObjList)
|
||||
}
|
||||
eimts('dataToscanFrame', {
|
||||
...state.shortcut,
|
||||
warehouseData: state.warehouseData,
|
||||
@@ -164,7 +185,24 @@
|
||||
}
|
||||
eimts('dataToscanFrame', {})
|
||||
}
|
||||
const stateShow = (val : boolean, specialModule : string = '') => {
|
||||
const stateShow = (val : boolean, specialModule : string = '', modeTyoeStr : string = '') => {
|
||||
if (modeTyoeStr != '') {
|
||||
state.modeTyoeStr = modeTyoeStr
|
||||
if (!uni.getStorageSync('shortcutObj')) uni.setStorageSync('shortcutObj', [])
|
||||
else {
|
||||
let shortcutObjItem : any = uni.getStorageSync('shortcutObj').find((item : any) => item.key === modeTyoeStr)
|
||||
if (Object.keys(shortcutObjItem).length !== 0) {
|
||||
if (Object.keys(shortcutObjItem.warehouseData).length) {
|
||||
state.warehouseData = shortcutObjItem.warehouseData
|
||||
state.shortcut.warehouseStr = shortcutObjItem.warehouseData.FNAME
|
||||
}
|
||||
if (Object.keys(shortcutObjItem.locationData).length) {
|
||||
state.locationData = shortcutObjItem.locationData
|
||||
state.shortcut.locationStr = shortcutObjItem.locationData.FFlexValueName
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
state.specialModule = specialModule
|
||||
state.show = val
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user