Jelajahi Sumber

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

gjy 2 tahun lalu
induk
melakukan
40fd98310e

+ 55 - 46
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -1,4 +1,4 @@
-<!-- <!--收购管理新增-->
+<!-- 收购管理新增-->
 <template>
   <el-container class="container">
     <!-- <div class="type">{{type}}</div> -->
@@ -11,8 +11,8 @@
         <el-row class="base-info">
           <el-col :span="2" style="line-height: 32px;">基本信息</el-col>
           <el-col :span="22">
-            <el-button :type="isSolidFood?'primary':''" @click="typeChange()">以水分定价</el-button>
-            <el-button :type="isSolidFood?'primary':''" @click="typeChange(1)">以容重定价</el-button>
+            <el-button :type="!isSolidFood?'primary':''" @click="typeChange()" v-if="type == '新增'">以水分定价</el-button>
+            <el-button :type="isSolidFood?'primary':''" @click="typeChange(1)" v-if="type == '新增'">以容重定价</el-button>
           </el-col>
         </el-row>
         <div class="row1">
@@ -110,7 +110,7 @@
               <div class="right">
                 <div class="line"></div>
                 <div class="jt-style"></div>
-                <div v-for="(item1, index) in item.detailList">
+                <div v-for="(item1, index) in item.detailList" :key="index">
                   <div class="item-style">
                     <div v-if="item1.type != 4" class="item-style-title">
                       <span>{{ item1.name }}{{ item1.index }}</span>
