Explorar o código

报单区隐藏套餐,增加税率税额

kevin_zhangl %!s(int64=3) %!d(string=hai) anos
pai
achega
22f84ca230
Modificáronse 1 ficheiros con 56 adicións e 54 borrados
  1. 56 54
      frontendEle/src/views/user/dec.vue

+ 56 - 54
frontendEle/src/views/user/dec.vue

@@ -26,52 +26,52 @@
                       Select Welcome Pack<!--报单方式二选一-->
                     </template>
                     <el-tabs type="border-card" v-model="decWay" style="position: relative;width: 1200px;">
-                        <el-tab-pane name="1">
-                            <span slot="label">Welcome Pack</span><!--报单级别套餐-->
-                            <el-table class="table-box" :data="_tableData" stripe style="width: 100%;" highlight-current-row @current-change="handleCurrentChange">
-                                <el-table-column
-                                        type="index"
-                                        width="50">
-                                </el-table-column>
-                                <el-table-column label=" " width="50">
-                                    <template slot-scope="scope">
-                                      <span class="el-checkbox__input" :class="{'is-checked':scope && scope.row && currentRow && scope.row.ID==currentRow.ID}">
-                                        <span class="el-checkbox__inner">
-                                          </span>
-                                        <input type="checkbox" aria-hidden="false" class="el-checkbox__original" value="">
-                                      </span>
-                                    </template>
-                                </el-table-column>
-                                <el-table-column label="Package Name" prop="PACKAGE_NAME" width="300"><!-- 套餐名称 -->
-
-                                </el-table-column>
-                                <el-table-column label="Price" prop="AMOUNT" width="100"><!-- 套餐金额 -->
-
-                                </el-table-column>
-
-                                <el-table-column label="BV" prop="PV" width="100"><!-- 套餐PV -->
-
-                                    <template>
-
-                                    </template>
-                                </el-table-column>
-
-                                <el-table-column label="Entry level" prop="LEVEL_NAME" width="100"><!-- 所属报单级别 -->
-                                    <template>
-
-                                    </template>
-                                </el-table-column>
-                                <el-table-column label="Details" prop="PACKAGE_CONTENT" width=""><!-- 套餐内容 -->
-                                    <template >
-
-                                    </template>
-                                </el-table-column>
-
-                            </el-table>
-                            <!-- <el-form-item>
-                               <el-button type="primary" @click="onclock" :loading="submitButton">保存</el-button>
-                             </el-form-item>-->
-                        </el-tab-pane>
+<!--                        <el-tab-pane name="1">-->
+<!--                            <span slot="label">Welcome Pack</span>&lt;!&ndash;报单级别套餐&ndash;&gt;-->
+<!--                            <el-table class="table-box" :data="_tableData" stripe style="width: 100%;" highlight-current-row @current-change="handleCurrentChange">-->
+<!--                                <el-table-column-->
+<!--                                        type="index"-->
+<!--                                        width="50">-->
+<!--                                </el-table-column>-->
+<!--                                <el-table-column label=" " width="50">-->
+<!--                                    <template slot-scope="scope">-->
+<!--                                      <span class="el-checkbox__input" :class="{'is-checked':scope && scope.row && currentRow && scope.row.ID==currentRow.ID}">-->
+<!--                                        <span class="el-checkbox__inner">-->
+<!--                                          </span>-->
+<!--                                        <input type="checkbox" aria-hidden="false" class="el-checkbox__original" value="">-->
+<!--                                      </span>-->
+<!--                                    </template>-->
+<!--                                </el-table-column>-->
+<!--                                <el-table-column label="Package Name" prop="PACKAGE_NAME" width="300">&lt;!&ndash; 套餐名称 &ndash;&gt;-->
+
+<!--                                </el-table-column>-->
+<!--                                <el-table-column label="Price" prop="AMOUNT" width="100">&lt;!&ndash; 套餐金额 &ndash;&gt;-->
+
+<!--                                </el-table-column>-->
+
+<!--                                <el-table-column label="BV" prop="PV" width="100">&lt;!&ndash; 套餐PV &ndash;&gt;-->
+
+<!--                                    <template>-->
+
+<!--                                    </template>-->
+<!--                                </el-table-column>-->
+
+<!--                                <el-table-column label="Entry level" prop="LEVEL_NAME" width="100">&lt;!&ndash; 所属报单级别 &ndash;&gt;-->
+<!--                                    <template>-->
+
+<!--                                    </template>-->
+<!--                                </el-table-column>-->
+<!--                                <el-table-column label="Details" prop="PACKAGE_CONTENT" width="">&lt;!&ndash; 套餐内容 &ndash;&gt;-->
+<!--                                    <template >-->
+
+<!--                                    </template>-->
+<!--                                </el-table-column>-->
+
+<!--                            </el-table>-->
+<!--                            &lt;!&ndash; <el-form-item>-->
+<!--                               <el-button type="primary" @click="onclock" :loading="submitButton">保存</el-button>-->
+<!--                             </el-form-item>&ndash;&gt;-->
+<!--                        </el-tab-pane>-->
                         <el-tab-pane label="Product" name="2"><!-- 商品报单 -->
                             <el-table class="table-box" v-if="numList.length > 0" :data="tableDatas" stripe style="width: 100%;" highlight-current-row  @selection-change="handleSelectionChange">
                                 <el-table-column
