Browse Source

修改扫描

wms3.0_pda
lijuncheng 7 months ago
parent
commit
14ad489c32
  1. 4
      .hbuilderx/debug.config.json
  2. 32
      .hbuilderx/launch.json
  3. 10
      src/main.js
  4. 9
      src/manifest.json
  5. 46
      src/mycomponents/scan/winComScan.vue
  6. 7
      src/pages.json
  7. 1
      src/pages/index/index.vue
  8. 1
      src/pages/login/index.vue

4
.hbuilderx/debug.config.json

@ -0,0 +1,4 @@
{
"rootPathIndex": 1,
"webRoot": "${projectDir}"
}

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 // launch.json configurations app-plus/h5/mp-weixin/mp-baidu/mp-alipay/mp-qq/mp-toutiao/mp-360/
"version": "0.0", // launchtypelocalremote, localremote
"configurations": [{ "version" : "0.0",
"app-plus" : "configurations" : [
{ {
"launchtype" : "local" "app-plus" : {
}, "launchtype" : "local"
"default" : },
{ "default" : {
"launchtype" : "local" "launchtype" : "local"
}, },
"type" : "uniCloud" "type" : "uniCloud"
} },
{
"openVueDevtools" : true,
"type" : "uni-app:h5"
}
] ]
} }

10
src/main.js

