Browse Source

pda机器扫码测试

master
zhang_li 8 months ago
parent
commit
9a014efa2d
  1. 16
      .hbuilderx/launch.json
  2. 31
      src/pages/inLocation/addForm.vue
  3. 2
      src/pages/inLocation/index.vue
  4. 4
      src/pages/index.vue
  5. 2
      src/pages/login.vue
  6. 18
      src/pages/outLocation/addForm.vue
  7. 27
      src/pages/sparePartsReturn/addForm.vue

16
.hbuilderx/launch.json

@ -1,16 +1,20 @@
{ // launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/ {
// launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote // launchtypelocalremote, localremote
"version": "0.0", "version" : "0.0",
"configurations": [{ "configurations" : [
"app-plus" :
{ {
"app-plus" : {
"launchtype" : "local" "launchtype" : "local"
}, },
"default" : "default" : {
{
"launchtype" : "local" "launchtype" : "local"
}, },
"type" : "uniCloud" "type" : "uniCloud"
},
{
"playground" : "custom",
"type" : "uni-app:app-android"
} }
] ]
} }

31
src/pages/inLocation/addForm.vue

@ -87,22 +87,17 @@
<u-form :model="form1" ref="form1" label-width="160rpx"> <u-form :model="form1" ref="form1" label-width="160rpx">
<u-form-item :label="`备件编号`" prop="itemNumber" required> <u-form-item :label="`备件编号`" prop="itemNumber" required>
<view class="select"> <view class="select">
<u-input v-model="form1.itemNumber" placeholder="请选择备件" @blur="blur1()" /> <u-input v-model="form1.itemNumber" placeholder="请选择备件" @blur='blur1()' @confirm="handelScanMsg1" :focus='isFocus'/>
<view class="right-button" @click="chickRightButton1">
扫描
</view>
</view> </view>
</u-form-item> </u-form-item>
<u-form-item :label="`备件名称`" prop="itemNumber" required class="disabled"> <u-form-item :label="`备件名称`" prop="itemName" required class="disabled">
<view class="select"> <view class="select">
<u-input v-model="form1.itemName" placeholder="请选择备件" disabled /> <u-input v-model="form1.itemName" placeholder="请选择备件" disabled />
</view> </view>
</u-form-item> </u-form-item>
<u-form-item label="库位" prop="locationNumber" required v-if="isShow"> <u-form-item label="库位" prop="locationNumber" required v-if="isShow">
<u-input v-model="form1.locationNumber" placeholder="请选择库位" @blur='blur()' /> <u-input v-model="form1.locationNumber" placeholder="请选择库位" @blur='blur()' @confirm="handelScanMsg" />
<view class="right-button" @click="chickRightButton">
扫描
</view>
</u-form-item> </u-form-item>
<u-form-item label="采购数量" prop="applyQty" required class="disabled"> <u-form-item label="采购数量" prop="applyQty" required class="disabled">
<u-input v-model="form1.applyQty" type="number" disabled placeholder="请输入采购数量" /> <u-input v-model="form1.applyQty" type="number" disabled placeholder="请输入采购数量" />
@ -156,6 +151,7 @@
isShow: false, isShow: false,
locationList: [], // locationList: [], //
locationItem: '', // locationItem: '', //
isFocus:false
} }
}, },
methods: { methods: {
@ -195,8 +191,8 @@
// //
reset() { reset() {
if (this.form.id) { if (this.form.id) {
this.form.classes = ''; this.form.supplierName = ''
this.form.faultType = '' this.form.itemNumbers=[]
} else { } else {
this.form = {} this.form = {}
@ -221,6 +217,7 @@
} }
this.isPopupShow = true this.isPopupShow = true
this.isShow = false this.isShow = false
this.isFocus = true
}, },
// //
addSpare() { addSpare() {
@ -301,6 +298,11 @@
if (this.form1.locationNumber) { if (this.form1.locationNumber) {
this.getLocation() this.getLocation()
} }
},
//
handelScanMsg() {
this.getLocation()
}, },
// //
getSparePartsInfo() { getSparePartsInfo() {
@ -308,6 +310,7 @@
number: this.form1.itemNumber, number: this.form1.itemNumber,
id: this.form.id id: this.form.id
}).then(res => { }).then(res => {
console.log(res)
if (!res.data) { if (!res.data) {
this.$modal.showToast('找不到该备件') this.$modal.showToast('找不到该备件')
this.itemNumber = '' this.itemNumber = ''
@ -333,6 +336,7 @@
} }
}).catch((err) => { }).catch((err) => {
console.log(err)
this.itemNumber = '' this.itemNumber = ''
this.form1.areaNumber = '' this.form1.areaNumber = ''
this.form1.itemName = '' this.form1.itemName = ''
@ -346,6 +350,11 @@
this.getSparePartsInfo() this.getSparePartsInfo()
} }
}, },
//
handelScanMsg1() {
console.log(this.form1.itemNumber)
this.getSparePartsInfo()
},
}, },
async onLoad(option) { async onLoad(option) {

2
src/pages/inLocation/index.vue

@ -69,7 +69,7 @@
} else { } else {
this.status = 'nomore' this.status = 'nomore'
} }
}) }).catch(() => {})
}, },
}, },

