多组织仓位
This commit is contained in:
@@ -312,7 +312,7 @@ export default {
|
|||||||
remarkIndex: null, //修改的是那个明细的备注
|
remarkIndex: null, //修改的是那个明细的备注
|
||||||
itremake: '', // 明细盘亏备注
|
itremake: '', // 明细盘亏备注
|
||||||
choseBoxId: '', // 当前箱的箱id
|
choseBoxId: '', // 当前箱的箱id
|
||||||
subStockCode: null, // 当前箱的仓位code
|
// subStockCode: null, // 当前箱的仓位code
|
||||||
subStockCode: '', //仓位code
|
subStockCode: '', //仓位code
|
||||||
old_SubStockCode: '', //老仓位code,由箱号携带出来
|
old_SubStockCode: '', //老仓位code,由箱号携带出来
|
||||||
APPdevice: uni.getStorageSync('devicePixelRatio'), // 缓存设备的像素比用来区分普通安卓normalAnroid还是pda
|
APPdevice: uni.getStorageSync('devicePixelRatio'), // 缓存设备的像素比用来区分普通安卓normalAnroid还是pda
|
||||||
@@ -407,13 +407,11 @@ export default {
|
|||||||
},
|
},
|
||||||
//仓库change事件
|
//仓库change事件
|
||||||
ckchange(e) {
|
ckchange(e) {
|
||||||
console.log(1232323);
|
|
||||||
this.xhDisabled = !e.name;
|
this.xhDisabled = !e.name;
|
||||||
this.focusInput = '';
|
this.focusInput = '';
|
||||||
this.warehouseName = e.name;
|
this.warehouseName = e.name;
|
||||||
this.warehouseCode = e.code;
|
this.warehouseCode = e.code;
|
||||||
this.orgCode = e.erpOrgCode;
|
this.orgCode = e.erpOrgCode;
|
||||||
|
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.focusInput = 'box';
|
this.focusInput = 'box';
|
||||||
}, 300);
|
}, 300);
|
||||||
@@ -534,7 +532,8 @@ export default {
|
|||||||
remark: it.remark,
|
remark: it.remark,
|
||||||
stockCode: this.warehouseCode,
|
stockCode: this.warehouseCode,
|
||||||
BoxBillNo: this.xhNo,
|
BoxBillNo: this.xhNo,
|
||||||
old_SubStockCode: it.old_SubStockCode ? it.old_SubStockCode : this.subStockCode
|
old_SubStockCode: it.old_SubStockCode ? it.old_SubStockCode : this.subStockCode,
|
||||||
|
twoSerialNumbers:it.twoSerialNumbers ? it.twoSerialNumbers.filter(Boolean):[]
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
console.log('提交數據', formData);
|
console.log('提交數據', formData);
|
||||||
@@ -543,6 +542,7 @@ export default {
|
|||||||
if (this.requestStatus) {
|
if (this.requestStatus) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.requestStatus = true;
|
this.requestStatus = true;
|
||||||
this.qrpdshow = false;
|
this.qrpdshow = false;
|
||||||
this.$api.post('/TakeStock/Save', formData).then((res) => {
|
this.$api.post('/TakeStock/Save', formData).then((res) => {
|
||||||
@@ -715,6 +715,11 @@ export default {
|
|||||||
this.dataList[findindx].itxlhList.push(res.data.serialNumber);
|
this.dataList[findindx].itxlhList.push(res.data.serialNumber);
|
||||||
// 缓存当前扫描数据
|
// 缓存当前扫描数据
|
||||||
this.xlhStrlist.push(res.data.serialNumber);
|
this.xlhStrlist.push(res.data.serialNumber);
|
||||||
|
//缓存2件装序列号
|
||||||
|
if(res.data.isTwo==2) {
|
||||||
|
this.dataList[findindx].twoSerialNumbers.push(res.data.twoSerialNumber);
|
||||||
|
this.twoData.push(res.data.twoSerialNumber)
|
||||||
|
}
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '获取成功',
|
title: '获取成功',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
@@ -753,7 +758,8 @@ export default {
|
|||||||
old_SubStockCode: res.data.subStockCode,
|
old_SubStockCode: res.data.subStockCode,
|
||||||
pdNum: this.xlhOrggType == 'ggxh' ? 0 : this.xlhOrggType == 'xlh' ? 1 : 0,
|
pdNum: this.xlhOrggType == 'ggxh' ? 0 : this.xlhOrggType == 'xlh' ? 1 : 0,
|
||||||
serialNumbers: [],
|
serialNumbers: [],
|
||||||
itxlhList: []
|
itxlhList: [],
|
||||||
|
twoSerialNumbers:[],
|
||||||
});
|
});
|
||||||
if (this.xlhOrggType == 'xlh') {
|
if (this.xlhOrggType == 'xlh') {
|
||||||
this.xlhGgxNum = 1;
|
this.xlhGgxNum = 1;
|
||||||
@@ -762,6 +768,7 @@ export default {
|
|||||||
this.xlhStrlist.push(res.data.serialNumber);
|
this.xlhStrlist.push(res.data.serialNumber);
|
||||||
//缓存2件装序列号
|
//缓存2件装序列号
|
||||||
if(res.data.isTwo==2) {
|
if(res.data.isTwo==2) {
|
||||||
|
this.dataList[this.dataList.length - 1].twoSerialNumbers.push(res.data.twoSerialNumber);
|
||||||
this.twoData.push(res.data.twoSerialNumber)
|
this.twoData.push(res.data.twoSerialNumber)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -837,16 +844,8 @@ export default {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
//没有仓位就不添加明细数据
|
|
||||||
// if(!if()res.data.subStockCode) {
|
|
||||||
// return
|
|
||||||
// }if()
|
|
||||||
//明细数据
|
|
||||||
// if(!res.data.subStockCode) {
|
|
||||||
// retrun
|
|
||||||
// }
|
|
||||||
this.dataList = [];
|
|
||||||
|
|
||||||
|
this.dataList = [];
|
||||||
res.data.details.forEach((obj) => {
|
res.data.details.forEach((obj) => {
|
||||||
if (obj.qty > 0 && res.data.subStockCode) {
|
if (obj.qty > 0 && res.data.subStockCode) {
|
||||||
this.dataList.push({
|
this.dataList.push({
|
||||||
@@ -857,7 +856,9 @@ export default {
|
|||||||
subStockCode: res.data.subStockCode,
|
subStockCode: res.data.subStockCode,
|
||||||
remark: '',
|
remark: '',
|
||||||
erpSubStockCode: null,
|
erpSubStockCode: null,
|
||||||
old_SubStockCode: res.data.subStockCode
|
old_SubStockCode: res.data.subStockCode,
|
||||||
|
twoSerialNumbers:res.data.twoSerialNumbers ? res.data.twoSerialNumbers: []
|
||||||
|
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|||||||
Binary file not shown.
@@ -337,6 +337,7 @@ export default {
|
|||||||
this.dqNumTag = '';
|
this.dqNumTag = '';
|
||||||
this.xlhOrggStrlist = [];
|
this.xlhOrggStrlist = [];
|
||||||
this.twoData=[]
|
this.twoData=[]
|
||||||
|
this.confirmParams=[]
|
||||||
this.MbNoTag = false;
|
this.MbNoTag = false;
|
||||||
this.YyNoTag = false;
|
this.YyNoTag = false;
|
||||||
this.xlhOrggTag = false;
|
this.xlhOrggTag = false;
|
||||||
@@ -375,11 +376,13 @@ export default {
|
|||||||
qty: obj.serialNumber ? 1 : obj.qty, //如归是序列号默认为1,如果是规格型号取用户输入的值
|
qty: obj.serialNumber ? 1 : obj.qty, //如归是序列号默认为1,如果是规格型号取用户输入的值
|
||||||
srcBoxId: obj.boxId,
|
srcBoxId: obj.boxId,
|
||||||
serialNumber: obj.serialNumber,
|
serialNumber: obj.serialNumber,
|
||||||
serialNumbers: []
|
twoSerialNumber:obj.twoSerialNumber,
|
||||||
|
serialNumbers: [],
|
||||||
|
twoSerialNumbers:[],
|
||||||
});
|
});
|
||||||
return acc;
|
return acc;
|
||||||
}, {});
|
}, {});
|
||||||
|
let srcBoxId =null
|
||||||
const result = Object.values(groupedBySrcBoxId).map((group) => {
|
const result = Object.values(groupedBySrcBoxId).map((group) => {
|
||||||
return group.reduce((acc, obj) => {
|
return group.reduce((acc, obj) => {
|
||||||
const existing = acc.find((item) => item.materialNumber === obj.materialNumber);
|
const existing = acc.find((item) => item.materialNumber === obj.materialNumber);
|
||||||
@@ -387,29 +390,41 @@ export default {
|
|||||||
if (obj.serialNumber) {
|
if (obj.serialNumber) {
|
||||||
existing.qty += obj.qty;
|
existing.qty += obj.qty;
|
||||||
existing.serialNumbers.push(obj.serialNumber);
|
existing.serialNumbers.push(obj.serialNumber);
|
||||||
|
|
||||||
}
|
}
|
||||||
// existing.qty += obj.qty;
|
if(obj.twoSerialNumber) {
|
||||||
// existing.serialNumbers.push(obj.serialNumber);
|
existing.twoSerialNumbers.push(obj.twoSerialNumber)
|
||||||
|
console.log(existing,'=existing=')
|
||||||
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
let twoSerialNumbers = []
|
||||||
|
if(obj.twoSerialNumber) {
|
||||||
|
twoSerialNumbers.push(obj.twoSerialNumber)
|
||||||
|
}
|
||||||
acc.push({
|
acc.push({
|
||||||
materialNumber: obj.materialNumber,
|
materialNumber: obj.materialNumber,
|
||||||
qty: obj.qty,
|
qty: obj.qty,
|
||||||
serialNumbers: obj.serialNumber ? [obj.serialNumber] : [],
|
serialNumbers: obj.serialNumber ? [obj.serialNumber] : [],
|
||||||
srcBoxId: obj.srcBoxId
|
// srcBoxId: obj.srcBoxId,
|
||||||
|
twoSerialNumbers:twoSerialNumbers,
|
||||||
});
|
});
|
||||||
|
srcBoxId = obj.srcBoxId
|
||||||
}
|
}
|
||||||
return acc;
|
return acc;
|
||||||
}, []);
|
}, []);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
console.log()
|
||||||
let params = [];
|
let params = [];
|
||||||
let length = result.length;
|
let length = result.length;
|
||||||
for (let i = 0; i < length; i++) {
|
for (let i = 0; i < length; i++) {
|
||||||
let obj = {
|
let obj = {
|
||||||
destBoxBillNo: this.boxMbNo,
|
destBoxBillNo: this.boxMbNo,
|
||||||
srcBoxId: this.YyboxId ? this.YyboxId : result[i][0].srcBoxId,
|
srcBoxId: this.YyboxId ? this.YyboxId : srcBoxId,
|
||||||
destBoxId: this.MbBoxId ? this.MbBoxId : 0,
|
destBoxId: this.MbBoxId ? this.MbBoxId : 0,
|
||||||
subStockCode: cwcode ? cwcode : this.subStockCode ? this.subStockCode : 0, //目标箱仓位或重新上架选择仓位
|
subStockCode: cwcode ? cwcode : this.subStockCode ? this.subStockCode : 0, //目标箱仓位或重新上架选择仓位
|
||||||
details: result[i]
|
details: result[i],
|
||||||
};
|
};
|
||||||
params.push(obj);
|
params.push(obj);
|
||||||
}
|
}
|
||||||
@@ -419,8 +434,8 @@ export default {
|
|||||||
if (this.requestStatus) {
|
if (this.requestStatus) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
console.log('提交的數據',params)
|
|
||||||
this.requestStatus = true;
|
this.requestStatus = true;
|
||||||
|
console.log(params,'=params=')
|
||||||
this.$api.post('/ChangeBoxRecord/Save', params).then((res) => {
|
this.$api.post('/ChangeBoxRecord/Save', params).then((res) => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -633,7 +648,7 @@ export default {
|
|||||||
specifications: this.itData.specifications,
|
specifications: this.itData.specifications,
|
||||||
materialNumber: this.itData.materialNumber,
|
materialNumber: this.itData.materialNumber,
|
||||||
qty: this.dqNum,
|
qty: this.dqNum,
|
||||||
srcBoxId: this.itData.boxId
|
srcBoxId: this.itData.boxId,
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -834,13 +849,15 @@ export default {
|
|||||||
specifications: res.data.specifications,
|
specifications: res.data.specifications,
|
||||||
materialNumber: res.data.materialNumber,
|
materialNumber: res.data.materialNumber,
|
||||||
qty: 1,
|
qty: 1,
|
||||||
srcBoxId: res.data.boxId
|
srcBoxId: res.data.boxId,
|
||||||
|
twoSerialNumber:res.data.twoSerialNumber ? res.data.twoSerialNumber: ''
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
//数量默认为1
|
//数量默认为1
|
||||||
this.focusInput = 'xlhggxh';
|
this.focusInput = 'xlhggxh';
|
||||||
this.setSMinputxlhOrggxh();
|
this.setSMinputxlhOrggxh();
|
||||||
this.xlhOrggStrlist.push(this.xlhOrggType == 'xlh' ? res.data.serialNumber : res.data.specifications);
|
this.xlhOrggStrlist.push(this.xlhOrggType == 'xlh' ? res.data.serialNumber : res.data.specifications);
|
||||||
|
this.confirmParams.push(res.data);
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '设置成功',
|
title: '设置成功',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
@@ -858,7 +875,7 @@ export default {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (this.xlhOrggStrlist.includes(this.xlhOrggxhVal) || this.twoData.includes(this.xlhVal)) {
|
if (this.xlhOrggStrlist.includes(this.xlhOrggxhVal) || this.twoData.includes(this.xlhOrggxhVal)) {
|
||||||
this.setSMinputxlhOrggxh();
|
this.setSMinputxlhOrggxh();
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '该序列号/格型号已扫描',
|
title: '该序列号/格型号已扫描',
|
||||||
@@ -880,7 +897,6 @@ export default {
|
|||||||
this.xlhggxhData = res;
|
this.xlhggxhData = res;
|
||||||
this.useGGXH = res.data.specifications;
|
this.useGGXH = res.data.specifications;
|
||||||
this.entGGXH = res.data.specifications;
|
this.entGGXH = res.data.specifications;
|
||||||
this.confirmParams.push(res.data);
|
|
||||||
// 明细添加,如果该序列号对应的规格型号不存在,就明细填加一条,如果存在就数量加一(booleacz 这个是判断规格型号)
|
// 明细添加,如果该序列号对应的规格型号不存在,就明细填加一条,如果存在就数量加一(booleacz 这个是判断规格型号)
|
||||||
this.booleacz = this.dataList.some((obj) => obj.specifications === res.data.specifications);
|
this.booleacz = this.dataList.some((obj) => obj.specifications === res.data.specifications);
|
||||||
// 判断扫码的是个序列号还是规格型号
|
// 判断扫码的是个序列号还是规格型号
|
||||||
@@ -895,6 +911,10 @@ export default {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
//缓存2件装序列号
|
||||||
|
if(res.data.isTwo==2 ) {
|
||||||
|
this.twoData.push(res.data.twoSerialNumber)
|
||||||
|
}
|
||||||
if (this.xlhOrggType == 'xlh') {
|
if (this.xlhOrggType == 'xlh') {
|
||||||
let xlhyyitlist = [];
|
let xlhyyitlist = [];
|
||||||
this.yyMXlist.forEach((it) => {
|
this.yyMXlist.forEach((it) => {
|
||||||
@@ -902,6 +922,7 @@ export default {
|
|||||||
xlhyyitlist = it.serialNumbers;
|
xlhyyitlist = it.serialNumbers;
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
/*
|
/*
|
||||||
原箱号有值,序列号=激活、激活且非冻结、非激活且非冻结=扫描成功,
|
原箱号有值,序列号=激活、激活且非冻结、非激活且非冻结=扫描成功,
|
||||||
原箱号没有值,序列号=非激活且非冻结、激活且冻结=扫描成功
|
原箱号没有值,序列号=非激活且非冻结、激活且冻结=扫描成功
|
||||||
@@ -991,10 +1012,12 @@ export default {
|
|||||||
this.dqNum = null;
|
this.dqNum = null;
|
||||||
this.focusInput = 'dqNum';
|
this.focusInput = 'dqNum';
|
||||||
this.xlhOrggStrlist.push(this.xlhOrggType == 'xlh' ? res.data.serialNumber : res.data.specifications);
|
this.xlhOrggStrlist.push(this.xlhOrggType == 'xlh' ? res.data.serialNumber : res.data.specifications);
|
||||||
|
this.confirmParams.push(res.data);
|
||||||
//缓存2件装序列号
|
//缓存2件装序列号
|
||||||
if(res.data.isTwo==2 && this.xlhOrggType == 'xlh') {
|
// if(res.data.isTwo==2 && this.xlhOrggType == 'xlh') {
|
||||||
this.twoData.push(res.data.twoSerialNumber)
|
// this.twoData.push(res.data.twoSerialNumber)
|
||||||
}
|
// console.log(this.twoData,'=this.twoData=')
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
this.focusInput = this.xlhOrggType == 'ggxh' ? 'dqNum' : 'xlhggxh';
|
this.focusInput = this.xlhOrggType == 'ggxh' ? 'dqNum' : 'xlhggxh';
|
||||||
|
|
||||||
|
|||||||
@@ -269,7 +269,6 @@ export default {
|
|||||||
subStockCode: this.cwcode,
|
subStockCode: this.cwcode,
|
||||||
details: []
|
details: []
|
||||||
};
|
};
|
||||||
console.log(this.dataList, '=this.dataList=');
|
|
||||||
this.dataList.forEach((it) => {
|
this.dataList.forEach((it) => {
|
||||||
if (it.details && it.details.length > 0) {
|
if (it.details && it.details.length > 0) {
|
||||||
it.details.forEach((k) => {
|
it.details.forEach((k) => {
|
||||||
@@ -280,16 +279,19 @@ export default {
|
|||||||
qty: k.qty,
|
qty: k.qty,
|
||||||
subStockCode: k.subStockCode,
|
subStockCode: k.subStockCode,
|
||||||
serialNumbers: k.itxlhlist,
|
serialNumbers: k.itxlhlist,
|
||||||
remark: k.remark
|
remark: k.remark,
|
||||||
|
twoSerialNumbers:k.twoSerialNumbers.filter(Boolean)
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
console.log('入库回退下架1', this.dataList, formdata);
|
// console.log('入库回退下架1', this.dataList, formdata);
|
||||||
|
// formData.details.twoSerialNumbers = formData?.details?.twoSerialNumbers?.length && formData?.details?.twoSerialNumbers.filter(Boolean);
|
||||||
if (this.requestStatus) {
|
if (this.requestStatus) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.requestStatus = true;
|
this.requestStatus = true;
|
||||||
|
|
||||||
this.$api.post('/BackRecord/OffShelf', formdata).then((res) => {
|
this.$api.post('/BackRecord/OffShelf', formdata).then((res) => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -474,6 +476,7 @@ export default {
|
|||||||
it.subStockCode = res.data.subStockCode;
|
it.subStockCode = res.data.subStockCode;
|
||||||
it.boxId = it.boxId;
|
it.boxId = it.boxId;
|
||||||
it.remark = '';
|
it.remark = '';
|
||||||
|
it.twoSerialNumbers = it.twoSerialNumbers ? it.twoSerialNumbers : []
|
||||||
});
|
});
|
||||||
this.dataList = [res.data].concat(this.dataList);
|
this.dataList = [res.data].concat(this.dataList);
|
||||||
|
|
||||||
@@ -608,8 +611,11 @@ export default {
|
|||||||
this.xlhVal = res.data.serialNumber;
|
this.xlhVal = res.data.serialNumber;
|
||||||
// 缓存序列号
|
// 缓存序列号
|
||||||
this.xlhstrList.push(res.data.serialNumber);
|
this.xlhstrList.push(res.data.serialNumber);
|
||||||
|
|
||||||
|
console.log(this.dataList,'=this.dataList=')
|
||||||
//缓存2件装序列号
|
//缓存2件装序列号
|
||||||
if(res.data.isTwo==2) {
|
if(res.data.isTwo==2) {
|
||||||
|
this.dataList[indexobj.objectIndex].details[indexobj.detailIndex].twoSerialNumbers.push(res.data.twoSerialNumber);
|
||||||
this.twoData.push(res.data.twoSerialNumber)
|
this.twoData.push(res.data.twoSerialNumber)
|
||||||
}
|
}
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
|
|||||||
@@ -408,7 +408,8 @@ export default {
|
|||||||
materialNumber: k.materialNumber,
|
materialNumber: k.materialNumber,
|
||||||
qty: parseInt(k.qty ? k.qty : 0),
|
qty: parseInt(k.qty ? k.qty : 0),
|
||||||
serialNumbers: k.itxlhlist,
|
serialNumbers: k.itxlhlist,
|
||||||
remark: k.remark
|
remark: k.remark,
|
||||||
|
twoSerialNumbers:k.twoSerialNumbers ? k.twoSerialNumbers.filter(Boolean): []
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -418,7 +419,10 @@ export default {
|
|||||||
if (this.requestStatus) {
|
if (this.requestStatus) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
this.requestStatus = true;
|
this.requestStatus = true;
|
||||||
|
|
||||||
|
// formData.details.twoSerialNumbers = formData?.details?.twoSerialNumbers?.length && formData?.details?.twoSerialNumbers?.filter(Boolean);
|
||||||
this.$api.post('/BackRecord/OnShelf', formdata).then((res) => {
|
this.$api.post('/BackRecord/OnShelf', formdata).then((res) => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -699,6 +703,7 @@ export default {
|
|||||||
this.xlhstrList.push(res.data.serialNumber);
|
this.xlhstrList.push(res.data.serialNumber);
|
||||||
if(res.data.isTwo==2) {
|
if(res.data.isTwo==2) {
|
||||||
this.twoData.push(res.data.twoSerialNumber)
|
this.twoData.push(res.data.twoSerialNumber)
|
||||||
|
this.dataList[0].details[findindx].twoSerialNumbers.push(res.data.twoSerialNumber);
|
||||||
}
|
}
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '获取成功',
|
title: '获取成功',
|
||||||
@@ -746,7 +751,8 @@ export default {
|
|||||||
materialNumber: res.data.materialNumber,
|
materialNumber: res.data.materialNumber,
|
||||||
specifications: res.data.specifications,
|
specifications: res.data.specifications,
|
||||||
materialName: res.data.materialName,
|
materialName: res.data.materialName,
|
||||||
remark: ''
|
remark: '',
|
||||||
|
twoSerialNumbers:[]
|
||||||
};
|
};
|
||||||
if (this.xlhOrggType == 'xlh') {
|
if (this.xlhOrggType == 'xlh') {
|
||||||
this.dqBoxInfo.details = [];
|
this.dqBoxInfo.details = [];
|
||||||
@@ -767,7 +773,9 @@ export default {
|
|||||||
materialNumber: res.data.materialNumber,
|
materialNumber: res.data.materialNumber,
|
||||||
specifications: res.data.specifications,
|
specifications: res.data.specifications,
|
||||||
materialName: res.data.materialName,
|
materialName: res.data.materialName,
|
||||||
remark: ''
|
remark: '',
|
||||||
|
twoSerialNumbers:[]
|
||||||
|
|
||||||
});
|
});
|
||||||
this.itIndx = this.dataList[0].details.length - 1;
|
this.itIndx = this.dataList[0].details.length - 1;
|
||||||
}
|
}
|
||||||
@@ -784,7 +792,9 @@ export default {
|
|||||||
materialNumber: res.data.materialNumber,
|
materialNumber: res.data.materialNumber,
|
||||||
specifications: res.data.specifications,
|
specifications: res.data.specifications,
|
||||||
materialName: res.data.materialName,
|
materialName: res.data.materialName,
|
||||||
remark: ''
|
remark: '',
|
||||||
|
twoSerialNumbers:[]
|
||||||
|
|
||||||
};
|
};
|
||||||
this.itIndx = this.dataList[0].details.length;
|
this.itIndx = this.dataList[0].details.length;
|
||||||
}
|
}
|
||||||
@@ -796,6 +806,7 @@ export default {
|
|||||||
//缓存2件装序列号
|
//缓存2件装序列号
|
||||||
if(res.data.isTwo==2) {
|
if(res.data.isTwo==2) {
|
||||||
this.twoData.push(res.data.twoSerialNumber)
|
this.twoData.push(res.data.twoSerialNumber)
|
||||||
|
this.dataList[0].details[this.itIndx].twoSerialNumbers.push(res.data.twoSerialNumber);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.xlhOrggType == 'ggxh') {
|
if (this.xlhOrggType == 'ggxh') {
|
||||||
@@ -883,6 +894,8 @@ export default {
|
|||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
if (res.data !== null) {
|
if (res.data !== null) {
|
||||||
|
console.log(this.cwcode,'=this.cwcode=')
|
||||||
|
console.log(res.data.subStockCode ,'=res.data.subStockCode =')
|
||||||
if (this.htfsType == '按产品回退' && this.cwcode !== res.data.subStockCode && res.data.subStockCode) {
|
if (this.htfsType == '按产品回退' && this.cwcode !== res.data.subStockCode && res.data.subStockCode) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请扫描对应仓位内的箱号',
|
title: '请扫描对应仓位内的箱号',
|
||||||
@@ -1024,7 +1037,6 @@ export default {
|
|||||||
this.dataList[indexobj.objectIndex].details[indexobj.detailIndex].itxlhlist.push(this.xlhVal);
|
this.dataList[indexobj.objectIndex].details[indexobj.detailIndex].itxlhlist.push(this.xlhVal);
|
||||||
} else {
|
} else {
|
||||||
const indexsh = this.dataList.findIndex((obj) => obj.boxBillNo === res.data.boxBillNo);
|
const indexsh = this.dataList.findIndex((obj) => obj.boxBillNo === res.data.boxBillNo);
|
||||||
console.log(12, indexsh);
|
|
||||||
if (indexsh !== -1) {
|
if (indexsh !== -1) {
|
||||||
const shwlidindex = this.dataList[indexsh].details.findIndex((obj) => obj.materialNumber === res.data.materialNumber);
|
const shwlidindex = this.dataList[indexsh].details.findIndex((obj) => obj.materialNumber === res.data.materialNumber);
|
||||||
console.log(13, shwlidindex, this.dataList[indexsh].details);
|
console.log(13, shwlidindex, this.dataList[indexsh].details);
|
||||||
|
|||||||
@@ -33,20 +33,24 @@
|
|||||||
<!-- 無聊 -->
|
<!-- 無聊 -->
|
||||||
<view class="item" :class="{ itembg2: !warehouseName }" :style="{ 'pointer-events': !warehouseName ? 'none' : '' }">
|
<view class="item" :class="{ itembg2: !warehouseName }" :style="{ 'pointer-events': !warehouseName ? 'none' : '' }">
|
||||||
<view class="" style="display: flex;padding: 10rpx 0; margin:0 40rpx;border-bottom: 1rpx solid #E3E5E8; box-sizing: border-box;">
|
<view class="" style="display: flex;padding: 10rpx 0; margin:0 40rpx;border-bottom: 1rpx solid #E3E5E8; box-sizing: border-box;">
|
||||||
<view style="border-right: 1rpx solid #E3E5E8;padding-right: 16rpx;">
|
<!-- border-right: 1rpx solid #E3E5E8; -->
|
||||||
|
<view style="width:130rpx;flex:3;border-right: 1rpx solid #E3E5E8;">
|
||||||
<uni-data-select
|
<uni-data-select
|
||||||
v-model="selectValue"
|
v-model="selectValue"
|
||||||
:localdata="options"
|
:localdata="options"
|
||||||
@change="hanldeSelectChange"
|
@change="hanldeSelectChange"
|
||||||
:clear="false"
|
:clear="false"
|
||||||
|
style=""
|
||||||
></uni-data-select>
|
></uni-data-select>
|
||||||
</view>
|
</view>
|
||||||
<view style="display: flex; align-items: center;justify-content: center;">
|
<!-- <view style="width: 1rpx; height:50rpx;background-color:#E3E5E8 ;">
|
||||||
<u-input :focus="focusTag==='box'" @clear="handleClear" border="bottom" :style="{width: inputWidth}" style="font-size: 14px; height:32rpx;"clearable v-model="inputVal" @confirm="handleInputConfirm()"
|
|
||||||
|
</view> -->
|
||||||
|
<view style="display: flex; align-items: center;justify-content: center;flex:10">
|
||||||
|
<u-input :focus="focusTag==='box'" @clear="handleClear" border="bottom" style="font-size: 14px; height:32rpx;"clearable v-model="inputVal" @confirm="handleInputConfirm()"
|
||||||
></u-input>
|
></u-input>
|
||||||
</view>
|
</view>
|
||||||
<view style="display: flex;align-items: center;"@click="scanImg('box')">
|
<view style="display: flex;align-items: center;flex: 2;justify-content: center;"@click="scanImg('box')">
|
||||||
<image src="../../static/img/smico.png" class="searchico" style="margin-left:0;"></image>
|
<image src="../../static/img/smico.png" class="searchico" style="margin-left:0;"></image>
|
||||||
</view>
|
</view>
|
||||||
|
|
||||||
@@ -193,7 +197,7 @@
|
|||||||
warehouseList:[],//仓库列表数据
|
warehouseList:[],//仓库列表数据
|
||||||
inputVal:'',//input输入值
|
inputVal:'',//input输入值
|
||||||
timer:null,
|
timer:null,
|
||||||
inputWidth:"470rpx",
|
inputWidth:0,
|
||||||
timer1:null,
|
timer1:null,
|
||||||
APPdevice: uni.getStorageSync('devicePixelRatio'), // 缓存设备的像素比用来区分普通安卓normalAnroid还是pda
|
APPdevice: uni.getStorageSync('devicePixelRatio'), // 缓存设备的像素比用来区分普通安卓normalAnroid还是pda
|
||||||
scanTracker: {
|
scanTracker: {
|
||||||
@@ -207,11 +211,12 @@
|
|||||||
this.getElHeight(".sh_gdInfo",1)
|
this.getElHeight(".sh_gdInfo",1)
|
||||||
this.getElHeight(".mianheade",2)
|
this.getElHeight(".mianheade",2)
|
||||||
/* #ifdef H5 */
|
/* #ifdef H5 */
|
||||||
this.inputWidth = '470rpx'
|
this.inputWidth = '450rpx'
|
||||||
/*#endif*/
|
/*#endif*/
|
||||||
/*#ifdef APP-PLUS*/
|
/*#ifdef APP-PLUS*/
|
||||||
this.inputWidth = '422rpx'
|
this.inputWidth = '402rpx'
|
||||||
/*#endif*/
|
/*#endif*/
|
||||||
|
console.log(this.inputWidth,'=this.inputWidth')
|
||||||
|
|
||||||
},
|
},
|
||||||
onLoad() {
|
onLoad() {
|
||||||
|
|||||||
@@ -464,7 +464,6 @@ export default {
|
|||||||
this.YiJiannum = 0;
|
this.YiJiannum = 0;
|
||||||
this.YingJianum = 0;
|
this.YingJianum = 0;
|
||||||
}
|
}
|
||||||
console.log(n,'===========n===========')
|
|
||||||
//根据出库单号检索
|
//根据出库单号检索
|
||||||
this.pageNo = 1;
|
this.pageNo = 1;
|
||||||
this.ckSelectlist = [];
|
this.ckSelectlist = [];
|
||||||
@@ -701,7 +700,6 @@ export default {
|
|||||||
},
|
},
|
||||||
// 一键清除出库单号
|
// 一键清除出库单号
|
||||||
clearnFn(val) {
|
clearnFn(val) {
|
||||||
console.log('一键清除出库单号', val);
|
|
||||||
if (val == 'ckdhselect') {
|
if (val == 'ckdhselect') {
|
||||||
// this.warehouseName = '';
|
// this.warehouseName = '';
|
||||||
// this.warehouseCode = '';
|
// this.warehouseCode = '';
|
||||||
@@ -852,10 +850,12 @@ export default {
|
|||||||
materialNumber: item.materialNumber,
|
materialNumber: item.materialNumber,
|
||||||
boxId: item.boxId,
|
boxId: item.boxId,
|
||||||
serialNumbers: [],
|
serialNumbers: [],
|
||||||
|
twoSerialNumbers:[],
|
||||||
qty: 0
|
qty: 0
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
mergedArray[key].serialNumbers.push(item.serialNumbers);
|
mergedArray[key].serialNumbers.push(item.serialNumbers);
|
||||||
|
mergedArray[key].twoSerialNumbers.push(item.twoSerialNumbers);
|
||||||
mergedArray[key].qty += item.qty;
|
mergedArray[key].qty += item.qty;
|
||||||
});
|
});
|
||||||
const result = Object.values(mergedArray);
|
const result = Object.values(mergedArray);
|
||||||
@@ -864,9 +864,11 @@ export default {
|
|||||||
} else {
|
} else {
|
||||||
thedetails = boxdetails;
|
thedetails = boxdetails;
|
||||||
}
|
}
|
||||||
// 过滤为0的数据
|
// 过滤为0的数
|
||||||
formData.details = [];
|
formData.details = [];
|
||||||
formData.details = thedetails.filter((it) => {
|
formData.details = thedetails.filter((it) => {
|
||||||
|
//去掉空值
|
||||||
|
it.twoSerialNumbers = it?.twoSerialNumbers?.filter(Boolean)
|
||||||
return it.qty && it.qty > 0;
|
return it.qty && it.qty > 0;
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -875,6 +877,7 @@ export default {
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.requestStatus = true;
|
this.requestStatus = true;
|
||||||
|
|
||||||
this.$api.post('/OutStock/Save', formData).then((res) => {
|
this.$api.post('/OutStock/Save', formData).then((res) => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
@@ -1112,8 +1115,6 @@ export default {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
let boxwlIds = res.data.details.filter((item) => item.qty > 0).map((item) => item.materialNumber);
|
let boxwlIds = res.data.details.filter((item) => item.qty > 0).map((item) => item.materialNumber);
|
||||||
console.log(boxwlIds,'=boxwlIds=')
|
|
||||||
console.log(this.dataList,'=this.dataList=')
|
|
||||||
let datawlds = this.dataList.map((it) => {
|
let datawlds = this.dataList.map((it) => {
|
||||||
return it.materialNumber;
|
return it.materialNumber;
|
||||||
});
|
});
|
||||||
@@ -1371,6 +1372,7 @@ export default {
|
|||||||
// 扫描序列号数据处理
|
// 扫描序列号数据处理
|
||||||
setxlhdata(res) {
|
setxlhdata(res) {
|
||||||
let thindx = this.dataList.findIndex((it) => it.materialNumber == res.data.materialNumber);
|
let thindx = this.dataList.findIndex((it) => it.materialNumber == res.data.materialNumber);
|
||||||
|
|
||||||
// 如果这个序列存在明细信息就缓存
|
// 如果这个序列存在明细信息就缓存
|
||||||
if (!this.dataList[thindx].itxlhlist && this.dataList[thindx].itxlhlist.length == 0) {
|
if (!this.dataList[thindx].itxlhlist && this.dataList[thindx].itxlhlist.length == 0) {
|
||||||
this.dqYJnum = 0;
|
this.dqYJnum = 0;
|
||||||
@@ -1382,7 +1384,8 @@ export default {
|
|||||||
qty: 1,
|
qty: 1,
|
||||||
boxId: this.isOldOps && this.isOldboxInfo.boxsubStock ? this.isOldboxInfo.boxId : res.data.boxId,
|
boxId: this.isOldOps && this.isOldboxInfo.boxsubStock ? this.isOldboxInfo.boxId : res.data.boxId,
|
||||||
subStockCode: this.isOldOps && this.isOldboxInfo.boxsubStock ? this.isOldboxInfo.boxsubStock : res.data.subStockCode,
|
subStockCode: this.isOldOps && this.isOldboxInfo.boxsubStock ? this.isOldboxInfo.boxsubStock : res.data.subStockCode,
|
||||||
serialNumbers: res.data.serialNumber
|
serialNumbers: res.data.serialNumber,
|
||||||
|
twoSerialNumbers:res.data.twoSerialNumber
|
||||||
});
|
});
|
||||||
this.dataList[thindx].itxlhlist.push(this.xlhVal);
|
this.dataList[thindx].itxlhlist.push(this.xlhVal);
|
||||||
this.dataList[thindx].boxitNo = this.isOldOps && this.isOldboxInfo.boxsubStock ? this.isOldboxInfo.boxName : res.data.boxBillNo;
|
this.dataList[thindx].boxitNo = this.isOldOps && this.isOldboxInfo.boxsubStock ? this.isOldboxInfo.boxName : res.data.boxBillNo;
|
||||||
@@ -1653,7 +1656,6 @@ export default {
|
|||||||
},
|
},
|
||||||
//根据出库单号获取对应的下拉数据
|
//根据出库单号获取对应的下拉数据
|
||||||
getCKselectlist(val) {
|
getCKselectlist(val) {
|
||||||
console.log('1232323')
|
|
||||||
// if (!val) return
|
// if (!val) return
|
||||||
clearTimeout(this.timer);
|
clearTimeout(this.timer);
|
||||||
this.pagingSet = false;
|
this.pagingSet = false;
|
||||||
|
|||||||
@@ -5,7 +5,7 @@
|
|||||||
<view class="mianheade mianheade2" @click="goback()">
|
<view class="mianheade mianheade2" @click="goback()">
|
||||||
<image src="../../static/img/n_baiback.png" class="blacBackico"></image>
|
<image src="../../static/img/n_baiback.png" class="blacBackico"></image>
|
||||||
<!-- /生产 -->
|
<!-- /生产 -->
|
||||||
<text class="pagetitle">采购上架入库</text>
|
<text class="pagetitle">采购/生产上架入库</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- 固定内容-->
|
<!-- 固定内容-->
|
||||||
<view class="sh_gdInfo">
|
<view class="sh_gdInfo">
|
||||||
@@ -231,6 +231,7 @@ export default {
|
|||||||
qktkTitle: '确定清空已收货数量?',
|
qktkTitle: '确定清空已收货数量?',
|
||||||
qktkContent: '清空后页面数据将不保存',
|
qktkContent: '清空后页面数据将不保存',
|
||||||
fid: '', // 来源单号
|
fid: '', // 来源单号
|
||||||
|
instockType:null,
|
||||||
orgCode: '', // 组织编码
|
orgCode: '', // 组织编码
|
||||||
dqboxNO: '', //用来是否保存当前输入箱号的值
|
dqboxNO: '', //用来是否保存当前输入箱号的值
|
||||||
APPdevice: uni.getStorageSync('devicePixelRatio'), // 缓存设备的像素比用来区分普通安卓normalAnroid还是pda
|
APPdevice: uni.getStorageSync('devicePixelRatio'), // 缓存设备的像素比用来区分普通安卓normalAnroid还是pda
|
||||||
@@ -254,10 +255,10 @@ export default {
|
|||||||
if (!n) {
|
if (!n) {
|
||||||
this.cwselectList = [];
|
this.cwselectList = [];
|
||||||
this.subStockCode = null;
|
this.subStockCode = null;
|
||||||
this.orgCode = null;
|
// this.orgCode = null;
|
||||||
} else {
|
} else {
|
||||||
this.subStockCode = null;
|
this.subStockCode = null;
|
||||||
this.orgCode = null;
|
// this.orgCode = null;
|
||||||
this.getcwList(n);
|
this.getcwList(n);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
@@ -273,6 +274,7 @@ export default {
|
|||||||
this.$refs.wselect1.inputData = '';
|
this.$refs.wselect1.inputData = '';
|
||||||
this.cwselectList = [];
|
this.cwselectList = [];
|
||||||
this.daiboxstrList = [];
|
this.daiboxstrList = [];
|
||||||
|
this.orgCode="";
|
||||||
this.krcwInfo = {
|
this.krcwInfo = {
|
||||||
materialSubStocks: [],
|
materialSubStocks: [],
|
||||||
materialNumber: '',
|
materialNumber: '',
|
||||||
@@ -361,12 +363,11 @@ export default {
|
|||||||
if (!val) return;
|
if (!val) return;
|
||||||
clearTimeout(this.timer);
|
clearTimeout(this.timer);
|
||||||
this.timer = setTimeout(() => {
|
this.timer = setTimeout(() => {
|
||||||
this.$api.get('/InStockTask/GetSourceOrder/' + val).then((res) => {
|
this.$api.get('/InStockTask/GetSourceOrder/' + val +"&").then((res) => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
this.lyselectList = [];
|
this.lyselectList = [];
|
||||||
this.lyselectList = res.data && res.data.length>0? res.data.filter(element => element.waitSlefQty > 0):[]
|
this.lyselectList = res.data && res.data.length>0? res.data.filter(element => element.waitSlefQty > 0):[]
|
||||||
|
|
||||||
console.log(this.focusInput);
|
|
||||||
if (this.lyselectList && this.lyselectList.length == 1) {
|
if (this.lyselectList && this.lyselectList.length == 1) {
|
||||||
this.lyOrderNo = this.lyselectList[0].sourceBillNo;
|
this.lyOrderNo = this.lyselectList[0].sourceBillNo;
|
||||||
this.$refs.wselectlydd.filterList = res.data;
|
this.$refs.wselectlydd.filterList = res.data;
|
||||||
@@ -383,6 +384,7 @@ export default {
|
|||||||
this.$refs.wselectlydd.optionsShow = false;
|
this.$refs.wselectlydd.optionsShow = false;
|
||||||
this.$refs.wselectlydd.isShow = false;
|
this.$refs.wselectlydd.isShow = false;
|
||||||
}
|
}
|
||||||
|
// console.log(this.instockType,'=this.instockType=')
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}, 1000);
|
}, 1000);
|
||||||
@@ -392,13 +394,18 @@ export default {
|
|||||||
if (!this.lyOrderNo) {
|
if (!this.lyOrderNo) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
console.log(1111111111111,'=============')
|
||||||
|
// console.log(e,'===============>>>')
|
||||||
this.setItemdata(e);
|
this.setItemdata(e);
|
||||||
},
|
},
|
||||||
// 选中的来源订单号相关物料
|
// 选中的来源订单号相关物料
|
||||||
setItemdata(e) {
|
setItemdata(e) {
|
||||||
|
console.log(e,'==============e==============')
|
||||||
this.lyorderId = e.id;
|
this.lyorderId = e.id;
|
||||||
this.detailsId = e.detailsId;
|
this.detailsId = e.detailsId;
|
||||||
this.customerCode = e.customerCode;
|
this.customerCode = e.customerCode;
|
||||||
|
this.instockType = e.instockType;
|
||||||
|
this.orgCode =e.orgCode;
|
||||||
// 仓库名称
|
// 仓库名称
|
||||||
this.warehouseName = e.stockName;
|
this.warehouseName = e.stockName;
|
||||||
this.warehouseCode = e.stockCode;
|
this.warehouseCode = e.stockCode;
|
||||||
@@ -461,6 +468,7 @@ export default {
|
|||||||
orgCode: this.orgCode,
|
orgCode: this.orgCode,
|
||||||
stockCode: this.warehouseCode,
|
stockCode: this.warehouseCode,
|
||||||
subStockCode: this.subStockCode,
|
subStockCode: this.subStockCode,
|
||||||
|
instockType:this.instockType,
|
||||||
details: thedetails
|
details: thedetails
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
@@ -565,7 +573,8 @@ export default {
|
|||||||
this.$api
|
this.$api
|
||||||
.get('/SysConfig/GetSubUcStockByName', {
|
.get('/SysConfig/GetSubUcStockByName', {
|
||||||
name: val,
|
name: val,
|
||||||
stockCode: this.warehouseCode
|
stockCode: this.warehouseCode,
|
||||||
|
orgCode:this.orgCode,
|
||||||
})
|
})
|
||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
@@ -581,8 +590,10 @@ export default {
|
|||||||
},
|
},
|
||||||
// 仓位下拉选择
|
// 仓位下拉选择
|
||||||
cwchange(e, type) {
|
cwchange(e, type) {
|
||||||
|
console.log(e,'=====================>')
|
||||||
|
console.log(this.instockType,'===============>')
|
||||||
this.subStockCode = e.code;
|
this.subStockCode = e.code;
|
||||||
this.orgCode = e.erpOrgCode;
|
// this.orgCode = e.erpOrgCode;
|
||||||
},
|
},
|
||||||
// 輸入失去焦點
|
// 輸入失去焦點
|
||||||
inputblur(val, type) {
|
inputblur(val, type) {
|
||||||
|
|||||||
@@ -14,7 +14,7 @@
|
|||||||
</view>
|
</view>
|
||||||
<view class="item" @click="otherPage(2)">
|
<view class="item" @click="otherPage(2)">
|
||||||
<image src="../../static/img/rk_fcgsjico.png" class="rkico"></image>
|
<image src="../../static/img/rk_fcgsjico.png" class="rkico"></image>
|
||||||
<text class="t1">采购上架</text>
|
<text class="t1">采购/生产上架</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" @click="otherPage(3)">
|
<view class="item" @click="otherPage(3)">
|
||||||
<image src="../../static/img/rk_cgsjico.png" class="rkico"></image>
|
<image src="../../static/img/rk_cgsjico.png" class="rkico"></image>
|
||||||
|
|||||||
@@ -419,17 +419,17 @@ export default {
|
|||||||
}
|
}
|
||||||
let dataForm = {};
|
let dataForm = {};
|
||||||
let details = [];
|
let details = [];
|
||||||
console.log(this.dataList);
|
console.log(this.dataList,);
|
||||||
details = this.dataList.map((it) => {
|
details = this.dataList.map((it) => {
|
||||||
return {
|
return {
|
||||||
qty: it.qty,
|
qty: it.qty,
|
||||||
supplierId: it.supplierId,
|
supplierId: it.supplierId,
|
||||||
materialNumber: it.materialNumber,
|
materialNumber: it.materialNumber,
|
||||||
serialNumbers: it.xlhList, //序列号集
|
serialNumbers: it.xlhList, //序列号集
|
||||||
erpDetailId: it.erpDetailId
|
erpDetailId: it.erpDetailId,
|
||||||
|
twoSerialNumbers:it.twoSerialNumbers ? it.twoSerialNumbers.filter(Boolean):[]
|
||||||
};
|
};
|
||||||
});
|
});
|
||||||
console.log('提交数据1', this.dataList, dataForm);
|
|
||||||
if (this.sjfsType == '按产品上架') {
|
if (this.sjfsType == '按产品上架') {
|
||||||
this.boxs[0].details = details;
|
this.boxs[0].details = details;
|
||||||
}
|
}
|
||||||
@@ -441,7 +441,7 @@ export default {
|
|||||||
subStockCode: this.subStockCode,
|
subStockCode: this.subStockCode,
|
||||||
boxs: this.boxs
|
boxs: this.boxs
|
||||||
};
|
};
|
||||||
console.log('dataForm', dataForm);
|
console.log('提交数据===dataForm===', dataForm);
|
||||||
// 节流
|
// 节流
|
||||||
if (this.requestStatus) {
|
if (this.requestStatus) {
|
||||||
return false;
|
return false;
|
||||||
@@ -480,6 +480,7 @@ export default {
|
|||||||
this.dataList.forEach((it) => {
|
this.dataList.forEach((it) => {
|
||||||
it.qty = 0;
|
it.qty = 0;
|
||||||
it.xlhList = [];
|
it.xlhList = [];
|
||||||
|
it.twoSerialNumbers=[]
|
||||||
});
|
});
|
||||||
this.qktkshow = false;
|
this.qktkshow = false;
|
||||||
this.focusInput = '';
|
this.focusInput = '';
|
||||||
@@ -783,10 +784,6 @@ export default {
|
|||||||
}
|
}
|
||||||
|
|
||||||
this.focusInput = '';
|
this.focusInput = '';
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
console.log('序列號', this.xlhVal);
|
|
||||||
this.$api
|
this.$api
|
||||||
.get('/SysConfig/GetMaterial', {
|
.get('/SysConfig/GetMaterial', {
|
||||||
serialNumber: this.xlhVal,
|
serialNumber: this.xlhVal,
|
||||||
@@ -844,13 +841,16 @@ export default {
|
|||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
this.dataList = this.$util.scanAndAllocate(this.dataList, res.data.materialNumber, res.data.serialNumber);
|
//18LC-628W3Y CTN00094835
|
||||||
|
console.log('走到了这里')
|
||||||
|
this.dataList = this.$util.scanAndAllocate(this.dataList, res.data.materialNumber, res.data.serialNumber,res.data.twoSerialNumber);
|
||||||
// 缓存序列号
|
// 缓存序列号
|
||||||
this.xlhstrList.push(res.data.serialNumber);
|
this.xlhstrList.push(res.data.serialNumber);
|
||||||
//缓存2件装序列号
|
//缓存2件装序列号
|
||||||
if(res.data.isTwo==2) {
|
if(res.data.isTwo==2) {
|
||||||
this.twoData.push(res.data.twoSerialNumber)
|
this.twoData.push(res.data.twoSerialNumber)
|
||||||
}
|
}
|
||||||
|
|
||||||
//保留当前输入的数据
|
//保留当前输入的数据
|
||||||
this.dqboxXlh = res.data.serialNumber;
|
this.dqboxXlh = res.data.serialNumber;
|
||||||
this.xlhVal = res.data.serialNumber;
|
this.xlhVal = res.data.serialNumber;
|
||||||
@@ -874,6 +874,7 @@ export default {
|
|||||||
list.forEach((it) => {
|
list.forEach((it) => {
|
||||||
it.qty = 0;
|
it.qty = 0;
|
||||||
it.xlhList = [];
|
it.xlhList = [];
|
||||||
|
it.twoSerialNumbers=[]
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
console.log('根据序列号的时候明细数据结构', list);
|
console.log('根据序列号的时候明细数据结构', list);
|
||||||
@@ -895,8 +896,8 @@ export default {
|
|||||||
let objArray = [];
|
let objArray = [];
|
||||||
objArray = list;
|
objArray = list;
|
||||||
let newObjArray = objArray.map((obj) => {
|
let newObjArray = objArray.map((obj) => {
|
||||||
obj.zQty = JSON.parse(JSON.stringify(obj.qty)); // 修改 name 属性,这里是在姓名后加上 ' Smith'
|
obj.zQty = JSON.parse(JSON.stringify(obj.qty));
|
||||||
obj.qty = 0; // 添加 age 属性,这里设定年龄为 30
|
obj.qty = 0;
|
||||||
return obj;
|
return obj;
|
||||||
});
|
});
|
||||||
return objArray;
|
return objArray;
|
||||||
@@ -919,15 +920,6 @@ export default {
|
|||||||
this.heights.body = this.heights.body - 36;
|
this.heights.body = this.heights.body - 36;
|
||||||
this.heights = this.$util.setlistHeight('.sh_gdInfo', '.footbts');
|
this.heights = this.$util.setlistHeight('.sh_gdInfo', '.footbts');
|
||||||
}, 200);
|
}, 200);
|
||||||
// if(this.cwNum && this.cwselectList.length && !this.subStockCode){
|
|
||||||
// this.cwselectList.forEach((item)=>{
|
|
||||||
// if(item.name === this.cwNum) {
|
|
||||||
// this.subStockCode = item.code
|
|
||||||
// console.log(this.subStockCode,'=走到这里来了=')
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
|
|
||||||
this.$forceUpdate();
|
this.$forceUpdate();
|
||||||
},
|
},
|
||||||
// 获取仓位下拉数据
|
// 获取仓位下拉数据
|
||||||
@@ -942,14 +934,6 @@ export default {
|
|||||||
.then((res) => {
|
.then((res) => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
this.cwselectList = res.data;
|
this.cwselectList = res.data;
|
||||||
//&& this.cwselectList.length == 1
|
|
||||||
// if (this.cwselectList && this.cwselectList.length == 1) {
|
|
||||||
// this.cwNum = this.cwselectList[0].name;
|
|
||||||
// this.cwchange(this.cwselectList[0]);
|
|
||||||
// this.$refs.wselect1.optionsShow = false;
|
|
||||||
// this.$refs.wselect1.isShow = false;
|
|
||||||
// }
|
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -3,7 +3,10 @@
|
|||||||
<view class="shpage">
|
<view class="shpage">
|
||||||
<!-- 标题栏 -->
|
<!-- 标题栏 -->
|
||||||
<view class="mianheade mianheade2" @click="goback()">
|
<view class="mianheade mianheade2" @click="goback()">
|
||||||
<image src="../../static/img/n_baiback.png" class="blacBackico"></image>
|
<image
|
||||||
|
src="../../static/img/n_baiback.png"
|
||||||
|
class="blacBackico"
|
||||||
|
></image>
|
||||||
<text class="pagetitle">收货</text>
|
<text class="pagetitle">收货</text>
|
||||||
</view>
|
</view>
|
||||||
<!-- 固定内容-->
|
<!-- 固定内容-->
|
||||||
@@ -11,84 +14,153 @@
|
|||||||
<view class="item itembg2">
|
<view class="item itembg2">
|
||||||
<view class="it">
|
<view class="it">
|
||||||
<text class="t1">仓库: </text>
|
<text class="t1">仓库: </text>
|
||||||
<text class="t2">{{warehouseName}}</text>
|
<text class="t2">{{ warehouseName }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" :class="{'itembg2':xhNo || boxstrList.length>0 }"
|
<view
|
||||||
:style="{'pointer-events':xhNo ||boxstrList.length>0?'none':''}">
|
class="item"
|
||||||
<view class="it itsp" >
|
:class="{ itembg2: xhNo || boxstrList.length > 0 }"
|
||||||
<text class="t1"><text class="redtag">*</text>采购订单号: </text>
|
:style="{
|
||||||
<!-- <view class="t1" style="display: flex;">
|
'pointer-events':
|
||||||
|
xhNo || boxstrList.length > 0 ? 'none' : '',
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<view class="it itsp">
|
||||||
|
<!-- <text class="t1"><text class="redtag">*</text>采购订单号: </text> -->
|
||||||
|
<view class="t1" style="display: flex">
|
||||||
<text class="redtag">*</text>
|
<text class="redtag">*</text>
|
||||||
<uni-data-select
|
<uni-data-select
|
||||||
style="font-size:12px"
|
style="font-size: 12px; width: 200rpx !important"
|
||||||
v-model="selectValue"
|
v-model="selectValue"
|
||||||
:localdata="options"
|
:localdata="options"
|
||||||
@change="hanldeSelectChange"
|
@change="hanldeSelectChange"
|
||||||
:clear="false"
|
:clear="false"
|
||||||
></uni-data-select>
|
></uni-data-select>
|
||||||
</view> -->
|
</view>
|
||||||
|
|
||||||
<w-select class="wwselectit" v-model.trim='cgOrderVal' defaultValue="请输入订单号搜索" :list='cgselectList'
|
<w-select
|
||||||
valueName='sourceBillNo' keyName="sourceBillNo" @change='cgchange' :filterable='filterable'
|
class="wwselectit"
|
||||||
optionType="order" @onBottomPage="onBottomPage" :pagingSet='false' :focus="focusInput=='cgdd'"
|
v-model.trim="cgOrderVal"
|
||||||
@focus="inputfocus($event,'cgdd')" :showClose='true' ref="wselectcgdd">
|
defaultValue="请输入订单号搜索"
|
||||||
|
:list="list"
|
||||||
|
valueName="sourceBillNo"
|
||||||
|
keyName="sourceBillNo"
|
||||||
|
@change="cgchange"
|
||||||
|
:filterable="filterable"
|
||||||
|
optionType="order"
|
||||||
|
@onBottomPage="onBottomPage"
|
||||||
|
:pagingSet="false"
|
||||||
|
:focus="focusInput == 'cgdd'"
|
||||||
|
@focus="inputfocus($event, 'cgdd')"
|
||||||
|
:showClose="true"
|
||||||
|
ref="wselectcgdd"
|
||||||
|
>
|
||||||
</w-select>
|
</w-select>
|
||||||
<image src="../../static/img/smico.png" class="searchico" @click="scanImg('cgdd')"></image>
|
<image
|
||||||
|
src="../../static/img/smico.png"
|
||||||
|
class="searchico"
|
||||||
|
@click="scanImg('cgdd')"
|
||||||
|
></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item" :class="{'itembg2':!cgOrderVal}" :style="{'pointer-events':!cgOrderVal?'none':''}">
|
<view
|
||||||
|
class="item"
|
||||||
|
:class="{ itembg2: !cgOrderVal }"
|
||||||
|
:style="{ 'pointer-events': !cgOrderVal ? 'none' : '' }"
|
||||||
|
>
|
||||||
<view class="it itsp">
|
<view class="it itsp">
|
||||||
<text class="t1"><text class="redtag">*</text>箱号: </text>
|
<text class="t1"><text class="redtag">*</text>箱号: </text>
|
||||||
<input v-model.trim="xhNo" class="inpt1" type="text" @focus="inputfocus($event,'box')"
|
<input
|
||||||
@blur="inputblur($event,'')" @confirm="inputConfirm($event,'box')"
|
v-model.trim="xhNo"
|
||||||
:focus="focusInput == 'box'" />
|
class="inpt1"
|
||||||
<image src="../../static/img/smico.png" class="searchico" @click="scanImg('box')"></image>
|
type="text"
|
||||||
|
@focus="inputfocus($event, 'box')"
|
||||||
|
@blur="inputblur($event, '')"
|
||||||
|
@confirm="inputConfirm($event, 'box')"
|
||||||
|
:focus="focusInput == 'box'"
|
||||||
|
/>
|
||||||
|
<image
|
||||||
|
src="../../static/img/smico.png"
|
||||||
|
class="searchico"
|
||||||
|
@click="scanImg('box')"
|
||||||
|
></image>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item itembg2">
|
<view class="item itembg2">
|
||||||
<view class="it">
|
<view class="it">
|
||||||
<text class="t1">数量: </text>
|
<text class="t1">数量: </text>
|
||||||
<text class="t1 tpleft">{{boxNum}} </text>
|
<text class="t1 tpleft">{{ boxNum }} </text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<view class="item item2">
|
<view class="item item2">
|
||||||
<view class="it2">
|
<view class="it2">
|
||||||
<text class="t1">{{cgOrderWLnum}}</text>
|
<text class="t1">{{ cgOrderWLnum }}</text>
|
||||||
<text class="t2">订单数量</text>
|
<text class="t2">订单数量</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="it2">
|
<view class="it2">
|
||||||
<text class="t1">{{krkNum}}</text>
|
<text class="t1">{{ krkNum }}</text>
|
||||||
<text class="t2">可入库数</text>
|
<text class="t2">可入库数</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="it2">
|
<view class="it2">
|
||||||
<text class="t1 rednum">{{yshNum}}</text>
|
<text class="t1 rednum">{{ yshNum }}</text>
|
||||||
<text class="t2">已收货数</text>
|
<text class="t2">已收货数</text>
|
||||||
</view>
|
</view>
|
||||||
<view class="it2" @click="xhmodelOpen">
|
<view class="it2" @click="xhmodelOpen">
|
||||||
<text class="t1 rednum">{{boxstrList.length}}</text>
|
<text class="t1 rednum">{{ boxstrList.length }}</text>
|
||||||
<text class="t2">已收箱数</text>
|
<text class="t2">已收箱数</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<!-- 列表内容-->
|
<!-- 列表内容-->
|
||||||
<view class="shlb" :style="{'margin-top':heights.top+'px','height':heights.body+'px'}">
|
<view
|
||||||
<z-paging ref="paging" v-model="dataList" @query="queryList" class="xlfeview"
|
class="shlb"
|
||||||
loading-more-default-text="上拉加载更多" :refresher-enabled="false">
|
:style="{
|
||||||
<view class="item" v-for="(i,index) in dataList" :key="index">
|
'margin-top': heights.top + 'px',
|
||||||
|
height: heights.body + 'px',
|
||||||
|
}"
|
||||||
|
>
|
||||||
|
<z-paging
|
||||||
|
ref="paging"
|
||||||
|
v-model="dataList"
|
||||||
|
@query="queryList"
|
||||||
|
class="xlfeview"
|
||||||
|
loading-more-default-text="上拉加载更多"
|
||||||
|
:refresher-enabled="false"
|
||||||
|
>
|
||||||
|
<view class="item" v-for="(i, index) in dataList" :key="index">
|
||||||
<view class="it">
|
<view class="it">
|
||||||
<text class="txt">{{i.specifications}}</text>
|
<text class="txt">{{ i.specifications }}</text>
|
||||||
<text class="txt">{{i.materialNumber}}</text>
|
<text class="txt">{{ i.materialNumber }}</text>
|
||||||
<text class="txt">明细备注:{{i.remark}}</text>
|
<text class="txt">明细备注:{{ i.remark }}</text>
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
<zero-loading v-if="listloading" type="circle" style="top: 60%;"></zero-loading>
|
<zero-loading
|
||||||
|
v-if="listloading"
|
||||||
|
type="circle"
|
||||||
|
style="top: 60%"
|
||||||
|
></zero-loading>
|
||||||
</z-paging>
|
</z-paging>
|
||||||
</view>
|
</view>
|
||||||
<!-- 已上架箱号-->
|
<!-- 已上架箱号-->
|
||||||
<u-modal :show="xhlistshow" title="已收箱号" @confirm="xhlistshow =false">
|
<u-modal
|
||||||
<view style="display: flex;flex-direction: column;overflow-y: auto;max-height: 60vh;overflow-y: auto;">
|
:show="xhlistshow"
|
||||||
<view v-for="(item,index) in boxstrList" style="margin-bottom: 5px;">{{item}}</view>
|
title="已收箱号"
|
||||||
|
@confirm="xhlistshow = false"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
style="
|
||||||
|
display: flex;
|
||||||
|
flex-direction: column;
|
||||||
|
overflow-y: auto;
|
||||||
|
max-height: 60vh;
|
||||||
|
overflow-y: auto;
|
||||||
|
"
|
||||||
|
>
|
||||||
|
<view
|
||||||
|
v-for="(item, index) in boxstrList"
|
||||||
|
style="margin-bottom: 5px"
|
||||||
|
>{{ item }}</view
|
||||||
|
>
|
||||||
</view>
|
</view>
|
||||||
</u-modal>
|
</u-modal>
|
||||||
<!-- 底部按钮固定-->
|
<!-- 底部按钮固定-->
|
||||||
@@ -97,46 +169,60 @@
|
|||||||
<view class="bt bt2" @click="completefn()">完成/下一单</view>
|
<view class="bt bt2" @click="completefn()">完成/下一单</view>
|
||||||
</view>
|
</view>
|
||||||
<!--清空二次确认弹框-->
|
<!--清空二次确认弹框-->
|
||||||
<u-modal :show="qktkshow" :title="qktkTitle" :content='qktkContent' @confirm="qktkconfirm"
|
<u-modal
|
||||||
:showCancelButton='true' @cancel="qktkshow = false"></u-modal>
|
:show="qktkshow"
|
||||||
|
:title="qktkTitle"
|
||||||
|
:content="qktkContent"
|
||||||
|
@confirm="qktkconfirm"
|
||||||
|
:showCancelButton="true"
|
||||||
|
@cancel="qktkshow = false"
|
||||||
|
></u-modal>
|
||||||
</view>
|
</view>
|
||||||
</template>
|
</template>
|
||||||
|
|
||||||
<script>
|
<script>
|
||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
heights: {
|
heights: {
|
||||||
top: 0,
|
top: 0,
|
||||||
body: 0,
|
body: 0,
|
||||||
},
|
},
|
||||||
options:[
|
options: [
|
||||||
{value:1,text:'采购订单号'},
|
{
|
||||||
{value:2,text:'生产单号'},
|
value: 1,
|
||||||
|
text: '采购单号',
|
||||||
|
},
|
||||||
|
{
|
||||||
|
value: 6,
|
||||||
|
text: '生产单号',
|
||||||
|
},
|
||||||
],
|
],
|
||||||
selectValue:1,//单号选择
|
selectValue: 1, //单号选择
|
||||||
listloading: false,
|
listloading: false,
|
||||||
xhlistshow: false, // 箱号查看弹框
|
xhlistshow: false, // 箱号查看弹框
|
||||||
focusInput: 'cgdd', // 自动聚焦
|
focusInput: 'cgdd', // 自动聚焦
|
||||||
mxid: '', //采购订单下拉选中明细id
|
mxid: '', //采购订单下拉选中明细id
|
||||||
focusTag: "", // 判斷聚焦
|
focusTag: '', // 判斷聚焦
|
||||||
warehouseName: '', //仓库名称
|
warehouseName: '', //仓库名称
|
||||||
warehouseCode: '', // 仓库编码
|
warehouseCode: '', // 仓库编码
|
||||||
xhNo: "", //箱号
|
xhNo: '', //箱号
|
||||||
boxstrList: [], // 缓存的箱号信息(多个)
|
boxstrList: [], // 缓存的箱号信息(多个)
|
||||||
filterable: true, // 采购订单是否开启模糊下拉搜索
|
filterable: true, // 采购订单是否开启模糊下拉搜索
|
||||||
boxNum: 0, //数量(扫码箱子的数量)
|
boxNum: 0, //数量(扫码箱子的数量)
|
||||||
boxs: [], // 已经扫描的箱子和对应id集合
|
boxs: [], // 已经扫描的箱子和对应id集合
|
||||||
cgOrderWLnum: 0, // 订单数量(采购订单物料数量)
|
cgOrderWLnum: 0, // 订单数量(采购订单物料数量)
|
||||||
cgOrderVal: "", //输入的采购订单号
|
cgOrderVal: '', //输入的采购订单号
|
||||||
|
cgOrderValClone: '', //采购订单号克隆
|
||||||
cgselectList: [], //采购下拉数据
|
cgselectList: [], //采购下拉数据
|
||||||
krkNum: 0, //可入库数量
|
krkNum: 0, //可入库数量
|
||||||
yshNum: 0, // 已收货数量
|
yshNum: 0, // 已收货数量
|
||||||
dataList: [], // 列表数据
|
dataList: [], // 列表数据
|
||||||
qktkshow: false, //清空二次确认弹框
|
qktkshow: false, //清空二次确认弹框
|
||||||
qktkTitle: '确定清空已收货数量?',
|
qktkTitle: '确定清空已收货数量?',
|
||||||
qktkContent: "清空后页面数据将不保存",
|
qktkContent: '清空后页面数据将不保存',
|
||||||
timer: null,
|
timer: null,
|
||||||
|
isQKMS: false,
|
||||||
availableQty: 0, // 第一次订单的可入库数量
|
availableQty: 0, // 第一次订单的可入库数量
|
||||||
erpDetailId: null, // erp明细id
|
erpDetailId: null, // erp明细id
|
||||||
dqboxNO: '', //用来是否保存当前输入箱号的值
|
dqboxNO: '', //用来是否保存当前输入箱号的值
|
||||||
@@ -145,316 +231,428 @@
|
|||||||
materialNumber: null, //选中采购单的时候物料编码
|
materialNumber: null, //选中采购单的时候物料编码
|
||||||
scanTracker: {
|
scanTracker: {
|
||||||
lastScanTime: 0,
|
lastScanTime: 0,
|
||||||
lastScanCode: null
|
lastScanCode: null,
|
||||||
}, // 源头处理扫码段时间内重复扫
|
}, // 源头处理扫码段时间内重复扫
|
||||||
|
};
|
||||||
|
},
|
||||||
|
computed: {
|
||||||
|
list() {
|
||||||
|
let ls = [];
|
||||||
|
if (this.cgselectList.length) {
|
||||||
|
ls = this.cgselectList.filter((item) => {
|
||||||
|
return item.availableQty > 0;
|
||||||
|
});
|
||||||
|
return ls;
|
||||||
|
} else {
|
||||||
|
return [];
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
},
|
||||||
watch: {
|
watch: {
|
||||||
boxNo(n) {
|
boxNo(n) {
|
||||||
if (!n) {
|
if (!n) {
|
||||||
this.dqboxNO = ''
|
this.dqboxNO = '';
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 采购订单号实时输入监听
|
// 采购订单号实时输入监听
|
||||||
cgOrderVal(n, o) {
|
cgOrderVal(n, o) {
|
||||||
if (!n) {
|
if (!n) {
|
||||||
this.qktkconfirm()
|
this.qktkconfirm();
|
||||||
this.dataList = []
|
this.dataList = [];
|
||||||
this.cgOrderWLnum = 0
|
this.cgOrderWLnum = 0;
|
||||||
this.krkNum = 0
|
this.krkNum = 0;
|
||||||
this.yshNum = 0
|
this.yshNum = 0;
|
||||||
this.yshNum = 0
|
this.yshNum = 0;
|
||||||
this.dqboxNO = ''
|
this.dqboxNO = '';
|
||||||
this.cgselectList = []
|
this.cgselectList = [];
|
||||||
this.warehouseName = ''
|
this.warehouseName = '';
|
||||||
this.warehouseCode = ''
|
this.warehouseCode = '';
|
||||||
} else {
|
} else {
|
||||||
this.getcgOrderSelectData(n)
|
this.getcgOrderSelectData(n);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
//监听订单号数据过滤为0
|
||||||
|
// cgselectList(n) {
|
||||||
|
// if (!n.length) {
|
||||||
|
// this.cgOrderVal = ""
|
||||||
|
// this.$refs.wselectcgdd.inputData = ""
|
||||||
|
// return
|
||||||
|
// }
|
||||||
|
|
||||||
|
// },
|
||||||
|
},
|
||||||
onReady() {
|
onReady() {
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.heights = this.$util.setlistHeight('.sh_gdInfo', '.footbts')
|
this.heights = this.$util.setlistHeight('.sh_gdInfo', '.footbts');
|
||||||
console.log("设备信息", this.heights)
|
console.log('设备信息', this.heights);
|
||||||
}, 500)
|
}, 500);
|
||||||
},
|
},
|
||||||
mounted() {
|
mounted() {
|
||||||
//获取广播扫码监听
|
//获取广播扫码监听
|
||||||
this.$broadcastScan.init(this.getScancode)
|
this.$broadcastScan.init(this.getScancode);
|
||||||
this.$broadcastScan.start();
|
this.$broadcastScan.start();
|
||||||
this.stopScanCode()
|
this.stopScanCode();
|
||||||
this.startScanCode()
|
this.startScanCode();
|
||||||
},
|
},
|
||||||
onHide() {
|
onHide() {
|
||||||
this.$broadcastScan.stop();
|
this.$broadcastScan.stop();
|
||||||
this.stopScanCode()
|
this.stopScanCode();
|
||||||
},
|
},
|
||||||
onShow() {
|
onShow() {
|
||||||
this.$broadcastScan.start();
|
this.$broadcastScan.start();
|
||||||
this.startScanCode()
|
this.startScanCode();
|
||||||
},
|
},
|
||||||
onBackPress(e) {
|
onBackPress(e) {
|
||||||
this.$util.appgoBack(e,'warehousIndex')
|
this.$util.appgoBack(e, 'warehousIndex');
|
||||||
return true
|
return true;
|
||||||
},
|
},
|
||||||
methods: {
|
methods: {
|
||||||
// 开启广播
|
// 开启广播
|
||||||
startScanCode(){
|
startScanCode() {
|
||||||
uni.$on('xwscan', (res) => {
|
uni.$on('xwscan', (res) => {
|
||||||
const now = Date.now();
|
const now = Date.now();
|
||||||
const timeSinceLastScan = now - this.scanTracker.lastScanTime;
|
const timeSinceLastScan = now - this.scanTracker.lastScanTime;
|
||||||
// 如果扫描的箱码和上次相同,并且时间间隔小于500ms,则不作处理
|
// 如果扫描的箱码和上次相同,并且时间间隔小于500ms,则不作处理
|
||||||
if ((res.code === this.scanTracker.lastScanCode) && (timeSinceLastScan < 4000)) {
|
if (
|
||||||
|
res.code === this.scanTracker.lastScanCode &&
|
||||||
|
timeSinceLastScan < 4000
|
||||||
|
) {
|
||||||
return;
|
return;
|
||||||
} else{
|
} else {
|
||||||
// 更新扫描跟踪信息
|
// 更新扫描跟踪信息
|
||||||
this.scanTracker.lastScanTime = now;
|
this.scanTracker.lastScanTime = now;
|
||||||
this.scanTracker.lastScanCode = res.code;
|
this.scanTracker.lastScanCode = res.code;
|
||||||
this.getScancode(res.code)
|
this.getScancode(res.code);
|
||||||
}
|
}
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 关闭广播
|
// 关闭广播
|
||||||
stopScanCode(){
|
stopScanCode() {
|
||||||
uni.$off('xwscan')
|
uni.$off('xwscan');
|
||||||
},
|
},
|
||||||
// 打开查看箱号
|
// 打开查看箱号
|
||||||
xhmodelOpen() {
|
xhmodelOpen() {
|
||||||
if (this.boxstrList.length > 0) {
|
if (this.boxstrList.length > 0) {
|
||||||
this.xhlistshow = true
|
this.xhlistshow = true;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 清空二次确认
|
// 清空二次确认
|
||||||
qktkconfirm() {
|
qktkconfirm() {
|
||||||
this.xhNo = ""
|
this.xhNo = '';
|
||||||
this.boxNum = 0
|
this.boxNum = 0;
|
||||||
this.krkNum = this.$util.sumObjectArrayValues(this.dataList, 'availableQty')
|
this.krkNum = this.$util.sumObjectArrayValues(
|
||||||
this.qktkshow = false
|
this.dataList,
|
||||||
this.yshNum = 0
|
'availableQty'
|
||||||
this.boxs = []
|
);
|
||||||
this.boxstrList = []
|
this.qktkshow = false;
|
||||||
|
this.yshNum = 0;
|
||||||
|
this.boxs = [];
|
||||||
|
this.boxstrList = [];
|
||||||
},
|
},
|
||||||
// //select-change
|
//select-change
|
||||||
// hanldeSelectChange() {
|
hanldeSelectChange() {
|
||||||
// this.cgOrderVal = ""
|
this.cgOrderVal = '';
|
||||||
// this.$refs.wselectcgdd.inputData=""
|
this.cgselectList = [];
|
||||||
// this.focusInput= ""
|
this.$nextTick(() => {
|
||||||
// setTimeout(()=>{
|
this.$refs.wselectcgdd.inputData = '';
|
||||||
// this.focusInput='cgdd'
|
this.$refs.wselectcgdd.filterList = [];
|
||||||
// },200)
|
});
|
||||||
// },
|
this.focusInput = '';
|
||||||
|
setTimeout(() => {
|
||||||
|
this.focusInput = 'cgdd';
|
||||||
|
}, 200);
|
||||||
|
console.log(this.selectValue, '==========selectValue=========');
|
||||||
|
},
|
||||||
|
|
||||||
|
// this.focusInput = ""
|
||||||
|
// setTimeout(() => {
|
||||||
|
// this.focusInput = 'cgdd'
|
||||||
|
// this.cgOrderVal = this.cgOrderValClone
|
||||||
|
// this.$refs.wselectcgdd.inputData=this.cgOrderValClone
|
||||||
|
// }, 200)
|
||||||
|
|
||||||
// 获取采购订单下拉数据
|
// 获取采购订单下拉数据
|
||||||
|
|
||||||
getcgOrderSelectData(val) {
|
getcgOrderSelectData(val) {
|
||||||
if (!val) return
|
if (!val) return;
|
||||||
clearTimeout(this.timer)
|
clearTimeout(this.timer);
|
||||||
|
|
||||||
this.timer = setTimeout(() => {
|
this.timer = setTimeout(() => {
|
||||||
this.$api.get('/InStockTask/GetSourceOrder/' + val).then(res => {
|
this.$api
|
||||||
|
.get(
|
||||||
|
'/InStockTask/GetSourceOrder/' +
|
||||||
|
`${val + '&' + this.selectValue}`
|
||||||
|
)
|
||||||
|
.then((res) => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
this.cgselectList = []
|
this.cgselectList = [];
|
||||||
this.cgselectList = res.data
|
this.cgselectList = res.data;
|
||||||
console.log(this.focusInput)
|
//如果所有的数量为0就不需要显示了
|
||||||
if (this.cgselectList && this.cgselectList.length == 1) {
|
let isAvailableQty = res?.data?.some((item) => {
|
||||||
this.cgOrderVal = this.cgselectList[0].sourceBillNo
|
return item?.availableQty;
|
||||||
this.$refs.wselectcgdd.filterList = res.data
|
});
|
||||||
this.$refs.wselectcgdd.inputData = this.cgselectList[0].sourceBillNo
|
//this.isQKMS是用戶點擊了完成了一下的標記(并且只有生产订单才这样操作)
|
||||||
this.setItemdata(this.cgselectList[0])
|
if (
|
||||||
this.cgchange(this.cgselectList[0])
|
this.isQKMS &&
|
||||||
this.$refs.wselectcgdd.optionsShow = false
|
this.selectValue === 6 &&
|
||||||
this.$refs.wselectcgdd.isShow = false
|
(!isAvailableQty || !res?.data?.length)
|
||||||
|
) {
|
||||||
|
this.qktkconfirm();
|
||||||
|
this.cgOrderVal = '';
|
||||||
|
this.dataList = [];
|
||||||
|
this.cgOrderWLnum = 0;
|
||||||
|
this.krkNum = 0;
|
||||||
|
this.yshNum = 0;
|
||||||
|
this.yshNum = 0;
|
||||||
|
this.dqboxNO = '';
|
||||||
|
this.cgselectList = [];
|
||||||
|
this.warehouseName = '';
|
||||||
|
this.warehouseCode = '';
|
||||||
|
this.focusInput = '';
|
||||||
|
this.$nextTick(() => {
|
||||||
|
setTimeout(() => {
|
||||||
|
this.$refs.wselectcgdd.inputData = '';
|
||||||
|
this.$refs.wselectcgdd.filterList = [];
|
||||||
|
this.focusInput = 'cgdd';
|
||||||
|
this.$refs.wselectcgdd.optionsShow = true;
|
||||||
|
this.$refs.wselectcgdd.isShow = true;
|
||||||
|
}, 200);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
// }
|
||||||
|
// console.log(this.cgselectList,'=this.cgselectList=')
|
||||||
|
if (
|
||||||
|
this.cgselectList &&
|
||||||
|
this.cgselectList.length == 1
|
||||||
|
) {
|
||||||
|
this.cgOrderVal =
|
||||||
|
this.cgselectList[0].sourceBillNo;
|
||||||
|
this.$refs.wselectcgdd.filterList = res.data;
|
||||||
|
this.$refs.wselectcgdd.inputData =
|
||||||
|
this.cgselectList[0].sourceBillNo;
|
||||||
|
this.setItemdata(this.cgselectList[0]);
|
||||||
|
this.cgchange(this.cgselectList[0]);
|
||||||
|
this.$refs.wselectcgdd.optionsShow = false;
|
||||||
|
this.$refs.wselectcgdd.isShow = false;
|
||||||
} else {
|
} else {
|
||||||
this.$refs.wselectcgdd.optionsShow = true
|
console.log('走到了這裏!');
|
||||||
this.$refs.wselectcgdd.isShow = true
|
this.$refs.wselectcgdd.optionsShow = true;
|
||||||
|
this.$refs.wselectcgdd.isShow = true;
|
||||||
}
|
}
|
||||||
if(this.focusInput !== 'cgdd'){
|
if (this.focusInput !== 'cgdd') {
|
||||||
this.$refs.wselectcgdd.optionsShow = false
|
this.$refs.wselectcgdd.optionsShow = false;
|
||||||
this.$refs.wselectcgdd.isShow = false
|
this.$refs.wselectcgdd.isShow = false;
|
||||||
}
|
}
|
||||||
|
this.isQKMS = false;
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}, 1000)
|
.catch(() => {
|
||||||
|
this.isQKMS = false;
|
||||||
|
});
|
||||||
|
}, 1000);
|
||||||
},
|
},
|
||||||
// 采购订单下拉框分页加载
|
// 采购订单下拉框分页加载
|
||||||
onBottomPage(val) {},
|
onBottomPage(val) {},
|
||||||
// 选中的采购订单号相关物料 如果数据校验失败就取明细带来的信息,不是就去明细信息的
|
// 选中的采购订单号相关物料 如果数据校验失败就取明细带来的信息,不是就去明细信息的
|
||||||
setItemdata(e) {
|
setItemdata(e) {
|
||||||
this.availableQty = e.availableQty
|
this.availableQty = e.availableQty;
|
||||||
this.cgOrderWLnum = this.$util.sumObjectArrayValues(this.dataList, 'qty')
|
this.cgOrderWLnum = this.$util.sumObjectArrayValues(
|
||||||
this.mxid = e.detailsId
|
this.dataList,
|
||||||
this.fid = e.id
|
'qty'
|
||||||
this.materialNumber = e.materialNumber
|
);
|
||||||
|
this.mxid = e.detailsId;
|
||||||
|
this.fid = e.id;
|
||||||
|
this.materialNumber = e.materialNumber;
|
||||||
// 仓库名称
|
// 仓库名称
|
||||||
this.warehouseName = e.stockName
|
this.warehouseName = e.stockName;
|
||||||
this.warehouseCode = e.stockCode
|
this.warehouseCode = e.stockCode;
|
||||||
this.erpDetailId = e.erpDetailId
|
this.erpDetailId = e.erpDetailId;
|
||||||
this.krkNum = e.availableQty
|
this.krkNum = e.availableQty;
|
||||||
this.focusInput = 'box'
|
this.focusInput = 'box';
|
||||||
},
|
},
|
||||||
// 采购订单下拉选中
|
// 采购订单下拉选中
|
||||||
cgchange(e) {
|
cgchange(e) {
|
||||||
if (!this.cgOrderVal) {
|
if (!this.cgOrderVal) {
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
this.dataList = [e]
|
console.log(e, '=============>');
|
||||||
|
this.dataList = [e];
|
||||||
|
|
||||||
// 以前已收货数量
|
// 以前已收货数量
|
||||||
this.setItemdata(e)
|
this.setItemdata(e);
|
||||||
},
|
},
|
||||||
// 扫描框数据重置,光标聚焦
|
// 扫描框数据重置,光标聚焦
|
||||||
setSMinputbox() {
|
setSMinputbox() {
|
||||||
this.focusInput = ''
|
this.focusInput = '';
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.xhNo = ''
|
this.xhNo = '';
|
||||||
this.focusInput = 'box'
|
this.focusInput = 'box';
|
||||||
this.boxNum = ''
|
this.boxNum = '';
|
||||||
}, 200)
|
}, 200);
|
||||||
},
|
},
|
||||||
// 根据箱号查相关信息
|
// 根据箱号查相关信息
|
||||||
getboxinfo() {
|
getboxinfo() {
|
||||||
if (this.timer) {
|
if (this.timer) {
|
||||||
clearTimeout(this.timer)
|
clearTimeout(this.timer);
|
||||||
}
|
}
|
||||||
this.timer = setTimeout(() => {
|
this.timer = setTimeout(() => {
|
||||||
if (!this.xhNo) {
|
if (!this.xhNo) {
|
||||||
this.setSMinputbox()
|
this.setSMinputbox();
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请扫描需要上架的箱号',
|
title: '请扫描需要上架的箱号',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 1500
|
duration: 1500,
|
||||||
})
|
});
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
if (this.boxstrList.includes(this.xhNo)) {
|
if (this.boxstrList.includes(this.xhNo)) {
|
||||||
this.setSMinputbox()
|
this.setSMinputbox();
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '该箱号已扫描,请重新输入',
|
title: '该箱号已扫描,请重新输入',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 1500
|
duration: 1500,
|
||||||
})
|
});
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
this.focusInput = ''
|
this.focusInput = '';
|
||||||
//采购订单物料明细和箱物料明细-对比接口,
|
//采购订单物料明细和箱物料明细-对比接口,
|
||||||
this.$api.post('/InStockTask/Contrast', {
|
this.$api
|
||||||
|
.post('/InStockTask/Contrast', {
|
||||||
boxBillNos: [this.xhNo.trim()],
|
boxBillNos: [this.xhNo.trim()],
|
||||||
stockCode: this.warehouseCode,
|
stockCode: this.warehouseCode,
|
||||||
materialNumber:this.materialNumber,
|
materialNumber: this.materialNumber,
|
||||||
taskId: this.fid,
|
taskId: this.fid,
|
||||||
isPurchase:true,
|
isPurchase: true,
|
||||||
}).then(res => {
|
})
|
||||||
|
.then((res) => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
if(res.data.boxs[0].details.length>1){
|
if (res.data.boxs[0].details.length > 1) {
|
||||||
this.dqboxNO = ''
|
this.dqboxNO = '';
|
||||||
this.xhNo = ''
|
this.xhNo = '';
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '箱内产品和采购单不一致!',
|
title: '箱内产品和采购单不一致!',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 1000
|
duration: 1000,
|
||||||
})
|
});
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
// 需要带出相关已收货数和已收箱数(这个数量应该是箱子对应单据选择物料的数量)
|
// 需要带出相关已收货数和已收箱数(这个数量应该是箱子对应单据选择物料的数量)
|
||||||
// let boxbymaterialQtyobj = res.data.boxs[0].details.find(item => item.materialNumber === this.materialNumber)
|
// let boxbymaterialQtyobj = res.data.boxs[0].details.find(item => item.materialNumber === this.materialNumber)
|
||||||
// console.log('物料数量',boxbymaterialQtyobj.qty)
|
// console.log('物料数量',boxbymaterialQtyobj.qty)
|
||||||
let totalCount = res.data.boxs[0].totalCount
|
let totalCount = res.data.boxs[0].totalCount;
|
||||||
// 可入库数量=订单数量-(当前箱子的数量+累计)-以前收货数量-已交
|
// 可入库数量=订单数量-(当前箱子的数量+累计)-以前收货数量-已交
|
||||||
// let dqkrkNUM = this.cgOrderWLnum - (this.yshNum + totalCount) - this.$util
|
// let dqkrkNUM = this.cgOrderWLnum - (this.yshNum + totalCount) - this.$util
|
||||||
// .sumObjectArrayValues(this.dataList, 'receiveQty') - this.$util.sumObjectArrayValues(
|
// .sumObjectArrayValues(this.dataList, 'receiveQty') - this.$util.sumObjectArrayValues(
|
||||||
// this.dataList, 'deliveredQty')
|
// this.dataList, 'deliveredQty')
|
||||||
// 12.5 界面可入库数量=接口第一次返回的可入库数量-已收货数量
|
// 12.5 界面可入库数量=接口第一次返回的可入库数量-已收货数量
|
||||||
let dqkrkNum = this.$util.sumObjectArrayValues(this.dataList, 'availableQty')
|
let dqkrkNum = this.$util.sumObjectArrayValues(
|
||||||
console.log('可入', parseInt(this.yshNum + totalCount), this.krkNum, )
|
this.dataList,
|
||||||
|
'availableQty'
|
||||||
|
);
|
||||||
|
console.log(
|
||||||
|
'可入',
|
||||||
|
parseInt(this.yshNum + totalCount),
|
||||||
|
this.krkNum
|
||||||
|
);
|
||||||
if (res.data.boxs.length > 0) {
|
if (res.data.boxs.length > 0) {
|
||||||
if (parseInt(this.yshNum + totalCount) > dqkrkNum) {
|
if (
|
||||||
this.setSMinputbox()
|
parseInt(this.yshNum + totalCount) >
|
||||||
|
dqkrkNum
|
||||||
|
) {
|
||||||
|
this.setSMinputbox();
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '箱内产品数量超过可入库数量',
|
title: '箱内产品数量超过可入库数量',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 1000
|
duration: 1000,
|
||||||
})
|
});
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
// 当前箱号里面物料的数量
|
// 当前箱号里面物料的数量
|
||||||
this.boxNum = totalCount
|
this.boxNum = totalCount;
|
||||||
// 已收货数量 累加
|
// 已收货数量 累加
|
||||||
this.krkNum = dqkrkNum - (this.yshNum + totalCount)
|
this.krkNum =
|
||||||
this.yshNum = this.yshNum + totalCount
|
dqkrkNum - (this.yshNum + totalCount);
|
||||||
|
this.yshNum = this.yshNum + totalCount;
|
||||||
this.boxs.push({
|
this.boxs.push({
|
||||||
id: 0,
|
id: 0,
|
||||||
erpDetailId: this.erpDetailId,
|
erpDetailId: this.erpDetailId,
|
||||||
boxId: res.data.boxs[0].boxId,
|
boxId: res.data.boxs[0].boxId,
|
||||||
boxBillNo: res.data.boxs[0].boxBillNo
|
boxBillNo: res.data.boxs[0].boxBillNo,
|
||||||
})
|
});
|
||||||
// 如果查询的箱号正常返回数据,就缓存改箱号信息
|
// 如果查询的箱号正常返回数据,就缓存改箱号信息
|
||||||
this.boxstrList.push(res.data.boxs[0].boxBillNo)
|
this.boxstrList.push(
|
||||||
|
res.data.boxs[0].boxBillNo
|
||||||
|
);
|
||||||
//保留当前输入的数据
|
//保留当前输入的数据
|
||||||
this.dqboxNO = res.data.boxs[0].boxBillNo
|
this.dqboxNO = res.data.boxs[0].boxBillNo;
|
||||||
this.xhNo = res.data.boxs[0].boxBillNo
|
this.xhNo = res.data.boxs[0].boxBillNo;
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '获取成功',
|
title: '获取成功',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 1500
|
duration: 1500,
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
this.dqboxNO = ''
|
this.dqboxNO = '';
|
||||||
this.xhNo = ''
|
this.xhNo = '';
|
||||||
}
|
}
|
||||||
this.focusInput = 'box'
|
this.focusInput = 'box';
|
||||||
})
|
});
|
||||||
}, 1000)
|
}, 1000);
|
||||||
},
|
},
|
||||||
// 输入确认
|
// 输入确认
|
||||||
inputConfirm(val, type) {
|
inputConfirm(val, type) {
|
||||||
if (val) {
|
if (val) {
|
||||||
this.setSMstr(val.target.value)
|
this.setSMstr(val.target.value);
|
||||||
if (this.focusTag == 'box') {
|
if (this.focusTag == 'box') {
|
||||||
// this.xhNo = val.target.value
|
// this.xhNo = val.target.value
|
||||||
this.getboxinfo()
|
this.getboxinfo();
|
||||||
|
//this.isQKMS = false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 区分不同的扫描数据、输入数据做处理显示
|
// 区分不同的扫描数据、输入数据做处理显示
|
||||||
setSMstr(str) {
|
setSMstr(str) {
|
||||||
let lth = str.length - this.dqboxNO.length
|
let lth = str.length - this.dqboxNO.length;
|
||||||
if (lth > 1) {
|
if (lth > 1) {
|
||||||
// 扫描的值
|
// 扫描的值
|
||||||
this.xhNo = str.substring(this.dqboxNO.length)
|
this.xhNo = str.substring(this.dqboxNO.length);
|
||||||
} else {
|
} else {
|
||||||
this.dqboxNO = str
|
this.dqboxNO = str;
|
||||||
this.xhNo = str
|
this.xhNo = str;
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 普通安卓设备碘酒扫描图标扫描
|
// 普通安卓设备碘酒扫描图标扫描
|
||||||
scanImg(type) {
|
scanImg(type) {
|
||||||
if (this.APPdevice == "normalAnroid") {
|
if (this.APPdevice == 'normalAnroid') {
|
||||||
this.$util.doScanQrCode().then(res => {
|
this.$util.doScanQrCode().then((res) => {
|
||||||
this.focusInput = type
|
this.focusInput = type;
|
||||||
this.focusTag = type
|
this.focusTag = type;
|
||||||
this.getScancode(res.result)
|
this.getScancode(res.result);
|
||||||
})
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// 获取扫描的值
|
// 获取扫描的值
|
||||||
getScancode(code) {
|
getScancode(code) {
|
||||||
// 有些PDA会自带换行符,trim函数处理下、
|
// 有些PDA会自带换行符,trim函数处理下、
|
||||||
if (this.focusTag == 'box') {
|
if (this.focusTag == 'box') {
|
||||||
this.xhNo = ''
|
this.xhNo = '';
|
||||||
this.xhNo = code.trim()
|
this.xhNo = code.trim();
|
||||||
this.getboxinfo()
|
this.getboxinfo();
|
||||||
}
|
}
|
||||||
if (this.focusTag == 'cgdd') {
|
if (this.focusTag == 'cgdd') {
|
||||||
this.cgOrderVal = ''
|
this.cgOrderVal = '';
|
||||||
this.cgOrderVal = code.trim()
|
this.cgOrderVal = code.trim();
|
||||||
this.$refs.wselectcgdd.inputData = code.trim()
|
this.$refs.wselectcgdd.inputData = code.trim();
|
||||||
this.getcgOrderSelectData(this.cgOrderVal)
|
this.getcgOrderSelectData(this.cgOrderVal);
|
||||||
}
|
}
|
||||||
|
|
||||||
},
|
},
|
||||||
// 輸入失去焦點
|
// 輸入失去焦點
|
||||||
inputblur(val, type) {},
|
inputblur(val, type) {},
|
||||||
// 输入聚焦
|
// 输入聚焦
|
||||||
inputfocus(val, type) {
|
inputfocus(val, type) {
|
||||||
this.focusTag = type
|
this.focusTag = type;
|
||||||
},
|
},
|
||||||
// 完成/下一单
|
// 完成/下一单
|
||||||
completefn() {
|
completefn() {
|
||||||
@@ -462,66 +660,104 @@
|
|||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '请先输入必填值',
|
title: '请先输入必填值',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 1500
|
duration: 1500,
|
||||||
})
|
});
|
||||||
return
|
return;
|
||||||
}
|
}
|
||||||
|
this.cgOrderValClone = this.cgOrderVal;
|
||||||
|
|
||||||
// 节流
|
// 节流
|
||||||
if (this.requestStatus) {
|
if (this.requestStatus) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
this.requestStatus = true;
|
this.requestStatus = true;
|
||||||
this.$api.post('/InStockTask/Receive', {
|
this.$api
|
||||||
|
.post('/InStockTask/Receive', {
|
||||||
id: this.fid,
|
id: this.fid,
|
||||||
boxs: this.boxs,
|
boxs: this.boxs,
|
||||||
details: [{
|
details: [
|
||||||
|
{
|
||||||
id: this.mxid, //明细id
|
id: this.mxid, //明细id
|
||||||
materialNumber: this.materialNumber,
|
materialNumber: this.materialNumber,
|
||||||
receiveQty: this.yshNum,
|
receiveQty: this.yshNum,
|
||||||
erpDetailId: this.erpDetailId
|
erpDetailId: this.erpDetailId,
|
||||||
}]
|
},
|
||||||
}).then(res => {
|
],
|
||||||
|
})
|
||||||
|
.then((res) => {
|
||||||
if (res.status == 200) {
|
if (res.status == 200) {
|
||||||
uni.showToast({
|
uni.showToast({
|
||||||
title: '成功',
|
title: '成功',
|
||||||
icon: 'none',
|
icon: 'none',
|
||||||
duration: 1500
|
duration: 1500,
|
||||||
})
|
});
|
||||||
|
this.qktkconfirm();
|
||||||
|
this.dataList = [];
|
||||||
|
this.cgOrderWLnum = 0;
|
||||||
|
this.krkNum = 0;
|
||||||
|
this.yshNum = 0;
|
||||||
|
this.dqboxNO = '';
|
||||||
|
// this.cgselectList = []
|
||||||
|
this.warehouseName = '';
|
||||||
|
this.warehouseCode = '';
|
||||||
|
this.cgOrderVal = '';
|
||||||
|
this.$nextTick(() => {
|
||||||
|
this.$refs.wselectcgdd.inputData = '';
|
||||||
|
this.$refs.wselectcgdd.filterList = [];
|
||||||
|
});
|
||||||
|
this.focusInput = '';
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
uni.navigateTo({
|
this.focusInput = 'cgdd';
|
||||||
url: '/pages/warehous/takeDelivery'
|
if (this.selectValue === 6) {
|
||||||
})
|
this.cgOrderVal = this.cgOrderValClone;
|
||||||
|
this.$refs.wselectcgdd.inputData =
|
||||||
|
this.cgOrderValClone;
|
||||||
|
}
|
||||||
}, 200);
|
}, 200);
|
||||||
|
this.isQKMS = true;
|
||||||
|
// setTimeout(() => {
|
||||||
|
// uni.navigateTo({
|
||||||
|
// url: '/pages/warehous/takeDelivery'
|
||||||
|
// })
|
||||||
|
// }, 200);
|
||||||
// this.$router.go(0)
|
// this.$router.go(0)
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
|
.catch(() => {
|
||||||
|
this.isQKMS = false;
|
||||||
|
});
|
||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
this.requestStatus = false;
|
this.requestStatus = false;
|
||||||
}, 1500);
|
}, 1500);
|
||||||
},
|
},
|
||||||
goback() {
|
goback() {
|
||||||
uni.navigateTo({
|
uni.navigateTo({
|
||||||
url: "/pages/warehous/index"
|
url: '/pages/warehous/index',
|
||||||
})
|
});
|
||||||
},
|
},
|
||||||
// 列表上拉加载更多
|
// 列表上拉加载更多
|
||||||
queryList(pageNo, pageSize) {
|
queryList(pageNo, pageSize) {
|
||||||
// console.log('上拉加载', pageNo, pageSize, this.dataList.length)
|
// console.log('上拉加载', pageNo, pageSize, this.dataList.length)
|
||||||
// this.$refs.paging.complete(this.dataList)
|
// this.$refs.paging.complete(this.dataList)
|
||||||
}
|
},
|
||||||
}
|
},
|
||||||
}
|
};
|
||||||
</script>
|
</script>
|
||||||
|
|
||||||
<style lang="scss">
|
<style lang="scss" scoped>
|
||||||
@import "@/static/public.scss";
|
@import '@/static/public.scss';
|
||||||
::v-deep .uni-select {
|
|
||||||
border:none !important;
|
::v-deep .uni-select {
|
||||||
height:24px;
|
border: none !important;
|
||||||
|
height: 24px;
|
||||||
width: 175rpx;
|
width: 175rpx;
|
||||||
padding-right: 0;
|
padding-right: 0;
|
||||||
padding-left: 3rpx;
|
padding-left: 3rpx;
|
||||||
text-align: center;
|
text-align: center;
|
||||||
margin-left: -7rpx;
|
margin-left: -7rpx;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// ::v-deep uni-select__selector-item {
|
||||||
|
// width: 200rpx !important;
|
||||||
|
// }
|
||||||
</style>
|
</style>
|
||||||
@@ -1,5 +1,5 @@
|
|||||||
const BaseApi = 'https://api.wms.test.f2b211.com/api' //测试
|
//const BaseApi = 'https://api.wms.test.f2b211.com/api' //测试
|
||||||
//const BaseApi = 'https://wmsapi.f2b211.com/api' // 正式
|
const BaseApi = 'https://wmsapi.f2b211.com/api' // 正式
|
||||||
export {
|
export {
|
||||||
BaseApi
|
BaseApi
|
||||||
}
|
}
|
||||||
@@ -215,10 +215,14 @@ function subtractQty(mxArray, boxArray) {
|
|||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
//按照产品分配序列号
|
//按照产品分配序列号
|
||||||
function scanAndAllocate(arr, materialNumber, serialNumber) {
|
function scanAndAllocate(arr, materialNumber, serialNumber,twoSerialNumber) {
|
||||||
|
console.log(twoSerialNumber,'=twoSerialNumber=')
|
||||||
// 遍历数组,按顺序分配序列号
|
// 遍历数组,按顺序分配序列号
|
||||||
for (const item of arr) {
|
for (const item of arr) {
|
||||||
if (item.materialNumber === materialNumber) {
|
if (item.materialNumber === materialNumber) {
|
||||||
|
if(twoSerialNumber) {
|
||||||
|
item.twoSerialNumbers.push(twoSerialNumber)
|
||||||
|
}
|
||||||
if (item.xlhList.length == 0) {
|
if (item.xlhList.length == 0) {
|
||||||
item.xlhList.push(serialNumber)
|
item.xlhList.push(serialNumber)
|
||||||
item.qty = item.xlhList.length
|
item.qty = item.xlhList.length
|
||||||
@@ -233,6 +237,7 @@ function scanAndAllocate(arr, materialNumber, serialNumber) {
|
|||||||
break
|
break
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return arr
|
return arr
|
||||||
|
|||||||
@@ -1,3 +1,7 @@
|
|||||||
|
## 1.0.10(2025-04-14)
|
||||||
|
- 修复 清除按钮不展示问题
|
||||||
|
## 1.0.9(2025-03-26)
|
||||||
|
- 优化 默认背景为白色与整体组件保持风格统一
|
||||||
## 1.0.8(2024-03-28)
|
## 1.0.8(2024-03-28)
|
||||||
- 修复 在vue2下:style动态绑定导致编译失败的bug
|
- 修复 在vue2下:style动态绑定导致编译失败的bug
|
||||||
## 1.0.7(2024-01-20)
|
## 1.0.7(2024-01-20)
|
||||||
|
|||||||
@@ -6,10 +6,10 @@
|
|||||||
<view class="uni-select__input-box" @click="toggleSelector">
|
<view class="uni-select__input-box" @click="toggleSelector">
|
||||||
<view v-if="current" class="uni-select__input-text">{{textShow}}</view>
|
<view v-if="current" class="uni-select__input-text">{{textShow}}</view>
|
||||||
<view v-else class="uni-select__input-text uni-select__input-placeholder">{{typePlaceholder}}</view>
|
<view v-else class="uni-select__input-text uni-select__input-placeholder">{{typePlaceholder}}</view>
|
||||||
<view v-if="current && clear && !disabled" @click.stop="clearVal">
|
<view key="clear-button" v-if="current && clear && !disabled" @click.stop="clearVal">
|
||||||
<uni-icons type="clear" color="#c0c4cc" size="24" />
|
<uni-icons type="clear" color="#c0c4cc" size="24" />
|
||||||
</view>
|
</view>
|
||||||
<view v-else>
|
<view key="arrow-button" v-else>
|
||||||
<uni-icons :type="showSelector? 'top' : 'bottom'" size="14" color="#999" />
|
<uni-icons :type="showSelector? 'top' : 'bottom'" size="14" color="#999" />
|
||||||
</view>
|
</view>
|
||||||
</view>
|
</view>
|
||||||
@@ -143,9 +143,6 @@
|
|||||||
textShow() {
|
textShow() {
|
||||||
// 长文本显示
|
// 长文本显示
|
||||||
let text = this.current;
|
let text = this.current;
|
||||||
if (text.length > 10) {
|
|
||||||
return text.slice(0, 25) + '...';
|
|
||||||
}
|
|
||||||
return text;
|
return text;
|
||||||
},
|
},
|
||||||
getOffsetByPlacement() {
|
getOffsetByPlacement() {
|
||||||
@@ -244,6 +241,7 @@
|
|||||||
|
|
||||||
clearVal() {
|
clearVal() {
|
||||||
this.emit('')
|
this.emit('')
|
||||||
|
this.current = ''
|
||||||
if (this.collection) {
|
if (this.collection) {
|
||||||
this.removeCache()
|
this.removeCache()
|
||||||
}
|
}
|
||||||
@@ -352,6 +350,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
.uni-stat-box {
|
.uni-stat-box {
|
||||||
|
background-color: #fff;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
flex: 1;
|
flex: 1;
|
||||||
}
|
}
|
||||||
@@ -405,6 +404,7 @@
|
|||||||
|
|
||||||
.uni-select__input-box {
|
.uni-select__input-box {
|
||||||
height: 35px;
|
height: 35px;
|
||||||
|
width: 0px;
|
||||||
position: relative;
|
position: relative;
|
||||||
/* #ifndef APP-NVUE */
|
/* #ifndef APP-NVUE */
|
||||||
display: flex;
|
display: flex;
|
||||||
@@ -433,6 +433,9 @@
|
|||||||
position: absolute;
|
position: absolute;
|
||||||
left: 0;
|
left: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
|
min-width: 200rpx;
|
||||||
|
display: flex;
|
||||||
|
flex-wrap: nowrap;
|
||||||
background-color: #FFFFFF;
|
background-color: #FFFFFF;
|
||||||
border: 1px solid #EBEEF5;
|
border: 1px solid #EBEEF5;
|
||||||
border-radius: 6px;
|
border-radius: 6px;
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"id": "uni-data-select",
|
"id": "uni-data-select",
|
||||||
"displayName": "uni-data-select 下拉框选择器",
|
"displayName": "uni-data-select 下拉框选择器",
|
||||||
"version": "1.0.8",
|
"version": "1.0.10",
|
||||||
"description": "通过数据驱动的下拉框选择器",
|
"description": "通过数据驱动的下拉框选择器",
|
||||||
"keywords": [
|
"keywords": [
|
||||||
"uni-ui",
|
"uni-ui",
|
||||||
@@ -48,8 +48,10 @@
|
|||||||
},
|
},
|
||||||
"client": {
|
"client": {
|
||||||
"App": {
|
"App": {
|
||||||
"app-vue": "u",
|
"app-vue": "y",
|
||||||
"app-nvue": "n"
|
"app-nvue": "n",
|
||||||
|
"app-harmony": "u",
|
||||||
|
"app-uvue": "u"
|
||||||
},
|
},
|
||||||
"H5-mobile": {
|
"H5-mobile": {
|
||||||
"Safari": "y",
|
"Safari": "y",
|
||||||
|
|||||||
Reference in New Issue
Block a user