lilei 2 gün önce
ebeveyn
işleme
b1ced294e3

+ 29 - 5
src/api/verifyAccountChange.js

@@ -62,7 +62,7 @@ export const verifyAcountBillSubmit = params => {
 
 // 经销商余额-分页列表
 export const verifyAccountBalanceQueryPage = (params) => {
-  const url = `/verifyAccountBalance/queryPage/${params.pageNo}/${params.pageSize}`
+  const url = `/verifyAccountDealer/queryPage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
   delete params.pageSize
   return axios({
@@ -74,10 +74,22 @@ export const verifyAccountBalanceQueryPage = (params) => {
     }
   })
 }
+// 分页列表-合计
+export const verifyAccountBalanceQueryCount = (params) => {
+  const url = `/verifyAccountDealer/queryCount`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('经销商余额列表统计')
+    }
+  })
+}
 
 //对账余额明细接口
 export const verifyAccountBalanceQueryDetailPage = (params) => {
-  const url = `/verifyAccountBalance/queryDetailPage/${params.pageNo}/${params.pageSize}`
+  const url = `/verifyAccountDealer/queryDetailPage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
   delete params.pageSize
   return axios({
@@ -92,7 +104,7 @@ export const verifyAccountBalanceQueryDetailPage = (params) => {
 
 // 对账余额明细统计
 export const verifyAccountBalanceQueryDetailCount = (params) => {
-  const url = `/verifyAccountBalance/queryDetailCount`
+  const url = `/verifyAccountDealer/queryDetailCount`
   return axios({
     url: url,
     data: params,
@@ -104,7 +116,7 @@ export const verifyAccountBalanceQueryDetailCount = (params) => {
 }
 // 对账余额导出
 export const verifyAccountBalanceExport = (params) => {
-  const url = `/verifyAccountBalance/export`
+  const url = `/verifyAccountDealer/export`
   return axios({
     url: url,
     data: params,
@@ -117,7 +129,7 @@ export const verifyAccountBalanceExport = (params) => {
 }
 // 对账余额明细导出
 export const verifyAccountBalanceDetailExport = (params) => {
-  const url = `/verifyAccountBalance/detailExport`
+  const url = `/verifyAccountDealer/detailExport`
   return axios({
     url: url,
     data: params,
@@ -127,4 +139,16 @@ export const verifyAccountBalanceDetailExport = (params) => {
       'module': encodeURIComponent('对账余额明细列表导出')
     }
   })
+}
+
+// 刷新历史对账余额
+export const verifyAccountBalanceRefresh = (params) => {
+  return axios({
+    url: `/verifyAccountDealer/refreshData`,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('刷新历史对账余额')
+    }
+  })
 }

+ 4 - 0
src/components/Select/index.js

@@ -23,6 +23,10 @@ export default {
       type: String,
       required: true
     },
+    mode: {
+      type: String,
+      default: 'default'
+    },
     showType: {
       type: String,
       default: 'select'

+ 1 - 1
src/config/financialManagement.js

@@ -173,7 +173,7 @@ export default {
                 }
               },
               {
-                path: 'detail/:sn/:name',
+                path: 'detail/:sn/:name/:type',
                 name: 'accountStatementBillDetail',
                 component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/accountStatementBill/detail.vue'),
                 meta: {

+ 2 - 2
src/views/financialManagement/accountStatementBill/baseModal.vue

@@ -104,8 +104,8 @@ export default {
         this.$refs.ruleForm.resetFields()
       })
       this.form = {
-        dealerSn: data.dealerSn,
-        dealerName: data.dealerName,
+        dealerSn: data.dealer.dealerSn,
+        dealerName: data.dealer.dealerName,
         remarks: ''
       }
     }

+ 29 - 12
src/views/financialManagement/accountStatementBill/detail.vue

@@ -67,8 +67,9 @@
             <a-col :md="6" :sm="24">
               <a-form-item label="对单状态">
                 <v-select
-                  v-model="queryParam.billStatus"
+                  v-model="queryParam.bizStatusColl"
                   ref="billStatus"
+                  mode="multiple"
                   id="accountStatement-billStatus"
                   code="VERIFY_ACCOUNT_STATUS"
                   placeholder="请选择对单状态"
@@ -108,7 +109,8 @@
           ref="table"
           :style="{ height: tableHeight+80+'px' }"
           size="small"
-          :rowKey="(record) => record.id"
+          :rowKey="(record) => record.no"
+          rowKeyName="no"
           :scroll="{ y: tableHeight }"
           :columns="columns"
           :data="loadData"
@@ -148,7 +150,7 @@ export default {
         changeType: undefined,
         bizType: undefined,
         waitSelect: undefined,
-        billStatus: undefined
+        bizStatusColl: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
       creatDate: [], //  创建时间
@@ -255,16 +257,38 @@ export default {
       this.queryParam.changeType = undefined
       this.queryParam.bizType = undefined
       this.queryParam.waitSelect = undefined
-      this.queryParam.billStatus = undefined
+      this.queryParam.bizStatusColl = undefined
 
       this.$refs.table.refresh(true)
     },
-    pageInit () {
+    // 默认对单状态
+    setDefaultStatus () {
+      const type = this.$route.params.type
+      if (type == '0') {
+        this.queryParam.bizStatusColl = undefined
+        this.queryParam.waitSelect = undefined
+      }
+      if (type == '1') {
+        this.queryParam.bizStatusColl = ['WAIT_VERIFY', 'FINISH']
+        this.queryParam.waitSelect = undefined
+      }
+      if (type == '2') {
+        this.queryParam.bizStatusColl = ['WAIT_SUBMIT', 'WAIT_CONFIRM']
+        this.queryParam.waitSelect = undefined
+      }
+      if (type == '3') {
+        this.queryParam.bizStatusColl = undefined
+        this.queryParam.waitSelect = '1'
+      }
+      this.$refs.table.refresh(true)
+    },
+    pageInit (flag) {
       const _this = this
       this.dealerSn = this.$route.params.sn
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
+      _this.setDefaultStatus()
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
@@ -285,19 +309,12 @@ export default {
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
       this.pageInit()
-      this.resetSearchForm()
     }
   },
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
       this.pageInit()
-      this.resetSearchForm()
-    }
-    // 仅刷新列表,不重置页面
-    if (this.$store.state.app.updateList) {
-      this.pageInit()
-      this.$refs.table.refresh()
     }
   },
   beforeRouteEnter (to, from, next) {

+ 71 - 44
src/views/financialManagement/accountStatementBill/list.vue

@@ -69,10 +69,11 @@
         <!-- 操作按钮 -->
         <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) }};
+            总余额:{{ toThousands(countData&&countData.totalBalance||0) }};
+            已对单余额:{{ toThousands(countData&&countData.confirmBalance||0) }};
+            待对单余额:{{ toThousands(countData&&countData.waitConfirmBalance||0) }};
+            待选余额:{{ toThousands(countData&&countData.newBizBalance||0) }};
+            待选单数:{{ countData&&countData.newBizCount||0 }};
           </div>
         </div>
         <!-- 列表 -->
@@ -89,11 +90,25 @@
           :defaultLoadData="false"
           bordered>
           <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-if="$hasPermissions('B_asb_detail')" class="link-bule" @click="handleDetail(record,0)">{{ record.totalBalance }}</span>
             <span v-else>{{ record.totalBalance }}</span>
           </template>
+          <template slot="confirmBalance" slot-scope="text, record">
+            <span v-if="$hasPermissions('B_asb_detail')" class="link-bule" @click="handleDetail(record,1)">{{ record.confirmBalance }}</span>
+            <span v-else>{{ record.confirmBalance }}</span>
+          </template>
+          <template slot="waitConfirmBalance" slot-scope="text, record">
+            <span v-if="$hasPermissions('B_asb_detail')" class="link-bule" @click="handleDetail(record,2)">{{ record.waitConfirmBalance }}</span>
+            <span v-else>{{ record.waitConfirmBalance }}</span>
+          </template>
+          <template slot="newBizBalance" slot-scope="text, record">
+            <span v-if="$hasPermissions('B_asb_detail')" class="link-bule" @click="handleDetail(record,3)">{{ record.newBizBalance }}</span>
+            <span v-else>{{ record.newBizBalance }}</span>
+          </template>
           <template slot="dealerType" slot-scope="text, record">
-            {{ record.dealerTypeName1 }}>{{ record.dealerTypeName2 }}
+            <span v-if="record.dealer">
+              {{ record.dealer.dealerTypeName1 }}{{ record.dealer.dealerTypeName2?'>':'' }}{{ record.dealer.dealerTypeName2 }}
+            </span>
           </template>
           <!-- 操作 -->
           <template slot="action" slot-scope="text, record">
@@ -125,7 +140,7 @@ import subarea from '@/views/common/subarea.js'
 import dealerType from '@/views/common/dealerType.js'
 import customerService from '@/views/common/customerService.vue'
 import baseModal from './baseModal.vue'
-import { verifyAccountBalanceQueryPage, verifyAccountBalanceExport } from '@/api/verifyAccountChange.js'
+import { verifyAccountBalanceQueryPage, verifyAccountBalanceExport, verifyAccountBalanceQueryCount } from '@/api/verifyAccountChange.js'
 export default {
   name: 'AccountStatementBillList',
   mixins: [commonMixin],
@@ -139,8 +154,6 @@ export default {
       dealerType: [], // 商户类型
       monthVal: '', // 初始化月份值
       queryParam: { //  查询条件
-        beginDate: '', // 月份开始时间
-        endDate: '', // 月份结束时间
         nameLike: '', // 经销商名称/别名
         dealerType1: undefined, //  商户类型
         dealerType2: undefined, //  商户类型
@@ -158,20 +171,33 @@ export default {
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        const params = Object.assign(parameter, this.queryParam)
-
-        return verifyAccountBalanceQueryPage(params).then(res => {
+        const params = this.queryParam
+        const params1 = {
+          dealer: {
+            nameLike: params.nameLike,
+            dealerType1: params.dealerType1,
+            dealerType2: params.dealerType2,
+            dealerLevel: params.dealerLevel,
+            subareaArea: params.subareaArea,
+            kdMidCustomerFnumber: params.kdMidCustomerFnumber
+          },
+          bizMonth: this.monthVal ? this.monthVal + '-01' : '',
+          ...parameter
+        }
+        return verifyAccountBalanceQueryPage(params1).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
             const no = (data.pageNo - 1) * data.pageSize
             for (var i = 0; i < data.list.length; i++) {
               data.list[i].no = no + i + 1
+              data.list[i].lastBizDate = moment(data.list[i].lastBizDate).format('YYYY-MM')
             }
             this.total = data.count || 0
             this.disabled = false
           }
           this.spinning = false
+          this.getCount(params1)
           return data
         })
       },
@@ -184,20 +210,20 @@ export default {
     columns () {
       const arr = [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { 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: '财务编码', dataIndex: 'dealer.kdMidCustomerFnumber', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '经销商名称', dataIndex: 'dealer.dealerName', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '商户别名', dataIndex: 'dealer.dealerAlias', width: '15%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { 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: '已对单余额', scopedSlots: { customRender: 'confirmBalance' }, dataIndex: 'confirmBalance', width: '6%', align: 'center' },
+        { title: '待对单余额', scopedSlots: { customRender: 'waitConfirmBalance' }, dataIndex: 'waitConfirmBalance', width: '6%', align: 'center' },
+        { title: '待选余额', scopedSlots: { customRender: 'newBizBalance' }, dataIndex: 'newBizBalance', width: '6%', align: 'center' },
+        { title: '待选单数', dataIndex: 'newBizCount', 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: '区域', dataIndex: 'dealer.subareaArea.subareaName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '分区', dataIndex: 'dealer.subareaArea.subareaAreaName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '省份', dataIndex: 'dealer.provinceName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '商户级别', dataIndex: 'dealer.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' }
       ]
@@ -212,21 +238,6 @@ export default {
     // 选择月份 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) {
@@ -238,10 +249,14 @@ export default {
       this.queryParam.dealerType1 = v[0]
       this.queryParam.dealerType2 = v[1]
     },
+    // 统计信息
+    getCount (params) {
+      verifyAccountBalanceQueryCount(params).then(res => {
+        this.countData = res.data
+      })
+    },
     //  重置
     resetSearchForm () {
-      this.queryParam.beginDate = ''
-      this.queryParam.endDate = ''
       this.monthVal = ''
       this.queryParam.nameLike = ''
       this.queryParam.dealerType1 = undefined
@@ -259,7 +274,19 @@ export default {
     handleExport () {
       const _this = this
       _this.exportLoading = true
-      hdExportExcel(verifyAccountBalanceExport, _this.queryParam, '经销商对账单据余额-', function () {
+      const params = this.queryParam
+      const params1 = {
+        dealer: {
+          nameLike: params.nameLike,
+          dealerType1: params.dealerType1,
+          dealerType2: params.dealerType2,
+          dealerLevel: params.dealerLevel,
+          subareaArea: params.subareaArea,
+          kdMidCustomerFnumber: params.kdMidCustomerFnumber
+        },
+        bizMonth: this.monthVal ? this.monthVal + '-01' : ''
+      }
+      hdExportExcel(verifyAccountBalanceExport, params1, '经销商对账单据余额-', function () {
         _this.exportLoading = false
       })
     },
@@ -274,8 +301,8 @@ export default {
       this.$router.push({ name: 'accountStatementEdit', params: { sn: data.verifyAccountBillSn } })
     },
     // 详情
-    handleDetail (row) {
-      this.$router.push({ name: 'accountStatementBillDetail', params: { sn: row.dealerSn, name: row.dealerName } })
+    handleDetail (row, type) {
+      this.$router.push({ name: 'accountStatementBillDetail', params: { sn: row.dealer.dealerSn, name: row.dealer.dealerName, type: type } })
     },
     pageInit () {
       const _this = this
@@ -285,7 +312,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 250
+      this.tableHeight = window.innerHeight - tableSearchH - 240
     }
   },
   watch: {

+ 2 - 2
vue.config.js

@@ -107,9 +107,9 @@ const vueConfig = {
     // If you want to turn on the proxy, please remosve the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.2.10/ocs-admin',
+        target: 'http://192.168.2.10/ocs-admin',
         // target: 'https://t.ocs.360arrow.com/ocs-admin', //  练习
-        target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
+        // target: 'https://p.ocs.360arrow.com/ocs-admin', //  预发布
         ws: false,
         changeOrigin: true,
         pathRewrite: {