先进先出

This commit is contained in:
qianhao.xu
2024-04-14 11:17:15 +08:00
parent c0ce07b146
commit 90be1fd3c4
4 changed files with 110 additions and 36 deletions

View File

@@ -1,6 +1,6 @@
{
"name" : "干巷仓库APP",
"appid" : "__UNI__A67E78B",
"appid" : "__UNI__A82C0EC",
"description" : "",
"versionName" : "1.0.0",
"versionCode" : "100",
@@ -94,19 +94,19 @@
"vueVersion" : "2",
"h5" : {
"template" : "static/index.html",
"devServer" : {
"port" : 9090,
"https" : false,
"disableHostCheck" : true,
"proxy" : {
"/api" : {
"target" : "http://192.168.0.31:8888",
"pathRewrite" : {
"^/api" : ""
}
}
}
},
// "devServer" : {
// "port" : 9090,
// "https" : false,
// "disableHostCheck" : true,
// "proxy" : {
// "/api" : {
// "target" : "http://192.168.0.31:8888",
// "pathRewrite" : {
// "^/api" : ""
// }
// }
// }
// },
"title" : "RuoYi-App",
"router" : {
"mode" : "hash",

View File

@@ -21,6 +21,12 @@
</view>
</view>
</view>
<!-- 选择物料号 -->
<view style="margin-top: 20px" class="warehoseInfo-box">
<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>
<!-- 货物列表 -->
<view class="scroll-view-box">
<view class="scroll-view-title">出库清单</view>
@@ -80,7 +86,11 @@ export default {
//工单计划
outOrderPlan: [],
// 1-仓库扫码 2-货物扫码 3-出货单扫码
searchType: 3
searchType: 3,
show: false,
columns: [['无物料号']],
material_id: '无物料号' //物料号
};
},
watch: {},
@@ -120,6 +130,17 @@ export default {
this.searchType = 2;
this.outInfo = data;
this.newMaterialList = [];
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
} else if (type === 2) {
if (this.newMaterialList.length > 0) {
uni.showModal({
@@ -132,8 +153,10 @@ export default {
}
const checkData = {
production_packcode: data.originalCode,
shipment_num: this.outInfo.shipmentNum
shipment_num: this.outInfo.shipmentNum,
partnumber:this.material_id
};
//检查是否可以出货
WarehoseApi.checkProductionOut(checkData).then((res) => {
if (res.code === 200 && res.data) {
this.newMaterialList.push(data);
@@ -203,7 +226,8 @@ 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) {
@@ -213,6 +237,22 @@ 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;
}
uni.showModal({
@@ -262,6 +302,17 @@ export default {
}
}
});
},
//取消
pick_cancel() {
this.show = false;
},
// 确认
pick_confirm(e) {
console.log(e.value);
this.material_id = e.value[0];
console.log(this.material_id);
this.show = false;
}
}
};

View File

@@ -1,26 +1,26 @@
<template>
<view>
<view class="body" v-for="(item, index) in dataList" :key="index">
<view class="body card" v-for="(item, index) in dataList" :key="index">
<view class="title">{{ item.packageCodeClient }}</view>
<view>
<text>库位</text>
<view>{{ item.locationCode }}</view>
<view >
<text>库位</text>
<text>{{ item.locationCode }}</text>
</view>
<view>
<text>零件号</text>
<view>{{ item.partnumber }}</view>
<view >
<text>零件号</text>
<text>{{ item.partnumber }}</text>
</view>
<view>
<text>数量</text>
<view>{{ item.goodsNumLogic }}</view>
<view >
<text>数量</text>
<text>{{ item.goodsNumLogic }}</text>
</view>
<view>
<text>入库时间</text>
<view>{{ item.entryWarehouseTime }}</view>
<view >
<text>入库时间</text>
<text>{{ item.entryWarehouseTime }}</text>
</view>
<view>
<text>备注</text>
<view>{{ item.remark }}</view>
<view >
<text>备注</text>
<text>{{ item.remark }}</text>
</view>
</view>
</view>
@@ -65,4 +65,20 @@ export default {
font-weight: 50;
}
}
.card {
background-color: #fff; /* 白色背景 */
border-radius: 8px; /* 圆角边框 */
padding: 12px; /* 内边距 */
margin-bottom: 16px; /* 底部间距 */
box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* 阴影效果 */
}
.card text {
font-weight: bold; /* 文本加粗 */
margin-bottom: 6px; /* 底部间距 */
}
.card view {
color: #333; /* 文本颜色 */
}
</style>

View File

@@ -18,14 +18,20 @@ import {
let timeout = 10000
const request = config => {
// 浏览器测试用
const storageBaseUrl = 'http://' + getBaseUrl() + '/api';
// const storageBaseUrl = 'http://' + getBaseUrl() + '/api';
// 真机测试以及部署用
//const storageBaseUrl = 'http://' + getBaseUrl();
const storageBaseUrl = 'http://' + getBaseUrl();
// 是否需要设置 token
const isToken = (config.headers || {}).isToken === false
config.header = config.header || {}
// 假设你使用的是PHP作为你的后端语言
config.header['Access-Control-Allow-Origin']= '*'; // 允许任何源访问
config.header['Access-Control-Allow-Methods']='GET, POST, OPTIONS'; // 允许的HTTP方法
config.header['Access-Control-Allow-Headers']= 'X-Requested-With'; // 允许的HTTP头
if (getToken() && !isToken) {
config.header['Authorization'] = 'Bearer ' + getToken()
}
// get请求映射params参数
if (config.params) {
@@ -44,9 +50,10 @@ const request = config => {
dataType: 'json'
}).then(response => {
let [error, res] = response
// console.log('token:','Bearer ' + getToken());
// console.log('token:','Bearer ' + getToAccess-Control-Allow-Originken());
// console.log('request:',storageBaseUrl + config.url,response);
if (error) {
console.log(error)
toast('后端接口连接异常')
reject('后端接口连接异常')
return