diff --git a/api/warehouse/warehose.js b/api/warehouse/warehose.js
index cb2e0b1..86f8d73 100644
--- a/api/warehouse/warehose.js
+++ b/api/warehouse/warehose.js
@@ -128,6 +128,17 @@ export function doOverOutorderplan(params) {
})
}
+/**
+ * 根据出货单号 生成出货单的出货计划
+ */
+export function generateOutorderplan(params) {
+ return request({
+ url: '/mes/wm/WmOutOrder/generate_outorderplan',
+ method: 'get',
+ params
+ })
+}
+
// 移库接口
/**
* 移库(物料+客户)
diff --git a/components/pda-scan-input/index.vue b/components/pda-scan-input/index.vue
index 9145cb7..4c11e61 100644
--- a/components/pda-scan-input/index.vue
+++ b/components/pda-scan-input/index.vue
@@ -1,7 +1,7 @@
-
-
+
+
@@ -10,16 +10,24 @@ import * as WarehoseApi from '@/api/warehouse/warehose.js';
export default {
name: 'pda-scan-input',
props: {
+ hasFocus:{
+ default: true,
+ type: Boolean
+ },
type: {
// 1-仓库扫码 2-成品满箱扫码 3-扫出库单 4-退库
default: 1,
type: Number
+ },
+ warehouseInfo: {
+ default: null
}
},
data() {
return {
isFocus: true,
- search: 'A1-01',
+ // search: 'A1-01',
+ search: '',
time: null
};
},
@@ -41,23 +49,34 @@ export default {
// this.time = setInterval(() => {
// if (!this.isFocus) {
// this.$nextTick(function () {
- // this.isFocus = true;
+ // this.isFocus = false;
// });
// }
- // }, 1);
+ // }, 60);
},
// 传输数据
emitInputChange(data, type) {
this.$emit('getInfo', data, type);
},
+ handlerBlur(){
+ if(this.hasFocus){
+ this.isFocus = false;
+ setTimeout(() => {
+ this.$nextTick(function () {
+ this.isFocus = true;
+ });
+ }, 1500);
+ }
+ },
// 获取扫码信息
async getInfo(e) {
const text = e.target.value;
const type = this.type;
setTimeout(() => {
- this.search = '';
- this.isFocus = true;
- }, 1500);
+ this.$nextTick(function () {
+ this.search = '';
+ });
+ }, 500);
if (type === 1) {
this.handleScanWareHouseCode(text);
} else if (type === 2) {
@@ -107,6 +126,28 @@ export default {
// type = 2 入库扫货物编码
async handleScanGoodsCode(text) {
let package_code = text;
+ // 临时库处理
+ let _warehouseInfo = this.warehouseInfo;
+ if (_warehouseInfo != null && _warehouseInfo != undefined) {
+ if (_warehouseInfo.remark === '临时' || _warehouseInfo.locaiton === 'LS1-01') {
+ let resolutionData = {
+ code: package_code
+ };
+ const emitRes = await WarehoseApi.resolutionPackage(resolutionData);
+ if (emitRes.code !== 200 || emitRes.data === null) {
+ uni.showModal({
+ title: '提示',
+ content: '该箱号数据解析异常!',
+ showCancel: false,
+ confirmText: '确定'
+ });
+ return;
+ }
+ this.emitInputChange(emitRes.data, 2);
+ return;
+ }
+ }
+ // 成品库处理
// 成品满箱扫码
let locationCheckData = {
package_code
@@ -139,6 +180,7 @@ export default {
});
return;
} else if (checkRes.data === 1) {
+
// 判断是否为满箱
const isFullRes = await WarehoseApi.isFullPackage(locationCheckData);
if (isFullRes.code !== 200 || !isFullRes.data) {
@@ -170,7 +212,7 @@ export default {
async handleScanDeliveryOrderCode(text) {
let id = text;
const getWmOutOrderRes = await WarehoseApi.getWmOutOrder(id);
- if(getWmOutOrderRes.code != 200){
+ if (getWmOutOrderRes.code != 200) {
uni.showModal({
title: '提示',
content: '出库单号异常!',
diff --git a/manifest.json b/manifest.json
index a69d283..5b189d8 100644
--- a/manifest.json
+++ b/manifest.json
@@ -68,7 +68,7 @@
"disableHostCheck" : true,
"proxy" : {
"/api" : {
- "target" : "http://192.168.0.31:8888",
+ "target" : "http://192.168.90.92:8888",
"pathRewrite" : {
"^/api" : ""
}
diff --git a/pages/inWarehouse/inWarehouse.vue b/pages/inWarehouse/inWarehouse.vue
index 81b6425..6b5cc2d 100644
--- a/pages/inWarehouse/inWarehouse.vue
+++ b/pages/inWarehouse/inWarehouse.vue
@@ -17,7 +17,7 @@
操作指示-请扫货物码
-
+
@@ -39,7 +39,8 @@
-
+
+
@@ -122,7 +123,6 @@ export default {
this.searchType = 1;
},
handleGetInfo(data, type) {
- console.log(data, type);
if (type === 1) {
// 仓库扫完后是箱号
this.searchType = 2;
@@ -145,8 +145,8 @@ export default {
// 此时扫描的是箱号
// 当前录入的箱号是否在同一批次录入过
// 曾经是否扫过
- if(this.newMaterialList.length > 0){
- for(let item of this.newMaterialList){
+ if (this.newMaterialList.length > 0) {
+ for (let item of this.newMaterialList) {
if (item.patchCode === data.patchCode) {
uni.showModal({
title: '提示',
@@ -227,7 +227,9 @@ export default {
icon: 'success',
title: '入库成功!'
});
- this.clear();
+ this.oldMaterialList = JSON.parse(JSON.stringify(this.clearData.oldMaterialList));
+ this.newMaterialList = JSON.parse(JSON.stringify(this.clearData.newMaterialList));
+ // this.clear();
} else {
uni.showToast({
icon: 'error',
@@ -322,5 +324,8 @@ export default {
.button-box {
width: 80%;
margin: 10px auto;
+ display: flex;
+ align-items: center;
+ justify-content: center;
}
diff --git a/pages/index/index.vue b/pages/index/index.vue
index 55a8d5d..fdf8656 100644
--- a/pages/index/index.vue
+++ b/pages/index/index.vue
@@ -26,8 +26,10 @@ export default {
{ name: '入库', icon: 'download-filled' },
{ name: '出库', icon: 'upload-filled' },
{ name: '盘点', icon: 'wallet-filled' },
- { name: '移库/拼箱', icon: 'cart-filled' },
- { name: '退库', icon: 'undo-filled' }
+ { name: '移库', icon: 'cart-filled' },
+ { name: '退库', icon: 'undo-filled' },
+ { name: '拼箱', icon: 'folder-add-filled' },
+ { name: '货物查看', icon: 'eye-filled' }
]
};
},
@@ -68,6 +70,16 @@ export default {
url: '/pages/returnWarehose/returnWarehose'
});
break;
+ case 6:
+ uni.navigateTo({
+ url: '/pages/returnWarehose/returnWarehose'
+ });
+ break;
+ case 6:
+ uni.navigateTo({
+ url: '/pages/returnWarehose/returnWarehose'
+ });
+ break;
default:
break;
}
@@ -77,7 +89,7 @@ export default {
title: '扫描成功',
icon: 'success'
});
- console.log('handleWareHouseChange', data);
+ // console.log('handleWareHouseChange', data);
}
}
};
diff --git a/pages/login/login.vue b/pages/login/login.vue
index 75d86fc..0cf0dad 100644
--- a/pages/login/login.vue
+++ b/pages/login/login.vue
@@ -70,7 +70,7 @@ export default {
// 初始化链接地址设计
let baseUrl = getBaseUrl();
if (!baseUrl) {
- baseUrl = '192.168.0.199:8888';
+ baseUrl = '192.168.60.251:8888';
setBaseUrl(baseUrl);
}
this.BaseUrl = baseUrl;
diff --git a/pages/outWarehouse/outWarehouse.vue b/pages/outWarehouse/outWarehouse.vue
index 98639b0..f0771b2 100644
--- a/pages/outWarehouse/outWarehouse.vue
+++ b/pages/outWarehouse/outWarehouse.vue
@@ -76,6 +76,9 @@ export default {
},
// 新录入货物信息
newMaterialList: [],
+
+ //工单计划
+ outOrderPlan:[],
// 1-仓库扫码 2-货物扫码 3-出货单扫码
searchType: 3
};
@@ -101,19 +104,33 @@ export default {
// 初始化,并且清空数据
this.clearData.outInfo = JSON.parse(JSON.stringify(this.outInfo));
this.clearData.newMaterialList = JSON.parse(JSON.stringify(this.newMaterialList));
+ this.clearData.outOrderPlan = JSON.parse(JSON.stringify(this.outOrderPlan));
this.searchType = 3;
},
clear() {
this.outInfo = JSON.parse(JSON.stringify(this.clearData.outInfo));
this.newMaterialList = JSON.parse(JSON.stringify(this.clearData.newMaterialList));
+ this.outOrderPlan = JSON.parse(JSON.stringify(this.clearData.outOrderPlan));
this.searchType = 3;
},
+ // 获取工单计划
+ getOutOrderPlan(data){
+ const query = {
+ shipment_num:data.shipmentNum
+ }
+ WarehoseApi.generateOutorderplan(query).then(res=>{
+ if(res.code === 200){
+ this.outOrderPlan = res.data;
+ }
+ })
+ },
// 扫码信息录入
handleGetInfo(data, type) {
if (type === 3) {
// 出货单扫完后是扫箱号
this.searchType = 2;
this.outInfo = data;
+ this.getOutOrderPlan(data);
this.newMaterialList = [];
} else if (type === 2) {
if (this.newMaterialList.length > 0) {
@@ -128,6 +145,24 @@ export default {
// 此时扫描的是箱号
// TODO 检查扫描的箱号零件号是否在此工单下
+ let flag = false;
+ let list = JSON.parse(JSON.stringify(this.outOrderPlan));
+ for(let item of list){
+ // 扫描箱的工单号与计划中的批次号对比,数字是否在其中
+ if(item.Patchcode === data.workoderID){
+ flag = true;
+ }
+ }
+ if(!flag){
+ // 此箱号不在计划内
+ uni.showModal({
+ title: '提示',
+ content: '当前货物未不在出库单计划内,请扫其他货物!',
+ showCancel: false,
+ confirmText: '确定'
+ });
+ return;
+ }
// TODO 箱出库,并关联到此出库单下
this.newMaterialList.push(data);
}
diff --git a/pages/stocktake/stocktake.vue b/pages/stocktake/stocktake.vue
index a0cd1df..13f68fd 100644
--- a/pages/stocktake/stocktake.vue
+++ b/pages/stocktake/stocktake.vue
@@ -27,7 +27,7 @@
盘点清单
-
+
diff --git a/utils/request.js b/utils/request.js
index 86a96e6..6bc9756 100644
--- a/utils/request.js
+++ b/utils/request.js
@@ -18,9 +18,9 @@ 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 || {}