From 7228eeb9ff0d5ddacfa119517f2b81f6b5926067 Mon Sep 17 00:00:00 2001 From: caill <815519168@qq.com> Date: Fri, 11 Jul 2025 14:05:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E5=91=BC=E5=8F=AB=E5=A5=97?= =?UTF-8?q?=E8=BD=B4=E3=80=81=E5=AD=90=E5=8D=B7=E8=A3=85=E7=AE=B1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pages/SecondPhase/production/ZjContainer.vue | 38 ++++++++++++++------ pages/SecondPhase/slitting/CallAxis.vue | 23 ++++++++---- utils/getData3.js | 8 +++-- utils/mork2.js | 4 +++ 4 files changed, 54 insertions(+), 19 deletions(-) diff --git a/pages/SecondPhase/production/ZjContainer.vue b/pages/SecondPhase/production/ZjContainer.vue index ac42e7e..9c7ef59 100644 --- a/pages/SecondPhase/production/ZjContainer.vue +++ b/pages/SecondPhase/production/ZjContainer.vue @@ -51,11 +51,11 @@ - - - + + 木箱描述 + + - @@ -129,7 +129,7 @@ import NavBar from '@/components/NavBar.vue' import SearchBox from '@/components/SearchBox.vue' import UpTop from '@/components/upTop.vue' - import {queryContainerNameBySaleOrder, queryBoxSpec, updateEntityList} from '@/utils/getData3.js' + import {queryContainerNameBySaleOrder, getSameBoxList, queryBoxSpec, updateEntityList} from '@/utils/getData3.js' export default { components: { NavBar, @@ -145,7 +145,8 @@ popData: [], show: false, disabled: false, - val2: '', + options: [], + index: '', pkId: '', pkObj: {}, paper: '', @@ -238,11 +239,28 @@ } } this.disabled = code !== '' - this.val2 = code - this._queryBoxSpec() + this._getSameBoxList(code) }, - async _queryBoxSpec () { - let res = await queryBoxSpec(this.val2) + async _getSameBoxList (e) { + let res = await getSameBoxList(e) + if (res && res.length) { + this.options = [...res] + if (this.options.length > 0) { + this.index = this.options[0].value + this._queryBoxSpec(this.index) + } + } + }, + selectChange (e) { + this.index = e + if (e) { + this._queryBoxSpec(e) + } else { + this.popData = [] + } + }, + async _queryBoxSpec (e) { + let res = await queryBoxSpec(e) if (res.code === 200) { this.popData = [...res.content] this.show = true diff --git a/pages/SecondPhase/slitting/CallAxis.vue b/pages/SecondPhase/slitting/CallAxis.vue index f55b123..79eba59 100644 --- a/pages/SecondPhase/slitting/CallAxis.vue +++ b/pages/SecondPhase/slitting/CallAxis.vue @@ -49,8 +49,9 @@ - - + + + @@ -81,7 +82,6 @@ onLoad (options) { this.title = options.title this._queryProductArea() - this._doCallTubeShaftShow() }, methods: { selectChange2(e) { @@ -103,10 +103,18 @@ }, selectChange (e) { this.index = e + if (e) { + this._doCallTubeShaftShow(e) + } else { + this.dataList = [] + } }, - async _doCallTubeShaftShow () { + async _doCallTubeShaftShow (e) { + if (!this.index) { + return + } try { - let res = await doCallTubeShaftShow() + let res = await doCallTubeShaftShow(e) if (res) { this.dataList = [...res] } else { @@ -133,8 +141,9 @@ title: res.message, icon: 'none' }) - this.clearUp() - this._doCallTubeShaftShow() + this.pkId = '' + this.pkObj = {} + this._doCallTubeShaftShow(this.index) } this.disabled = false } catch (e) { diff --git a/utils/getData3.js b/utils/getData3.js index 1f44174..bff9061 100644 --- a/utils/getData3.js +++ b/utils/getData3.js @@ -260,6 +260,10 @@ export const queryContainerNameBySaleOrder = (code) => request({ url:'api/pdmBiSubpackagerelation/queryContainerNameBySaleOrder', data: {type: '1', container_name: code} }) +export const getSameBoxList = (code) => request({ + url:'api/samebox/getSameBoxList', + data: {box_code: code} +}) export const queryBoxSpec = (code) => request({ method: 'GET', url:'api/pdmBiSubpackagerelation/queryBoxSpec', @@ -572,9 +576,9 @@ export const cutCacheInventory = (code, type) => request({ /** * 呼叫套轴 */ -export const doCallTubeShaftShow = () => request({ +export const doCallTubeShaftShow = (code) => request({ url:'api/pda/slitter/doCallTubeShaftShow', - data: {} + data: {device_code: code} }) export const doCallTubeShaft = (code, row) => request({ url:'api/pda/slitter/doCallTubeShaft', diff --git a/utils/mork2.js b/utils/mork2.js index d1f9513..38a89dc 100644 --- a/utils/mork2.js +++ b/utils/mork2.js @@ -211,6 +211,10 @@ export const queryContainerNameBySaleOrder = () => { } return res } +export const getSameBoxList = () => { + let res = [{text: '物料一', value: '001'}, {text: '物料a', value: '002'}, {text: '物料b', value: '003'}] + return res +} export const queryBoxSpec = () => { let res = { "totalElements": 1,