4
src/pages/index.vue

@ -106,7 +106,7 @@
this.$modal.confirm('确定注销并退出系统吗?').then(() => { this.$modal.confirm('确定注销并退出系统吗?').then(() => {
this.$store.dispatch('LogOut').then(() => { this.$store.dispatch('LogOut').then(() => {
this.$tab.reLaunch('/pages/login') this.$tab.reLaunch('/pages/login')
}) }).catch(() => {})
}) })
}, },
handleLogin() { handleLogin() {
@ -125,7 +125,7 @@
this.menus1 = this.menus.filter(item=>item.path !== 'itemOut') this.menus1 = this.menus.filter(item=>item.path !== 'itemOut')
this.menus2 = this.menus.filter(item=>item.path === 'itemOut') this.menus2 = this.menus.filter(item=>item.path === 'itemOut')
console.log(this.menus2) console.log(this.menus2)
}) }).catch(() => {})
} }
}, },

2
src/pages/login.vue

@ -94,7 +94,7 @@
this.$modal.closeLoading() this.$modal.closeLoading()
await this.loginSuccess() await this.loginSuccess()
// this.$tab.reLaunch('/pages/index') // this.$tab.reLaunch('/pages/index')
}) }).catch(() => {})
}, },
// //
async loginSuccess(result) { async loginSuccess(result) {

18
src/pages/outLocation/addForm.vue

@ -89,10 +89,8 @@
<view class="popup"> <view class="popup">
<u-form :model="form1" ref="form1" label-width="160rpx"> <u-form :model="form1" ref="form1" label-width="160rpx">
<u-form-item label="库位" prop="locationNumber" required> <u-form-item label="库位" prop="locationNumber" required>
<u-input v-model="form1.locationNumber" placeholder="请选择库位" @blur="blur()" /> <u-input v-model="form1.locationNumber" placeholder="请选择库位" @blur="blur()" @confirm="handelScanMsg" :focus='isFocus'/>
<view class="right-button" @click="chickRightButton">
扫描
</view>
</u-form-item> </u-form-item>
<u-form-item :label="`备件名称`" prop="itemNumber" required class="disabled"> <u-form-item :label="`备件名称`" prop="itemNumber" required class="disabled">
<view class="select"> <view class="select">
@ -154,7 +152,8 @@
qty: '' qty: ''
}, },
isShow: false, isShow: false,
isInAccount: 'FALSE' isInAccount: 'FALSE',
isFocus:false
} }
}, },
methods: { methods: {
@ -194,10 +193,8 @@
// //
reset() { reset() {
if (this.form.id) { if (this.form.id) {
this.form.classes = ''; this.form.subList =[];
this.form.faultType = ''
} else { } else {
this.form = {} this.form = {}
} }
}, },
@ -227,6 +224,7 @@
} }
this.isPopupShow = true this.isPopupShow = true
this.isShow= false this.isShow= false
this.isFocus = true
}, },
// //
addSpare() { addSpare() {
@ -304,7 +302,9 @@
this.getLocation() this.getLocation()
} }
}, },
handelScanMsg() {
this.getLocation()
},
}, },
async onLoad(option) { async onLoad(option) {

27
src/pages/sparePartsReturn/addForm.vue

@ -58,10 +58,7 @@
<u-form :model="form1" ref="form1" label-width="160rpx"> <u-form :model="form1" ref="form1" label-width="160rpx">
<u-form-item :label="`备件编号`" prop="itemNumber" required> <u-form-item :label="`备件编号`" prop="itemNumber" required>
<view class="select"> <view class="select">
<u-input v-model="form1.itemNumber" placeholder="请选择备件" @blur="blur1()"/> <u-input v-model="form1.itemNumber" placeholder="请选择备件" @blur='blur1()' @confirm="handelScanMsg1" :focus='isFocus'/>
<view class="right-button" @click="chickRightButton1">
扫描
</view>
</view> </view>
</u-form-item> </u-form-item>
<u-form-item :label="`备件名称`" prop="itemNumber" required class="disabled"> <u-form-item :label="`备件名称`" prop="itemNumber" required class="disabled">
@ -70,7 +67,7 @@
</view> </view>
</u-form-item> </u-form-item>
<u-form-item label="库位" prop="locationNumber" required v-if="isShow"> <u-form-item label="库位" prop="locationNumber" required v-if="isShow">
<u-input v-model="form1.locationNumber" placeholder="请选择库位" @blur="blur()"/> <u-input v-model="form1.locationNumber" placeholder="请选择库位" @blur="blur()" @confirm="handelScanMsg"/>
<view class="right-button" @click="chickRightButton"> <view class="right-button" @click="chickRightButton">
扫描 扫描
</view> </view>
@ -126,6 +123,7 @@
isShow: false, isShow: false,
locationList:[],// locationList:[],//
locationItem:'',// locationItem:'',//
isFocus:false
} }
}, },
methods: { methods: {
@ -165,10 +163,9 @@
// //
reset() { reset() {
if (this.form.id) { if (this.form.id) {
this.form.classes = ''; this.form.reverterId = '';
this.form.faultType = '' this.form.itemNumbers = []
} else { } else {
this.form = {} this.form = {}
} }
}, },
@ -191,10 +188,10 @@
// //
chooseSingleColumn(e) { chooseSingleColumn(e) {
this.form[this.field] = e[0].value this.form[this.field] = e[0].value
if(this.field == 'reverterId'){ if(this.field == 'reverterId'){
this.choosesingleColumnItem = this.singleColumnList.filter(item => item.id == e[0].value) this.choosesingleColumnItem = this.singleColumnList.filter(item => item.id == e[0].value)
this.form.reverterName = this.choosesingleColumnItem[0].name this.form.reverterName = this.choosesingleColumnItem[0].name
} }
this.getApplyDeviceList() this.getApplyDeviceList()
this.singleColumnShow = false this.singleColumnShow = false
this.$forceUpdate() this.$forceUpdate()
@ -219,6 +216,7 @@ if(this.field == 'reverterId'){
} }
this.isPopupShow = true this.isPopupShow = true
this.isShow= false this.isShow= false
this.isFocus = true
}, },
// //
addSpare() { addSpare() {
@ -290,6 +288,10 @@ if(this.field == 'reverterId'){
this.getLocation() this.getLocation()
} }
}, },
//
handelScanMsg() {
this.getLocation()
},
// //
getSparePartsInfo() { getSparePartsInfo() {
sparePartsApi.getSparePartsReturnInfo({ sparePartsApi.getSparePartsReturnInfo({
@ -332,6 +334,11 @@ if(this.field == 'reverterId'){
this.getSparePartsInfo() this.getSparePartsInfo()
} }
}, },
//
handelScanMsg1() {
console.log(this.form1.itemNumber)
this.getSparePartsInfo()
},
}, },
async onLoad(option) { async onLoad(option) {

Loading…
Cancel
Save