From b60645131ee57cf9c42e29cc4758e55a8b2bad27 Mon Sep 17 00:00:00 2001 From: x Date: Wed, 3 Jun 2026 13:05:15 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E6=89=AB=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- components/NumberInput.vue | 3 +- components/SearchBox copy.vue | 73 ++++++++++++++++++ components/SearchBox.vue | 51 +++++++++++++ pages/home/home.vue | 2 +- pages/zw/jb-lower-mater.vue | 139 +++++++++++----------------------- pages/zw/jb-return-mater.vue | 8 +- pages/zw/jb-up-mater.vue | 12 +-- pages/zw/ll-instore.vue | 2 +- pages/zw/manual-callmater.vue | 4 +- pages/zw/materbox-instore.vue | 13 +++- pages/zw/wlrk.vue | 51 +++++++++---- 11 files changed, 233 insertions(+), 125 deletions(-) create mode 100644 components/SearchBox copy.vue diff --git a/components/NumberInput.vue b/components/NumberInput.vue index c8290f0..de92caa 100644 --- a/components/NumberInput.vue +++ b/components/NumberInput.vue @@ -133,7 +133,8 @@ export default { font-size: 14px; } input { - font-size: 15px; + /* font-size: 15px; */ + font-size: 28rpx; color: #333; } diff --git a/components/SearchBox copy.vue b/components/SearchBox copy.vue new file mode 100644 index 0000000..29ac87e --- /dev/null +++ b/components/SearchBox copy.vue @@ -0,0 +1,73 @@ + + + + + diff --git a/components/SearchBox.vue b/components/SearchBox.vue index 29ac87e..2fb4f21 100644 --- a/components/SearchBox.vue +++ b/components/SearchBox.vue @@ -8,10 +8,12 @@ :focus="focusState" @focus="handleFocus" @blur="handleBlur" + @input="handleInput" @confirm="handleSend"> + @@ -42,6 +44,13 @@ // } this.focusState = false }, + handleInput (e) { + this.$emit('input', e.target.value) + // this.$emit('handleInput', e.target.value) + if (e.target.value.length) { + this.$emit('handleInput', e.target.value) + } + }, toDel () { this.$emit('input', '') this.$emit('handleDel') @@ -51,7 +60,49 @@ if (e.target.value.length) { this.$emit('handleChange', e.target.value) } + }, + async toPhone() { + // #ifdef APP-PLUS + let status = await this.checkPermission(); + if (status !== 1) { + return; + } + // #endif + uni.scanCode({ + success: (res) => { + this.$emit('input', res.result) + this.$emit('handleChange', res.result) + }, + fail: (err) => { + // uni.showToast({ + // title: '出错', + // icon: 'none' + // }) + } + }); } + // #ifdef APP-PLUS + , + async checkPermission(code) { + let status = permision.isIOS ? await permision.requestIOS('camera') : + await permision.requestAndroid('android.permission.CAMERA'); + + if (status === null || status === 1) { + status = 1; + } else { + uni.showModal({ + content: "需要相机权限", + confirmText: "设置", + success: function(res) { + if (res.confirm) { + permision.gotoAppSetting(); + } + } + }) + } + return status; + } + // #endif } } diff --git a/pages/home/home.vue b/pages/home/home.vue index 967d09b..1bd7d6a 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -41,7 +41,7 @@ return { userName: '', menuList: [ - {title: '原料管理', path: 'RF04', sonTree: [{title: '来料入库', path: '/pages/zw/ll-instore'}, {title: '空载具入库', path: '/pages/zw/kzj-instore'}, {title: '空载具出库', path: '/pages/zw/kzj-outstore'}, {title: '点位属性设置', path: '/pages/zw/point-attrset'}, {title: '物料组盘', path: '/pages/zw/wl-groupplate'}, {title: '点位更新', path: '/pages/zw/confirm-quhuo'}]}, + {title: '原料管理', path: 'RF04', sonTree: [{title: '物料组盘', path: '/pages/zw/wl-groupplate'}, {title: '来料入库', path: '/pages/zw/ll-instore'}, {title: '空载具入库', path: '/pages/zw/kzj-instore'}, {title: '空载具出库', path: '/pages/zw/kzj-outstore'}, {title: '点位属性设置', path: '/pages/zw/point-attrset'}, {title: '点位更新', path: '/pages/zw/confirm-quhuo'}]}, {title: '解包管理', path: 'RF03', sonTree: [{title: '解包上料', path: '/pages/zw/jb-up-mater'}, {title: '解包出桶', path: '/pages/zw/jb-lower-mater'}, {title: '解包退料', path: '/pages/zw/jb-return-mater'}, {title: '人车安全', path: '/pages/zw/mancar-safe'}]}, {title: '缓存管理', path: 'RF06', sonTree: [{title: '料桶盘点', path: '/pages/zw/materbox-instore'}, {title: '物料入库', path: '/pages/zw/wlrk'}]}, {title: '产线管理', path: 'RF02', sonTree: [{title: '手工叫料', path: '/pages/zw/manual-callmater'}, {title: '手工退料', path: '/pages/zw/manual-returnmater'}]}, diff --git a/pages/zw/jb-lower-mater.vue b/pages/zw/jb-lower-mater.vue index d8a415e..047ac26 100644 --- a/pages/zw/jb-lower-mater.vue +++ b/pages/zw/jb-lower-mater.vue @@ -42,7 +42,7 @@ 料桶编码 - + @@ -63,7 +63,7 @@ {{e.workorder_code}} {{e.material_name}} - {{e.pcsn}} + {{JSON.parse(e.ext_data).batch_no}} {{e.workorder_status_name}} {{e.operator}} {{e.plan_weight}} @@ -96,35 +96,22 @@ - + - 库位信息: - - {{ selectStructName || '请选择' }} - - - + 库位信息: + - + - - - - - - - {{ item.struct_name }} - - @@ -159,11 +146,11 @@ standError: '', disabled: false, statusMap: { - '1': '未生产', - '2': '已下发', + '1': '未开始', + '2': '已下发', '3': '生产中', - '4': '等待下料', - '5': '完成' + '4': '等待中', + '5': '已完成' }, reload: false, status: 'more', @@ -177,14 +164,16 @@ pageSize: 100, showDialog: false, selectType: '0', - showSelect: false, selectStructName: '', selectStructCode: '', // structList: [ - // { struct_code: 'A01', struct_name: 'A区01库位' }, - // { struct_code: 'A02', struct_name: 'A区02库位' }, - // { struct_code: 'B01', struct_name: 'B区01库位' }, - // ] + // { value: 'A01', text: 'A区01库位' }, + // { value: 'A02', text: 'A区02库位' }, + // { value: 'B01', text: 'B区01库位' }, + // { value: 'B21', text: 'B区21库位' }, + // { value: 'B31', text: 'B区31库位' }, + // { value: 'B02', text: 'B区02库位' } + // ], structList: [] }; }, @@ -197,6 +186,16 @@ // this._pointList('DDJBQ') }, methods: { + handleInput (e) { + if (e) { + this.val2 = e.slice(-4) + } + }, + handleChange2 (e) { + if (e) { + this.val2 = e.slice(-4) + } + }, closeDialog() { this.showDialog = false }, @@ -211,17 +210,13 @@ } this.showDialog = true }, - openSelect() { - if (!this.pkId) { - return + // 库位选择事件 + onStructChange(e) { + this.selectStructCode = e + let item = this.structList.find(i => i.value === e) + if (item) { + this.selectStructName = item.text } - this._structListByWorkId() - this.showSelect = true - }, - selectStruct(item) { - this.selectStructCode = item.struct_code - this.selectStructName = item.struct_name - this.showSelect = false }, handleBlur () { if (this.val3) { @@ -439,7 +434,7 @@ }, async _downMaterial () { try { - let res = await downMaterial(this.pkId, 'DDJBQ', this.val3, this.index2, this.val1, this.val2, this.selectType, this.selectStructCode, this.selectStructName) + let res = await downMaterial(this.pkId, this.index, this.val3, this.index2, this.val1, this.val2, this.selectType, this.selectStructCode, this.selectStructName) if (res.code === '200') { uni.showToast({ title: res.message, @@ -461,7 +456,7 @@ }