From 26ed7822b252483df255d9a2cf29fcecbaaa25ab Mon Sep 17 00:00:00 2001 From: xiangxy Date: Tue, 19 Aug 2025 10:16:55 +0800 Subject: [PATCH] change --- pages/entry/mater-group-to-store.vue | 110 +++--------- pages/entry/mater-group-to-store0.vue | 233 ++++++++++++++++++++++++++ pages/home/home.vue | 2 +- pages/zw/materbox-instore.vue | 161 +++++++++--------- utils/getData4.js | 18 +- 5 files changed, 361 insertions(+), 163 deletions(-) create mode 100644 pages/entry/mater-group-to-store0.vue diff --git a/pages/entry/mater-group-to-store.vue b/pages/entry/mater-group-to-store.vue index b3baa93..452d166 100644 --- a/pages/entry/mater-group-to-store.vue +++ b/pages/entry/mater-group-to-store.vue @@ -28,14 +28,6 @@ - - - 单位 - - - - - 物料单重 @@ -54,10 +46,10 @@ - 物料数量 + 供应商 - - + + @@ -72,39 +64,17 @@ 仓库编码 - - - - - - - 当前库位可用数: - - - - 高库位 - - - {{kwData.g}}个 - - - 中库位 - - - {{kwData.z}}个 - - - 低库位 - - - {{kwData.d}}个 + + - + @@ -113,7 +83,8 @@ import NavBar from '@/components/NavBar.vue' import SearchBox from '@/components/SearchBox.vue' import NumberInput from '@/components/NumberInput.vue' - import {storList, getStructCount, groupMaterIn} from '@/utils/getData2.js' + import {suppList, combination} from '@/utils/getData4.js' + export default { components: { NavBar, @@ -122,39 +93,21 @@ }, data() { return { + val1: '', title: '', currentData: {}, options: [], index: '', - disabled: false, - kwData: {} + disabled: false }; }, onLoad (options) { this.title = options.title - this._storList() + this._suppList() }, onShow () { if (this.$store.getters.publicObj !== '') { this.currentData = this.$store.getters.publicObj - if(this.currentData.stor_code !== '' && this.currentData.stor_code !== null && this.currentData.stor_code !== undefined) { - this.options.map(el => { - if (el.value === this.currentData.stor_code) { - this.index = el.value - } - }) - } else { - if (this.currentData.vehicle_code && this.currentData.vehicle_code.charAt(0).toUpperCase() === 'T') { - this.index ='FStockPallet' - } else { - this.index ='FStockId' - } - } - if (this.currentData.vehicle_code) { - this._getStructCount(this.currentData.vehicle_code) - } else { - this.kwData = {} - } this.$store.dispatch('setPublicObj', '') } }, @@ -162,13 +115,16 @@ selectChange (e) { this.index = e }, - async _storList () { - let res = await storList() - if (res.code === '200') { - this.options = [...res.content] - this.options.map(el => { - this.$set(el, 'text', el.label) - }) + async _suppList () { + try { + let res = await suppList() + if (res) { + this.options = res.data + } else { + this.options = [] + } + } catch (e) { + this.options = [] } }, toJump () { @@ -183,19 +139,6 @@ } else { this.index ='FStockId' } - this._getStructCount(e) - } - }, - async _getStructCount (e) { - try { - let res = await getStructCount(e) - if (res) { - this.kwData = res - } else { - this.kwData = {} - } - } catch (e) { - this.kwData = {} } }, handleDel () { @@ -205,17 +148,16 @@ this.currentData = {} this.index = '' this.disabled = false - this.kwData = {} }, - async _groupMaterIn () { + async _combination () { this.disabled = true if (JSON.stringify(this.currentData) === '{}') { this.disabled = false return } try { - this.currentData.stor_code = this.index - let res = await groupMaterIn(this.index, this.currentData) + let selobj = this.options.find(item => item.value === this.index) + let res = await combination(this.currentData.material_code, this.currentData.pcsn, this.currentData.material_id, selobj.text, '', this.currentData.single_weight) uni.showToast({ title: res.message, icon: 'none' diff --git a/pages/entry/mater-group-to-store0.vue b/pages/entry/mater-group-to-store0.vue new file mode 100644 index 0000000..b3baa93 --- /dev/null +++ b/pages/entry/mater-group-to-store0.vue @@ -0,0 +1,233 @@ + + + + + diff --git a/pages/home/home.vue b/pages/home/home.vue index d3a3d6a..9736534 100644 --- a/pages/home/home.vue +++ b/pages/home/home.vue @@ -41,7 +41,7 @@ return { userName: '', menuList: [ - {title: '解包管理', path: 'RF03', sonTree: [{title: '解包上料', path: '/pages/zw/jb-up-mater'}, {title: '解包下料', path: '/pages/zw/jb-lower-mater'}, {title: '料桶出入', path: '/pages/zw/materbox-instore'}, {title: '解包退料', path: '/pages/zw/jb-return-mater'}, {title: '人车安全', path: '/pages/zw/mancar-safe'}]}, + {title: '解包管理', path: 'RF03', sonTree: [{title: '解包上料', path: '/pages/zw/jb-up-mater'}, {title: '解包下料', path: '/pages/zw/jb-lower-mater'}, {title: '料桶组盘', path: '/pages/zw/materbox-instore'}, {title: '解包退料', path: '/pages/zw/jb-return-mater'}, {title: '人车安全', path: '/pages/zw/mancar-safe'}]}, {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: 'RF07', sonTree: [{title: '人工叫料', path: '/pages/zw/manual-callmater'}, {title: '人工退料', path: '/pages/zw/manual-returnmater'}]}, // {title: '预装管理', path: 'RF04', sonTree: [{title: '物料组盘', path: '/pages/entry/mater-group'}, {title: '货架绑定', path: '/pages/outbound/shelf-bind'}]}, diff --git a/pages/zw/materbox-instore.vue b/pages/zw/materbox-instore.vue index ede13c7..099f4bf 100644 --- a/pages/zw/materbox-instore.vue +++ b/pages/zw/materbox-instore.vue @@ -1,6 +1,6 @@