生产补料验证
This commit is contained in:
@@ -67,7 +67,6 @@
|
||||
if (props.fence.filter((item : any) => item).length === 0) {
|
||||
state.inputText = res
|
||||
state.show = false
|
||||
console.log(res);
|
||||
emits('scanConfirm', res)
|
||||
}
|
||||
}
|
||||
@@ -75,9 +74,11 @@
|
||||
emits('inputConfirm', e)
|
||||
}
|
||||
const closeFun = (time : number = 4000) => {
|
||||
console.log('123');
|
||||
setTimeout(() => {
|
||||
state.inputText = ''
|
||||
state.show = true
|
||||
console.log('456');
|
||||
emits('inputConfirm', '')
|
||||
},time)
|
||||
}
|
||||
|
||||
@@ -138,6 +138,7 @@
|
||||
state.locationData = obj.locationData
|
||||
if (state.warehouseData.FIsOpenLocation) {
|
||||
state.NoLocationList = true
|
||||
|
||||
state.NoLocationListText = t('index.ksmcw')
|
||||
} else {
|
||||
state.NoLocationList = false
|
||||
@@ -167,29 +168,28 @@
|
||||
//首次数据校验&修正
|
||||
const dataValidation = () => {
|
||||
//批号校验
|
||||
if (state.receiveBillScanData.FIsBatchManage === 'True') {
|
||||
if (state.scanFrame.batchNumberStr !== '' && state.scanFrame.batchNumberStr !== state.receiveBillScanData.FLot_Text) {
|
||||
state.show = true
|
||||
uni.showModal({
|
||||
title: t('index.ts'), content: '与默认批号不同,是否替换新的批号', cancelText: '取消', confirmText: '替换',
|
||||
success(res) {
|
||||
if (res.confirm) {
|
||||
state.scanFrame.batchNumberStr = state.receiveBillScanData.FLot_Text
|
||||
} else if (res.cancel) {
|
||||
console.log('用户点击取消');
|
||||
}
|
||||
}
|
||||
});
|
||||
} else if (state.scanFrame.batchNumberStr == '') {
|
||||
state.scanFrame.batchNumberStr = state.receiveBillScanData.FLot_Text
|
||||
}
|
||||
} else {
|
||||
state.scanFrame.batchNumberStr = '',
|
||||
state.batchNumberStrState = true
|
||||
state.batchNumberStrPdr = '批号未启用'
|
||||
}
|
||||
|
||||
|
||||
// if (state.receiveBillScanData.FIsBatchManage === 'True') {
|
||||
// if (state.scanFrame.batchNumberStr !== '' && state.scanFrame.batchNumberStr !== state.receiveBillScanData.FLot_Text) {
|
||||
// state.show = true
|
||||
// uni.showModal({
|
||||
// title: t('index.ts'), content: '与默认批号不同,是否替换新的批号', cancelText: '取消', confirmText: '替换',
|
||||
// success(res) {
|
||||
// if (res.confirm) {
|
||||
// state.scanFrame.batchNumberStr = state.receiveBillScanData.FLot_Text
|
||||
// } else if (res.cancel) {
|
||||
// console.log('用户点击取消');
|
||||
// }
|
||||
// }
|
||||
// });
|
||||
// } else if (state.scanFrame.batchNumberStr == '') {
|
||||
// state.scanFrame.batchNumberStr = state.receiveBillScanData.FLot_Text
|
||||
// }
|
||||
// } else {
|
||||
// state.scanFrame.batchNumberStr = ''
|
||||
// state.batchNumberStrState = true
|
||||
// state.batchNumberStrPdr = '批号未启用'
|
||||
// }
|
||||
state.scanFrame.batchNumberStr = state.receiveBillScanData.FLot_Text
|
||||
//仓库校验
|
||||
if (Object.keys(state.warehouseData).length !== 0 && Object.keys(state.receiveBillScanData.StockId).length !== 0) {
|
||||
console.log('断点1');
|
||||
@@ -214,6 +214,7 @@
|
||||
FNAME: formatLangTextValue(state.receiveBillScanData.StockId.Name),
|
||||
FNUMBER: state.receiveBillScanData.StockId.Number,
|
||||
FSTOCKID: state.receiveBillScanData.StockId.Id,
|
||||
|
||||
}
|
||||
if (state.warehouseData.FIsOpenLocation) {
|
||||
state.NoLocationList = true
|
||||
@@ -232,7 +233,6 @@
|
||||
}
|
||||
state.scanFrame.articlesStr = state.receiveBillScanData.MaterialNumber
|
||||
state.scanFrame.barCodeStr = state.receiveBillScanData.queryString
|
||||
|
||||
//如果开启了异常弹出,则自动返回数据
|
||||
if (!state.receiveBillScanData.scanFrameShowSate && !state.show) {
|
||||
if (dataVerifyFun()) {
|
||||
@@ -247,7 +247,7 @@
|
||||
eimts('confirmation', { ...state.scanFrame, warehouseData: state.warehouseData, locationData: state.locationData || {}, id: state.receiveBillScanData.Id })
|
||||
dataErase()
|
||||
state.show = false
|
||||
eimts('boxShow',state.show)
|
||||
eimts('boxShow', state.show)
|
||||
}
|
||||
}
|
||||
|
||||
@@ -302,11 +302,11 @@
|
||||
*/
|
||||
const close = () => {
|
||||
state.show = false
|
||||
console.log('===================<><><><><><>=====================',state.show);
|
||||
eimts('boxShow',state.show)
|
||||
console.log('===================<><><><><><>=====================', state.show);
|
||||
eimts('boxShow', state.show)
|
||||
}
|
||||
const open = () => {
|
||||
eimts('boxShow',state.show)
|
||||
const open = () => {
|
||||
eimts('boxShow', state.show)
|
||||
} //待使用
|
||||
const stateShow = (val : boolean) => { state.show = val }
|
||||
|
||||
@@ -321,7 +321,6 @@
|
||||
}
|
||||
const warehouseDataFun = (item : any) => {
|
||||
state.warehouseData = item
|
||||
console.log(item);
|
||||
state.scanFrame.warehouseStr = item.FNAME
|
||||
state.warehouse = false
|
||||
state.locationData = {}
|
||||
|
||||
@@ -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