This commit is contained in:
2024-03-21 17:46:38 +08:00
parent fc286d3809
commit 5e8b9adb6c
11 changed files with 169 additions and 144 deletions

View File

@@ -8,18 +8,19 @@
ref="scaninput" ref="scaninput"
:placeholder="keyCode === '' ? placeholder : keyCode" :placeholder="keyCode === '' ? placeholder : keyCode"
:value="value" :value="value"
:readOnly="readOnly"
@focus="handleFocus($event)" @focus="handleFocus($event)"
@blur="handleBlur($event)" @blur="handleBlur($event)"
@input="handleChange($event)"> @input="handleChange($event)">
<div class="button_box"> <div class="button_box">
<button class="search_box_icon fxcol" @click="handleScan"> <button class="search_box_icon fxcol" @click="handleScan">
<span class="iconfont scan_icon" :class="{'scan_icon_checked': type === true}"></span> <span class="iconfont scan_icon" :class="{'scan_icon_checked': type === '1'}"></span>
</button> </button>
<button class="search_box_icon fxcol" @click="handleKey"> <button class="search_box_icon fxcol" @click="handleKey">
<span class="iconfont key_icon" :class="{'key_icon_checked': type === false}"></span> <span class="iconfont key_icon" :class="{'key_icon_checked': type === '2'}"></span>
</button> </button>
<button v-show="seaShow === true" class="search_box_icon fxcol" @click="handleSearch"> <button v-show="seaShow === true" class="search_box_icon fxcol" @click="handleSearch">
<span class="iconfont search_icon" :class="{'key_icon_checked': type === false}"></span> <span class="iconfont search_icon" :class="{'key_icon_checked': type === '2'}"></span>
</button> </button>
</div> </div>
</div> </div>
@@ -49,54 +50,47 @@ export default {
return { return {
placeholder: '', placeholder: '',
type: '', type: '',
cur: '' cur: '',
readOnly: false
} }
}, },
methods: { methods: {
handleScan () { handleScan () {
this.type = '1'
this.$refs.scaninput.focus() this.$refs.scaninput.focus()
this.placeholder = '请按扫码键输入'
this.type = true
this.$emit('input', '')
}, },
handleKey () { handleKey () {
this.type = '2'
this.$refs.scaninput.focus() this.$refs.scaninput.focus()
this.placeholder = '请键盘输入' this.placeholder = '请键盘输入'
this.type = false
// this.$emit('input', this.cur)
}, },
handleFocus ($event) { handleFocus ($event) {
// this.cur = $event.target.value
this.placeholder = '请按扫码键输入' this.placeholder = '请按扫码键输入'
this.type = true if (this.type !== '2') {
this.readOnly = true
setTimeout(() => {
this.readOnly = false
}, 200)
}
$event.target.value = '' $event.target.value = ''
this.$emit('input', $event.target.value) this.$emit('input', $event.target.value)
}, },
handleBlur ($event) { handleBlur ($event) {
this.type = '' this.type = ''
this.placeholder = '' this.placeholder = ''
// if ($event.target.value === '') {
// $event.target.value = this.cur
// }
this.$emit('input', $event.target.value) this.$emit('input', $event.target.value)
}, },
handleChange ($event) { handleChange ($event) {
if ($event.target.value) { if ($event.target.value) {
if (this.type) {
this.cur = $event.target.value.split('##')[0]
let _this = this
setTimeout(() => {
_this.$emit('input', this.cur)
_this.$emit('handleChange', this.cur, true)
_this.$emit('getScanTxt', $event.target.value)
}, 20)
this.$refs.scaninput.blur()
} else if (!this.type) {
this.cur = $event.target.value this.cur = $event.target.value
if (this.type === '2') {
this.$emit('input', this.cur) this.$emit('input', this.cur)
this.$emit('handleChange', this.cur, false) this.$emit('handleChange', this.cur, false)
} else { } else {
this.cur = $event.target.value setTimeout(() => {
this.$emit('input', this.cur)
this.$emit('handleChange', this.cur, true)
}, 20)
} }
} }
}, },

View File

@@ -7,37 +7,18 @@ import {post} from '@config/http.js'
export const RFReadTrayStatePick = (id) => post('RF_ReadTrayState_Pick', { export const RFReadTrayStatePick = (id) => post('RF_ReadTrayState_Pick', {
js: JSON.stringify({TrayID: id}) js: JSON.stringify({TrayID: id})
}) })
// export const RFReadTrayStatePick = (id) => {
// let res = {'ErrNO': '1', 'ErrMsg': '读取成功'}
// return res
// }
// 托盘待拣货信息 // 托盘待拣货信息
export const RFReadTrayStoragePick = (id) => post('RF_ReadTrayStorage_Pick', { export const RFReadTrayStoragePick = (id) => post('RF_ReadTrayStorage_Pick', {
js: JSON.stringify({TrayID: id}) js: JSON.stringify({TrayID: id})
}) })
// export const RFReadTrayStoragePick = (id) => {
// let res = {'ErrNO': '1', 'ErrMsg': '读取成功!', 'StorageList': [{'BillID': '000001', 'MatCode': '物料编码001', 'MatName': '物料名称001', 'BatchNumber': '批次001', 'MatNum': '100', 'FactNumOut': '50'}, {'BillID': '000002', 'MatCode': '物料编码002', 'MatName': '物料名称002', 'BatchNumber': '批次002', 'MatNum': '100', 'FactNumOut': '50'}]}
// return res
// }
// 读取物料条码 // 读取物料条码
export const RFReadMatBarCodeStatePick = (id, code) => post('RF_ReadMatBarCodeState_Pick', { export const RFReadMatBarCodeStatePick = (id, code) => post('RF_ReadMatBarCodeState_Pick', {
js: JSON.stringify({TrayID: id, MatBarCode: code}) js: JSON.stringify({TrayID: id, MatBarCode: code})
}) })
// export const RFReadMatBarCodeStatePick = (id, code) => {
// let res = {'ErrNO': '1', 'ErrMsg': '读取成功'}
// return res
// }
// 拣货 // 拣货
export const RFStoragePick = (id, code, uid) => post('RF_Storage_Pick', { export const RFStoragePick = (id, code, uid) => post('RF_Storage_Pick', {
js: JSON.stringify({TrayID: id, MatBarCode: code, UserPID: uid}) js: JSON.stringify({TrayID: id, MatBarCode: code, UserPID: uid})
}) })
// export const RFStoragePick = (id, code, uid) => {
// let res = {'ErrNO': '1', 'ErrMsg': '拣货成功'}
// return res
// }
/** /**
* 盘点 * 盘点
*/ */
@@ -45,34 +26,15 @@ export const RFStoragePick = (id, code, uid) => post('RF_Storage_Pick', {
export const RFReadTrayStateInventory = (id) => post('RF_ReadTrayState_Inventory', { export const RFReadTrayStateInventory = (id) => post('RF_ReadTrayState_Inventory', {
js: JSON.stringify({TrayID: id}) js: JSON.stringify({TrayID: id})
}) })
// export const RFReadTrayStateInventory = (id) => {
// let res = {'ErrNO': '1', 'ErrMsg': '读取成功'}
// return res
// }
// 托盘待盘点信息 // 托盘待盘点信息
export const RFReadTrayStorageInventory = (id) => post('RF_ReadTrayStorage_Inventory', { export const RFReadTrayStorageInventory = (id) => post('RF_ReadTrayStorage_Inventory', {
js: JSON.stringify({TrayID: id}) js: JSON.stringify({TrayID: id})
}) })
// export const RFReadTrayStorageInventory = (id) => {
// let res = {'ErrNO': '1', 'ErrMsg': '读取成功!', 'StorageList': [{'BillID': '000001', 'MatCode': '物料编码001', 'MatName': '物料名称001', 'BatchNumber': '批次001', 'MatNum': '100', 'FactNumOut': '50'}, {'BillID': '000002', 'MatCode': '物料编码002', 'MatName': '物料名称002', 'BatchNumber': '批次002', 'MatNum': '100', 'FactNumOut': '50'}]}
// return res
// }
// 读取物料条码 // 读取物料条码
export const RFReadMatBarCodeStateInventory = (id, code) => post('RF_ReadMatBarCodeState_Inventory', { export const RFReadMatBarCodeStateInventory = (id, code) => post('RF_ReadMatBarCodeState_Inventory', {
js: JSON.stringify({TrayID: id, MatBarCode: code}) js: JSON.stringify({TrayID: id, MatBarCode: code})
}) })
// export const RFReadMatBarCodeStateInventory = (id, code) => {
// let res = {'ErrNO': '1', 'ErrMsg': '读取成功'}
// return res
// }
// 盘点 // 盘点
export const RFStorageInventory = (id, code, uid) => post('RF_Storage_Inventory', { export const RFStorageInventory = (id, code, uid) => post('RF_Storage_Inventory', {
js: JSON.stringify({TrayID: id, MatBarCode: code, UserPID: uid}) js: JSON.stringify({TrayID: id, MatBarCode: code, UserPID: uid})
}) })
// export const RFStorageInventory = (id, code, uid) => {
// let res = {'ErrNO': '1', 'ErrMsg': '盘点成功'}
// return res
// }

View File

@@ -4,11 +4,6 @@ import {post} from '@config/http.js'
export const rfLogin = (user, password) => post('RF_Login', { export const rfLogin = (user, password) => post('RF_Login', {
js: JSON.stringify({UserID: user, UserPassWord: password}) js: JSON.stringify({UserID: user, UserPassWord: password})
}) })
// export const rfLogin = (user, password) => {
// let res = {'ErrNO': '1', 'ErrMsg': '登录成功', 'UserName': '张三', 'UserPID': '1001'}
// return res
// }
/** /**
* 组盘 * 组盘
*/ */
@@ -16,37 +11,18 @@ export const rfLogin = (user, password) => post('RF_Login', {
export const rfReadTrayStatePackage = (id) => post('RF_ReadTrayState_Package', { export const rfReadTrayStatePackage = (id) => post('RF_ReadTrayState_Package', {
js: JSON.stringify({TrayID: id}) js: JSON.stringify({TrayID: id})
}) })
// export const rfReadTrayStatePackage = (id) => {
// let res = {'ErrNO': '1', 'ErrMsg': '读取成功'}
// return res
// }
// 托盘库存信息 // 托盘库存信息
export const rfReadTrayStoragePackage = (id) => post('RF_ReadTrayStorage_Package', { export const rfReadTrayStoragePackage = (id) => post('RF_ReadTrayStorage_Package', {
js: JSON.stringify({TrayID: id}) js: JSON.stringify({TrayID: id})
}) })
// export const rfReadTrayStoragePackage = (id) => {
// let res = {'ErrNO': '1', 'ErrMsg': '读取成功!', 'StorageList': [{'BillID': '000001', 'MatCode': '物料编码001', 'MatName': '物料名称001', 'BatchNumber': '批次001', 'MatNum': '1'}, {'BillID': '000002', 'MatCode': '物料编码002', 'MatName': '物料名称002', 'BatchNumber': '批次002', 'MatNum': '1'}]}
// return res
// }
// 读取物料条码 // 读取物料条码
export const rfReadMatBarCodeStatePackage = (id, code) => post('RF_ReadMatBarCodeState_Package', { export const rfReadMatBarCodeStatePackage = (id, code) => post('RF_ReadMatBarCodeState_Package', {
js: JSON.stringify({TrayID: id, MatBarCode: code}) js: JSON.stringify({TrayID: id, MatBarCode: code})
}) })
// export const rfReadMatBarCodeStatePackage = (id, code) => {
// let res = {'ErrNO': '1', 'ErrMsg': '读取成功'}
// return res
// }
// 组盘 // 组盘
export const rfTrayPackage = (id, code, size, uid) => post('RF_Tray_Package', { export const rfTrayPackage = (id, code, size, uid) => post('RF_Tray_Package', {
js: JSON.stringify({TrayID: id, MatBarCode: code, MatSize: size, UserPID: uid}) js: JSON.stringify({TrayID: id, MatBarCode: code, MatSize: size, UserPID: uid})
}) })
// export const rfTrayPackage = (id, code, size, uid) => {
// let res = {'ErrNO': '1', 'ErrMsg': '组盘成功'}
// return res
// }
/** /**
*解盘 *解盘
*/ */
@@ -54,25 +30,11 @@ export const rfTrayPackage = (id, code, size, uid) => post('RF_Tray_Package', {
export const rfReadTrayStateUnPackage = (id) => post('RF_ReadTrayState_UnPackage', { export const rfReadTrayStateUnPackage = (id) => post('RF_ReadTrayState_UnPackage', {
js: JSON.stringify({TrayID: id}) js: JSON.stringify({TrayID: id})
}) })
// export const rfReadTrayStateUnPackage = (id) => {
// let res = {'ErrNO': '1', 'ErrMsg': '读取成功'}
// return res
// }
// 托盘库存信息 // 托盘库存信息
export const rfReadTrayStorageUnPackage = (id) => post('RF_ReadTrayStorage_UnPackage', { export const rfReadTrayStorageUnPackage = (id) => post('RF_ReadTrayStorage_UnPackage', {
js: JSON.stringify({TrayID: id}) js: JSON.stringify({TrayID: id})
}) })
// export const rfReadTrayStorageUnPackage = (id) => {
// let res = {'ErrNO': '1', 'ErrMsg': '读取成功!', 'StorageList': [{'BillID': '000001', 'MatCode': '物料编码001', 'MatName': '物料名称001', 'BatchNumber': '批次001', 'MatNum': '1'}, {'BillID': '000002', 'MatCode': '物料编码002', 'MatName': '物料名称002', 'BatchNumber': '批次002', 'MatNum': '1'}, {'BillID': '000003', 'MatCode': '物料编码002', 'MatName': '物料名称002', 'BatchNumber': '批次002', 'MatNum': '1'}]}
// return res
// }
// 解盘 // 解盘
export const rfTrayUnPackage = (id, uid) => post('RF_Tray_UnPackage', { export const rfTrayUnPackage = (id, uid) => post('RF_Tray_UnPackage', {
js: JSON.stringify({TrayID: id, UserPID: uid}) js: JSON.stringify({TrayID: id, UserPID: uid})
}) })
// export const rfTrayUnPackage = (id, uid) => {
// let res = {'ErrNO': '1', 'ErrMsg': '组盘成功'}
// return res
// }

View File

@@ -19,7 +19,7 @@ export const toast = (str) => {
store.dispatch('toastMsg', str) store.dispatch('toastMsg', str)
setTimeout(() => { setTimeout(() => {
store.dispatch('showToast', false) store.dispatch('showToast', false)
}, 3000) }, 5000)
} }
/** /**

32
src/config/mork1.js Normal file
View File

@@ -0,0 +1,32 @@
export const RFReadTrayStatePick = (id) => {
let res = {'ErrNO': '1', 'ErrMsg': '读取成功'}
return res
}
export const RFReadTrayStoragePick = (id) => {
let res = {'ErrNO': '1', 'ErrMsg': '读取成功!', 'StorageList': [{'BillID': '000001', 'MatCode': '物料编码001', 'MatName': '物料名称001', 'BatchNumber': '批次001', 'MatNum': '100', 'FactNumOut': '50'}, {'BillID': '000002', 'MatCode': '物料编码002', 'MatName': '物料名称002', 'BatchNumber': '批次002', 'MatNum': '100', 'FactNumOut': '50'}]}
return res
}
export const RFReadMatBarCodeStatePick = (id, code) => {
let res = {'ErrNO': '1', 'ErrMsg': '读取成功'}
return res
}
export const RFStoragePick = (id, code, uid) => {
let res = {'ErrNO': '1', 'ErrMsg': '拣货成功'}
return res
}
export const RFReadTrayStateInventory = (id) => {
let res = {'ErrNO': '1', 'ErrMsg': '读取成功'}
return res
}
export const RFReadTrayStorageInventory = (id) => {
let res = {'ErrNO': '1', 'ErrMsg': '读取成功!', 'StorageList': [{'BillID': '000001', 'MatCode': '物料编码001', 'MatName': '物料名称001', 'BatchNumber': '批次001', 'MatNum': '100', 'FactNumOut': '50'}, {'BillID': '000002', 'MatCode': '物料编码002', 'MatName': '物料名称002', 'BatchNumber': '批次002', 'MatNum': '100', 'FactNumOut': '50'}]}
return res
}
export const RFReadMatBarCodeStateInventory = (id, code) => {
let res = {'ErrNO': '1', 'ErrMsg': '读取成功'}
return res
}
export const RFStorageInventory = (id, code, uid) => {
let res = {'ErrNO': '1', 'ErrMsg': '盘点成功'}
return res
}

32
src/config/mork2.js Normal file
View File

@@ -0,0 +1,32 @@
export const rfLogin = (user, password) => {
let res = {'ErrNO': '1', 'ErrMsg': '登录成功', 'UserName': '张三', 'UserPID': '1001'}
return res
}
export const rfReadTrayStatePackage = (id) => {
let res = {'ErrNO': '1', 'ErrMsg': '读取成功'}
return res
}
export const rfReadTrayStoragePackage = (id) => {
let res = {'ErrNO': '1', 'ErrMsg': '读取成功!', 'StorageList': [{'BillID': '000001', 'MatCode': '物料编码001', 'MatName': '物料名称001', 'BatchNumber': '批次001', 'MatNum': '1'}, {'BillID': '000002', 'MatCode': '物料编码002', 'MatName': '物料名称002', 'BatchNumber': '批次002', 'MatNum': '1'}]}
return res
}
export const rfReadMatBarCodeStatePackage = (id, code) => {
let res = {'ErrNO': '1', 'ErrMsg': '读取成功'}
return res
}
export const rfTrayPackage = (id, code, size, uid) => {
let res = {'ErrNO': '1', 'ErrMsg': '组盘成功'}
return res
}
export const rfReadTrayStateUnPackage = (id) => {
let res = {'ErrNO': '1', 'ErrMsg': '读取成功'}
return res
}
export const rfReadTrayStorageUnPackage = (id) => {
let res = {'ErrNO': '1', 'ErrMsg': '读取成功!', 'StorageList': [{'BillID': '000001', 'MatCode': '物料编码001', 'MatName': '物料名称001', 'BatchNumber': '批次001', 'MatNum': '1'}, {'BillID': '000002', 'MatCode': '物料编码002', 'MatName': '物料名称002', 'BatchNumber': '批次002', 'MatNum': '1'}, {'BillID': '000003', 'MatCode': '物料编码002', 'MatName': '物料名称002', 'BatchNumber': '批次002', 'MatNum': '1'}]}
return res
}
export const rfTrayUnPackage = (id, uid) => {
let res = {'ErrNO': '1', 'ErrMsg': '组盘成功'}
return res
}

View File

@@ -13,7 +13,6 @@
<div class="fxrow check-box"> <div class="fxrow check-box">
<i class="icon-name-check" :class="{'icon-name-checked': memberName}" @click="Remember"></i> <i class="icon-name-check" :class="{'icon-name-checked': memberName}" @click="Remember"></i>
<span class="fxcol">记住用户名</span> <span class="fxcol">记住用户名</span>
<!-- <router-link :to="{path: '/setup'}" class="fxcol" style="text-align:right;color:#6798ef">设置</router-link> -->
</div> </div>
<button class="login-btn" :disabled="disabled" @click="_Login">确认登录</button> <button class="login-btn" :disabled="disabled" @click="_Login">确认登录</button>
</section> </section>
@@ -22,7 +21,7 @@
<script> <script>
import {rfLogin} from '@config/getData2' import {rfLogin} from '@config/getData2'
// import {encrypt} from '../../main.js' // import {rfLogin} from '@config/mork2'
export default { export default {
name: 'Login', name: 'Login',
data () { data () {

View File

@@ -81,9 +81,6 @@ export default {
try { try {
let res = await RFReadTrayStateInventory(val) let res = await RFReadTrayStateInventory(val)
if (res.ErrNO === '1') { if (res.ErrNO === '1') {
if (this.val2 === '') {
this.$refs.myInput2.handleScan()
}
this._RFReadTrayStorageInventory() this._RFReadTrayStorageInventory()
} else { } else {
this.toast(res.ErrMsg) this.toast(res.ErrMsg)
@@ -100,8 +97,12 @@ export default {
let res = await RFReadTrayStorageInventory(this.val1) let res = await RFReadTrayStorageInventory(this.val1)
if (res.ErrNO === '1') { if (res.ErrNO === '1') {
this.dataList = [...res.StorageList] this.dataList = [...res.StorageList]
this.val2 = ''
this.$refs.myInput2.handleScan()
} else { } else {
this.toast(res.ErrMsg) this.toast(res.ErrMsg)
this.val1 = ''
this.$refs.myInput1.handleScan()
} }
}, },
/** 读取物料条码 */ /** 读取物料条码 */
@@ -109,10 +110,7 @@ export default {
try { try {
let res = await RFReadMatBarCodeStateInventory(this.val1, val) let res = await RFReadMatBarCodeStateInventory(this.val1, val)
if (res.ErrNO === '1') { if (res.ErrNO === '1') {
this.toast(res.ErrMsg) this._RFStorageInventory()
if (this.val1 === '') {
this.$refs.myInput1.handleScan()
}
} else { } else {
this.toast(res.ErrMsg) this.toast(res.ErrMsg)
this.val2 = '' this.val2 = ''
@@ -125,9 +123,10 @@ export default {
}, },
handleChange1 (e, type) { handleChange1 (e, type) {
if (type && e.substring(0, 2) !== 'ZD') { if (type && e.substring(0, 2) !== 'ZD') {
this.$refs.myInput1.handleScan()
setTimeout(() => {
this.val1 = '' this.val1 = ''
this.val2 = e }, 200)
this._RFReadMatBarCodeStateInventory(this.val2)
return return
} }
if (type) { if (type) {
@@ -137,11 +136,20 @@ export default {
handleChange2 (e, type) { handleChange2 (e, type) {
if (type && e.substring(0, 2) === 'ZD') { if (type && e.substring(0, 2) === 'ZD') {
this.val1 = e this.val1 = e
setTimeout(() => {
this.val2 = '' this.val2 = ''
}, 200)
this._RFReadTrayStateInventory(this.val1) this._RFReadTrayStateInventory(this.val1)
return return
} }
if (type) { if (type && this.val1 === '' && e.substring(0, 2) !== 'ZD') {
this.$refs.myInput1.handleScan()
setTimeout(() => {
this.val2 = ''
}, 200)
return
}
if (type && this.val1 !== '') {
this._RFReadMatBarCodeStateInventory(e) this._RFReadMatBarCodeStateInventory(e)
} }
}, },
@@ -160,10 +168,14 @@ export default {
this._RFReadTrayStorageInventory() this._RFReadTrayStorageInventory()
} else { } else {
this.Dialog(res.ErrMsg) this.Dialog(res.ErrMsg)
this.val2 = ''
this.$refs.myInput2.handleScan()
} }
this.disabled = false this.disabled = false
} catch (e) { } catch (e) {
this.disabled = false this.disabled = false
this.val2 = ''
this.$refs.myInput2.handleScan()
} }
}, },
/** 取消 */ /** 取消 */

View File

@@ -70,6 +70,7 @@ import NavBar from '@components/NavBar.vue'
import SearchBox from '@components/SearchBox.vue' import SearchBox from '@components/SearchBox.vue'
import DropdownMenu from '@components/DropdownMenu.vue' import DropdownMenu from '@components/DropdownMenu.vue'
import {rfReadTrayStatePackage, rfReadTrayStoragePackage, rfReadMatBarCodeStatePackage, rfTrayPackage} from '@config/getData2' import {rfReadTrayStatePackage, rfReadTrayStoragePackage, rfReadMatBarCodeStatePackage, rfTrayPackage} from '@config/getData2'
// import {rfReadTrayStatePackage, rfReadTrayStoragePackage, rfReadMatBarCodeStatePackage, rfTrayPackage} from '@config/mork2'
export default { export default {
name: 'GroupDisk', name: 'GroupDisk',
components: { components: {
@@ -97,10 +98,6 @@ export default {
try { try {
let res = await rfReadTrayStatePackage(val) let res = await rfReadTrayStatePackage(val)
if (res.ErrNO === '1') { if (res.ErrNO === '1') {
// this.toast(res.ErrMsg)
if (this.val2 === '') {
this.$refs.myInput2.handleScan()
}
this._rfReadTrayStoragePackage() this._rfReadTrayStoragePackage()
} else { } else {
this.toast(res.ErrMsg) this.toast(res.ErrMsg)
@@ -117,8 +114,12 @@ export default {
let res = await rfReadTrayStoragePackage(this.val1) let res = await rfReadTrayStoragePackage(this.val1)
if (res.ErrNO === '1') { if (res.ErrNO === '1') {
this.dataList = [...res.StorageList] this.dataList = [...res.StorageList]
this.val2 = ''
this.$refs.myInput2.handleScan()
} else { } else {
this.toast(res.ErrMsg) this.toast(res.ErrMsg)
this.val1 = ''
this.$refs.myInput1.handleScan()
} }
}, },
/** 读取物料条码 */ /** 读取物料条码 */
@@ -126,10 +127,7 @@ export default {
try { try {
let res = await rfReadMatBarCodeStatePackage(this.val1, val) let res = await rfReadMatBarCodeStatePackage(this.val1, val)
if (res.ErrNO === '1') { if (res.ErrNO === '1') {
this.toast(res.ErrMsg) this.open = true
if (this.val1 === '') {
this.$refs.myInput1.handleScan()
}
} else { } else {
this.toast(res.ErrMsg) this.toast(res.ErrMsg)
this.val2 = '' this.val2 = ''
@@ -142,9 +140,10 @@ export default {
}, },
handleChange1 (e, type) { handleChange1 (e, type) {
if (type && e.substring(0, 2) !== 'ZD') { if (type && e.substring(0, 2) !== 'ZD') {
this.$refs.myInput1.handleScan()
setTimeout(() => {
this.val1 = '' this.val1 = ''
this.val2 = e }, 200)
this._rfReadMatBarCodeStatePackage(this.val2)
return return
} }
if (type) { if (type) {
@@ -154,11 +153,20 @@ export default {
handleChange2 (e, type) { handleChange2 (e, type) {
if (type && e.substring(0, 2) === 'ZD') { if (type && e.substring(0, 2) === 'ZD') {
this.val1 = e this.val1 = e
setTimeout(() => {
this.val2 = '' this.val2 = ''
}, 200)
this._rfReadTrayStatePackage(this.val1) this._rfReadTrayStatePackage(this.val1)
return return
} }
if (type) { if (type && this.val1 === '' && e.substring(0, 2) !== 'ZD') {
this.$refs.myInput1.handleScan()
setTimeout(() => {
this.val2 = ''
}, 200)
return
}
if (type && this.val1 !== '') {
this._rfReadMatBarCodeStatePackage(e) this._rfReadMatBarCodeStatePackage(e)
} }
}, },
@@ -173,8 +181,11 @@ export default {
let uid = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).UserPID : '' let uid = this.$store.getters.userInfo !== '' ? JSON.parse(this.$store.getters.userInfo).UserPID : ''
let res = await rfTrayPackage(this.val1, this.val2, this.option[this.active].value, uid) let res = await rfTrayPackage(this.val1, this.val2, this.option[this.active].value, uid)
if (res.ErrNO === '1') { if (res.ErrNO === '1') {
this.toast(res.ErrMsg)
this._rfReadTrayStoragePackage() this._rfReadTrayStoragePackage()
this.toast(res.ErrMsg)
this.val2 = ''
this.active = ''
this.$refs.myInput2.handleScan()
} else { } else {
this.Dialog(res.ErrMsg) this.Dialog(res.ErrMsg)
} }
@@ -202,6 +213,7 @@ export default {
dropdownMenu (i) { dropdownMenu (i) {
this.active = i + '' this.active = i + ''
this.open = false this.open = false
this._rfTrayPackage()
} }
} }
} }

View File

@@ -90,12 +90,16 @@ export default {
this.dataList = [...res.StorageList] this.dataList = [...res.StorageList]
} else { } else {
this.toast(res.ErrMsg) this.toast(res.ErrMsg)
this.val1 = ''
this.$refs.myInput1.handleScan()
} }
}, },
handleChange1 (e, type) { handleChange1 (e, type) {
if (type && e.substring(0, 2) !== 'ZD') { if (type && e.substring(0, 2) !== 'ZD') {
this.val1 = ''
this.$refs.myInput1.handleScan() this.$refs.myInput1.handleScan()
setTimeout(() => {
this.val1 = ''
}, 200)
return return
} }
if (type) { if (type) {
@@ -116,11 +120,14 @@ export default {
this.toast(res.ErrMsg) this.toast(res.ErrMsg)
this._rfReadTrayStorageUnPackage() this._rfReadTrayStorageUnPackage()
} else { } else {
this.Dialog(res.ErrMsg) this.toast(res.ErrMsg)
this.toCancle()
} }
this.disabled = false this.disabled = false
} catch (e) { } catch (e) {
this.disabled = false this.disabled = false
this.val1 = ''
this.$refs.myInput1.handleScan()
} }
}, },
/** 取消 */ /** 取消 */

View File

@@ -81,9 +81,6 @@ export default {
try { try {
let res = await RFReadTrayStatePick(val) let res = await RFReadTrayStatePick(val)
if (res.ErrNO === '1') { if (res.ErrNO === '1') {
if (this.val2 === '') {
this.$refs.myInput2.handleScan()
}
this._RFReadTrayStoragePick() this._RFReadTrayStoragePick()
} else { } else {
this.toast(res.ErrMsg) this.toast(res.ErrMsg)
@@ -100,8 +97,12 @@ export default {
let res = await RFReadTrayStoragePick(this.val1) let res = await RFReadTrayStoragePick(this.val1)
if (res.ErrNO === '1') { if (res.ErrNO === '1') {
this.dataList = [...res.StorageList] this.dataList = [...res.StorageList]
this.val2 = ''
this.$refs.myInput2.handleScan()
} else { } else {
this.toast(res.ErrMsg) this.toast(res.ErrMsg)
this.val1 = ''
this.$refs.myInput1.handleScan()
} }
}, },
/** 读取物料条码 */ /** 读取物料条码 */
@@ -110,9 +111,7 @@ export default {
let res = await RFReadMatBarCodeStatePick(this.val1, val) let res = await RFReadMatBarCodeStatePick(this.val1, val)
if (res.ErrNO === '1') { if (res.ErrNO === '1') {
this.toast(res.ErrMsg) this.toast(res.ErrMsg)
if (this.val1 === '') { this._RFStoragePick()
this.$refs.myInput1.handleScan()
}
} else { } else {
this.toast(res.ErrMsg) this.toast(res.ErrMsg)
this.val2 = '' this.val2 = ''
@@ -125,9 +124,10 @@ export default {
}, },
handleChange1 (e, type) { handleChange1 (e, type) {
if (type && e.substring(0, 2) !== 'ZD') { if (type && e.substring(0, 2) !== 'ZD') {
this.$refs.myInput1.handleScan()
setTimeout(() => {
this.val1 = '' this.val1 = ''
this.val2 = e }, 200)
this._RFReadMatBarCodeStatePick(this.val2)
return return
} }
if (type) { if (type) {
@@ -137,11 +137,20 @@ export default {
handleChange2 (e, type) { handleChange2 (e, type) {
if (type && e.substring(0, 2) === 'ZD') { if (type && e.substring(0, 2) === 'ZD') {
this.val1 = e this.val1 = e
setTimeout(() => {
this.val2 = '' this.val2 = ''
}, 200)
this._RFReadTrayStatePick(this.val1) this._RFReadTrayStatePick(this.val1)
return return
} }
if (type) { if (type && this.val1 === '' && e.substring(0, 2) !== 'ZD') {
this.$refs.myInput1.handleScan()
setTimeout(() => {
this.val2 = ''
}, 200)
return
}
if (type && this.val1 !== '') {
this._RFReadMatBarCodeStatePick(e) this._RFReadMatBarCodeStatePick(e)
} }
}, },
@@ -160,10 +169,14 @@ export default {
this._RFReadTrayStoragePick() this._RFReadTrayStoragePick()
} else { } else {
this.Dialog(res.ErrMsg) this.Dialog(res.ErrMsg)
this.val2 = ''
this.$refs.myInput2.handleScan()
} }
this.disabled = false this.disabled = false
} catch (e) { } catch (e) {
this.disabled = false this.disabled = false
this.val2 = ''
this.$refs.myInput2.handleScan()
} }
}, },
/** 取消 */ /** 取消 */