多组织仓位
This commit is contained in:
@@ -312,7 +312,7 @@ export default {
|
||||
remarkIndex: null, //修改的是那个明细的备注
|
||||
itremake: '', // 明细盘亏备注
|
||||
choseBoxId: '', // 当前箱的箱id
|
||||
subStockCode: null, // 当前箱的仓位code
|
||||
// subStockCode: null, // 当前箱的仓位code
|
||||
subStockCode: '', //仓位code
|
||||
old_SubStockCode: '', //老仓位code,由箱号携带出来
|
||||
APPdevice: uni.getStorageSync('devicePixelRatio'), // 缓存设备的像素比用来区分普通安卓normalAnroid还是pda
|
||||
@@ -407,13 +407,11 @@ export default {
|
||||
},
|
||||
//仓库change事件
|
||||
ckchange(e) {
|
||||
console.log(1232323);
|
||||
this.xhDisabled = !e.name;
|
||||
this.focusInput = '';
|
||||
this.warehouseName = e.name;
|
||||
this.warehouseCode = e.code;
|
||||
this.orgCode = e.erpOrgCode;
|
||||
|
||||
setTimeout(() => {
|
||||
this.focusInput = 'box';
|
||||
}, 300);
|
||||
@@ -521,7 +519,7 @@ export default {
|
||||
return;
|
||||
}
|
||||
let formData = [];
|
||||
|
||||
|
||||
this.dataList.forEach((it) => {
|
||||
formData.push({
|
||||
boxId: this.choseBoxId,
|
||||
@@ -534,15 +532,17 @@ export default {
|
||||
remark: it.remark,
|
||||
stockCode: this.warehouseCode,
|
||||
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);
|
||||
|
||||
|
||||
// 节流
|
||||
if (this.requestStatus) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.requestStatus = true;
|
||||
this.qrpdshow = false;
|
||||
this.$api.post('/TakeStock/Save', formData).then((res) => {
|
||||
@@ -715,6 +715,11 @@ export default {
|
||||
this.dataList[findindx].itxlhList.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({
|
||||
title: '获取成功',
|
||||
icon: 'none',
|
||||
@@ -753,7 +758,8 @@ export default {
|
||||
old_SubStockCode: res.data.subStockCode,
|
||||
pdNum: this.xlhOrggType == 'ggxh' ? 0 : this.xlhOrggType == 'xlh' ? 1 : 0,
|
||||
serialNumbers: [],
|
||||
itxlhList: []
|
||||
itxlhList: [],
|
||||
twoSerialNumbers:[],
|
||||
});
|
||||
if (this.xlhOrggType == 'xlh') {
|
||||
this.xlhGgxNum = 1;
|
||||
@@ -762,6 +768,7 @@ export default {
|
||||
this.xlhStrlist.push(res.data.serialNumber);
|
||||
//缓存2件装序列号
|
||||
if(res.data.isTwo==2) {
|
||||
this.dataList[this.dataList.length - 1].twoSerialNumbers.push(res.data.twoSerialNumber);
|
||||
this.twoData.push(res.data.twoSerialNumber)
|
||||
}
|
||||
}
|
||||
@@ -837,16 +844,8 @@ export default {
|
||||
});
|
||||
return;
|
||||
}
|
||||
//没有仓位就不添加明细数据
|
||||
// if(!if()res.data.subStockCode) {
|
||||
// return
|
||||
// }if()
|
||||
//明细数据
|
||||
// if(!res.data.subStockCode) {
|
||||
// retrun
|
||||
// }
|
||||
|
||||
this.dataList = [];
|
||||
|
||||
res.data.details.forEach((obj) => {
|
||||
if (obj.qty > 0 && res.data.subStockCode) {
|
||||
this.dataList.push({
|
||||
@@ -857,7 +856,9 @@ export default {
|
||||
subStockCode: res.data.subStockCode,
|
||||
remark: '',
|
||||
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.xlhOrggStrlist = [];
|
||||
this.twoData=[]
|
||||
this.confirmParams=[]
|
||||
this.MbNoTag = false;
|
||||
this.YyNoTag = false;
|
||||
this.xlhOrggTag = false;
|
||||
@@ -375,11 +376,13 @@ export default {
|
||||
qty: obj.serialNumber ? 1 : obj.qty, //如归是序列号默认为1,如果是规格型号取用户输入的值
|
||||
srcBoxId: obj.boxId,
|
||||
serialNumber: obj.serialNumber,
|
||||
serialNumbers: []
|
||||
twoSerialNumber:obj.twoSerialNumber,
|
||||
serialNumbers: [],
|
||||
twoSerialNumbers:[],
|
||||
});
|
||||
return acc;
|
||||
}, {});
|
||||
|
||||
let srcBoxId =null
|
||||
const result = Object.values(groupedBySrcBoxId).map((group) => {
|
||||
return group.reduce((acc, obj) => {
|
||||
const existing = acc.find((item) => item.materialNumber === obj.materialNumber);
|
||||
@@ -387,29 +390,41 @@ export default {
|
||||
if (obj.serialNumber) {
|
||||
existing.qty += obj.qty;
|
||||
existing.serialNumbers.push(obj.serialNumber);
|
||||
|
||||
}
|
||||
// existing.qty += obj.qty;
|
||||
// existing.serialNumbers.push(obj.serialNumber);
|
||||
if(obj.twoSerialNumber) {
|
||||
existing.twoSerialNumbers.push(obj.twoSerialNumber)
|
||||
console.log(existing,'=existing=')
|
||||
}
|
||||
|
||||
} else {
|
||||
let twoSerialNumbers = []
|
||||
if(obj.twoSerialNumber) {
|
||||
twoSerialNumbers.push(obj.twoSerialNumber)
|
||||
}
|
||||
acc.push({
|
||||
materialNumber: obj.materialNumber,
|
||||
qty: obj.qty,
|
||||
serialNumbers: obj.serialNumber ? [obj.serialNumber] : [],
|
||||
srcBoxId: obj.srcBoxId
|
||||
// srcBoxId: obj.srcBoxId,
|
||||
twoSerialNumbers:twoSerialNumbers,
|
||||
});
|
||||
srcBoxId = obj.srcBoxId
|
||||
}
|
||||
return acc;
|
||||
}, []);
|
||||
});
|
||||
|
||||
console.log()
|
||||
let params = [];
|
||||
let length = result.length;
|
||||
for (let i = 0; i < length; i++) {
|
||||
let obj = {
|
||||
destBoxBillNo: this.boxMbNo,
|
||||
srcBoxId: this.YyboxId ? this.YyboxId : result[i][0].srcBoxId,
|
||||
srcBoxId: this.YyboxId ? this.YyboxId : srcBoxId,
|
||||
destBoxId: this.MbBoxId ? this.MbBoxId : 0,
|
||||
subStockCode: cwcode ? cwcode : this.subStockCode ? this.subStockCode : 0, //目标箱仓位或重新上架选择仓位
|
||||
details: result[i]
|
||||
details: result[i],
|
||||
};
|
||||
params.push(obj);
|
||||
}
|
||||
@@ -419,8 +434,8 @@ export default {
|
||||
if (this.requestStatus) {
|
||||
return false;
|
||||
}
|
||||
console.log('提交的數據',params)
|
||||
this.requestStatus = true;
|
||||
this.requestStatus = true;
|
||||
console.log(params,'=params=')
|
||||
this.$api.post('/ChangeBoxRecord/Save', params).then((res) => {
|
||||
if (res.status == 200) {
|
||||
uni.showToast({
|
||||
@@ -633,7 +648,7 @@ export default {
|
||||
specifications: this.itData.specifications,
|
||||
materialNumber: this.itData.materialNumber,
|
||||
qty: this.dqNum,
|
||||
srcBoxId: this.itData.boxId
|
||||
srcBoxId: this.itData.boxId,
|
||||
});
|
||||
}
|
||||
|
||||
@@ -834,13 +849,15 @@ export default {
|
||||
specifications: res.data.specifications,
|
||||
materialNumber: res.data.materialNumber,
|
||||
qty: 1,
|
||||
srcBoxId: res.data.boxId
|
||||
srcBoxId: res.data.boxId,
|
||||
twoSerialNumber:res.data.twoSerialNumber ? res.data.twoSerialNumber: ''
|
||||
});
|
||||
}
|
||||
//数量默认为1
|
||||
this.focusInput = 'xlhggxh';
|
||||
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({
|
||||
title: '设置成功',
|
||||
icon: 'none',
|
||||
@@ -858,7 +875,7 @@ export default {
|
||||
});
|
||||
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();
|
||||
uni.showToast({
|
||||
title: '该序列号/格型号已扫描',
|
||||
@@ -880,7 +897,6 @@ export default {
|
||||
this.xlhggxhData = res;
|
||||
this.useGGXH = res.data.specifications;
|
||||
this.entGGXH = res.data.specifications;
|
||||
this.confirmParams.push(res.data);
|
||||
// 明细添加,如果该序列号对应的规格型号不存在,就明细填加一条,如果存在就数量加一(booleacz 这个是判断规格型号)
|
||||
this.booleacz = this.dataList.some((obj) => obj.specifications === res.data.specifications);
|
||||
// 判断扫码的是个序列号还是规格型号
|
||||
@@ -895,6 +911,10 @@ export default {
|
||||
});
|
||||
return;
|
||||
}
|
||||
//缓存2件装序列号
|
||||
if(res.data.isTwo==2 ) {
|
||||
this.twoData.push(res.data.twoSerialNumber)
|
||||
}
|
||||
if (this.xlhOrggType == 'xlh') {
|
||||
let xlhyyitlist = [];
|
||||
this.yyMXlist.forEach((it) => {
|
||||
@@ -902,6 +922,7 @@ export default {
|
||||
xlhyyitlist = it.serialNumbers;
|
||||
}
|
||||
});
|
||||
|
||||
/*
|
||||
原箱号有值,序列号=激活、激活且非冻结、非激活且非冻结=扫描成功,
|
||||
原箱号没有值,序列号=非激活且非冻结、激活且冻结=扫描成功
|
||||
@@ -991,13 +1012,15 @@ export default {
|
||||
this.dqNum = null;
|
||||
this.focusInput = 'dqNum';
|
||||
this.xlhOrggStrlist.push(this.xlhOrggType == 'xlh' ? res.data.serialNumber : res.data.specifications);
|
||||
this.confirmParams.push(res.data);
|
||||
//缓存2件装序列号
|
||||
if(res.data.isTwo==2 && this.xlhOrggType == 'xlh') {
|
||||
this.twoData.push(res.data.twoSerialNumber)
|
||||
}
|
||||
// if(res.data.isTwo==2 && this.xlhOrggType == 'xlh') {
|
||||
// this.twoData.push(res.data.twoSerialNumber)
|
||||
// console.log(this.twoData,'=this.twoData=')
|
||||
// }
|
||||
}
|
||||
this.focusInput = this.xlhOrggType == 'ggxh' ? 'dqNum' : 'xlhggxh';
|
||||
|
||||
|
||||
} else {
|
||||
this.setSMinputxlhOrggxh();
|
||||
}
|
||||
|
||||
@@ -269,7 +269,6 @@ export default {
|
||||
subStockCode: this.cwcode,
|
||||
details: []
|
||||
};
|
||||
console.log(this.dataList, '=this.dataList=');
|
||||
this.dataList.forEach((it) => {
|
||||
if (it.details && it.details.length > 0) {
|
||||
it.details.forEach((k) => {
|
||||
@@ -280,16 +279,19 @@ export default {
|
||||
qty: k.qty,
|
||||
subStockCode: k.subStockCode,
|
||||
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) {
|
||||
return false;
|
||||
}
|
||||
this.requestStatus = true;
|
||||
|
||||
this.$api.post('/BackRecord/OffShelf', formdata).then((res) => {
|
||||
if (res.status == 200) {
|
||||
uni.showToast({
|
||||
@@ -474,6 +476,7 @@ export default {
|
||||
it.subStockCode = res.data.subStockCode;
|
||||
it.boxId = it.boxId;
|
||||
it.remark = '';
|
||||
it.twoSerialNumbers = it.twoSerialNumbers ? it.twoSerialNumbers : []
|
||||
});
|
||||
this.dataList = [res.data].concat(this.dataList);
|
||||
|
||||
@@ -608,8 +611,11 @@ export default {
|
||||
this.xlhVal = res.data.serialNumber;
|
||||
// 缓存序列号
|
||||
this.xlhstrList.push(res.data.serialNumber);
|
||||
|
||||
console.log(this.dataList,'=this.dataList=')
|
||||
//缓存2件装序列号
|
||||
if(res.data.isTwo==2) {
|
||||
this.dataList[indexobj.objectIndex].details[indexobj.detailIndex].twoSerialNumbers.push(res.data.twoSerialNumber);
|
||||
this.twoData.push(res.data.twoSerialNumber)
|
||||
}
|
||||
uni.showToast({
|
||||
|
||||
@@ -408,7 +408,8 @@ export default {
|
||||
materialNumber: k.materialNumber,
|
||||
qty: parseInt(k.qty ? k.qty : 0),
|
||||
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) {
|
||||
return false;
|
||||
}
|
||||
|
||||
this.requestStatus = true;
|
||||
|
||||
// formData.details.twoSerialNumbers = formData?.details?.twoSerialNumbers?.length && formData?.details?.twoSerialNumbers?.filter(Boolean);
|
||||
this.$api.post('/BackRecord/OnShelf', formdata).then((res) => {
|
||||
if (res.status == 200) {
|
||||
uni.showToast({
|
||||
@@ -699,6 +703,7 @@ export default {
|
||||
this.xlhstrList.push(res.data.serialNumber);
|
||||
if(res.data.isTwo==2) {
|
||||
this.twoData.push(res.data.twoSerialNumber)
|
||||
this.dataList[0].details[findindx].twoSerialNumbers.push(res.data.twoSerialNumber);
|
||||
}
|
||||
uni.showToast({
|
||||
title: '获取成功',
|
||||
@@ -746,7 +751,8 @@ export default {
|
||||
materialNumber: res.data.materialNumber,
|
||||
specifications: res.data.specifications,
|
||||
materialName: res.data.materialName,
|
||||
remark: ''
|
||||
remark: '',
|
||||
twoSerialNumbers:[]
|
||||
};
|
||||
if (this.xlhOrggType == 'xlh') {
|
||||
this.dqBoxInfo.details = [];
|
||||
@@ -767,7 +773,9 @@ export default {
|
||||
materialNumber: res.data.materialNumber,
|
||||
specifications: res.data.specifications,
|
||||
materialName: res.data.materialName,
|
||||
remark: ''
|
||||
remark: '',
|
||||
twoSerialNumbers:[]
|
||||
|
||||
});
|
||||
this.itIndx = this.dataList[0].details.length - 1;
|
||||
}
|
||||
@@ -784,7 +792,9 @@ export default {
|
||||
materialNumber: res.data.materialNumber,
|
||||
specifications: res.data.specifications,
|
||||
materialName: res.data.materialName,
|
||||
remark: ''
|
||||
remark: '',
|
||||
twoSerialNumbers:[]
|
||||
|
||||
};
|
||||
this.itIndx = this.dataList[0].details.length;
|
||||
}
|
||||
@@ -796,6 +806,7 @@ export default {
|
||||
//缓存2件装序列号
|
||||
if(res.data.isTwo==2) {
|
||||
this.twoData.push(res.data.twoSerialNumber)
|
||||
this.dataList[0].details[this.itIndx].twoSerialNumbers.push(res.data.twoSerialNumber);
|
||||
}
|
||||
}
|
||||
if (this.xlhOrggType == 'ggxh') {
|
||||
@@ -883,6 +894,8 @@ export default {
|
||||
.then((res) => {
|
||||
if (res.status == 200) {
|
||||
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) {
|
||||
uni.showToast({
|
||||
title: '请扫描对应仓位内的箱号',
|
||||
@@ -1024,7 +1037,6 @@ export default {
|
||||
this.dataList[indexobj.objectIndex].details[indexobj.detailIndex].itxlhlist.push(this.xlhVal);
|
||||
} else {
|
||||
const indexsh = this.dataList.findIndex((obj) => obj.boxBillNo === res.data.boxBillNo);
|
||||
console.log(12, indexsh);
|
||||
if (indexsh !== -1) {
|
||||
const shwlidindex = this.dataList[indexsh].details.findIndex((obj) => obj.materialNumber === res.data.materialNumber);
|
||||
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="" 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
|
||||
v-model="selectValue"
|
||||
:localdata="options"
|
||||
@change="hanldeSelectChange"
|
||||
:clear="false"
|
||||
|
||||
style=""
|
||||
></uni-data-select>
|
||||
</view>
|
||||
<view style="display: flex; align-items: center;justify-content: center;">
|
||||
<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 style="width: 1rpx; height:50rpx;background-color:#E3E5E8 ;">
|
||||
|
||||
</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>
|
||||
</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>
|
||||
</view>
|
||||
|
||||
@@ -193,7 +197,7 @@
|
||||
warehouseList:[],//仓库列表数据
|
||||
inputVal:'',//input输入值
|
||||
timer:null,
|
||||
inputWidth:"470rpx",
|
||||
inputWidth:0,
|
||||
timer1:null,
|
||||
APPdevice: uni.getStorageSync('devicePixelRatio'), // 缓存设备的像素比用来区分普通安卓normalAnroid还是pda
|
||||
scanTracker: {
|
||||
@@ -207,11 +211,12 @@
|
||||
this.getElHeight(".sh_gdInfo",1)
|
||||
this.getElHeight(".mianheade",2)
|
||||
/* #ifdef H5 */
|
||||
this.inputWidth = '470rpx'
|
||||
this.inputWidth = '450rpx'
|
||||
/*#endif*/
|
||||
/*#ifdef APP-PLUS*/
|
||||
this.inputWidth = '422rpx'
|
||||
this.inputWidth = '402rpx'
|
||||
/*#endif*/
|
||||
console.log(this.inputWidth,'=this.inputWidth')
|
||||
|
||||
},
|
||||
onLoad() {
|
||||
|
||||
@@ -464,7 +464,6 @@ export default {
|
||||
this.YiJiannum = 0;
|
||||
this.YingJianum = 0;
|
||||
}
|
||||
console.log(n,'===========n===========')
|
||||
//根据出库单号检索
|
||||
this.pageNo = 1;
|
||||
this.ckSelectlist = [];
|
||||
@@ -701,7 +700,6 @@ export default {
|
||||
},
|
||||
// 一键清除出库单号
|
||||
clearnFn(val) {
|
||||
console.log('一键清除出库单号', val);
|
||||
if (val == 'ckdhselect') {
|
||||
// this.warehouseName = '';
|
||||
// this.warehouseCode = '';
|
||||
@@ -802,7 +800,7 @@ export default {
|
||||
icon: 'none',
|
||||
duration: 2000
|
||||
});
|
||||
return;
|
||||
return;
|
||||
}
|
||||
let formData = {};
|
||||
formData.taskId = this.fid;
|
||||
@@ -852,10 +850,12 @@ export default {
|
||||
materialNumber: item.materialNumber,
|
||||
boxId: item.boxId,
|
||||
serialNumbers: [],
|
||||
twoSerialNumbers:[],
|
||||
qty: 0
|
||||
};
|
||||
}
|
||||
mergedArray[key].serialNumbers.push(item.serialNumbers);
|
||||
mergedArray[key].twoSerialNumbers.push(item.twoSerialNumbers);
|
||||
mergedArray[key].qty += item.qty;
|
||||
});
|
||||
const result = Object.values(mergedArray);
|
||||
@@ -864,9 +864,11 @@ export default {
|
||||
} else {
|
||||
thedetails = boxdetails;
|
||||
}
|
||||
// 过滤为0的数据
|
||||
// 过滤为0的数
|
||||
formData.details = [];
|
||||
formData.details = thedetails.filter((it) => {
|
||||
//去掉空值
|
||||
it.twoSerialNumbers = it?.twoSerialNumbers?.filter(Boolean)
|
||||
return it.qty && it.qty > 0;
|
||||
});
|
||||
}
|
||||
@@ -875,6 +877,7 @@ export default {
|
||||
return false;
|
||||
}
|
||||
this.requestStatus = true;
|
||||
|
||||
this.$api.post('/OutStock/Save', formData).then((res) => {
|
||||
if (res.status == 200) {
|
||||
uni.showToast({
|
||||
@@ -1112,8 +1115,6 @@ export default {
|
||||
return;
|
||||
}
|
||||
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) => {
|
||||
return it.materialNumber;
|
||||
});
|
||||
@@ -1371,6 +1372,7 @@ export default {
|
||||
// 扫描序列号数据处理
|
||||
setxlhdata(res) {
|
||||
let thindx = this.dataList.findIndex((it) => it.materialNumber == res.data.materialNumber);
|
||||
|
||||
// 如果这个序列存在明细信息就缓存
|
||||
if (!this.dataList[thindx].itxlhlist && this.dataList[thindx].itxlhlist.length == 0) {
|
||||
this.dqYJnum = 0;
|
||||
@@ -1382,7 +1384,8 @@ export default {
|
||||
qty: 1,
|
||||
boxId: this.isOldOps && this.isOldboxInfo.boxsubStock ? this.isOldboxInfo.boxId : res.data.boxId,
|
||||
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].boxitNo = this.isOldOps && this.isOldboxInfo.boxsubStock ? this.isOldboxInfo.boxName : res.data.boxBillNo;
|
||||
@@ -1653,7 +1656,6 @@ export default {
|
||||
},
|
||||
//根据出库单号获取对应的下拉数据
|
||||
getCKselectlist(val) {
|
||||
console.log('1232323')
|
||||
// if (!val) return
|
||||
clearTimeout(this.timer);
|
||||
this.pagingSet = false;
|
||||
|
||||
@@ -5,7 +5,7 @@
|
||||
<view class="mianheade mianheade2" @click="goback()">
|
||||
<image src="../../static/img/n_baiback.png" class="blacBackico"></image>
|
||||
<!-- /生产 -->
|
||||
<text class="pagetitle">采购上架入库</text>
|
||||
<text class="pagetitle">采购/生产上架入库</text>
|
||||
</view>
|
||||
<!-- 固定内容-->
|
||||
<view class="sh_gdInfo">
|
||||
@@ -231,6 +231,7 @@ export default {
|
||||
qktkTitle: '确定清空已收货数量?',
|
||||
qktkContent: '清空后页面数据将不保存',
|
||||
fid: '', // 来源单号
|
||||
instockType:null,
|
||||
orgCode: '', // 组织编码
|
||||
dqboxNO: '', //用来是否保存当前输入箱号的值
|
||||
APPdevice: uni.getStorageSync('devicePixelRatio'), // 缓存设备的像素比用来区分普通安卓normalAnroid还是pda
|
||||
@@ -254,10 +255,10 @@ export default {
|
||||
if (!n) {
|
||||
this.cwselectList = [];
|
||||
this.subStockCode = null;
|
||||
this.orgCode = null;
|
||||
// this.orgCode = null;
|
||||
} else {
|
||||
this.subStockCode = null;
|
||||
this.orgCode = null;
|
||||
// this.orgCode = null;
|
||||
this.getcwList(n);
|
||||
}
|
||||
},
|
||||
@@ -273,6 +274,7 @@ export default {
|
||||
this.$refs.wselect1.inputData = '';
|
||||
this.cwselectList = [];
|
||||
this.daiboxstrList = [];
|
||||
this.orgCode="";
|
||||
this.krcwInfo = {
|
||||
materialSubStocks: [],
|
||||
materialNumber: '',
|
||||
@@ -361,12 +363,11 @@ export default {
|
||||
if (!val) return;
|
||||
clearTimeout(this.timer);
|
||||
this.timer = setTimeout(() => {
|
||||
this.$api.get('/InStockTask/GetSourceOrder/' + val).then((res) => {
|
||||
this.$api.get('/InStockTask/GetSourceOrder/' + val +"&").then((res) => {
|
||||
if (res.status == 200) {
|
||||
this.lyselectList = [];
|
||||
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) {
|
||||
this.lyOrderNo = this.lyselectList[0].sourceBillNo;
|
||||
this.$refs.wselectlydd.filterList = res.data;
|
||||
@@ -383,6 +384,7 @@ export default {
|
||||
this.$refs.wselectlydd.optionsShow = false;
|
||||
this.$refs.wselectlydd.isShow = false;
|
||||
}
|
||||
// console.log(this.instockType,'=this.instockType=')
|
||||
}
|
||||
});
|
||||
}, 1000);
|
||||
@@ -392,13 +394,18 @@ export default {
|
||||
if (!this.lyOrderNo) {
|
||||
return;
|
||||
}
|
||||
console.log(1111111111111,'=============')
|
||||
// console.log(e,'===============>>>')
|
||||
this.setItemdata(e);
|
||||
},
|
||||
// 选中的来源订单号相关物料
|
||||
setItemdata(e) {
|
||||
console.log(e,'==============e==============')
|
||||
this.lyorderId = e.id;
|
||||
this.detailsId = e.detailsId;
|
||||
this.customerCode = e.customerCode;
|
||||
this.instockType = e.instockType;
|
||||
this.orgCode =e.orgCode;
|
||||
// 仓库名称
|
||||
this.warehouseName = e.stockName;
|
||||
this.warehouseCode = e.stockCode;
|
||||
@@ -461,6 +468,7 @@ export default {
|
||||
orgCode: this.orgCode,
|
||||
stockCode: this.warehouseCode,
|
||||
subStockCode: this.subStockCode,
|
||||
instockType:this.instockType,
|
||||
details: thedetails
|
||||
})
|
||||
.then((res) => {
|
||||
@@ -565,7 +573,8 @@ export default {
|
||||
this.$api
|
||||
.get('/SysConfig/GetSubUcStockByName', {
|
||||
name: val,
|
||||
stockCode: this.warehouseCode
|
||||
stockCode: this.warehouseCode,
|
||||
orgCode:this.orgCode,
|
||||
})
|
||||
.then((res) => {
|
||||
if (res.status == 200) {
|
||||
@@ -581,8 +590,10 @@ export default {
|
||||
},
|
||||
// 仓位下拉选择
|
||||
cwchange(e, type) {
|
||||
console.log(e,'=====================>')
|
||||
console.log(this.instockType,'===============>')
|
||||
this.subStockCode = e.code;
|
||||
this.orgCode = e.erpOrgCode;
|
||||
// this.orgCode = e.erpOrgCode;
|
||||
},
|
||||
// 輸入失去焦點
|
||||
inputblur(val, type) {
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
</view>
|
||||
<view class="item" @click="otherPage(2)">
|
||||
<image src="../../static/img/rk_fcgsjico.png" class="rkico"></image>
|
||||
<text class="t1">采购上架</text>
|
||||
<text class="t1">采购/生产上架</text>
|
||||
</view>
|
||||
<view class="item" @click="otherPage(3)">
|
||||
<image src="../../static/img/rk_cgsjico.png" class="rkico"></image>
|
||||
|
||||
@@ -419,17 +419,17 @@ export default {
|
||||
}
|
||||
let dataForm = {};
|
||||
let details = [];
|
||||
console.log(this.dataList);
|
||||
console.log(this.dataList,);
|
||||
details = this.dataList.map((it) => {
|
||||
return {
|
||||
qty: it.qty,
|
||||
supplierId: it.supplierId,
|
||||
materialNumber: it.materialNumber,
|
||||
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 == '按产品上架') {
|
||||
this.boxs[0].details = details;
|
||||
}
|
||||
@@ -441,7 +441,7 @@ export default {
|
||||
subStockCode: this.subStockCode,
|
||||
boxs: this.boxs
|
||||
};
|
||||
console.log('dataForm', dataForm);
|
||||
console.log('提交数据===dataForm===', dataForm);
|
||||
// 节流
|
||||
if (this.requestStatus) {
|
||||
return false;
|
||||
@@ -480,6 +480,7 @@ export default {
|
||||
this.dataList.forEach((it) => {
|
||||
it.qty = 0;
|
||||
it.xlhList = [];
|
||||
it.twoSerialNumbers=[]
|
||||
});
|
||||
this.qktkshow = false;
|
||||
this.focusInput = '';
|
||||
@@ -783,10 +784,6 @@ export default {
|
||||
}
|
||||
|
||||
this.focusInput = '';
|
||||
|
||||
|
||||
|
||||
console.log('序列號', this.xlhVal);
|
||||
this.$api
|
||||
.get('/SysConfig/GetMaterial', {
|
||||
serialNumber: this.xlhVal,
|
||||
@@ -844,13 +841,16 @@ export default {
|
||||
});
|
||||
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);
|
||||
//缓存2件装序列号
|
||||
if(res.data.isTwo==2) {
|
||||
this.twoData.push(res.data.twoSerialNumber)
|
||||
}
|
||||
|
||||
//保留当前输入的数据
|
||||
this.dqboxXlh = res.data.serialNumber;
|
||||
this.xlhVal = res.data.serialNumber;
|
||||
@@ -874,6 +874,7 @@ export default {
|
||||
list.forEach((it) => {
|
||||
it.qty = 0;
|
||||
it.xlhList = [];
|
||||
it.twoSerialNumbers=[]
|
||||
});
|
||||
}
|
||||
console.log('根据序列号的时候明细数据结构', list);
|
||||
@@ -895,8 +896,8 @@ export default {
|
||||
let objArray = [];
|
||||
objArray = list;
|
||||
let newObjArray = objArray.map((obj) => {
|
||||
obj.zQty = JSON.parse(JSON.stringify(obj.qty)); // 修改 name 属性,这里是在姓名后加上 ' Smith'
|
||||
obj.qty = 0; // 添加 age 属性,这里设定年龄为 30
|
||||
obj.zQty = JSON.parse(JSON.stringify(obj.qty));
|
||||
obj.qty = 0;
|
||||
return obj;
|
||||
});
|
||||
return objArray;
|
||||
@@ -919,15 +920,6 @@ export default {
|
||||
this.heights.body = this.heights.body - 36;
|
||||
this.heights = this.$util.setlistHeight('.sh_gdInfo', '.footbts');
|
||||
}, 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();
|
||||
},
|
||||
// 获取仓位下拉数据
|
||||
@@ -942,14 +934,6 @@ export default {
|
||||
.then((res) => {
|
||||
if (res.status == 200) {
|
||||
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;
|
||||
// }
|
||||
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -1,5 +1,5 @@
|
||||
const BaseApi = 'https://api.wms.test.f2b211.com/api' //测试
|
||||
//const BaseApi = 'https://wmsapi.f2b211.com/api' // 正式
|
||||
//const BaseApi = 'https://api.wms.test.f2b211.com/api' //测试
|
||||
const BaseApi = 'https://wmsapi.f2b211.com/api' // 正式
|
||||
export {
|
||||
BaseApi
|
||||
}
|
||||
@@ -215,10 +215,14 @@ function subtractQty(mxArray, boxArray) {
|
||||
return result;
|
||||
}
|
||||
//按照产品分配序列号
|
||||
function scanAndAllocate(arr, materialNumber, serialNumber) {
|
||||
function scanAndAllocate(arr, materialNumber, serialNumber,twoSerialNumber) {
|
||||
console.log(twoSerialNumber,'=twoSerialNumber=')
|
||||
// 遍历数组,按顺序分配序列号
|
||||
for (const item of arr) {
|
||||
if (item.materialNumber === materialNumber) {
|
||||
if(twoSerialNumber) {
|
||||
item.twoSerialNumbers.push(twoSerialNumber)
|
||||
}
|
||||
if (item.xlhList.length == 0) {
|
||||
item.xlhList.push(serialNumber)
|
||||
item.qty = item.xlhList.length
|
||||
@@ -233,6 +237,7 @@ function scanAndAllocate(arr, materialNumber, serialNumber) {
|
||||
break
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
return arr
|
||||
|
||||
@@ -1,3 +1,7 @@
|
||||
## 1.0.10(2025-04-14)
|
||||
- 修复 清除按钮不展示问题
|
||||
## 1.0.9(2025-03-26)
|
||||
- 优化 默认背景为白色与整体组件保持风格统一
|
||||
## 1.0.8(2024-03-28)
|
||||
- 修复 在vue2下:style动态绑定导致编译失败的bug
|
||||
## 1.0.7(2024-01-20)
|
||||
|
||||
@@ -6,10 +6,10 @@
|
||||
<view class="uni-select__input-box" @click="toggleSelector">
|
||||
<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-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" />
|
||||
</view>
|
||||
<view v-else>
|
||||
<view key="arrow-button" v-else>
|
||||
<uni-icons :type="showSelector? 'top' : 'bottom'" size="14" color="#999" />
|
||||
</view>
|
||||
</view>
|
||||
@@ -143,9 +143,6 @@
|
||||
textShow() {
|
||||
// 长文本显示
|
||||
let text = this.current;
|
||||
if (text.length > 10) {
|
||||
return text.slice(0, 25) + '...';
|
||||
}
|
||||
return text;
|
||||
},
|
||||
getOffsetByPlacement() {
|
||||
@@ -244,6 +241,7 @@
|
||||
|
||||
clearVal() {
|
||||
this.emit('')
|
||||
this.current = ''
|
||||
if (this.collection) {
|
||||
this.removeCache()
|
||||
}
|
||||
@@ -352,6 +350,7 @@
|
||||
}
|
||||
|
||||
.uni-stat-box {
|
||||
background-color: #fff;
|
||||
width: 100%;
|
||||
flex: 1;
|
||||
}
|
||||
@@ -405,6 +404,7 @@
|
||||
|
||||
.uni-select__input-box {
|
||||
height: 35px;
|
||||
width: 0px;
|
||||
position: relative;
|
||||
/* #ifndef APP-NVUE */
|
||||
display: flex;
|
||||
@@ -433,6 +433,9 @@
|
||||
position: absolute;
|
||||
left: 0;
|
||||
width: 100%;
|
||||
min-width: 200rpx;
|
||||
display: flex;
|
||||
flex-wrap: nowrap;
|
||||
background-color: #FFFFFF;
|
||||
border: 1px solid #EBEEF5;
|
||||
border-radius: 6px;
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
{
|
||||
"id": "uni-data-select",
|
||||
"displayName": "uni-data-select 下拉框选择器",
|
||||
"version": "1.0.8",
|
||||
"version": "1.0.10",
|
||||
"description": "通过数据驱动的下拉框选择器",
|
||||
"keywords": [
|
||||
"uni-ui",
|
||||
@@ -48,8 +48,10 @@
|
||||
},
|
||||
"client": {
|
||||
"App": {
|
||||
"app-vue": "u",
|
||||
"app-nvue": "n"
|
||||
"app-vue": "y",
|
||||
"app-nvue": "n",
|
||||
"app-harmony": "u",
|
||||
"app-uvue": "u"
|
||||
},
|
||||
"H5-mobile": {
|
||||
"Safari": "y",
|
||||
|
||||
Reference in New Issue
Block a user