lilei 4 روز پیش
والد
کامیت
0b734b4ca2

+ 68 - 6
src/views/financialManagement/accountStatementBill/list.vue

@@ -35,6 +35,17 @@
                 <a-input id="accountStatementBill-bookNo" v-model.trim="queryParam.kdMidCustomerFnumber" allowClear placeholder="请输入财务编码"/>
               </a-form-item>
             </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-model-item label="月度有业务客户" prop="beginDate">
+                <a-month-picker
+                  id="accountStatementBill-monthBox"
+                  class="monthBox"
+                  :disabled-date="disabledDate"
+                  v-model="monthVal"
+                  placeholder="请选择月份"
+                  @change="onChangeMonth" />
+              </a-form-model-item>
+            </a-col>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="accountStatementBill-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="accountStatementBill-reset">重置</a-button>
@@ -55,6 +66,15 @@
     </a-card>
     <a-card size="small" :bordered="false" class="accountStatementBill-wrap">
       <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 操作按钮 -->
+        <div class="table-operator">
+          <div class="tongji-bar">
+            总余额:{{ toThousands(countData&&countData.orderTotalAmount||0) }};
+            已对单余额:{{ toThousands(countData&&countData.receiptTotalAmount||0) }};
+            待对单余额:{{ toThousands(countData&&countData.useTotalAmount||0) }};
+            待选余额:{{ toThousands(countData&&countData.payTotalAmount||0) }};
+          </div>
+        </div>
         <!-- 列表 -->
         <s-table
           class="sTable fixPagination"
@@ -68,9 +88,9 @@
           :pageSize="30"
           :defaultLoadData="false"
           bordered>
-          <template slot="totalAmount" slot-scope="text, record">
-            <span v-if="$hasPermissions('B_asb_detail')" class="link-bule" @click="handleDetail(record)">{{ record.totalAmount }}</span>
-            <span v-else>{{ record.totalAmount }}</span>
+          <template slot="totalBalance" slot-scope="text, record">
+            <span v-if="$hasPermissions('B_asb_detail')" class="link-bule" @click="handleDetail(record)">{{ record.totalBalance }}</span>
+            <span v-else>{{ record.totalBalance }}</span>
           </template>
           <template slot="dealerType" slot-scope="text, record">
             {{ record.dealerTypeName1 }}>{{ record.dealerTypeName2 }}
@@ -97,6 +117,7 @@
 </template>
 
 <script>
+import moment from 'moment'
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { hdExportExcel } from '@/libs/exportExcel'
@@ -116,7 +137,10 @@ export default {
       tableHeight: 0,
       openModal: false,
       dealerType: [], // 商户类型
+      monthVal: '', // 初始化月份值
       queryParam: { //  查询条件
+        beginDate: '', // 月份开始时间
+        endDate: '', // 月份结束时间
         nameLike: '', // 经销商名称/别名
         dealerType1: undefined, //  商户类型
         dealerType2: undefined, //  商户类型
@@ -151,7 +175,8 @@ export default {
           return data
         })
       },
-      total: 0 // 合计
+      total: 0, // 合计
+      countData: null
     }
   },
   // 根据权限显示列表字段
