多组织仓位
This commit is contained in:
@@ -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
Reference in New Issue
Block a user