修改呼叫套轴、子卷装箱

This commit is contained in:
2025-07-11 14:05:30 +08:00
parent b53324d8ca
commit 7228eeb9ff
4 changed files with 54 additions and 19 deletions

View File

@@ -51,11 +51,11 @@
<view class="msg_wrapper" :class="show ? 'popshow' : 'pophide'"> <view class="msg_wrapper" :class="show ? 'popshow' : 'pophide'">
<view class="pop-line"></view> <view class="pop-line"></view>
<view class="zd_wrapper-2"> <view class="zd_wrapper-2">
<view class="zd-row filter_item"> <view class="filter_item">
<view :class="!disabled ? 'zd-col-18' : 'zd-col-24'"> <view class="filter_label">木箱描述</view>
<input type="text" placeholder="输入关键字搜索" class="filter_input" :class="{'filter_input_disabled': disabled}" :disabled="disabled" v-model="val2"> <view class="filter_input_wraper">
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
</view> </view>
<view v-show="!disabled" class="zd-col-5"><button class="btn-submit btn-success" @tap="_queryBoxSpec">查询</button></view>
</view> </view>
</view> </view>
<view class="msg_content msg_content_1 pdb110"> <view class="msg_content msg_content_1 pdb110">
@@ -129,7 +129,7 @@
import NavBar from '@/components/NavBar.vue' import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue' import SearchBox from '@/components/SearchBox.vue'
import UpTop from '@/components/upTop.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 { export default {
components: { components: {
NavBar, NavBar,
@@ -145,7 +145,8 @@
popData: [], popData: [],
show: false, show: false,
disabled: false, disabled: false,
val2: '', options: [],
index: '',
pkId: '', pkId: '',
pkObj: {}, pkObj: {},
paper: '', paper: '',
@@ -238,11 +239,28 @@
} }
} }
this.disabled = code !== '' this.disabled = code !== ''
this.val2 = code this._getSameBoxList(code)
this._queryBoxSpec()
}, },
async _queryBoxSpec () { async _getSameBoxList (e) {
let res = await queryBoxSpec(this.val2) 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) { if (res.code === 200) {
this.popData = [...res.content] this.popData = [...res.content]
this.show = true this.show = true

View File

@@ -49,8 +49,9 @@
</view> </view>
</view> </view>
<view class="zd-row submitbar"> <view class="zd-row submitbar">
<button class="zd-col-6 btn-submit btn-default" @tap="clearUp">清空</button> <button class="zd-col-5 btn-submit btn-default" @tap="clearUp">清空</button>
<button class="zd-col-15 btn-submit btn-success" :class="{'btn-info': !index || !pkId}" :disabled="disabled" @tap="_doCallTubeShaft">确认</button> <button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !index}" @tap="_doCallTubeShaftShow">刷新</button>
<button class="zd-col-8 btn-submit btn-success" :class="{'btn-info': !index || !pkId}" :disabled="disabled" @tap="_doCallTubeShaft">确认</button>
</view> </view>
</view> </view>
</template> </template>
@@ -81,7 +82,6 @@
onLoad (options) { onLoad (options) {
this.title = options.title this.title = options.title
this._queryProductArea() this._queryProductArea()
this._doCallTubeShaftShow()
}, },
methods: { methods: {
selectChange2(e) { selectChange2(e) {
@@ -103,10 +103,18 @@
}, },
selectChange (e) { selectChange (e) {
this.index = e this.index = e
if (e) {
this._doCallTubeShaftShow(e)
} else {
this.dataList = []
}
}, },
async _doCallTubeShaftShow () { async _doCallTubeShaftShow (e) {
if (!this.index) {
return
}
try { try {
let res = await doCallTubeShaftShow() let res = await doCallTubeShaftShow(e)
if (res) { if (res) {
this.dataList = [...res] this.dataList = [...res]
} else { } else {
@@ -133,8 +141,9 @@
title: res.message, title: res.message,
icon: 'none' icon: 'none'
}) })
this.clearUp() this.pkId = ''
this._doCallTubeShaftShow() this.pkObj = {}
this._doCallTubeShaftShow(this.index)
} }
this.disabled = false this.disabled = false
} catch (e) { } catch (e) {

View File

@@ -260,6 +260,10 @@ export const queryContainerNameBySaleOrder = (code) => request({
url:'api/pdmBiSubpackagerelation/queryContainerNameBySaleOrder', url:'api/pdmBiSubpackagerelation/queryContainerNameBySaleOrder',
data: {type: '1', container_name: code} data: {type: '1', container_name: code}
}) })
export const getSameBoxList = (code) => request({
url:'api/samebox/getSameBoxList',
data: {box_code: code}
})
export const queryBoxSpec = (code) => request({ export const queryBoxSpec = (code) => request({
method: 'GET', method: 'GET',
url:'api/pdmBiSubpackagerelation/queryBoxSpec', 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', url:'api/pda/slitter/doCallTubeShaftShow',
data: {} data: {device_code: code}
}) })
export const doCallTubeShaft = (code, row) => request({ export const doCallTubeShaft = (code, row) => request({
url:'api/pda/slitter/doCallTubeShaft', url:'api/pda/slitter/doCallTubeShaft',

View File

@@ -211,6 +211,10 @@ export const queryContainerNameBySaleOrder = () => {
} }
return res return res
} }
export const getSameBoxList = () => {
let res = [{text: '物料一', value: '001'}, {text: '物料a', value: '002'}, {text: '物料b', value: '003'}]
return res
}
export const queryBoxSpec = () => { export const queryBoxSpec = () => {
let res = { let res = {
"totalElements": 1, "totalElements": 1,