@@ -162,12 +187,16 @@ export default {
         { title: '财务编码', dataIndex: 'kdMidCustomerFnumber', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '经销商名称', dataIndex: 'dealerName', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '商户别名', dataIndex: 'dealerAlias', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '总余额', scopedSlots: { customRender: 'totalAmount' }, width: '6%', align: 'center' },
-        { title: '待选余额', dataIndex: 'waitAmount', width: '6%', align: 'center', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '总余额', scopedSlots: { customRender: 'totalBalance' }, width: '6%', align: 'center' },
+        { title: '已对单余额', dataIndex: 'confirmBalance', width: '6%', align: 'center', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '待对单余额', dataIndex: 'waitConfirmBalance', width: '6%', align: 'center', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '待选余额', dataIndex: 'newBizBalance', width: '6%', align: 'center', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
         { title: '待选单数', dataIndex: 'waitCount', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '最新业务月份', dataIndex: 'lastBizDate', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '客服', dataIndex: 'kfName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '区域', dataIndex: 'subareaArea.subareaName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '省份', dataIndex: 'provinceName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '商户级别', dataIndex: 'dealerLevelDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '商户类型', scopedSlots: { customRender: 'dealerType' }, width: '15%', align: 'center' },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
@@ -176,6 +205,29 @@ export default {
     }
   },
   methods: {
+    // 选择月份  禁用选择当月以后日期
+    disabledDate (current) {
+      return current && current >= moment().endOf('day')
+    },
+    // 选择月份 change
+    onChangeMonth (date, dateString) {
+      this.monthVal = dateString
+      if (date && dateString != '') {
+        this.queryParam.beginDate = this.getMonthRange(dateString).firstDay
+        this.queryParam.endDate = this.getMonthRange(dateString).lastDay
+      } else {
+        this.queryParam.beginDate = undefined
+        this.queryParam.endDate = undefined
+      }
+    },
+    // 获取指定月份   第一天和最后一天
+    getMonthRange (targetMonth) {
+      // 获取指定月第一天(格式化为 YYYY-MM-DD)
+      const firstDay = moment(targetMonth).startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
+      // 获取指定月最后一天(格式化为 YYYY-MM-DD)
+      const lastDay = moment(targetMonth).endOf('month').format('YYYY-MM-DD') + ' 23:59:59'
+      return { firstDay, lastDay }
+    },
     // 区域分区
     subareaChange (val) {
       this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
@@ -190,6 +242,7 @@ export default {
     resetSearchForm () {
       this.queryParam.beginDate = ''
       this.queryParam.endDate = ''
+      this.monthVal = ''
       this.queryParam.nameLike = ''
       this.queryParam.dealerType1 = undefined
       this.queryParam.dealerType2 = undefined
@@ -280,4 +333,13 @@ export default {
       color: rgba(0, 0, 0);
     }
   }
+  .monthBox{
+    width: 100%;
+    /deep/.ant-calendar-picker-icon{
+      display:none !important;
+    }
+    /deep/.ant-calendar-picker input{
+      text-align:center;
+    }
+  }
 </style>

+ 36 - 1
src/views/financialManagement/manualEntryForm/list.vue

@@ -45,7 +45,17 @@
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="manualEntryForm-refresh">查询</a-button>
               <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="manualEntryForm-reset">重置</a-button>
-            </a-col>
+              <a-button
+                style="margin-left: 10px"
+                type="primary"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+                v-if="$hasPermissions('B_promotionFeeExport')"
+                id="manualEntryForm-export">导出</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
+              </a></a-col>
           </a-row>
         </a-form>
       </div>
@@ -117,6 +127,7 @@
 <script>
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
+import { hdExportExcel } from '@/libs/exportExcel'
 import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import baseModal from './baseModal.vue'
@@ -132,6 +143,7 @@ export default {
       spinning: false,
       baseModal: false,
       openModal: false,
+      exportLoading: false, // 导出按钮加载状态
       tableHeight: 0,
       queryParam: { //  查询条件
         beginDate: '',
@@ -201,6 +213,29 @@ export default {
       this.queryParam.beginDate = date[0] ? date[0] : ''
       this.queryParam.endDate = date[1] ? date[1] : ''
     },
+    //  导出  必填判断
+    handleExport () {
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.exportList()
+        } else {
+          _this.$message.error('请选择查询月份')
+          return false
+        }
+      })
+    },
+    // 导出
+    exportList () {
+      const _this = this
+      const params = JSON.parse(JSON.stringify(_this.queryParam))
+      _this.exportLoading = true
+      _this.spinning = true
+      hdExportExcel(promoSalesExpenseExport, params, '人工录入单', function () {
+        _this.exportLoading = false
+        _this.spinning = false
+      })
+    },
     // 客户
     custChange (v) {
       if (v && v.key) {