Forráskód Böngészése

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

zhongtianhaoyuan 3 éve
szülő
commit
7e86a15b58

+ 67 - 5
src/views/houseSelfCollect/acquisitionManagementAdd.vue

@@ -555,7 +555,6 @@
       },
       // 删除价格组
       delSetPrice(item, index) {
-        // debugger
         let that = this
         this.checkList1 = []
         this.checkList2 = []
@@ -906,6 +905,7 @@
       },
       // 获取分界价格数据,构造分界价格区间数据
       getSplitPrice() {
+        let that = this;
         this.left = []
         this.right = []
         let _priceList = this.priceList;
@@ -923,12 +923,21 @@
             _rightObj.priceList = []
             _rightObj.haveSplit = false
 
+            //获取基准在x轴索引
 
-            for (let j = (_priceList[i].detailList.length + 1) / 2 - 1; j > 0; j--) {
+              let index = function(){
+              for(let index=0;index<_priceList[i].detailList.length;index++){
+                        if(_priceList[i].detailList[index].water==that.baseInfoForm.waterBase){
+                          return index
+                }
+              }
+           } 
+           console.log(index())
+          for (let j = index(); j > 0; j--) {
               if (_priceList[i].detailList[j] && _priceList[i].detailList[j].type != 4) {
                 if (_priceList[i].detailList[j].type != 1) {
                   let baseprice = ""
-                  if (j == (_priceList[i].detailList.length + 1) / 2 - 1) {
+                  if (j == index()) {
                     baseprice = parseFloat(_priceList[i].basicUnitPrice)
                   } else {
                     baseprice = parseFloat(_priceList[i].basicUnitPrice + (parseFloat(_priceList[i].detailList[j + 2]
@@ -949,13 +958,39 @@
                 }
               }
             }
+
+            // for (let j = (_priceList[i].detailList.length + 1) / 2 - 1; j > 0; j--) {
+            //   if (_priceList[i].detailList[j] && _priceList[i].detailList[j].type != 4) {
+            //     if (_priceList[i].detailList[j].type != 1) {
+            //       let baseprice = ""
+            //       if (j == (_priceList[i].detailList.length + 1) / 2 - 1) {
+            //         baseprice = parseFloat(_priceList[i].basicUnitPrice)
+            //       } else {
+            //         baseprice = parseFloat(_priceList[i].basicUnitPrice + (parseFloat(_priceList[i].detailList[j + 2]
+            //           .water) - parseFloat(_priceList[i].detailList[j].water)) / 0.5 * parseFloat(_priceList[i]
+            //           .detailList[j + 1].jfprice))
+            //       }
+            //       _leftObj.priceList.push({
+            //         index: j,
+            //         priceStart: parseFloat(_priceList[i].detailList[j].water),
+            //         priceEnd: parseFloat(_priceList[i].detailList[j - 2].water),
+            //         type: parseFloat(_priceList[i].detailList[j].type),
+            //         water: _priceList[i].detailList[j].water,
+            //         jfprice: parseFloat(_priceList[i].detailList[j - 1].jfprice),
+            //         baseprice: baseprice,
+            //         price: (parseFloat(_priceList[i].detailList[j].water) - parseFloat(_priceList[i].detailList[j -
+            //           2].water)) / 0.5 * parseFloat(_priceList[i].detailList[j - 1].jfprice)
+            //       })
+            //     }
+            //   }
+            // }
             this.left.push(_leftObj)
             console.log("this.left", this.left)
-            for (let k = (_priceList[i].detailList.length + 1) / 2 - 1; k <= _priceList[i].detailList.length; k++) {
+                  for (let k = index(); k <= _priceList[i].detailList.length; k++) {
               if (_priceList[i].detailList[k] && _priceList[i].detailList[k].type != 4) {
                 if (_priceList[i].detailList[k].type != 3) {
                   let baseprice = ""
-                  if (k == (_priceList[i].detailList.length + 1) / 2 - 1) {
+                  if (k == index()) {
                     baseprice = parseFloat(_priceList[i].basicUnitPrice)
                   } else {
                     baseprice = parseFloat(_priceList[i].basicUnitPrice - (parseFloat(_priceList[i].detailList[k]
@@ -976,6 +1011,33 @@
                 }
               }
             }
+
+
+            // for (let k = (_priceList[i].detailList.length + 1) / 2 - 1; k <= _priceList[i].detailList.length; k++) {
+            //   if (_priceList[i].detailList[k] && _priceList[i].detailList[k].type != 4) {
+            //     if (_priceList[i].detailList[k].type != 3) {
+            //       let baseprice = ""
+            //       if (k == (_priceList[i].detailList.length + 1) / 2 - 1) {
+            //         baseprice = parseFloat(_priceList[i].basicUnitPrice)
+            //       } else {
+            //         baseprice = parseFloat(_priceList[i].basicUnitPrice - (parseFloat(_priceList[i].detailList[k]
+            //           .water) - parseFloat(_priceList[i].detailList[k - 2].water)) / 0.5 * parseFloat(_priceList[i]
+            //           .detailList[k - 1].jfprice))
+            //       }
+            //       _rightObj.priceList.push({
+            //         index: k,
+            //         priceStart: parseFloat(_priceList[i].detailList[k].water),
+            //         priceEnd: parseFloat(_priceList[i].detailList[k + 2].water),
+            //         type: parseFloat(_priceList[i].detailList[k].type),
+            //         water: _priceList[i].detailList[k].water,
+            //         jfprice: parseFloat(_priceList[i].detailList[k + 1].jfprice),
+            //         baseprice: baseprice,
+            //         price: (parseFloat(_priceList[i].detailList[k + 2].water) - parseFloat(_priceList[i].detailList[
+            //           k].water)) / 0.5 * parseFloat(_priceList[i].detailList[k + 1].jfprice)
+            //       })
+            //     }
+            //   }
+            // }
             this.right.push(_rightObj)
             console.log("this.right", this.right)
           }

+ 29 - 1
src/views/outboundManagement/collectionManagement.vue

@@ -149,7 +149,11 @@
         class="table_td"
         prop="amountEdCollectionable"
         label="已收款(元)"
-      ></el-table-column>
+      >
+      <template slot-scope="scope">
+        <div @click="cellClick(scope.row)">{{scope.row.amountEdCollectionable}}</div>
+      </template>
+      </el-table-column>
       <el-table-column
         class="table_td"
         prop="collectionDate"
@@ -170,6 +174,11 @@
         </template>
       </el-table-column>
     </el-table>
+    <el-dialog :visible.sync="isShowImgList" title="收款截图">
+     <div v-for="(item,index) in imgList" :key="index"  class="imgList-style">
+       <img :src="item" alt="" class="img">
+     </div>
+    </el-dialog>
     <!-- 收款 -->
     <el-dialog
       width="25%"
@@ -275,6 +284,8 @@ export default {
   watch: {},
   data() {
     return {
+      imgList:[],
+      isShowImgList:false,
       //分页
       currentPage: 1,
       pageSize: 10,
@@ -323,6 +334,15 @@ export default {
     this.getList()
   },
   methods: {
+    cellClick(row){
+      this.imgList = row.collectionScreenshot.split('$')
+      this.isShowImgList = true
+      // console.log(val)
+      //  console.log(val2)
+      //   console.log(val3)
+      //    console.log(event)
+      console.log(row)
+    },
     contractchange(e) {
       this.contractNo = e
       this.getList()
@@ -616,5 +636,13 @@ export default {
     font-size: 13px;
     margin-left: -67px;
 }
+.imgList-style{
+  width: 50%;
+  display: inline-block;
+  .img{
+    width: 100%;
+    height: 300px;
+  }
+}
 </style>