Browse Source

计算器中添加额外费用

dujingxian 4 years ago
parent
commit
2aed66711f
1 changed files with 13 additions and 1 deletions
  1. 13 1
      src/views/index/calc.vue

+ 13 - 1
src/views/index/calc.vue

@@ -57,6 +57,15 @@
                     <label class="col-form-label">公积金</label>
                     <span class="badge">&yen;{{data.fund_calc}}</span>
                 </div>
+                <!-- 额外费用 -->
+                <template v-if="data.append_cost.length">
+                    <div
+                        class="mt-2 d-flex justify-content-between align-items-center"
+                        v-for="(item, idx) in data.append_cost" :key="idx">
+                        <label class="col-form-label">{{item.name}}</label>
+                        <span class="badge">&yen;{{item.cost}}</span>
+                    </div>
+                </template>
                 <div class="mt-2 d-flex justify-content-between align-items-center"
                      v-if="data.is_fund&&data.fund_calc">
                     <label class="col-form-label">总计</label>
@@ -97,7 +106,9 @@
             shi:'',
             code:'11',
             codes:'1101',
-            sociallist:[{id: 1, name: "本地城镇"}, {id: 2, name: "本地农村"}, {id: 3, name: "外埠城镇"}, {id: 4, name: "外埠农村"}]
+            sociallist:[{id: 1, name: "本地城镇"}, {id: 2, name: "本地农村"}, {id: 3, name: "外埠城镇"}, {id: 4, name: "外埠农村"}],
+            // 附加费用 残保金
+            append_cost: []
         };
         async created() {
             this.data.citycode = localStorage.getItem('citycode')
@@ -148,6 +159,7 @@
             this.data.subtotal_calc = res.data.subtotal;
             this.data.total_calc = res.data.total;
             this.data.is_discounts = res.data.discounts;
+            this.data.append_cost = res.data.append_cost;
         }
     }
 </script>