Browse Source

修改:商用工程订单新增编辑增加 统计

zh 2 năm trước cách đây
mục cha
commit
e31e946864
1 tập tin đã thay đổi với 33 bổ sung7 xóa
  1. 33 7
      src/views/supply/engin/components/commerce_form.vue

+ 33 - 7
src/views/supply/engin/components/commerce_form.vue

@@ -241,6 +241,8 @@
         fit
         highlight-current-row
         stripe
+        show-summary
+        :summary-method="$getSummaries"
         max-height="400"
         @selection-change="handleSelectionChange"
       >
@@ -288,7 +290,7 @@
             <div>{{ status2Filter(scope.row) }}</div>
           </template>
         </el-table-column>
-        <el-table-column align="center" label="订单金额" min-width="100" show-overflow-tooltip>
+        <el-table-column align="center" label="订单金额" prop="dd" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.price * scope.row.qty }}
           </template>
@@ -311,12 +313,12 @@
             </el-select>
           </template>
         </el-table-column>
-        <el-table-column align="center" label="返利金额" min-width="100" show-overflow-tooltip>
+        <el-table-column align="center" label="返利金额" prop="fl" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ (scope.row.price * scope.row.qty * (scope.row.rebateRate * 100)) / 100 }}
           </template>
         </el-table-column>
-        <el-table-column align="center" label="格力折扣" min-width="100" show-overflow-tooltip>
+        <el-table-column align="center" label="格力折扣" prop="zk" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{ scope.row.qty * scope.row.discAmount }}
           </template>
@@ -339,7 +341,7 @@
             </el-select>
           </template>
         </el-table-column>
-        <el-table-column align="center" label="实付金额" prop="qty" min-width="100" show-overflow-tooltip>
+        <el-table-column align="center" label="实付金额" prop="sf" min-width="100" show-overflow-tooltip>
           <template slot-scope="scope">
             {{
               (scope.row.price * scope.row.qty * 100 -
@@ -610,6 +612,29 @@ export default {
   watch: {
     goodsList: {
       handler(newValue, oldValue) {
+        newValue.forEach(item => {
+          item.dd = (item.price || 0) * (item.qty || 0)
+          item.zk = item.qty * item.discAmount
+          item.sf =   (item.price * item.qty * 100 -
+                ((item.price * item.qty * (item.rebateRate * 100)) / 100) * 100 -
+                ((item.qty * (item.discAmount * 100)) / 100) * 100) /
+              100
+
+          item.fl = (item.price * item.qty * (item.rebateRate * 100)) / 100
+          item.sums1 = [
+            'number',
+            'directTransferQty',
+            'qty',
+            'hasOrderQty',
+            'enginNum',
+            'oldQty',
+            'hasSendQty',
+            'retiredQty',
+            'zk'
+          ]
+          item.sums2 = ['totalAmount', 'dd','fl','sf','payAmount', 'price', 'payRebateAmount', 'discAmount']
+        })
+
         if (this.goodsList && this.goodsList.length) {
           this.flag = true
           if (this.isFirst) {
@@ -831,7 +856,7 @@ export default {
 
     // 重置筛选表单
     resetScreenForm() {
-        this.$nextTick(()=>{
+      this.$nextTick(() => {
         this.$refs.screenForm.resetFields()
       })
       this.dialogTable_currentPage = 1
@@ -896,8 +921,9 @@ export default {
             discAmount: '',
             customerWalletId: '',
             isDirectTransfer: false,
-            directTransferQty: '',
-            hasSendQty: '',
+            directTransferQty: 0,
+            retiredQty:0,
+            hasSendQty: 0,
             hasOrderQty: item.hasOrderQty,
             remark: item.remark,
             tax: item.taxRate,