Ver código fonte

Merge branch 'master' of http://47.100.3.209:3000/gdc/yiliangyiyun-pc

zhongtianhaoyuan 3 anos atrás
pai
commit
8458a90467

+ 9 - 0
src/views/houseSelfCollect/acquisitionManagement.vue

@@ -282,6 +282,15 @@ export default {
       })
         .toPromise()
         .then(response => {
+           let _data = sessionStorage.getItem('houseSelfCollect_house')
+           _data = JSON.parse(sessionStorage.getItem('houseSelfCollect_house'))
+           if(_data.allowEdit==0){
+             _data.allowEdit = 1
+           }else{
+             _data.allowEdit = 0
+           } 
+            sessionStorage.setItem('houseSelfCollect_house',JSON.stringify(_data))
+           
           // this.tableData = response.records
         })
     },

+ 9 - 4
src/views/houseSelfCollect/settlement.vue

@@ -502,12 +502,17 @@ export default {
             this.paymentList.qualityInspectionManagement.weightDeduction=this.paymentList.qualityInspectionManagement.weightDeduction.toFixed(2)
             this.paymentList.base=(100-this.paymentList.qualityInspectionManagement.weightDeduction)/100
             this.paymentList.base = this.paymentList.base.toFixed(3)
-            this.paymentList.pureWeight=this.paymentList.base*this.paymentList.weighingManagement.netWeight
-            this.paymentList.pureWeight =  this.paymentList.pureWeight.toFixed(2)
+            if(this.paymentList.type=='潮粮'){
+              this.paymentList.pureWeight=this.paymentList.base*this.paymentList.weighingManagement.netWeight
+              this.paymentList.pureWeight =  this.paymentList.pureWeight.toFixed(2)
+            }
+            
           }
           else{
-            this.paymentList.pureWeight=this.paymentList.weighingManagement.netWeight * (100 - this.paymentList.param)/100
-            this.paymentList.pureWeight =  this.paymentList.pureWeight.toFixed(2)
+            if(this.paymentList.type=='潮粮'){
+              this.paymentList.pureWeight=this.paymentList.weighingManagement.netWeight * (100 - this.paymentList.param)/100
+              this.paymentList.pureWeight =  this.paymentList.pureWeight.toFixed(2)
+            }
           }
           if(!this.paymentList.dryGrainPrice){
             this.paymentList.dryGrainPrice=this.paymentList.qualityInspectionManagement.tidalGrainPrice/this.paymentList.base

+ 42 - 4
src/views/warehouse/costmanagement.vue

@@ -52,6 +52,7 @@
       <el-table
         class="wenzi"
         :data="warehouseList"
+        :span-method="arraySpanMethod"
         style="width: 100%; margin-top: 20px"
         height="780"
       >
@@ -187,15 +188,51 @@ export default {
     this.showType = this.isShow
   },
   methods: {
+    arraySpanMethod(obj){
+			if (obj.columnIndex === 1 ) {
+				// 二维数组存储的数据 取出
+				var _row = this.spanArr[obj.rowIndex]
+				var _col = _row > 0 ? 1 : 0
+				return {
+					rowspan: _row,
+					colspan: _col
+				}
+			} else {
+				return false
+			}
+    },
+    getSpanArr:function(data) {
+			var vm = this;
+			vm.spanArr = [];
+			vm.pos = 0;
+			data.forEach(function(item, index){
+				//判断是否是第一项
+				if (index === 0) {
+					vm.spanArr.push(1);
+					vm.pos = 0;
+				} else {
+					//不是第一项时,就根据标识去存储
+					if (data[index].warehouseName === data[index - 1].warehouseName ) {
+						// 查找到符合条件的数据时每次要把之前存储的数据+1
+						vm.spanArr[vm.pos] += 1;
+						vm.spanArr.push(0);
+					} else {
+						// 没有符合的数据时,要记住当前的index
+						vm.spanArr.push(1);
+						vm.pos = index
+					}
+				}
+			});
+		},
     changeradio(e) {
       this.selectWarehouse()
     },
     warehouselocation(){
       this.$router.push({ path: 'warehouselocation',query:{cangId:this.cangid}})
     },
-     weightedsubsidiary(){
-       console.log(this.cangid)
-      this.$router.push({ path: 'weightedsubsidiary',query:{cangId:this.cangid}  })
+     weightedsubsidiary(item){
+      //  console.log(item)
+      this.$router.push({ path: 'weightedsubsidiary',query:{cangId:item.warehouseId}  })
     },
     warehouseNameChange(e) {
       for(let i = 0 ; i < this.warehouseList1.length; i++){
@@ -257,7 +294,7 @@ export default {
       this.getList()
     },
     handleCurrentChange(val) {
-      this.currentPage = val
+      this.currectPage = val
       console.log(`当前页: ${val}`)
       this.getList()
     },
@@ -319,6 +356,7 @@ export default {
             }
             
           }
+          this.getSpanArr(arr)
           this.warehouseList = arr
           this.deptBudgetTotal=response.total
         })

+ 2 - 2
src/views/warehouse/warehouselocation.vue

@@ -45,7 +45,7 @@
                 </ws-select>
               <div :class='{"forbidden":forbidden1==true}' @click='add'><i class="el-icon-arrow-right"></i></div>
           </div>
-          <span v-if='warehouseList.records>0'>合计:{{count}}元</span>
+          <span v-if='deptBudgetTotal>0'>合计:{{count}}元</span>
         </div>
       </el-col>
       <el-col :span="12" class="bg-right">
@@ -399,7 +399,7 @@ this.cangid=this.$route.query.cangId
             })
             return
         }
-        editinventory({applUrl:this.applUrl,expenseName:this.expenseName,amount:this.amount,warehouseId:this.cangid,warehouseName:this.warehouseName}).toPromise()
+        editinventory({id:this.id,applUrl:this.applUrl,expenseName:this.expenseName,amount:this.amount,warehouseId:this.cangid,warehouseName:this.warehouseName}).toPromise()
         .then((response) => {
             this.$notify.success({
                 title: '成功',