Bladeren bron

【修改】家用工程押金

howie 2 jaren geleden
bovenliggende
commit
efa37c4338

+ 13 - 12
src/views/deposit_home/components/deposit-apply-surrender.vue

@@ -164,9 +164,9 @@
             min-width="160"
             show-overflow-tooltip
           />
-          <!-- <el-table-column align="left" label="实装物料编号" prop="realMaterialNumber" min-width="150" show-overflow-tooltip></el-table-column>
+          <el-table-column align="left" label="实装物料编号" prop="realMaterialNumber" min-width="150" show-overflow-tooltip></el-table-column>
             <el-table-column align="left" label="实装厂产品编码" prop="realMaterialOldNumber" min-width="200" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="实装规格型号" prop="realSpecification" min-width="300" show-overflow-tooltip></el-table-column> -->
+            <el-table-column align="left" label="实装规格型号" prop="realSpecification" min-width="300" show-overflow-tooltip></el-table-column>
           <el-table-column
             align="center"
             label="单价"
@@ -206,7 +206,7 @@
             min-width="160"
             show-overflow-tooltip
           />
-          <!-- <el-table-column
+          <el-table-column
               align="right"
               label="合同数量"
               prop="contractQty"
@@ -255,7 +255,7 @@
                   {{comTotal(scope.row.contractQty,scope.row.contractPrice)}}
                 </div>
               </template>
-            </el-table-column> -->
+            </el-table-column>
             <el-table-column
               align="right"
               label="押金金额"
@@ -267,7 +267,7 @@
                 {{ scope.row.depositAmount | numToFixed }}
               </template>
             </el-table-column>
-          <!-- <el-table-column
+          <el-table-column
             align="center"
             label="上交资料"
             prop="dataQty"
@@ -305,7 +305,7 @@
               <template slot-scope="scope">
                 {{ scope.row.diffPolicyPrice | numToFixed }}
               </template>
-            </el-table-column> -->
+            </el-table-column>
         </el-table>
       </div>
     </div>
@@ -584,6 +584,7 @@ export default {
       row.saleTypeId = this.details.saleTypeId
       computeDiff(row).then(res=>{
         row.diffAmount = res.data.diffAmount
+        row.diffPolicyPrice = res.data.diffPolicyPrice
       this.$successMsg('已计算收差金额')
       })
     }
@@ -598,13 +599,13 @@ export default {
         return
       }
 