@@ -92,12 +92,12 @@
                                 <el-table-column label="Product BV" prop="PRICE_PV" width="100"><!-- BV价格 -->
 
                                 </el-table-column>
-                                <el-table-column label="Product BV" prop="TAX_RATE" width="100">
+                                <el-table-column label="TAX_RATE" prop="TAX_RATE" width="100">
                                     <template slot-scope="scope">
                                       {{ Math.round(scope.row.TAX_RATE * 100) / 100 }}
                                     </template>
                                 </el-table-column>
-                                <el-table-column label="Product BV" width="100">
+                                <el-table-column label="TAX" width="100">
                                     <template slot-scope="scope">
                                       {{ Math.round((scope.row.SELL_PRICE - scope.row.SELL_PRICE / (1 + scope.row.TAX_RATE / 100)) * 100) / 100 }}
                                     </template>
@@ -115,8 +115,9 @@
                             <div class="white-box-footer flex">
                                 <el-button @click="getSum()">Total Calculation</el-button><!--计算合计-->
                                 <div class='flex data' style="flex:1;justify-content: flex-end;">
-                                    <div style="margin-right:2rem">Product price:${{sell_price_sum}}</div><!--商品价格-->
-                                    <div>Product BV:${{price_pv_sum}}</div><!--商品BV-->
+                                    <div style="margin-right:2rem">Product price:₦{{sell_price_sum}}</div><!--商品价格-->
+                                    <div style="margin-right:2rem">Product BV:{{price_pv_sum}}</div><!--商品BV-->
+                                    <div>Product Tax:₦{{tax_sum}}</div><!--商品BV-->
                                 </div>
                             </div>
 
@@ -296,7 +297,7 @@
         data() {
             return {
                 currentRow:null,
-                decWay:'1',
+                decWay:'2',
                 regionData: store.state.regionInfo.regionData,
                 form: {
 
@@ -347,6 +348,7 @@
                 numList: [],
                 sell_price_sum:0.00,
                 price_pv_sum:0.00,
+                tax_sum:0.00,
                 areaDisabled: false,
                 addressDisabled: false
             }
@@ -362,15 +364,15 @@
               }
             },
             getSum(){
-                let sell_price_sum=0,price_pv_sum=0;
+                let sell_price_sum=0,price_pv_sum=0,tax_sum=0;
                 this.multipleSelection.map((item,index)=>{
-                    console.log(item)
                     sell_price_sum+=Number(item.SELL_PRICE)*item.goodsNum;
                     price_pv_sum+=Number(item.PRICE_PV)*item.goodsNum;
+                    tax_sum += Number(item.SELL_PRICE - item.SELL_PRICE / (1 + item.TAX_RATE / 100)) * item.goodsNum;
                 })
                 this.sell_price_sum=tool.formatPrice(sell_price_sum);
                 this.price_pv_sum=tool.formatPrice(price_pv_sum);
-                console.log(this.sell_price_sum,this.price_pv_sum)
+                this.tax_sum = tool.formatPrice(tax_sum);
             },
             getData () {