|
@@ -516,11 +516,39 @@
|
|
|
this.dataList.taskTypeKey=localStorage.getItem("taskTypeKey")
|
|
|
this.dataList1.taskTypeKey=localStorage.getItem("taskTypeKey")
|
|
|
if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
|
|
|
- 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")
|
|
|
+ }
|
|
|
+ getstaff({compId: localStorage.getItem('ws-pf_compId'),warehouseId: this.dataList.warehouseId})
|
|
|
+ .toPromise()
|
|
|
+ .then(response => {
|
|
|
+ this.options = response
|
|
|
+ this.staffList = response
|
|
|
+ // this.agent = response
|
|
|
+ })
|
|
|
this.dataList.contractNo=localStorage.getItem("contractNo")
|
|
|
+ if(this.dataList.taskTypeKey==3){
|
|
|
+ this.dataList.moveTaskNo=localStorage.getItem("contractNo")
|
|
|
+ this.dataList1.moveTaskNo=localStorage.getItem("contractNo")
|
|
|
+ }
|
|
|
}
|
|
|
else if(this.dataList.taskTypeKey==2||this.dataList.taskTypeKey==4){
|
|
|
- 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")
|
|
|
+ }
|
|
|
+ getstaff({compId: localStorage.getItem('ws-pf_compId'),warehouseId: this.dataList.warehouseId})
|
|
|
+ .toPromise()
|
|
|
+ .then(response => {
|
|
|
+ this.options = response
|
|
|
+ this.staffList = response
|
|
|
+ // this.agent = response
|
|
|
+ })
|
|
|
this.dataList1.contractNo=localStorage.getItem("contractNo")
|
|
|
}
|
|
|
}
|
|
@@ -566,8 +594,13 @@
|
|
|
if(this.dataList.taskTypeKey==1||this.dataList.taskTypeKey==3){
|
|
|
if(this.dataList.warehouseName){
|
|
|
localStorage.setItem("warehouse",this.dataList.warehouseName);
|
|
|
- localStorage.setItem("contractNo",this.dataList.contractNo);
|
|
|
+ if(this.dataList.taskTypeKey==3){
|
|
|
+ localStorage.setItem("contractNo",this.dataList.moveTaskNo);
|
|
|
+ }else{
|
|
|
+ localStorage.setItem("contractNo",this.dataList.contractNo);
|
|
|
+ }
|
|
|
localStorage.setItem("taskTypeKey",this.dataList.taskTypeKey);
|
|
|
+ localStorage.setItem("warehouseId",this.baseId);
|
|
|
this.$router.push({name:'supplyofgoods',query:{baseId:this.baseId}})
|
|
|
}else{
|
|
|
this.$message({
|
|
@@ -580,6 +613,7 @@
|
|
|
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}})
|
|
|
}else{
|
|
|
this.$message({
|
|
@@ -1197,6 +1231,7 @@
|
|
|
})
|
|
|
return
|
|
|
}
|
|
|
+ this.dataList.contractNo=''
|
|
|
this.dataList1.contractNo=''
|
|
|
if (!this.dataList1.moveTaskNo) {
|
|
|
this.$message({
|
|
@@ -1663,19 +1698,32 @@
|
|
|
},
|
|
|
getList() {
|
|
|
this.tasknumber()
|
|
|
- if(localStorage.getItem("supplygoods1")){
|
|
|
- if(this.dataList.taskTypeKey == 1){
|
|
|
+ if(localStorage.getItem("taskTypeKey")){
|
|
|
+ if(localStorage.getItem("taskTypeKey") == 1){
|
|
|
this.$set(this.dataList, 'inOutType', '销售出库')
|
|
|
this.$set(this.dataList, 'inOutTypeKey', '1')
|
|
|
this.$set(this.dataList, 'goodsName', '玉米')
|
|
|
this.$set(this.dataList, 'goodsNameKey', '1')
|
|
|
- this.$set(this.dataList, 'grade', '一等品')
|
|
|
- this.$set(this.dataList, 'gradeKey', '1')
|
|
|
this.$set(this.dataList1, 'goodsName', '玉米')
|
|
|
this.$set(this.dataList1, 'goodsNameKey', '1')
|
|
|
- this.$set(this.dataList1, 'grade', '一等品')
|
|
|
- this.$set(this.dataList1, 'gradeKey', '1')
|
|
|
+ }else if(localStorage.getItem("taskTypeKey") == 2){
|
|
|
+ this.$set(this.dataList1, 'inOutType', '采购入库')
|
|
|
+ this.$set(this.dataList1, 'inOutTypeKey', '2')
|
|
|
+ }else if(localStorage.getItem("taskTypeKey") == 3){
|
|
|
+ this.$set(this.dataList, 'inOutType', '移库出库')
|
|
|
+ this.$set(this.dataList, 'inOutTypeKey', '3')
|
|
|
+ this.$set(this.dataList1, 'inOutType', '移库入库')
|
|
|
+ this.$set(this.dataList1, 'inOutTypeKey', '3')
|
|
|
+ }else if(localStorage.getItem("taskTypeKey") == 4){
|
|
|
+ this.$set(this.dataList, 'inOutType', '销售出库')
|
|
|
+ this.$set(this.dataList, 'inOutTypeKey', '4')
|
|
|
+ this.$set(this.dataList1, 'inOutType', '退库')
|
|
|
+ this.$set(this.dataList1, 'inOutTypeKey', '4')
|
|
|
}
|
|
|
+ this.$set(this.dataList, 'grade', '一等品')
|
|
|
+ this.$set(this.dataList, 'gradeKey', '1')
|
|
|
+ this.$set(this.dataList1, 'grade', '一等品')
|
|
|
+ this.$set(this.dataList1, 'gradeKey', '1')
|
|
|
}else{
|
|
|
this.$set(this.dataList, 'inOutType', '销售出库')
|
|
|
this.$set(this.dataList, 'inOutTypeKey', '1')
|