仓库-出库功能修改

This commit is contained in:
赵正易 2024-04-24 17:14:56 +08:00
parent 7d410d5bdb
commit 114ead8547

View File

@ -60,8 +60,10 @@
</view>
<!-- 底部按钮 -->
<view class="button-box">
<u-button style="width: 40%" type="primary" @click="handlerDoOut">货物出库</u-button>
<u-button style="width: 40%" type="success" @click="handlerSubmit">出库单完成</u-button>
<u-button style="width: 40%" type="primary" @click="handlerDoOut" :disabled="loading"
:loading="loading">货物出库</u-button>
<u-button style="width: 40%" type="success" @click="handlerSubmit" :disabled="loading"
:loading="loading">出库单完成</u-button>
</view>
</view>
</template>
@ -183,7 +185,7 @@
return;
}
if (this.subsectionCurrent === 1 && this.newMaterialList.length > 0) {
if(this.newMaterialList.length > 50){
if (this.newMaterialList.length > 50) {
uni.showModal({
title: '提示',
content: '批量出库数量已达到50箱请先出库此50箱',
@ -251,6 +253,10 @@
},
//
handlerDoOut() {
this.loading = true;
setTimeout(() => {
this.loading = false;
}, 30000)
if (this.searchType === 3) {
uni.showModal({
title: '提示',
@ -258,6 +264,7 @@
showCancel: false,
confirmText: '确定'
});
this.loading = false;
return;
}
const length = this.newMaterialList.length;
@ -268,6 +275,7 @@
showCancel: false,
confirmText: '确定'
});
this.loading = false;
return;
}
uni.showModal({
@ -296,6 +304,7 @@
showCancel: false,
confirmText: '确认'
});
this.loading = false;
return;
} else {
newPatchCodeList.push(item.patchCode)
@ -311,6 +320,8 @@
showCancel: false,
confirmText: '确认'
});
this.loading = false;
return;
}
WarehoseApi.doMaterialOut(data).then((res) => {
if (res.code !== 200) {
@ -320,6 +331,7 @@
showCancel: false,
confirmText: '确认'
});
this.loading = false;
return;
} else {
if (res.data.item1 == 100) {
@ -330,6 +342,7 @@
confirmText: '确认'
});
this.newMaterialList = [];
this.loading = false;
} else if (res.data.item2 == 200) {
uni.showModal({
title: '提示',
@ -338,6 +351,7 @@
confirmText: '确认'
});
this.newMaterialList = [];
this.loading = false;
} else {
uni.showModal({
title: '提示',
@ -346,6 +360,7 @@
confirmText: '确认'
});
this.newMaterialList = [];
this.loading = false;
}
}
});