接口修改

This commit is contained in:
2025-09-18 17:53:38 +08:00
parent 6bdb34a86e
commit 42827c3e2a
2 changed files with 11 additions and 11 deletions

View File

@@ -86,7 +86,7 @@
</view>
<view class="zd-row submit-bar">
<button class="zd-col-5 button-primary" @tap="searchList">查询</button>
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !val3 || !val4}" :disabled="disabled" @tap="_returnConfirm">确认退回</button>
<button class="zd-col-18 button-primary" :class="{'button-info': !val1 || !val3 || !val4 || !dataList.length}" :disabled="disabled" @tap="_returnConfirm">确认退回</button>
</view>
</view>
</template>
@@ -94,7 +94,7 @@
<script>
import NavBar from '@/components/NavBar.vue'
import SearchBox from '@/components/SearchBox.vue'
import {getOutGroupInfo, returnConfirm} from '@/utils/getData1.js'
import {getBomMaterDtl, returnConfirm} from '@/utils/getData1.js'
export default {
components: {
NavBar,
@@ -123,11 +123,11 @@
},
searchList () {
this.dataList = []
this._getOutGroupInfo()
this._getBomMaterDtl()
},
async _getOutGroupInfo () {
async _getBomMaterDtl () {
try {
let res = await getOutGroupInfo(this.val1)
let res = await getBomMaterDtl(this.val1)
if (res && res.data.data.length > 0) {
this.val2 = res.data.device_code
this.val3 = res.data.bom_code
@@ -149,12 +149,12 @@
},
async _returnConfirm () {
this.disabled = true
if (!this.val1 || !this.val3 || !this.val4) {
if (!this.val1 || !this.val3 || !this.val4 || !this.dataList.length) {
this.disabled = false
return
}
try {
let res = await returnConfirm(this.val1, this.val3, this.val4)
let res = await returnConfirm(this.val1, this.val3, this.val4, this.dataList)
if (res) {
uni.showToast({
title: res.message,

View File

@@ -76,14 +76,14 @@ export const materialBoxOutConfirm = (id, scode, strcode, tsscode, qty) => reque
// 【大料箱】退库确认共 (2) 个
// 根据载具号获取出库状态下的组盘信息-表格
export const getOutGroupInfo = (scode) => request({
url:'api/pda/largeMaterialBox/getOutGroupInfo',
export const getBomMaterDtl = (scode) => request({
url:'api/pda/largeMaterialBox/getBomMaterDtl',
data: {storagevehicle_code: scode}
})
// 确认退回
export const returnConfirm = (scode, bcode, qty) => request({
export const returnConfirm = (scode, bcode, qty, rows) => request({
url:'api/pda/largeMaterialBox//returnConfirm',
data: {storagevehicle_code: scode, bom_code: bcode, residue_qty: qty}
data: {storagevehicle_code: scode, bom_code: bcode, residue_qty: qty, rows: rows}
})
// 【大料箱】大料箱移库共 (2) 个