@ -34,7 +34,7 @@ export function createApp() {
app.use(uView) app.use(uView)
app.component('comMessage', comMessage) app.component('comMessage', comMessage)
console.log("网络22请求") console.log("网络22请求")
startApp(app); // startApp(app);
return { return {
app, app,
}; };
@ -57,10 +57,10 @@ export function startApp(app) {
// getApp().globalData.feed_configList = res.data.feed_configList; // getApp().globalData.feed_configList = res.data.feed_configList;
// getApp().globalData.isDevelopment = res.data.baseInfo.isDevelopment.value // getApp().globalData.isDevelopment = res.data.baseInfo.isDevelopment.value
// Vue.prototype.$dev_url = res.data.baseInfo.dev.value; // Vue.prototype.$dev_url = res.data.baseInfo.dev.value;
console.log("网络",res.data.baseInfo.request_url.value) // console.log("网络",res.data.baseInfo.request_url.value)
console.log("开发环境12",res.data.baseInfo.isDevelopment.value) // console.log("开发环境12",res.data.baseInfo.isDevelopment.value)
uni.setStorageSync("request_url",res.data.baseInfo.request_url.value) // uni.setStorageSync("request_url",res.data.baseInfo.request_url.value)
uni.setStorageSync("isDevelopment",res.data.baseInfo.isDevelopment.value) // uni.setStorageSync("isDevelopment",res.data.baseInfo.isDevelopment.value)
} }
}, },
fail: (error) => { fail: (error) => {

9
src/manifest.json

@ -20,7 +20,11 @@
"delay" : 0 "delay" : 0
}, },
/* */ /* */
"modules" : {}, "modules" : {
"Bluetooth" : {},
"Barcode" : {},
"Camera" : {}
},
/* */ /* */
"distribute" : { "distribute" : {
/* android */ /* android */
@ -42,7 +46,8 @@
"<uses-feature android:name=\"android.hardware.camera\"/>", "<uses-feature android:name=\"android.hardware.camera\"/>",
"<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>" "<uses-permission android:name=\"android.permission.WRITE_SETTINGS\"/>"
], ],
"abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ] "abiFilters" : [ "armeabi-v7a", "arm64-v8a", "x86" ],
"minSdkVersion" : 23
}, },
/* ios */ /* ios */
"ios" : { "ios" : {

46
src/mycomponents/scan/winComScan.vue

@ -7,7 +7,7 @@
<view class="conbox"> <view class="conbox">
<textarea v-model="scanMsg" trim="all" maxlength="1000" style="margin-left: 5px;width: 90%;" <textarea v-model="scanMsg" trim="all" maxlength="1000" style="margin-left: 5px;width: 90%;"
:focus="boxfocus" :placeholder="placeholderValue" @focus="getfocus" @blur="losefocus" :focus="boxfocus" :placeholder="placeholderValue" @focus="getfocus" @blur="losefocus"
@input="handelScanMsg" :cursor="cursorIndex"></textarea> @input="handelScanMsg" :cursor="cursorIndex" ></textarea>
</view> </view>
<view class="uni-flex uni-row space-between u-col-center"> <view class="uni-flex uni-row space-between u-col-center">
@ -63,8 +63,7 @@
export default { export default {
name: "winComScan", name: "winComScan",
emits: ["getResult"], emits: ["getResult"],
components: { components: {},
},
props: { props: {
placeholder: { placeholder: {
type: String, type: String,
@ -101,12 +100,34 @@
} }
}, },
mounted() { mounted() {
//#ifndef APP-PLUS
// #ifdef H5
if (document.querySelector('textarea') != null) { if (document.querySelector('textarea') != null) {
document.querySelector('textarea').setAttribute('inputmode', 'none') document.querySelector('textarea').setAttribute('inputmode', 'none')
} }
//#endif // #endif
// #ifdef APP-PLUS
//
// uni.onKeyboardHeightChange(res => {
// console.log(res.height)
// if(res.height>0){
// // uni.hideKeyboard();
// plus.key.hideSoftKeybord();
// }
// })
//
// uni.onWindowResize((res) => {
// plus.key.hideSoftKeybord()
// })
// plus.key.hideSoftKeybord();
// setInterval(function(){
// plus.key.hideSoftKeybord();
// // uni.hideKeyboard();//
// // plus.key.hideSoftKeybord();
// },60);
// #endif
// if (this.$el.querySelector('textarea') != null) { // if (this.$el.querySelector('textarea') != null) {
// this.$el.querySelector('textarea').setAttribute('inputmode', 'none') // this.$el.querySelector('textarea').setAttribute('inputmode', 'none')
// } // }
@ -120,6 +141,17 @@
this.placeholderValue = '请扫描' + this.placeholder; this.placeholderValue = '请扫描' + this.placeholder;
}, },
methods: { methods: {
hide() {
//
var interval = setInterval(function() {
uni.hideKeyboard(); //
console.log('刷新')
}, 60);
setTimeout(() => {
clearInterval(interval);
console.log('停止刷新')
}, 2000);
},
getValue() { getValue() {
return this.scanMsg return this.scanMsg
}, },
@ -151,7 +183,7 @@
that.getfocus(); that.getfocus();
this.$refs.comMessage.showErrorMessage("扫描内容为空,请重新扫描", res => { this.$refs.comMessage.showErrorMessage("扫描内容为空,请重新扫描", res => {
if (res) { if (res) {
that.scanMsg="" that.scanMsg = ""
that.getfocus(); that.getfocus();
} }
}) })
@ -241,4 +273,4 @@
<style scoped lang="scss"> <style scoped lang="scss">
</style> </style>

7
src/pages.json

@ -333,6 +333,13 @@
"enablePullDownRefresh": true "enablePullDownRefresh": true
} }
}, },
{
"path": "pages/inspect/job/inspectFullDetail",
"style": {
"navigationBarTitleText": "全检检验详情",
"enablePullDownRefresh": true
}
},
{ {
"path": "pages/putaway/job/putawayJob", "path": "pages/putaway/job/putawayJob",
"style": { "style": {

1
src/pages/index/index.vue

@ -123,6 +123,7 @@
if (uni.getStorageSync("hasLogin")) { if (uni.getStorageSync("hasLogin")) {
this.getMenuItemTop() this.getMenuItemTop()
} }
}, },
onHide() { onHide() {

1
src/pages/login/index.vue

@ -146,7 +146,6 @@
}, },
onLoad() { onLoad() {
getCaptchaImage().then(res => { getCaptchaImage().then(res => {
if (res) { if (res) {
var code = res.data.img; var code = res.data.img;

Loading…
Cancel
Save