This commit is contained in:
qianhao.xu
2024-04-15 11:36:59 +08:00
parent 90be1fd3c4
commit 5768339370
2 changed files with 39 additions and 38 deletions

View File

@@ -23,7 +23,7 @@
</view>
<!-- 选择物料号 -->
<view style="margin-top: 20px" class="warehoseInfo-box">
<u--text type="primary" :text="material_id" :size="50"></u--text>
<u--text type="primary" :text="material_id" :size="50"></u--text>
<u-button @click="show = true">选择物料号</u-button>
<u-picker :show="show" :columns="columns" @cancel="pick_cancel" @confirm="pick_confirm"></u-picker>
</view>
@@ -130,17 +130,15 @@ export default {
this.searchType = 2;
this.outInfo = data;
this.newMaterialList = [];
let arry=[]
this.columns=[];
this.outInfo.materialList.forEach((item)=>{
let arry = [];
this.columns = [];
this.outInfo.materialList.forEach((item) => {
arry.push(item.partnumber);
})
this.columns.push(arry)
this.material_id=this.outInfo.materialList[0].partnumber
});
this.columns.push(arry);
this.material_id = this.outInfo.materialList[0].partnumber;
} else if (type === 2) {
if (this.newMaterialList.length > 0) {
uni.showModal({
@@ -154,7 +152,7 @@ export default {
const checkData = {
production_packcode: data.originalCode,
shipment_num: this.outInfo.shipmentNum,
partnumber:this.material_id
partnumber: this.material_id
};
//检查是否可以出货
WarehoseApi.checkProductionOut(checkData).then((res) => {
@@ -226,8 +224,7 @@ export default {
if (res.confirm) {
const data = {
shipmentNum: this.outInfo.shipmentNum,
patchCode: [this.newMaterialList[0].patchCode],
patchCode: [this.newMaterialList[0].patchCode]
};
WarehoseApi.doMaterialOut(data).then((res) => {
if (res.code !== 200) {
@@ -237,31 +234,35 @@ export default {
showCancel: false,
confirmText: '确认'
});
if(res.data.item1=100){
uni.showModal({
title: '提示',
content: '此物料已经出库完成,没有可以出库的了',
showCancel: false,
confirmText: '确认'
});
}else if(res.data.item2=100){
uni.showModal({
title: '提示',
content: '不是此物料最早批次,无法出库',
showCancel: false,
confirmText: '确认'
});
}
return;
} else {
if (res.data.item1 == 100) {
uni.showModal({
title: '提示',
content: '此物料已经出库完成,不可以再出库',
showCancel: false,
confirmText: '确认'
});
this.newMaterialList = [];
} else if (res.data.item2 == 200) {
uni.showModal({
title: '提示',
content: '不是此物料最早批次,无法出库',
showCancel: false,
confirmText: '确认'
});
this.newMaterialList = [];
} else {
uni.showModal({
title: '提示',
content: '出库成功',
showCancel: false,
confirmText: '确认'
});
this.newMaterialList = [];
}
}
uni.showModal({
title: '提示',
content: '出库成功',
showCancel: false,
confirmText: '确认'
});
this.newMaterialList = [];
});
}
}

View File

@@ -18,7 +18,7 @@ import {
let timeout = 10000
const request = config => {
// 浏览器测试用
// const storageBaseUrl = 'http://' + getBaseUrl() + '/api';
// const storageBaseUrl = 'http://' + getBaseUrl() + '/api';
// 真机测试以及部署用
const storageBaseUrl = 'http://' + getBaseUrl();
// 是否需要设置 token