@@ -345,6 +345,9 @@ export default {
   },
 
   activated() {
+    debugger
+
+    console.log(this.$route.query.type)
     // 货名
     let _goodsNameList = []
     _goodsNameList = this.$route.query.goodsNameList
@@ -372,21 +375,20 @@ export default {
         if (_goodsNameList.length == 0) {
           this.goodnameList = response
           this.selectVal = response[0].constValue
-          if (this.selectVal == '玉米淀粉' ||
-            this.selectVal == '玉米(机收)' ||
-            this.selectVal == '玉米(酒精)' ||
-            this.selectVal == '玉米(筛漏)' ||
-            this.selectVal == '玉米(陈粮)' ||
-            this.selectVal == '玉米(棒)' ||
-            this.selectVal == '玉米'
-          ) {
-            this.isSolidFood = true
-            this.baseInfoForm.bulkDensityStandard = 1
-          } else {
-            this.isSolidFood = false
-            this.baseInfoForm.bulkDensityStandard = ''
-          }
-
+          // if (this.selectVal == '玉米淀粉' ||
+          //   this.selectVal == '玉米(机收)' ||
+          //   this.selectVal == '玉米(酒精)' ||
+          //   this.selectVal == '玉米(筛漏)' ||
+          //   this.selectVal == '玉米(陈粮)' ||
+          //   this.selectVal == '玉米(棒)' ||
+          //   this.selectVal == '玉米'
+          // ) {
+          //   this.isSolidFood = true
+          //   this.baseInfoForm.bulkDensityStandard = 1
+          // } else {
+          //   this.isSolidFood = false
+          //   this.baseInfoForm.bulkDensityStandard = ''
+          // }
           // this.isSolidFood = false
           // this.baseInfoForm.bulkDensityStandard = ''
           this.baseInfoForm.goodsNameKey = response[0].constKey
@@ -395,24 +397,23 @@ export default {
           if (_list.length != 0) {
             this.selectVal = _list[0].constValue
             this.selectVal = _goodsNameList[0]
-            if (this.selectVal == '玉米淀粉' ||
-              this.selectVal == '玉米(机收)' ||
-              this.selectVal == '玉米(酒精)' ||
-              this.selectVal == '玉米(筛漏)' ||
-              this.selectVal == '玉米(陈粮)' ||
-              this.selectVal == '玉米(棒)' ||
-              this.selectVal == '玉米'
-            ) {
-              this.isSolidFood = true
-              this.baseInfoForm.bulkDensityStandard = 1
-            } else {
-              this.isSolidFood = false
-              this.baseInfoForm.bulkDensityStandard = ''
-            }
+            // if (this.selectVal == '玉米淀粉' ||
+            //   this.selectVal == '玉米(机收)' ||
+            //   this.selectVal == '玉米(酒精)' ||
+            //   this.selectVal == '玉米(筛漏)' ||
+            //   this.selectVal == '玉米(陈粮)' ||
+            //   this.selectVal == '玉米(棒)' ||
+            //   this.selectVal == '玉米'
+            // ) {
+            //   this.isSolidFood = true
+            //   this.baseInfoForm.bulkDensityStandard = 1
+            // } else {
+            //   this.isSolidFood = false
+            //   this.baseInfoForm.bulkDensityStandard = ''
+            // }
             this.baseInfoForm.goodsNameKey = _list[0].constKey
-
-            this.isSolidFood = false
-            this.baseInfoForm.bulkDensityStandard = ''
+            // this.isSolidFood = false
+            // this.baseInfoForm.bulkDensityStandard = ''
           }
         }
       })
@@ -544,6 +545,13 @@ export default {
           //构造查看priceList数据
           this.priceList = []
           this.makeLookPriceList()
+          if(this.baseInfoForm.bulkDensityStandard == 1){
+            this.isSolidFood = true
+            this.baseInfoForm.bulkDensityStandard = 1
+          }else{
+            this.isSolidFood = false
+            this.baseInfoForm.bulkDensityStandard = ""
+          }
           // if (this.selectVal == '玉米淀粉' ||
           //   this.selectVal == '玉米(机收)' ||
           //   this.selectVal == '玉米(酒精)' ||
@@ -584,16 +592,7 @@ export default {
         })
     },
     goodsChange(e) {
-      if (e == '玉米淀粉' ||
-        e == '玉米(机收)' ||
-        e == '玉米(酒精)' ||
-        e == '玉米(筛漏)' ||
-        e == '玉米(陈粮)' ||
-        e == '玉米(棒)' ||
-        e == '玉米'
-      ) {
-        // this.isSolidFood = true //true
-        this.baseInfoForm = {
+      this.baseInfoForm = {
           //防止填完数据  后切换货名不清空多余数据
           warehouseId: '',
           warehouseName: '',
@@ -615,10 +614,20 @@ export default {
           detailPrints: [],
           paramType: '1',
         }
+      if (e == '玉米淀粉' ||
+        e == '玉米(机收)' ||
+        e == '玉米(酒精)' ||
+        e == '玉米(筛漏)' ||
+        e == '玉米(陈粮)' ||
+        e == '玉米(棒)' ||
+        e == '玉米'
+      ) {
         this.baseInfoForm.warehouseId = this.$route.query.warehouseId
         this.baseInfoForm.warehouseName = this.$route.query.warehouseName
         this.baseInfoForm.compId = this.$route.query.compId
         this.baseInfoForm.bulkDensityStandard = 1
+      }else{
+        this.baseInfoForm.bulkDensityStandard = ""
       }
       for (let num = 0; num < this.goodnameList.length; num++) {
         if (e == this.goodnameList[num].constValue) {

+ 3 - 3
src/views/profitable/warehouseprofits.vue

@@ -99,7 +99,7 @@
       return {
         value: [],
         profitList: [{
-          name: "玉米",
+          name: '玉米',
           count: 2000,
         }],
         datalist2:[],
@@ -183,9 +183,9 @@
        getPassYearFormatDate() {
         var nowDate = new Date()
         var _date = new Date()
-        var year = nowDate.getFullYear()-1
+        var year = nowDate.getFullYear()
         var year1 = _date.getFullYear()
-        var month = nowDate.getMonth() + 1
+        var month = nowDate.getMonth()
         var month1 = _date.getMonth() + 1
         var strDate = nowDate.getDate()
         var strDate1 = _date.getDate()

+ 10 - 10
src/views/profitable/warehouseprofitsdetails.vue

@@ -68,17 +68,17 @@
     components: {},
     data() {
       return {
-        value: "",
+        value: '',
         tableData: [],
         deptBudgetTotal: 0,
         currentPage: 1,
         pageSize: 10,
         warehouse:[],
         deptCircularPage: {},
-        searchType:"",
-        searchKeyWord:"",
-        startDate:"",
-        endDate:"",
+        searchType:'',
+        searchKeyWord:'',
+        startDate:'',
+        endDate:'',
         outtotal:0,
         intotal:0,
       }
@@ -107,10 +107,10 @@
       getPassYearFormatDate () {
           var nowDate = new Date()
           var _date = new Date()
-          nowDate.setTime(nowDate.getTime()-24*60*60*1000*30)
-          var year = nowDate.getFullYear()-1
+          // nowDate.setTime(nowDate.getTime()-24*60*60*1000*30)
+          var year = nowDate.getFullYear()
           var year1 = _date.getFullYear()
-          var month = nowDate.getMonth() + 1
+          var month = nowDate.getMonth()
           var month1 = _date.getMonth() + 1
           var strDate = nowDate.getDate()
           var strDate1 = _date.getDate()
@@ -135,8 +135,8 @@
          getwarehousedetails({
             // warehouseType: 1,
             // compId: localStorage.getItem('ws-pf_compId'),
-            startDate:this.startDate,
-            endDate:this.endDate,
+            warehouseStartDate:this.startDate,
+          warehouseEndDate:this.endDate,
             searchKeyWord:this.searchKeyWord,
             currentPage: this.currentPage,
             pageSize:this.pageSize,