浏览代码

Merge branch 'master' of http://git.zthymaoyi.com/gdc/yiliangyiyun-pc

gjy 4 年之前
父节点
当前提交
81c4de7be7

+ 2 - 0
src/views/taskManagement/tranManagementTransportAdd.vue

@@ -392,6 +392,7 @@ export default {
   data() {
     let self = this
     return {
+      flag:2,
       checkList: [],
       deptBudgetList: {
         taskNo: '',
@@ -566,6 +567,7 @@ export default {
         })
       xialaNo({
         compId: this.compId,
+        flag: this.flag
       })
         .toPromise()
         .then((response) => {

+ 40 - 1
src/views/taskManagement/tranManagementWarehouseInOutTaskAdd.vue

@@ -294,7 +294,7 @@
               class="typeselect"
             >
               <el-option
-                v-for="item in contractNoList"
+                v-for="item in contractNoList1"
                 :key="item.constKey"
                 :label="item.contractNo"
                 :value="item.contractNo"
@@ -684,12 +684,31 @@ export default {
     isShow(val) {
       this.showType = val
     },
+    flag(val){
+      xialaNo({
+        compId: this.compId,
+        flag: val
+      })
+        .toPromise()
+        .then((response) => {
+          if(this.dataList1.taskTypeKey == 2 || this.dataList1.taskTypeKey == 4){
+              this.contractNoList1 = response
+              if(this.dataList1.taskTypeKey == 2){
+                this.contractNoList = response
+              }
+          }
+          else{
+              this.contractNoList = response
+          }
+        })
+    }
   },
   computed: {
     ...mapGetters(['deptBudgetList']),
   },
   data() {
     return {
+      flag:1,
       //弹出框
       dialogViewSpareMoney: false,
       dialogApproveFormVisible: false,
@@ -703,6 +722,7 @@ export default {
       // 年
       year: '',
       contractNoList: [],
+      contractNoList1: [],
       deptBudgetTotal: 0,
       readonly: true,
       currentPage: 1,
@@ -995,6 +1015,10 @@ export default {
       }
     },
     selectstorageType(e) {
+      switch(e){
+        case "采购出库": this.flag = 0;break
+        case "销售出库": this.flag = 1;break
+      }
       for (var i = 0; i < this.storageType.length; i++) {
         if (this.storageType[i].constValue == e) {
           this.dataList.inOutTypeKey = this.storageType[i].constKey
@@ -1002,6 +1026,10 @@ export default {
       }
     },
     selectstorageType1(e) {
+      switch(e){
+        case "采购入库": this.flag = 0;break
+        case "退库": this.flag = 2;break
+      }
       for (var i = 0; i < this.storageType1.length; i++) {
         if (this.storageType1[i].constValue == e) {
           this.dataList1.inOutTypeKey = this.storageType1[i].constKey
@@ -1047,10 +1075,12 @@ export default {
       if(this.dataList.taskTypeKey==1){
         this.dataList.inOutType='销售出库'
         this.dataList.inOutTypeKey='1'
+        this.flag = 1
       }
       if(this.dataList1.taskTypeKey==2){
         this.dataList1.inOutType='采购入库'
         this.dataList1.inOutTypeKey='1'
+        this.flag = 0
       }
       else if(this.dataList1.taskTypeKey==3){
         this.disabled=true
@@ -1063,6 +1093,7 @@ export default {
         this.dataList1.inOutType='退库'
         this.dataList1.inOutTypeKey='6'
         this.dataList.inOutType='销售出库'
+        this.flag = 2
         this.dataList.inOutTypeKey='1'
       }
     },
@@ -1096,6 +1127,12 @@ export default {
         this.$set(this.dataList1,'grade','一等品')
         this.$set(this.dataList1,'gradeKey','1')
       }
+      switch(this.dataList.inOutType){
+        case "采购出库": this.flag = 0;break
+        case "采购入库": this.flag = 0;break
+        case "销售出库": this.flag = 1;break
+        case "退库": this.flag = 2;break
+      }
       
       // 货名
       pullDown({ constId: 'CON2' })
@@ -1121,10 +1158,12 @@ export default {
         })
       xialaNo({
         compId: this.compId,
+        flag: this.flag
       })
         .toPromise()
         .then((response) => {
           this.contractNoList = response
+          // this.contractNoList1 = response
         })
       // //临时仓库入库类型
       // pullDown({ constId: 'WARE1' })