diff --git a/src/pages/login/login/index.vue b/src/pages/login/login/index.vue
index 02761ba..275a066 100644
--- a/src/pages/login/login/index.vue
+++ b/src/pages/login/login/index.vue
@@ -142,7 +142,7 @@ export default class LoginPage extends BasePage {
// console.log('Version////', this.Version);
}
///********版本号修改区域**********
- version = '0.0.115'; //正式版本号
+ version = '0.0.116'; //正式版本号
//version = '0.0.14'; //测试版本号
//***************标志修改区域:是否是测试标志: false 正式版本; true 测试版本****************
//isTest = true;
diff --git a/src/pages/quality/Materialinspection/index.vue b/src/pages/quality/Materialinspection/index.vue
index 64923d7..46cebeb 100644
--- a/src/pages/quality/Materialinspection/index.vue
+++ b/src/pages/quality/Materialinspection/index.vue
@@ -103,7 +103,7 @@
物料名称 : {{ clickitem.materialName }}
-
数量 : {{ clickitem.quality }}
+
数量 : {{ clickitem.quality }}{{ clickitem.unit }}
检验状态 : {{ clickitem.checkStatus == 0 ? '待检验' : '检验完成' }}
diff --git a/src/pages/wms/product/SaleOutWH/index.vue b/src/pages/wms/product/SaleOutWH/index.vue
index e416eec..319375d 100644
--- a/src/pages/wms/product/SaleOutWH/index.vue
+++ b/src/pages/wms/product/SaleOutWH/index.vue
@@ -12,7 +12,7 @@
- 备货单号:
+ 装运单号:
@@ -22,7 +22,11 @@
-
+
+
+
+
+
-
+
-
+
产品编码:
@@ -55,7 +56,7 @@
- 订单数量:
+ 计划数量:
{{ orderNoItemList && orderNoItemList.planQuantity }}
@@ -64,17 +65,23 @@
- 捡货数量:
- {{ outnumber }}
+
+ 出库数量:
+ {{ orderNoItemList && orderNoItemList.outQuantity }}
+
+
+ 出库仓库:
+ {{ loc.userDefined2 }}
+
-
+
@@ -85,25 +92,36 @@
-
+
+
+ 批次:
+ {{ item.batchNumber }}
+
+
+
+ 产品名称:
+ {{ item.productName }}
+
+
+
+ 产品编码:
+ {{ item.productCode }}
- 库位码:
- {{ item.wlCode }}
+ 库区:
+ {{ item.waCode }}
+
+
+ 数量:
+
+
-
@@ -152,8 +170,12 @@ export default class SaleOutWH extends BasePage {
//productCodebiaozhiwei = '';
cimWl = {} as OptionType;
aimWl: any = {};
+ bimWl: any = {};
boxnumber: any = '';
materilist = [];
+ prodlist = [];
+ picilist = [];
+ loc: any = {};
// remove: any = {};
// async onReady() {
// await this.model.queryLocation();
@@ -175,22 +197,42 @@ export default class SaleOutWH extends BasePage {
name: '整托扫描',
disabled: false,
},
- {
- code: 1,
- name: '单箱扫描',
- disabled: false,
- },
+ // {
+ // code: 1,
+ // name: '单箱扫描',
+ // disabled: false,
+ // },
];
selectvalue: any = 0;
async onLoad() {
await this.model.getwarehouselist();
this.warehouselist = model.warehouselist;
- this.cimWl = this.warehouselist[0];
+ //this.cimWl = this.warehouselist[0];
}
bookTypeChange(e: any) {
this.aimWl = e.pickerName;
+ this.picilist = this.materilist.filter((item) => {
+ return item.productCode === this.aimWl.value;
+ });
+ this.bimWl = this.picilist[0];
+ this.list = [];
+ this.orderNoItemList = this.picilist[0];
+ this.orderNoItemList.outQuantity = this.orderNoItemList.outnumber;
+ this.outnumber = this.orderNoItemList.outQuantity;
+ this.warehouselist.some((item) => {
+ if (item.userDefined1 === this.orderNoItemList.whCode) {
+ this.loc = item;
+ return true; // 在 some 中返回 true 会停止循环
+ }
+ return false; // 继续循环
+ });
+ }
+ //选批次
+ bookTypeChangepici(e: any) {
+ this.bimWl = e.pickerName;
this.orderNoItemList = e.pickerName;
this.list = [];
+ this.orderNoItemList.outQuantity = this.orderNoItemList.outnumber;
this.outnumber = this.orderNoItemList.outQuantity;
}
wlChange(e: any) {
@@ -203,16 +245,17 @@ export default class SaleOutWH extends BasePage {
}
//收货按钮
async ondelete(item, index) {
- console.log('this.list', Array.isArray(this.list));
- const newList = [...this.list]; // 创建一个新的数组
- newList.splice(index, 1); // 在新数组上执行 splice 操作
- this.list = newList; // 将新数组赋值回原数组
+ // console.log('this.list', Array.isArray(this.list));
+ // const newList = [...this.list]; // 创建一个新的数组
+ // newList.splice(index, 1); // 在新数组上执行 splice 操作
+ this.list.splice(index, 1); // 将新数组赋值回原数组
+ this.orderNoItemList.outQuantity -= item.amount;
(this.$refs.uToast as any).show({
title: '删除成功',
type: 'success',
});
- console.log('this.outnumber', this.outnumber);
- this.outnumber = this.outnumber - 1;
+ //console.log('this.outnumber', this.outnumber);
+
// if(!this.list.length){
// this.productCodebiaozhiwei = '';
// }
@@ -221,7 +264,7 @@ export default class SaleOutWH extends BasePage {
async query() {
if (this.orderNo == '' || this.orderNo.length == 0) {
(this.$refs.uToast as any).show({
- title: '请输入备货单号',
+ title: '请输入装运单号',
// url: '/pages/user/index'
});
return;
@@ -233,94 +276,101 @@ export default class SaleOutWH extends BasePage {
this.model.orderNoItemList.forEach((item) => {
item.label = item.productName;
item.value = item.productCode;
+ item.outnumber = item.outQuantity;
this.materilist.push(item);
});
- this.aimWl.value = this.materilist[0].value;
- this.orderNoItemList = this.materilist[0];
+ const productCodeMap = {};
+
+ // 创建一个新的数组用于存放去重后的元素
+ const uniqueItems = [];
+
+ this.materilist.forEach((item) => {
+ if (!productCodeMap[item.productCode]) {
+ productCodeMap[item.productCode] = true;
+ uniqueItems.push(item);
+ }
+ });
+ this.prodlist = uniqueItems;
+ this.aimWl.value = this.prodlist[0].value;
+
+ //批次
+
+ this.picilist = this.materilist.filter((item) => {
+ return item.productCode === this.aimWl.value;
+ });
+ this.bimWl.value = this.picilist[0].lotNumber;
+ this.orderNoItemList = this.picilist[0];
this.outnumber = this.orderNoItemList.outQuantity;
+ this.warehouselist.some((item) => {
+ if (item.userDefined1 === this.orderNoItemList.whCode) {
+ this.loc = item;
+ return true; // 在 some 中返回 true 会停止循环
+ }
+ return false; // 继续循环
+ });
+
+ // this.loc = this.warehouselist.filter((item)=>{
+ // return item.userDefined1 === this.orderNoItemList.whCode;
+ // })
+ console.log('库位', this.loc);
+ // this.orderNoItemList = this.materilist[0];
+ // this.outnumber = this.orderNoItemList.outQuantity;
} else {
this.materilist = [];
+ this.prodlist = [];
}
}
async addlist() {
if (this.orderNo == '' || this.orderNo.length == 0) {
(this.$refs.uToast as any).show({
- title: '请输入备货单号',
+ title: '请输入装运单号',
// url: '/pages/user/index'
});
return;
}
- if (this.aimWl.value == '' || this.aimWl.value.length == 0) {
+ if (Object.keys(this.orderNoItemList).length == 0) {
(this.$refs.uToast as any).show({
- title: '请输入选择产品编码',
+ title: '请先选择产品',
// url: '/pages/user/index'
});
return;
}
- if (this.selectvalue == 0) {
- //选择整托扫描
- let item: any = {};
- item.sn = this.boxnumber;
- item.siteCode = session.FactoryCode;
- await this.model.ScanCodeWholePallet(item);
- if (this.model.scanCode == '200') {
- (this.$refs.uToast as any).show({
- title: '成功',
- type: 'success',
- });
- model.scandatalist.map((item) => {
- if (item.productCode == this.aimWl.value) {
- this.list.push({ sn: item.sn, barcode: item.barcode, wlCode: item.wlCode, storageId: item.storageId });
- this.outnumber += 1;
- } else {
- (this.$refs.uToast as any).show({
- title: '扫描的物料必须与选择的物料相同',
- type: 'error',
- });
- }
- });
- // this.list.push()
-
- this.boxnumber = '';
- } else {
- (this.$refs.uToast as any).show({
- title: '失败',
- type: 'error',
- });
- this.boxnumber = '';
- }
- } else if (this.selectvalue == 1) {
- let item: any = {};
- item.barcode = this.boxnumber;
- item.siteCode = session.FactoryCode;
- await this.model.ScanCodeSingleBox(item);
- if (this.model.scanCode == '200') {
- let scandata = model.scandata;
- if (this.aimWl.value == scandata.productCode) {
- (this.$refs.uToast as any).show({
- title: '成功',
- type: 'success',
- });
- this.list.push({ sn: scandata.sn, barcode: scandata.barcode, wlCode: scandata.wlCode, storageId: scandata.storageId });
- this.outnumber += 1;
+ // if (this.selectvalue == 0) {
+ //选择整托扫描
+ let item: any = {};
+ item.sn = this.boxnumber;
+ item.siteCode = session.FactoryCode;
+ await this.model.ScanCodeWholePallet(item);
+ if (this.model.scanCode == '200') {
+ (this.$refs.uToast as any).show({
+ title: '成功',
+ type: 'success',
+ });
+ model.scandatalist.map((item) => {
+ item.productCode = item.productCode.slice(item.productCode.search(/[1-9]/));
+ if (item.productCode == this.orderNoItemList.productCode) {
+ this.list.push(item);
+ this.orderNoItemList.outQuantity += item.amount;
} else {
(this.$refs.uToast as any).show({
title: '扫描的物料必须与选择的物料相同',
type: 'error',
});
}
+ });
+ // this.list.push()
- this.boxnumber = '';
- } else {
- (this.$refs.uToast as any).show({
- title: '失败',
- type: 'error',
- });
- this.boxnumber = '';
- }
+ this.boxnumber = '';
+ } else {
+ (this.$refs.uToast as any).show({
+ title: '失败',
+ type: 'error',
+ });
+ this.boxnumber = '';
}
+ //}
// //入库后的查询下面列表的接口
// await this.model.queryOrderNo(this.form5);
@@ -329,7 +379,7 @@ export default class SaleOutWH extends BasePage {
async onSubmit() {
if (this.orderNo == '' || this.orderNo.length == 0) {
(this.$refs.uToast as any).show({
- title: '请输入备货单号',
+ title: '请输入装运单号',
// url: '/pages/user/index'
});
return;
@@ -337,20 +387,25 @@ export default class SaleOutWH extends BasePage {
if (this.list.length == 0 || this.list == '') {
(this.$refs.uToast as any).show({
- title: '请先扫描箱码',
+ title: '请先扫描标志卡',
// url: '/pages/user/index'
});
return;
}
//this.list[0].outnumber = this.outnumber;
+ let wmsFpStorageNewsSns = [];
+ this.list.map((item) => {
+ wmsFpStorageNewsSns.push({
+ storageId: item.storageId,
+ amount: item.amount,
+ });
+ });
let item = {
factoryCode: session.FactoryCode,
- whCode: this.cimWl.value,
id: this.orderNoItemList.id,
- productCode: this.orderNoItemList.productCode,
- productName: this.orderNoItemList.productName,
- wmsProductPutTrayCodeList: this.list,
+ wmsFpStorageNewsSns: wmsFpStorageNewsSns,
};
+ //console.log('000------',item);
await this.model.out(item);
if (this.model.SubmitCode == '200') {
(this.$refs.uToast as any).show({
@@ -397,6 +452,15 @@ export default class SaleOutWH extends BasePage {
});
}
}
+
+ confirmNumber(item) {
+ console.log(item);
+ let addnumber = 0;
+ this.list.forEach((item) => {
+ addnumber += parseFloat(item.amount ? item.amount : '0');
+ });
+ this.orderNoItemList.outQuantity = this.orderNoItemList.outnumber + addnumber;
+ }
}