Browse Source

pda机器扫码测试

master
zhang_li 8 months ago
parent
commit
9a014efa2d
  1. 32
      .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. 29
      src/pages/sparePartsReturn/addForm.vue

32
.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/
// launchtypelocalremote, localremote
"version": "0.0",
"configurations": [{
"app-plus" :
{
"launchtype" : "local"
},
"default" :
{
"launchtype" : "local"
},
"type" : "uniCloud"
}
{
// launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
// launchtypelocalremote, localremote
"version" : "0.0",
"configurations" : [
{
"app-plus" : {
"launchtype" : "local"
},
"default" : {
"launchtype" : "local"
},
"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-item :label="`备件编号`" prop="itemNumber" required>
<view class="select">
<u-input v-model="form1.itemNumber" placeholder="请选择备件" @blur="blur1()" />
<view class="right-button" @click="chickRightButton1">
扫描
</view>
<u-input v-model="form1.itemNumber" placeholder="请选择备件" @blur='blur1()' @confirm="handelScanMsg1" :focus='isFocus'/>
</view>
</u-form-item>
<u-form-item :label="`备件名称`" prop="itemNumber" required class="disabled">
<u-form-item :label="`备件名称`" prop="itemName" required class="disabled">
<view class="select">
<u-input v-model="form1.itemName" placeholder="请选择备件" disabled />
</view>
</u-form-item>
<u-form-item label="库位" prop="locationNumber" required v-if="isShow">
<u-input v-model="form1.locationNumber" placeholder="请选择库位" @blur='blur()' />
<view class="right-button" @click="chickRightButton">
扫描
</view>
<u-input v-model="form1.locationNumber" placeholder="请选择库位" @blur='blur()' @confirm="handelScanMsg" />
</u-form-item>
<u-form-item label="采购数量" prop="applyQty" required class="disabled">
<u-input v-model="form1.applyQty" type="number" disabled placeholder="请输入采购数量" />
@ -156,6 +151,7 @@
isShow: false,
locationList: [], //
locationItem: '', //
isFocus:false
}
},
methods: {
@ -195,8 +191,8 @@
//
reset() {
if (this.form.id) {
this.form.classes = '';
this.form.faultType = ''
this.form.supplierName = ''
this.form.itemNumbers=[]
} else {
this.form = {}
@ -221,6 +217,7 @@
}
this.isPopupShow = true
this.isShow = false
this.isFocus = true
},
//
addSpare() {
@ -301,6 +298,11 @@
if (this.form1.locationNumber) {
this.getLocation()
}
},
//
handelScanMsg() {
this.getLocation()
},
//
getSparePartsInfo() {
@ -308,6 +310,7 @@
number: this.form1.itemNumber,
id: this.form.id
}).then(res => {
console.log(res)
if (!res.data) {
this.$modal.showToast('找不到该备件')
this.itemNumber = ''
@ -333,6 +336,7 @@
}
}).catch((err) => {
console.log(err)
this.itemNumber = ''
this.form1.areaNumber = ''
this.form1.itemName = ''
@ -346,6 +350,11 @@
this.getSparePartsInfo()
}
},
//
handelScanMsg1() {
console.log(this.form1.itemNumber)
this.getSparePartsInfo()
},
},
async onLoad(option) {

2
src/pages/inLocation/index.vue

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

4
src/pages/index.vue

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

2
src/pages/login.vue

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

18
src/pages/outLocation/addForm.vue

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

29
src/pages/sparePartsReturn/addForm.vue

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

Loading…
Cancel
Save