|
@@ -519,15 +519,15 @@
|
|
this.sourceId=''
|
|
this.sourceId=''
|
|
this.dataList.weight=0
|
|
this.dataList.weight=0
|
|
this.dataList1.weight=0
|
|
this.dataList1.weight=0
|
|
- if(localStorage.getItem("taskTypeKey")){
|
|
|
|
- this.dataList.taskTypeKey=localStorage.getItem("taskTypeKey")
|
|
|
|
- this.dataList1.taskTypeKey=localStorage.getItem("taskTypeKey")
|
|
|
|
|
|
+ if(localStorage.getItem('taskTypeKey')){
|
|
|
|
+ this.dataList.taskTypeKey=localStorage.getItem('taskTypeKey')
|
|
|
|
+ this.dataList1.taskTypeKey=localStorage.getItem('taskTypeKey')
|
|
if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
|
|
if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
|
|
- if(localStorage.getItem("warehouse")){
|
|
|
|
- this.dataList.warehouseName=localStorage.getItem("warehouse")
|
|
|
|
|
|
+ if(localStorage.getItem('warehouse')){
|
|
|
|
+ this.dataList.warehouseName=localStorage.getItem('warehouse')
|
|
}
|
|
}
|
|
- if(localStorage.getItem("warehouseId")){
|
|
|
|
- this.baseId=localStorage.getItem("warehouseId")
|
|
|
|
|
|
+ if(localStorage.getItem('warehouseId')){
|
|
|
|
+ this.baseId=localStorage.getItem('warehouseId')
|
|
}
|
|
}
|
|
getstaff({compId: localStorage.getItem('ws-pf_compId'),warehouseId: this.dataList.warehouseId})
|
|
getstaff({compId: localStorage.getItem('ws-pf_compId'),warehouseId: this.dataList.warehouseId})
|
|
.toPromise()
|
|
.toPromise()
|
|
@@ -536,18 +536,18 @@
|
|
this.staffList = response
|
|
this.staffList = response
|
|
// this.agent = response
|
|
// this.agent = response
|
|
})
|
|
})
|
|
- this.dataList.contractNo=localStorage.getItem("contractNo")
|
|
|
|
|
|
+ this.dataList.contractNo=localStorage.getItem('contractNo')
|
|
if(this.dataList.taskTypeKey==3){
|
|
if(this.dataList.taskTypeKey==3){
|
|
- this.dataList.moveTaskNo=localStorage.getItem("contractNo")
|
|
|
|
- this.dataList1.moveTaskNo=localStorage.getItem("contractNo")
|
|
|
|
|
|
+ this.dataList.moveTaskNo=localStorage.getItem('contractNo')
|
|
|
|
+ this.dataList1.moveTaskNo=localStorage.getItem('contractNo')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
else if(this.dataList.taskTypeKey==2||this.dataList.taskTypeKey==4){
|
|
else if(this.dataList.taskTypeKey==2||this.dataList.taskTypeKey==4){
|
|
- if(localStorage.getItem("warehouse")){
|
|
|
|
- this.dataList1.warehouseName=localStorage.getItem("warehouse")
|
|
|
|
|
|
+ if(localStorage.getItem('warehouse')){
|
|
|
|
+ this.dataList1.warehouseName=localStorage.getItem('warehouse')
|
|
}
|
|
}
|
|
- if(localStorage.getItem("warehouseId")){
|
|
|
|
- this.baseId=localStorage.getItem("warehouseId")
|
|
|
|
|
|
+ if(localStorage.getItem('warehouseId')){
|
|
|
|
+ this.baseId=localStorage.getItem('warehouseId')
|
|
}
|
|
}
|
|
getstaff({compId: localStorage.getItem('ws-pf_compId'),warehouseId: this.dataList.warehouseId})
|
|
getstaff({compId: localStorage.getItem('ws-pf_compId'),warehouseId: this.dataList.warehouseId})
|
|
.toPromise()
|
|
.toPromise()
|
|
@@ -556,15 +556,15 @@
|
|
this.staffList = response
|
|
this.staffList = response
|
|
// this.agent = response
|
|
// this.agent = response
|
|
})
|
|
})
|
|
- this.dataList1.contractNo=localStorage.getItem("contractNo")
|
|
|
|
|
|
+ this.dataList1.contractNo=localStorage.getItem('contractNo')
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- if(localStorage.getItem("supplygoods1")){
|
|
|
|
- if(this.dataList1.taskTypeKey==2&&this.dataList1.inOutType=="退库"||this.dataList.taskTypeKey==4){
|
|
|
|
- var supplygoods=JSON.parse(localStorage.getItem("supplygoods1"))
|
|
|
|
|
|
+ if(localStorage.getItem('supplygoods1')){
|
|
|
|
+ if(this.dataList1.taskTypeKey==2&&this.dataList1.inOutType=='退库'||this.dataList.taskTypeKey==4){
|
|
|
|
+ var supplygoods=JSON.parse(localStorage.getItem('supplygoods1'))
|
|
for (let i = 0; i < supplygoods.length; i++) {
|
|
for (let i = 0; i < supplygoods.length; i++) {
|
|
if(supplygoods[i].sourceRelationInfoList){
|
|
if(supplygoods[i].sourceRelationInfoList){
|
|
- if(localStorage.getItem("supplygoodsstatus")&&localStorage.getItem("supplygoodsstatus")==1){
|
|
|
|
|
|
+ if(localStorage.getItem('supplygoodsstatus')&&localStorage.getItem('supplygoodsstatus')==1){
|
|
for (let q = 0; q < supplygoods[i].sourceRelationInfoList.length; q++) {
|
|
for (let q = 0; q < supplygoods[i].sourceRelationInfoList.length; q++) {
|
|
|
|
|
|
if(this.goods.indexOf(supplygoods[i].sourceRelationInfoList[q].goodsName)==-1){
|
|
if(this.goods.indexOf(supplygoods[i].sourceRelationInfoList[q].goodsName)==-1){
|
|
@@ -578,8 +578,8 @@
|
|
console.log(this.goods)
|
|
console.log(this.goods)
|
|
}
|
|
}
|
|
}else if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
|
|
}else if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
|
|
- var supplygoods=JSON.parse(localStorage.getItem("supplygoods1"))
|
|
|
|
- if(localStorage.getItem("supplygoodsstatus")&&localStorage.getItem("supplygoodsstatus")==0){
|
|
|
|
|
|
+ var supplygoods=JSON.parse(localStorage.getItem('supplygoods1'))
|
|
|
|
+ if(localStorage.getItem('supplygoodsstatus')&&localStorage.getItem('supplygoodsstatus')==0){
|
|
for (let i = 0; i < supplygoods.length; i++) {
|
|
for (let i = 0; i < supplygoods.length; i++) {
|
|
this.goods=this.goods!=''?this.goods+',':''+supplygoods[i].goodsName
|
|
this.goods=this.goods!=''?this.goods+',':''+supplygoods[i].goodsName
|
|
this.dataList1.weight=Number(this.dataList1.weight)+Number(supplygoods[i].estimateOutWarehouseWeight)
|
|
this.dataList1.weight=Number(this.dataList1.weight)+Number(supplygoods[i].estimateOutWarehouseWeight)
|
|
@@ -600,14 +600,14 @@
|
|
supplygoods(){
|
|
supplygoods(){
|
|
if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
|
|
if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
|
|
if(this.dataList.warehouseName){
|
|
if(this.dataList.warehouseName){
|
|
- localStorage.setItem("warehouse",this.dataList.warehouseName);
|
|
|
|
|
|
+ localStorage.setItem('warehouse',this.dataList.warehouseName);
|
|
if(this.dataList.taskTypeKey==3){
|
|
if(this.dataList.taskTypeKey==3){
|
|
- localStorage.setItem("contractNo",this.dataList.moveTaskNo);
|
|
|
|
|
|
+ localStorage.setItem('contractNo',this.dataList.moveTaskNo);
|
|
}else{
|
|
}else{
|
|
- localStorage.setItem("contractNo",this.dataList.contractNo);
|
|
|
|
|
|
+ localStorage.setItem('contractNo',this.dataList.contractNo);
|
|
}
|
|
}
|
|
- localStorage.setItem("taskTypeKey",this.dataList.taskTypeKey);
|
|
|
|
- localStorage.setItem("warehouseId",this.baseId);
|
|
|
|
|
|
+ localStorage.setItem('taskTypeKey',this.dataList.taskTypeKey);
|
|
|
|
+ localStorage.setItem('warehouseId',this.baseId);
|
|
this.$router.push({name:'supplyofgoods',query:{baseId:this.baseId}})
|
|
this.$router.push({name:'supplyofgoods',query:{baseId:this.baseId}})
|
|
}else{
|
|
}else{
|
|
this.$message({
|
|
this.$message({
|
|
@@ -615,12 +615,12 @@
|
|
type: 'warning'
|
|
type: 'warning'
|
|
});
|
|
});
|
|
}
|
|
}
|
|
- }else if(this.dataList1.taskTypeKey==2&&this.dataList1.inOutType=="退库"||this.dataList1.taskTypeKey==4){
|
|
|
|
|
|
+ }else if(this.dataList1.taskTypeKey==2&&this.dataList1.inOutType=='退库'||this.dataList1.taskTypeKey==4){
|
|
if(this.dataList1.moveTaskNo||this.dataList1.contractNo){
|
|
if(this.dataList1.moveTaskNo||this.dataList1.contractNo){
|
|
- localStorage.setItem("warehouse",this.dataList1.warehouseName);
|
|
|
|
- localStorage.setItem("contractNo",this.dataList1.contractNo);
|
|
|
|
- localStorage.setItem("taskTypeKey",this.dataList1.taskTypeKey);
|
|
|
|
- localStorage.setItem("warehouseId",this.baseId);
|
|
|
|
|
|
+ localStorage.setItem('warehouse',this.dataList1.warehouseName);
|
|
|
|
+ localStorage.setItem('contractNo',this.dataList1.contractNo);
|
|
|
|
+ localStorage.setItem('taskTypeKey',this.dataList1.taskTypeKey);
|
|
|
|
+ localStorage.setItem('warehouseId',this.baseId);
|
|
this.$router.push({name:'outsupplyofgoods',query:{contractNo:this.dataList1.contractNo,taskTypeKey:this.dataList1.taskTypeKey}})
|
|
this.$router.push({name:'outsupplyofgoods',query:{contractNo:this.dataList1.contractNo,taskTypeKey:this.dataList1.taskTypeKey}})
|
|
}else{
|
|
}else{
|
|
this.$message({
|
|
this.$message({
|
|
@@ -872,7 +872,7 @@
|
|
this.$set(this.dataList1, 'gradeKey', response.gradeKey)
|
|
this.$set(this.dataList1, 'gradeKey', response.gradeKey)
|
|
this.$set(this.dataList1, 'waterContent', response.waterContent)
|
|
this.$set(this.dataList1, 'waterContent', response.waterContent)
|
|
this.$set(this.dataList1, 'bulkDensity', response.bulkDensity)
|
|
this.$set(this.dataList1, 'bulkDensity', response.bulkDensity)
|
|
- if(this.dataList1.taskTypeKey==2&&this.dataList1.inOutType=="退库"){
|
|
|
|
|
|
+ if(this.dataList1.taskTypeKey==2&&this.dataList1.inOutType=='退库'){
|
|
this.goods=''
|
|
this.goods=''
|
|
this.dataList1.weight=0
|
|
this.dataList1.weight=0
|
|
}else{
|
|
}else{
|
|
@@ -1491,21 +1491,22 @@
|
|
return
|
|
return
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- localStorage.removeItem("warehouse")
|
|
|
|
- localStorage.removeItem("contractNo");
|
|
|
|
- localStorage.removeItem("taskTypeKey");
|
|
|
|
|
|
+ localStorage.removeItem('warehouse')
|
|
|
|
+ localStorage.removeItem('contractNo');
|
|
|
|
+ localStorage.removeItem('taskTypeKey');
|
|
// this.dataList.goodsNameKey =
|
|
// this.dataList.goodsNameKey =
|
|
// this.dataList.positionId =
|
|
// this.dataList.positionId =
|
|
// this.dataList.baseId =
|
|
// this.dataList.baseId =
|
|
this.dataList.inOutFlag = 1
|
|
this.dataList.inOutFlag = 1
|
|
this.dataList1.inOutFlag = 2
|
|
this.dataList1.inOutFlag = 2
|
|
- var data=JSON.parse(localStorage.getItem("supplygoods"))
|
|
|
|
|
|
+ var data=JSON.parse(localStorage.getItem('supplygoods'))
|
|
if(data){
|
|
if(data){
|
|
for (let i = 0; i < data.length; i++) {
|
|
for (let i = 0; i < data.length; i++) {
|
|
data[i].sourceId=data[i].id
|
|
data[i].sourceId=data[i].id
|
|
}
|
|
}
|
|
}else{
|
|
}else{
|
|
- if(this.dataList.taskTypeKey == 1||this.dataList.taskTypeKey == 3||this.dataList.taskTypeKey == 4||this.dataList1.taskTypeKey == 2&&this.dataList1.inOutType){
|
|
|
|
|
|
+ // ||this.dataList1.taskTypeKey == 2&&this.dataList1.inOutType
|
|
|
|
+ if(this.dataList.taskTypeKey == 1||this.dataList.taskTypeKey == 3||this.dataList.taskTypeKey == 4){
|
|
this.$message({
|
|
this.$message({
|
|
message: '请选择货源!',
|
|
message: '请选择货源!',
|
|
type: 'warning'
|
|
type: 'warning'
|
|
@@ -1705,23 +1706,23 @@
|
|
},
|
|
},
|
|
getList() {
|
|
getList() {
|
|
this.tasknumber()
|
|
this.tasknumber()
|
|
- if(localStorage.getItem("taskTypeKey")){
|
|
|
|
- if(localStorage.getItem("taskTypeKey") == 1){
|
|
|
|
|
|
+ if(localStorage.getItem('taskTypeKey')){
|
|
|
|
+ if(localStorage.getItem('taskTypeKey') == 1){
|
|
this.$set(this.dataList, 'inOutType', '销售出库')
|
|
this.$set(this.dataList, 'inOutType', '销售出库')
|
|
this.$set(this.dataList, 'inOutTypeKey', '1')
|
|
this.$set(this.dataList, 'inOutTypeKey', '1')
|
|
this.$set(this.dataList, 'goodsName', '玉米')
|
|
this.$set(this.dataList, 'goodsName', '玉米')
|
|
this.$set(this.dataList, 'goodsNameKey', '1')
|
|
this.$set(this.dataList, 'goodsNameKey', '1')
|
|
this.$set(this.dataList1, 'goodsName', '玉米')
|
|
this.$set(this.dataList1, 'goodsName', '玉米')
|
|
this.$set(this.dataList1, 'goodsNameKey', '1')
|
|
this.$set(this.dataList1, 'goodsNameKey', '1')
|
|
- }else if(localStorage.getItem("taskTypeKey") == 2){
|
|
|
|
|
|
+ }else if(localStorage.getItem('taskTypeKey') == 2){
|
|
this.$set(this.dataList1, 'inOutType', '采购入库')
|
|
this.$set(this.dataList1, 'inOutType', '采购入库')
|
|
this.$set(this.dataList1, 'inOutTypeKey', '2')
|
|
this.$set(this.dataList1, 'inOutTypeKey', '2')
|
|
- }else if(localStorage.getItem("taskTypeKey") == 3){
|
|
|
|
|
|
+ }else if(localStorage.getItem('taskTypeKey') == 3){
|
|
this.$set(this.dataList, 'inOutType', '移库出库')
|
|
this.$set(this.dataList, 'inOutType', '移库出库')
|
|
this.$set(this.dataList, 'inOutTypeKey', '3')
|
|
this.$set(this.dataList, 'inOutTypeKey', '3')
|
|
this.$set(this.dataList1, 'inOutType', '移库入库')
|
|
this.$set(this.dataList1, 'inOutType', '移库入库')
|
|
this.$set(this.dataList1, 'inOutTypeKey', '3')
|
|
this.$set(this.dataList1, 'inOutTypeKey', '3')
|
|
- }else if(localStorage.getItem("taskTypeKey") == 4){
|
|
|
|
|
|
+ }else if(localStorage.getItem('taskTypeKey') == 4){
|
|
this.$set(this.dataList, 'inOutType', '销售出库')
|
|
this.$set(this.dataList, 'inOutType', '销售出库')
|
|
this.$set(this.dataList, 'inOutTypeKey', '4')
|
|
this.$set(this.dataList, 'inOutTypeKey', '4')
|
|
this.$set(this.dataList1, 'inOutType', '退库')
|
|
this.$set(this.dataList1, 'inOutType', '退库')
|