Browse Source

销售单列表增加销售金额统计

liyuan 6 days ago
parent
commit
ec04c00ad7

+ 8 - 0
src/api/tirePartsMall/salesManagement/saleOrder.js

@@ -356,3 +356,11 @@ export const getGoodAllList = (params) => {
         params: params
     })
 }
+
+export const getExpenditurePrice = (data) => {
+    return request({
+        url: '/api/blade-sales-part/order/getExpenditurePrice',
+        method: 'POST',
+        params: data
+    })
+}

+ 5 - 5
src/views/tirePartsMall/financialManagement/saleDetail/index.vue

@@ -374,23 +374,23 @@ export default {
             },
             {
                 id: 6,
-                label: '已取消数量',
+                label: '已退货数量',
                 prop: 'goodsSumCancellation'
             }, {
                 id: 7,
-                label: '已取消金额',
+                label: '已退货金额',
                 prop: 'amountCancellation'
             }, {
                 id: 8,
-                label: '已取消成本',
+                label: '已退货成本',
                 prop: 'costPriceCancellation'
             }, {
                 id: 9,
-                label: '已取消毛利',
+                label: '已退货毛利',
                 prop: 'profitCancellation'
             }, {
                 id: 10,
-                label: '已取消运费',
+                label: '已退货运费',
                 prop: 'freightCancellation'
             }],
         }

+ 31 - 5
src/views/tirePartsMall/salesManagement/purchaseOrder/index.vue

@@ -48,8 +48,17 @@
           <el-checkbox v-model="search.notComplete" true-label="1"></el-checkbox>
         </template>
         <template slot-scope="{type,size,row,$index}" slot="menuLeft">
-          <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true">新建订单</el-button>
-          <el-button type="warning" icon="el-icon-download" size="small" @click="outExport">导出</el-button>
+            <div style="display: flex;align-items: center;">
+                <el-button icon="el-icon-plus" type="primary" :size="size" @click="detailsOpen = true">新建订单</el-button>
+                <el-button type="warning" icon="el-icon-download" size="small" @click="outExport">导出</el-button>
+                <div style="display: flex;align-items: center;">
+                    <div class="buttonBox">
+                        <span>采购金额总计:</span>
+                        <span>{{ expenditure }}</span>
+                    </div>
+                </div>
+            </div>
+
         </template>
         <template slot-scope="{ row, index }" slot="ordNo">
           <span style="color: #409EFF;cursor: pointer" @click.stop="editOpen(row, 2)">{{ row.ordNo }}
@@ -67,9 +76,8 @@
 </template>
 
 <script>
-import { getList, remove, getGoodsInfo } from "@/api/tirePartsMall/salesManagement/saleOrder";
+import { getList, remove, getDetails, getExpenditurePrice } from "@/api/tirePartsMall/salesManagement/saleOrder";
 import detailsPage from "./detailsPage"
-import { getDetails } from "@/api/tirePartsMall/salesManagement/saleOrder";
 import { getToken } from "@/util/auth";
 
 export default {
@@ -83,6 +91,7 @@ export default {
       actualStatusList: [],
       returnStatusList: [],
       detailsOpen: false,
+        expenditure: 0,
       loading: false,
       search: {},
       form: {},
@@ -359,7 +368,7 @@ export default {
         //   label: '金额',
         //   prop: "totalMoney",
         //   overHidden: true,
-        // }, 
+        // },
         {
           label: '已付金额',
           prop: "paymentAmountTl",
@@ -530,8 +539,14 @@ export default {
     this.getWorkDicts("return_Status").then(res => {
       this.returnStatusList = res.data.data
     });
+    this.getExpenditurePriceData()
   },
   methods: {
+      getExpenditurePriceData(params) {
+          getExpenditurePrice(params ? params : {}).then(res => {
+              this.expenditure = res.data.data
+          })
+      },
     // 导出
     outExport() {
       console.log(this.search, 412)
@@ -640,6 +655,7 @@ export default {
           this.$refs.crud.doLayout()
           this.$refs.crud.dicInit()
         })
+          this.getExpenditurePriceData(params)
         this.loading = false
       }).finally(() => {
         this.loading = false
@@ -684,6 +700,16 @@ export default {
 </script>
 
 <style scoped>
+.buttonBox {
+    font-size: 12px;
+    color: #909399;
+    margin-left: 10px;
+    border: 1px solid #d3d4d6;
+    border-radius: 3px;
+    padding: 6px 10px;
+    background: #f4f4f5;
+}
+
 .bottomBox {
   padding: 3px 6px;
   border-radius: 12px;