修改呼叫套轴、子卷装箱

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="pop-line"></view>
<view class="zd_wrapper-2">
<view class="zd-row filter_item">
<view :class="!disabled ? 'zd-col-18' : 'zd-col-24'">
<input type="text" placeholder="输入关键字搜索" class="filter_input" :class="{'filter_input_disabled': disabled}" :disabled="disabled" v-model="val2">
<view class="filter_item">
<view class="filter_label">木箱描述</view>
<view class="filter_input_wraper">
<uni-data-select v-model="index" :localdata="options" @change="selectChange"></uni-data-select>
</view>
<view v-show="!disabled" class="zd-col-5"><button class="btn-submit btn-success" @tap="_queryBoxSpec">查询</button></view>
</view>
</view>
<view class="msg_content msg_content_1 pdb110">
@@ -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

View File

@@ -49,8 +49,9 @@
</view>
</view>
<view class="zd-row submitbar">
<button class="zd-col-6 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-5 btn-submit btn-default" @tap="clearUp">清空</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>
</template>
@@ -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) {

View File

@@ -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',

View File

@@ -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,