From db2f89d1f5c518debe6213c4eab7315f37f8b7c7 Mon Sep 17 00:00:00 2001 From: lijuncheng Date: Mon, 8 Apr 2024 13:59:36 +0800 Subject: [PATCH] =?UTF-8?q?=E5=88=A0=E9=99=A4=E6=97=A0=E7=94=A8=E5=9B=BE?= =?UTF-8?q?=E7=89=87=EF=BC=8C=E4=BF=AE=E6=94=B9=E5=BC=B9=E5=87=BA=E6=A1=86?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- package.json | 1 + src/App.vue | 2 +- src/api/request2.js | 2 +- src/common/appUpdate.js | 10 +- src/common/basic.js | 4 +- src/common/utils.js | 6 +- src/manifest.json | 8 + src/mycomponents/form/customerFrom.vue | 38 +++-- src/mycomponents/popup/selectClickList.vue | 69 ++++++++ src/pages/common/foucs.js | 45 +++++ src/pages/common/plan.vue | 47 ++++-- src/pages/foam/check.vue | 5 +- src/pages/foam/input.vue | 154 +++++++----------- src/pages/index/index.vue | 1 - src/pages/plastics/check.vue | 5 +- src/pages/plastics/input.vue | 81 +++------ src/pages/setter/index.vue | 2 +- src/static/app/144.png | Bin 0 -> 4542 bytes src/static/app/192.png | Bin 0 -> 7127 bytes src/static/app/72.png | Bin 0 -> 1409 bytes src/static/app/96.png | Bin 0 -> 2382 bytes src/static/icons_ui/default_notpassed.png | Bin 12915 -> 0 bytes src/static/icons_ui/icon_apply_num.svg | 13 -- src/static/icons_ui/icon_asn.svg | 12 -- src/static/icons_ui/icon_buy_num.svg | 13 -- src/static/icons_ui/icon_camera_white.svg | 8 - src/static/icons_ui/icon_erp.svg | 11 -- src/static/icons_ui/icon_form.svg | 5 - src/static/icons_ui/icon_kw_use.svg | 10 -- src/static/icons_ui/icon_notpass.svg | 5 - src/static/icons_ui/icon_num.svg | 4 - src/static/icons_ui/icon_passed.svg | 5 - src/static/icons_ui/icon_prod_line.svg | 12 -- src/static/icons_ui/icon_qiju_end.svg | 5 - src/static/icons_ui/icon_qiju_num.svg | 4 - src/static/icons_ui/icon_qiju_start.svg | 5 - src/static/icons_ui/icon_return_num.svg | 12 -- src/static/icons_ui/icon_send_request.svg | 12 -- src/static/icons_ui/icon_senditem.svg | 4 - src/static/icons_ui/icon_supplier.svg | 11 -- src/static/icons_ui/icon_take_photo.svg | 8 - src/static/icons_ui/icons_common_recceipt.svg | 8 - src/static/icons_ui/icons_common_sjadd.svg | 9 - src/static/icons_ui/label_scx.svg | 4 - src/static/images/message.svg | 4 - src/static/images/profile.jpg | Bin 81131 -> 0 bytes src/static/video/error.wav | Bin 280044 -> 0 bytes .../wz-select-popup/wz-select-popup.vue | 1 + 48 files changed, 272 insertions(+), 393 deletions(-) create mode 100644 src/mycomponents/popup/selectClickList.vue create mode 100644 src/pages/common/foucs.js create mode 100644 src/static/app/144.png create mode 100644 src/static/app/192.png create mode 100644 src/static/app/72.png create mode 100644 src/static/app/96.png delete mode 100644 src/static/icons_ui/default_notpassed.png delete mode 100644 src/static/icons_ui/icon_apply_num.svg delete mode 100644 src/static/icons_ui/icon_asn.svg delete mode 100644 src/static/icons_ui/icon_buy_num.svg delete mode 100644 src/static/icons_ui/icon_camera_white.svg delete mode 100644 src/static/icons_ui/icon_erp.svg delete mode 100644 src/static/icons_ui/icon_form.svg delete mode 100644 src/static/icons_ui/icon_kw_use.svg delete mode 100644 src/static/icons_ui/icon_notpass.svg delete mode 100644 src/static/icons_ui/icon_num.svg delete mode 100644 src/static/icons_ui/icon_passed.svg delete mode 100644 src/static/icons_ui/icon_prod_line.svg delete mode 100644 src/static/icons_ui/icon_qiju_end.svg delete mode 100644 src/static/icons_ui/icon_qiju_num.svg delete mode 100644 src/static/icons_ui/icon_qiju_start.svg delete mode 100644 src/static/icons_ui/icon_return_num.svg delete mode 100644 src/static/icons_ui/icon_send_request.svg delete mode 100644 src/static/icons_ui/icon_senditem.svg delete mode 100644 src/static/icons_ui/icon_supplier.svg delete mode 100644 src/static/icons_ui/icon_take_photo.svg delete mode 100644 src/static/icons_ui/icons_common_recceipt.svg delete mode 100644 src/static/icons_ui/icons_common_sjadd.svg delete mode 100644 src/static/icons_ui/label_scx.svg delete mode 100644 src/static/images/message.svg delete mode 100644 src/static/images/profile.jpg delete mode 100644 src/static/video/error.wav diff --git a/package.json b/package.json index 38bd551..e794994 100644 --- a/package.json +++ b/package.json @@ -26,6 +26,7 @@ "less": "^4.2.0", "vue": "^3.2.45", "vue-i18n": "^9.1.9", + "vue-touch-keyboard": "^0.3.2", "vuex": "^4.1.0" }, "devDependencies": { diff --git a/src/App.vue b/src/App.vue index 9128a34..e204d47 100644 --- a/src/App.vue +++ b/src/App.vue @@ -18,7 +18,7 @@ // plus.screen.lockOrientation('landscape-primary'); // // app 强制竖屏 // plus.screen.lockOrientation('portrait-primary'); - appUpdate(); + appUpdate(false); // #endif }, diff --git a/src/api/request2.js b/src/api/request2.js index 44c4338..8c19194 100644 --- a/src/api/request2.js +++ b/src/api/request2.js @@ -191,7 +191,7 @@ export function getMainMessage() { */ export function appCheckUpdate() { return uni.request({ - url: "http://192.168.0.119:9527/appUpdate.json", + url: "http://192.168.0.105:9527/appUpdate.json", method: "GET", data: {} }) diff --git a/src/common/appUpdate.js b/src/common/appUpdate.js index 03af4c3..4a420d6 100644 --- a/src/common/appUpdate.js +++ b/src/common/appUpdate.js @@ -1,7 +1,7 @@ import { appCheckUpdate } from '../api/request2.js'; -export function appUpdate() { +export function appUpdate(isShowHint) { let curversion = 0; plus.runtime.getProperty(plus.runtime.appid, function(widgetInfo) { const data = { @@ -35,9 +35,11 @@ export function appUpdate() { } }) } else { - uni.showToast({ - title:"当前是最新版本" - }) + if(isShowHint){ + uni.showToast({ + title:"当前是最新版本" + }) + } console.log("没有新版本") } } diff --git a/src/common/basic.js b/src/common/basic.js index d770a26..432e301 100644 --- a/src/common/basic.js +++ b/src/common/basic.js @@ -902,7 +902,7 @@ export function setRootFontSize(fontSize) { export function scanErrorAudio() { var music = null; music = uni.createInnerAudioContext(); //创建播放器对象 - music.src = "../../static/video/error.wav"; + // music.src = "../../static/video/error.wav"; music.volume = 1; music.play(); //执行播放 music.onEnded(() => { @@ -915,7 +915,7 @@ export function scanErrorAudio() { export function newMessageAudio() { var music = null; music = uni.createInnerAudioContext(); //创建播放器对象 - music.src = "../../static/video/error.wav"; + // music.src = "../../static/video/error.wav"; music.volume = 1; music.play(); //执行播放 music.onEnded(() => { diff --git a/src/common/utils.js b/src/common/utils.js index 8e74f52..f30fa7d 100644 --- a/src/common/utils.js +++ b/src/common/utils.js @@ -1,13 +1,11 @@ //提示是否消息 -export function showConfirmMsg(title, content, callback) { +export function showConfirmMsg(title, content,showCancel, callback) { uni.showModal({ title: title, cancelText: '否', confirmText: '是', + showCancel:showCancel, content: content, - customStyle: { - content: 'color: red;' // 这里设置对话框内容的颜色为红色 - }, success: function(res) { if (res.confirm) { callback(true); diff --git a/src/manifest.json b/src/manifest.json index be23fe5..6e4361c 100644 --- a/src/manifest.json +++ b/src/manifest.json @@ -56,6 +56,14 @@ /* SDK配置 */ "sdkConfigs" : { "ad" : {} + }, + "icons" : { + "android" : { + "hdpi" : "src/static/app/72.png", + "xhdpi" : "src/static/app/96.png", + "xxhdpi" : "src/static/app/144.png", + "xxxhdpi" : "src/static/app/192.png" + } } } }, diff --git a/src/mycomponents/form/customerFrom.vue b/src/mycomponents/form/customerFrom.vue index e7ab561..45e11ab 100644 --- a/src/mycomponents/form/customerFrom.vue +++ b/src/mycomponents/form/customerFrom.vue @@ -117,7 +117,7 @@ - + {{radio.name}} @@ -266,16 +266,20 @@ console.log("radioGroupChange", item) }, inputMain(item) { - if (item.putMachine[0].SelectName.length > 0) { - item.SelectName = "" - } + // if (item.putMachine[0].SelectName.length > 0) { + // item.SelectName = "" + // } + item.SelectName = "" + item.SelectValue="" this.reload3() }, inputMinor(item) { - if (item.putMachine[1].SelectName.length > 0) { - item.SelectName = "" - } + // if (item.putMachine[1].SelectName.length > 0) { + // item.SelectName = "" + // } + item.SelectName = "" + item.SelectValue="" this.reload3() }, @@ -285,6 +289,13 @@ // } this.reload2() }, + + radioChangeType3(item,radio){ + if(radio.value==4){ + item.putMachine[0].SelectName="" + item.putMachine[1].SelectName="" + } + }, submit(callBack) { @@ -380,7 +391,7 @@ } if(hintResult.length>0){ - showConfirmMsg("是否提交?",hintResult,callback=>{ + showConfirmMsg("是否提交?",hintResult,true,callback=>{ if(callback){ this.formData.forEach(res => { if(res.SelectName){ @@ -434,9 +445,6 @@ }, - - - isWithinInterval(num, lower, upper) { var num = Number(num); var lower = Number(lower); @@ -454,12 +462,8 @@ return true; }, showHint(title, hint) { - // uni.showModal({ - // title: title, - // Content: hint - // }) // this.$refs.comMessage.showMessage("提示", hint) - showConfirmMsg("提示",hint,callback=>{ + showConfirmMsg("提示",hint,false,callback=>{ }) @@ -497,9 +501,11 @@ reload() { this.isRefresh = false + this.isRefreshType2 = false this.isRefreshType3 = false this.$nextTick(() => { this.isRefresh = true + this.isRefreshType2 = true this.isRefreshType3 = true }) this.$forceUpdate() diff --git a/src/mycomponents/popup/selectClickList.vue b/src/mycomponents/popup/selectClickList.vue new file mode 100644 index 0000000..fcdd33e --- /dev/null +++ b/src/mycomponents/popup/selectClickList.vue @@ -0,0 +1,69 @@ + + + + + \ No newline at end of file diff --git a/src/pages/common/foucs.js b/src/pages/common/foucs.js new file mode 100644 index 0000000..1c3240b --- /dev/null +++ b/src/pages/common/foucs.js @@ -0,0 +1,45 @@ +//focus.js + +/** + * @description 用于各个功能中,光标聚焦到指定input上 + * 用法如下: + * + * 调用 $toFoucs(1) 光标即可聚焦到该input上 + * @author bing + * @date 2023-08-04 15:58 + */ +export default { + data() { + return { + foucsIndex: 0, + } + }, + methods: { + /** + * @description 定位光标到指定input框 + * @author bing + * @date 2023-08-04 17:16 + * @param {Number} to 要定位到的input, + * @param {Function} callback 定位之后的回调 + * @param {boolean} hideKeyboard 是否关闭软键盘,默认关闭 + */ + $toFoucs(to, hideKeyboard = true, callback, ) { + this.foucsIndex = 9999; + this.$nextTick(() => { + this.foucsIndex = to; + hideKeyboard ? this.$hideKeyboard() : "" + callback ? callback() : '' + }) + }, + // 关闭软键盘,防冻 + $hideKeyboard() { + var interval = setInterval(function() { + uni.hideKeyboard(); //隐藏软键盘 + }, 10); + setTimeout(() => { + clearInterval(interval); + }, 1000); + } + } + +} \ No newline at end of file diff --git a/src/pages/common/plan.vue b/src/pages/common/plan.vue index 6011dff..380b028 100644 --- a/src/pages/common/plan.vue +++ b/src/pages/common/plan.vue @@ -1,29 +1,39 @@ diff --git a/src/pages/foam/check.vue b/src/pages/foam/check.vue index fe33e68..32ab365 100644 --- a/src/pages/foam/check.vue +++ b/src/pages/foam/check.vue @@ -233,9 +233,6 @@ mounted() { this.$refs.inputDevice.focused = true }, - onReady() { - // this.openScanPopup(); - }, methods: { getScanResult(result) { uni.showLoading({ @@ -325,7 +322,7 @@ this.deviceCheckCode="" }, showMessage(hint){ - showConfirmMsg("提示", hint,callBack=>{ + showConfirmMsg("提示", hint,false,callBack=>{ } ) }, diff --git a/src/pages/foam/input.vue b/src/pages/foam/input.vue index 04fcb5e..88d5ccb 100644 --- a/src/pages/foam/input.vue +++ b/src/pages/foam/input.vue @@ -15,7 +15,6 @@ - @@ -27,10 +26,11 @@ - - + + - + @@ -41,13 +41,14 @@ - - + + - + - + @@ -79,12 +80,9 @@ - - - - - + + @@ -100,11 +98,6 @@ }