-      // for (let i = 0; i < this.details.length; i++) {
-      //       this.details.items[i].contractAmount = this.details.items[i].contractQty * this.details.items[i].contractPrice
-      //         if (this.details.items[i].contractAmount) {
-      //           return this.$errorMsg('合同单价、合同数量不能为空')
-      //         }
+      for (let i = 0; i < this.details.items.length; i++) {
+            this.details.items[i].contractAmount = this.details.items[i].contractQty * this.details.items[i].contractPrice
+              if (this.details.items[i].contractAmount) {
+                return this.$errorMsg('合同单价、合同数量不能为空')
+              }
 
-      //     }
+          }
 
       this.fileList.forEach((el) => {
 

+ 6 - 6
src/views/deposit_home/components/deposit_list-detail.vue

@@ -221,9 +221,9 @@
                 <span>{{ scope.row.specification }}</span>
               </template>
             </el-table-column>
-            <!-- <el-table-column align="left" label="实装物料编号" prop="realMaterialNumber" min-width="150" show-overflow-tooltip></el-table-column>
+            <el-table-column align="left" label="实装物料编号" prop="realMaterialNumber" min-width="150" show-overflow-tooltip></el-table-column>
             <el-table-column align="left" label="实装厂产品编码" prop="realMaterialOldNumber" min-width="200" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="实装规格型号" prop="realSpecification" min-width="300" show-overflow-tooltip></el-table-column> -->
+            <el-table-column align="left" label="实装规格型号" prop="realSpecification" min-width="300" show-overflow-tooltip></el-table-column>
             <el-table-column
               align="right"
               label="单价"
@@ -278,7 +278,7 @@
                 {{ scope.row.depositAmount | numToFixed }}
               </template>
             </el-table-column> -->
-            <!-- <el-table-column
+            <el-table-column
               align="right"
               label="合同数量"
               prop="contractQty"
@@ -310,7 +310,7 @@
               <template slot-scope="scope">
                   {{ scope.row.contractAmount }}
               </template>
-            </el-table-column> -->
+            </el-table-column>
             <el-table-column
               align="right"
               label="押金金额"
@@ -322,7 +322,7 @@
                 {{ scope.row.depositAmount | numToFixed }}
               </template>
             </el-table-column>
-            <!-- <el-table-column
+            <el-table-column
               align="right"
               label="上交资料"
               prop="dataQty"
@@ -350,7 +350,7 @@
               <template slot-scope="scope">
                 {{ scope.row.diffPolicyPrice | numToFixed }}
               </template>
-            </el-table-column> -->
+            </el-table-column>
 
 
           </el-table>

+ 31 - 15
src/views/deposit_home/components/refund_list-detail.vue

@@ -473,9 +473,9 @@
                 <span>{{ scope.row.specification }}</span>
               </template>
             </el-table-column>
-            <!-- <el-table-column align="left" label="实装物料编号" prop="realMaterialNumber" min-width="150" show-overflow-tooltip></el-table-column>
+            <el-table-column align="left" label="实装物料编号" prop="realMaterialNumber" min-width="150" show-overflow-tooltip></el-table-column>
             <el-table-column align="left" label="实装厂产品编码" prop="realMaterialOldNumber" min-width="200" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="实装规格型号" prop="realSpecification" min-width="300" show-overflow-tooltip></el-table-column> -->
+            <el-table-column align="left" label="实装规格型号" prop="realSpecification" min-width="300" show-overflow-tooltip></el-table-column>
             <el-table-column
               align="right"
               label="单价"
@@ -530,7 +530,7 @@
                 {{ scope.row.depositAmount | numToFixed }}
               </template>
             </el-table-column>
-            <!-- <el-table-column
+            <el-table-column
               align="right"
               label="合同数量"
               prop="contractQty"
@@ -602,6 +602,8 @@
                   class="inpt"
                   v-model.number="scope.row.dataQty"
                   size="mini"
+                  @blur="setDataQty($event,scope.row)"
+
                   clearable
                 ></el-input>
                 <div v-else>
@@ -630,7 +632,7 @@
               <template slot-scope="scope">
                 {{ scope.row.diffPolicyPrice | numToFixed }}
               </template>
-            </el-table-column> -->
+            </el-table-column>
 
           </el-table>
         </div>
@@ -992,6 +994,8 @@ import {
   getDepositManageEdit,
   getCommonFileGetStream,
 } from "@/api/engin_deposit/refund_list";
+import { computeDiff } from '@/api/engin_deposit.js'
+
 import ret from "bluebird/js/release/util";
 export default {
   props: {
@@ -1091,6 +1095,17 @@ export default {
         return "";
       }
     },
+        // 计算收差金额
+        setDataQty(e,row){
+        if(!row.dataQty) return
+      row.saleTypeId = this.details.saleTypeId
+      computeDiff(row).then(res=>{
+        row.diffAmount = res.data.diffAmount
+        row.diffPolicyPrice = res.data.diffPolicyPrice
+      this.$successMsg('已计算收差金额')
+      })
+    }
+    ,
     //审批驳回
     async rejectFn() {
       this.$confirm("此操作将审批订单, 是否继续?", "提示", {
@@ -1104,13 +1119,13 @@ export default {
             return;
           }
 
-          // for (let i = 0; i < this.detailList.items.length; i++) {
-          //   this.detailList.items[i].contractAmount = this.detailList.items[i].contractQty * this.detailList.items[i].contractPrice
-          //     if (this.detailList.items[i].contractAmount) {
-          //       return this.$errorMsg('合同单价、合同数量不能为空')
-          //     }
+          for (let i = 0; i < this.detailList.items.length; i++) {
+            this.detailList.items[i].contractAmount = this.detailList.items[i].contractQty * this.detailList.items[i].contractPrice
+              if (this.detailList.items[i].contractAmount) {
+                return this.$errorMsg('合同单价、合同数量不能为空')
+              }
 
-          // }
+          }
 
       //     this.detailList.items.map(e=>{
       //     e.contractAmount = e.contractQty * e.contractPrice
@@ -1180,12 +1195,13 @@ export default {
             this.$message.error("请选择安装时间");
             return;
           }
-      //     this.detailList.items.map(e=>{
-      //     if (!e.contractAmount) {
-      //       return this.$errorMsg('合同单价、合同数量不能为空')
-      //     }
-      // })
+          for (let i = 0; i < this.detailList.items.length; i++) {
+            this.detailList.items[i].contractAmount = this.detailList.items[i].contractQty * this.detailList.items[i].contractPrice
+              if (this.detailList.items[i].contractAmount) {
+                return this.$errorMsg('合同单价、合同数量不能为空')
+              }
 
+          }
           let data = {
             ...this.detailList,
             checkBy: this.checkBy,

+ 2 - 2
src/views/deposit_home/deposit_list.vue

@@ -396,9 +396,9 @@
                 <span>{{ scope.row.specification }}</span>
               </template>
             </el-table-column>
-            <!-- <el-table-column align="left" label="实装物料编号" prop="realMaterialNumber" min-width="150" show-overflow-tooltip></el-table-column>
+            <el-table-column align="left" label="实装物料编号" prop="realMaterialNumber" min-width="150" show-overflow-tooltip></el-table-column>
             <el-table-column align="left" label="实装厂产品编码" prop="realMaterialOldNumber" min-width="200" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="实装规格型号" prop="realSpecification" min-width="300" show-overflow-tooltip></el-table-column> -->
+            <el-table-column align="left" label="实装规格型号" prop="realSpecification" min-width="300" show-overflow-tooltip></el-table-column>
             <el-table-column
               align="left"
               label="是否退押"

+ 2 - 2
src/views/deposit_home/refund_list.vue

@@ -572,9 +572,9 @@
                 <span>{{ scope.row.specification }}</span>
               </template>
             </el-table-column>
-            <!-- <el-table-column align="left" label="实装物料编号" prop="realMaterialNumber" min-width="150" show-overflow-tooltip></el-table-column>
+            <el-table-column align="left" label="实装物料编号" prop="realMaterialNumber" min-width="150" show-overflow-tooltip></el-table-column>
             <el-table-column align="left" label="实装厂产品编码" prop="realMaterialOldNumber" min-width="200" show-overflow-tooltip></el-table-column>
-            <el-table-column align="left" label="实装规格型号" prop="realSpecification" min-width="300" show-overflow-tooltip></el-table-column> -->
+            <el-table-column align="left" label="实装规格型号" prop="realSpecification" min-width="300" show-overflow-tooltip></el-table-column>
             <el-table-column
               align="left"
               label="是否退押"