فهرست منبع

经销商账户

chenrui 3 ماه پیش
والد
کامیت
2aea9c8b35

+ 82 - 0
src/api/dealerAccount.js

@@ -0,0 +1,82 @@
+import { axios } from '@/utils/request'
+
+// 经销商账户列表   有分页
+export const dealerAccountList = (params) => {
+  const url = `/dealerAccount/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('经销商账户列表查询')
+    }
+  })
+}
+//  经销商账户  轮胎补贴金额详情列表   有分页
+export const dealerAccountFlowList = (params) => {
+  const url = `/dealerAccountFlow/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('轮胎补贴金额列表查询')
+    }
+  })
+}
+
+// 调账  保存
+export const dealerAccountSubmit = (params) => {
+  return axios({
+    url: '/dealerAccountChange/submit',
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('保存')
+    }
+  })
+}
+
+// 调账记录  列表  有分页
+export const dealerAccountRecordList = (params) => {
+  const url = `/dealerAccountChange/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('调账记录列表查询')
+    }
+  })
+}
+//  轮胎补贴金额 导出
+export const dealerAccountFlowExport = (params) => {
+  return axios({
+    url: '/dealerAccountFlow/exportExcel',
+    data: params,
+    method: 'post',
+    responseType: 'blob',
+    headers: {
+      'module': encodeURIComponent('导出')
+    }
+  })
+}
+
+// 经销商账户  列表导出
+export const dealerAccountExport = (params) => {
+  return axios({
+    url: '/dealerAccount/exportExcel',
+    data: params,
+    method: 'post',
+    responseType: 'blob',
+    headers: {
+      'module': encodeURIComponent('导出')
+    }
+  })
+}

+ 1 - 1
src/config/dealerManagement.js

@@ -131,7 +131,7 @@ export default {
           }
           }
         },
         },
         {
         {
-          path: 'detail/:sn',
+          path: 'detail/:sn/:name/:num',
           name: 'dealerAccountDetail',
           name: 'dealerAccountDetail',
           component: () => import(/* webpackChunkName: "dealerManagement" */ '@/views/dealerManagement/dealerAccount/detail.vue'),
           component: () => import(/* webpackChunkName: "dealerManagement" */ '@/views/dealerManagement/dealerAccount/detail.vue'),
           meta: {
           meta: {

+ 50 - 127
src/views/dealerManagement/dealerAccount/checkAccountModal.vue

@@ -1,7 +1,7 @@
 <template>
 <template>
   <a-modal
   <a-modal
     centered
     centered
-    class="costAdd-modal"
+    class="checkAccount-modal"
     :footer="null"
     :footer="null"
     :maskClosable="false"
     :maskClosable="false"
     title="调账"
     title="调账"
@@ -11,20 +11,20 @@
     <div>
     <div>
       <a-spin :spinning="spinning" tip="Loading...">
       <a-spin :spinning="spinning" tip="Loading...">
         <a-form-model
         <a-form-model
-          id="costAddModal-form"
+          id="checkAccountModal-form"
           ref="ruleForm"
           ref="ruleForm"
           :model="form"
           :model="form"
           :rules="rules"
           :rules="rules"
           :label-col="formItemLayout.labelCol"
           :label-col="formItemLayout.labelCol"
           :wrapper-col="formItemLayout.wrapperCol"
           :wrapper-col="formItemLayout.wrapperCol"
         >
         >
-          <a-form-model-item label="客户名称" prop="dealerSn" v-if="form.defaultFlag==0">
-            嘀嘀嘀嘀嘀嘀
+          <a-form-model-item label="客户名称">
+            {{ $route.params.name }}
           </a-form-model-item>
           </a-form-model-item>
-          <a-form-model-item label="调账金额" prop="ruleValue1">
+          <a-form-model-item label="调账金额" prop="changeAmount">
             <a-input-number
             <a-input-number
-              id="costAddModal-ruleValue1"
-              v-model="form.ruleValue1"
+              id="checkAccountModal-changeAmount"
+              v-model="form.changeAmount"
               style="width:90%;"
               style="width:90%;"
               :max="99999999"
               :max="99999999"
               :precision="2"
               :precision="2"
@@ -33,47 +33,51 @@
           </a-form-model-item>
           </a-form-model-item>
           <a-row :gutter="16">
           <a-row :gutter="16">
             <a-col :span="10">
             <a-col :span="10">
-              <a-form-model-item label="调账前" prop="ruleValue1" :label-col="{span:10}" :wrapper-col="{ span: 10}">
-                1111111
+              <a-form-model-item label="调账前" :label-col="{span:10}" :wrapper-col="{ span: 10}">
+                {{ ($route.params.num||$route.params.num==0) ?toThousands($route.params.num):'--' }}
               </a-form-model-item>
               </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :span="12">
             <a-col :span="12">
-              <a-form-model-item label="调账后" prop="ruleValue1" :label-col="{span:10}" :wrapper-col="{ span: 10}">
-                222222
+              <a-form-model-item label="调账后" :label-col="{span:10}" :wrapper-col="{ span: 10}">
+                {{ ($route.params.num||$route.params.num==0) ?(form.changeAmount||form.changeAmount==0) ?toThousands($route.params.num*1+form.changeAmount*1):'--' :'--' }}
               </a-form-model-item>
               </a-form-model-item>
             </a-col>
             </a-col>
           </a-row>
           </a-row>
-          <a-form-model-item label="备注" prop="ruleValue1">
-            <a-input v-model="form.desc" style="width:90%;" :maxLength="50" type="textarea" placeholder="请输入备注(最多50字符)"/>
+          <a-form-model-item label="备注">
+            <a-input
+              id="checkAccountModal-remark"
+              v-model="form.remark"
+              style="width:90%;"
+              :maxLength="50"
+              type="textarea"
+              placeholder="请输入备注(最多50字符)"/>
           </a-form-model-item>
           </a-form-model-item>
         </a-form-model>
         </a-form-model>
         <div class="btn-cont">
         <div class="btn-cont">
-          <a-button type="primary" id="costAddModal-save" @click="handleSave">提交</a-button>
-          <a-button id="costAddModal-cancel" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+          <a-button type="primary" id="checkAccountModal-save" @click="handleSubmit">提交</a-button>
+          <a-button id="checkAccountModal-cancel" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
         </div>
         </div>
       </a-spin>
       </a-spin>
     </div>
     </div>
     <!-- 提交  选择审批人员 -->
     <!-- 提交  选择审批人员 -->
-    <chooseDepartUserModal :openModal="openDepartUserModal" @close="openDepartUserModal=false" @submit="handleSubmit"></chooseDepartUserModal>
+    <chooseDepartUserModal :openModal="openDepartUserModal" @close="openDepartUserModal=false" @submit="handleSave"></chooseDepartUserModal>
   </a-modal>
   </a-modal>
 </template>
 </template>
 
 
 <script>
 <script>
+import { commonMixin } from '@/utils/mixin'
 // 组件
 // 组件
 import chooseDepartUserModal from './chooseDepartUserModal.vue'
 import chooseDepartUserModal from './chooseDepartUserModal.vue'
 // 接口
 // 接口
-import { getSubsidyRuleList, createSubsidyRule } from '@/api/subsidyRule'
+import { dealerAccountSubmit } from '@/api/dealerAccount'
 export default {
 export default {
-  name: 'CostAddModal',
+  name: 'CheckAccountModal',
+  mixins: [commonMixin],
   components: { chooseDepartUserModal },
   components: { chooseDepartUserModal },
   props: {
   props: {
     openModal: { //  弹框显示状态
     openModal: { //  弹框显示状态
       type: Boolean,
       type: Boolean,
       default: false
       default: false
-    },
-    pageType: { //  页面类型
-      type: String,
-      default: ''
     }
     }
   },
   },
   data () {
   data () {
@@ -86,120 +90,47 @@ export default {
       },
       },
       // 提交数据
       // 提交数据
       form: {
       form: {
-        defaultFlag: 0, // 0指定客户  1默认
-        dealerSn: undefined, // 客户名称
-        ruleValue1: undefined, // 服务费比例
-        ruleType: undefined, // 弹窗类型
-        effectType: undefined// 生效方式
+        dealerSn: undefined, // 客户sn
+        changeAmount: undefined, // 调账金额
+        remark: undefined// 备注
       },
       },
       // 必填项判断
       // 必填项判断
       rules: {
       rules: {
-        dealerSn: [{ required: true, message: '请选择客户名称', trigger: 'change' }],
-        ruleValue1: [{ required: true, message: '请输入服务费比例', trigger: 'blur' }],
-        effectType: [{ required: true, message: '请选择生效方式', trigger: 'change' }]
+        changeAmount: [{ required: true, message: '请输入调账金额', trigger: 'blur' }]
       },
       },
       openDepartUserModal: false // 打开 选择审批人员 弹窗
       openDepartUserModal: false // 打开 选择审批人员 弹窗
     }
     }
   },
   },
   methods: {
   methods: {
-    // 客户名称 change
-    custChange (val) {
-      if (val && val.key) {
-        this.form.dealerSn = val.key
-        this.getHistoryData({ dealerSn: val.key, subsidyQueryStatus: 'NOT_FINISH', ruleType: this.pageType })
-      } else {
-        this.feeDataList = null
-      }
-    },
-    // 0指定客户  1默认客户  change
-    defaultChange (e) {
-      this.form.defaultChange = e.target.value
-      if (e.target.value == '1') {
-        this.getHistoryData({ defaultFlag: 1, subsidyQueryStatus: 'NOT_FINISH', ruleType: this.pageType })
-      } else {
-        this.feeDataList = null
-      }
-    },
+    // 提交  调起选择审批人员
     handleSubmit () {
     handleSubmit () {
-
-    },
-    // 获取当月/次月  历史数据值
-    getHistoryData (ajaxData) {
-      this.spinning = true
-      getSubsidyRuleList(ajaxData).then(res => {
-        if (res.status == 200) {
-          this.feeDataList = res.data
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          this.openDepartUserModal = true
         } else {
         } else {
-          this.feeDataList = null
+          console.log('error submit!!')
+          return false
         }
         }
-        this.spinning = false
       })
       })
     },
     },
     // 保存
     // 保存
-    handleSave () {
+    handleSave (val) {
       const _this = this
       const _this = this
-      _this.openDepartUserModal = true
-      // this.$refs.ruleForm.validate(valid => {
-      //   if (valid) {
-      //     _this.form.ruleType = _this.pageType
-      //     _this.spinning = true
-      //     subsidyRuleSave(this.form).then(res => {
-      //       if (res.status == 200) {
-      //         if (!res.data) {
-      //           this.isShow = false
-      //           this.$message.success(res.message)
-      //           this.$emit('ok')
-      //         } else {
-      //           _this.openTip(res.data)
-      //         }
-      //       }
-      //       this.spinning = false
-      //     })
-      //   } else {
-      //     console.log('error submit!!')
-      //     return false
-      //   }
-      // })
-    },
-    openTip (code) {
-      const _this = this
-      if (code === 'IN_USE') {
-        this.$confirm({
-          title: '提示',
-          content: '将重新生成新的' + (_this.pageType === 'SERVICE_FEE' ? '服务费比例' : '运费补贴') + ',并结束当前' + (_this.pageType === 'SERVICE_FEE' ? '服务费比例。' : '运费补贴。'),
-          centered: true,
-          onOk () {
-            createSubsidyRule(_this.form).then(res => {
-              if (res.status == 200) {
-                _this.isShow = false
-                _this.$message.success(res.message)
-                _this.$emit('ok')
-              }
-            })
-          }
-        })
-      } else {
-        this.$info({
-          title: '提示',
-          content: '已存在【未开始】的' + (_this.pageType === 'SERVICE_FEE' ? '服务费比例' : '运费补贴'),
-          centered: true,
-          onOk () {
-            console.log('知道了')
-          }
-        })
-      }
+      val.dealerSn = this.$route.params.sn
+      _this.form = { ..._this.form, ...val }
+      _this.spinning = true
+      dealerAccountSubmit(_this.form).then(res => {
+        if (res.status == 200) {
+          _this.$emit('ok')
+          _this.isShow = false
+        }
+        _this.spinning = false
+      })
     },
     },
-    // 重置
     resetFormData () {
     resetFormData () {
-      this.form.defaultFlag = 0
       this.form.dealerSn = undefined
       this.form.dealerSn = undefined
-      this.form.ruleValue1 = undefined
-      this.form.ruleType = undefined
-      this.form.effectType = undefined
-      if (this.form.defaultFlag == 0) {
-        this.$refs.dealerSubareaScopeList.resetForm()
-      }
-      this.feeDataList = null
+      this.form.changeAmount = undefined
+      this.form.remark = undefined
       this.$refs.ruleForm.resetFields()
       this.$refs.ruleForm.resetFields()
     }
     }
   },
   },
@@ -220,15 +151,7 @@ export default {
 </script>
 </script>
 
 
 <style lang="less">
 <style lang="less">
-  .costAdd-modal{
-    .formList{
-      margin-left:42px;
-    }
-    .formBoxList{
-      div{
-        margin-bottom:5px;
-      }
-    }
+  .checkAccount-modal{
     .ant-modal-body {
     .ant-modal-body {
       padding: 40px 40px 24px;
       padding: 40px 40px 24px;
     }
     }

+ 74 - 63
src/views/dealerManagement/dealerAccount/checkRecordModal.vue

@@ -1,36 +1,34 @@
 <template>
 <template>
   <!-- 调账记录 -->
   <!-- 调账记录 -->
   <a-drawer
   <a-drawer
-    :title="'调账记录'+titVal"
+    :title="'调账记录('+$route.params.name+')'"
     placement="right"
     placement="right"
     closable
     closable
     :visible="isShow"
     :visible="isShow"
-    class="lookUpCustomers-modal"
+    class="checkRecord-modal"
     @close="isShow=false"
     @close="isShow=false"
-    width="75%">
+    width="78%">
     <a-spin :spinning="spinning" tip="Loading...">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 搜索条件 -->
       <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
       <div ref="tableSearch" class="table-page-search-wrapper">
-        <a-form layout="inline" id="dealerAccountNewList-form" @keyup.enter.native="$refs.table.refresh(true)">
+        <a-form layout="inline" id="checkRecordModal-form" @keyup.enter.native="$refs.table.refresh(true)">
           <a-row :gutter="15">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
-              <a-form-model-item label="申请日期" prop="time">
+              <a-form-model-item label="申请日期">
                 <rangeDate
                 <rangeDate
                   ref="rangeDate"
                   ref="rangeDate"
-                  :showTime="false"
-                  :today="false"
-                  :value="queryParam.time"
-                  id="tireSalesDealerList-time"
+                  :value="time"
+                  id="checkRecordModal-time"
                   @change="dateChange" />
                   @change="dateChange" />
               </a-form-model-item>
               </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="入账类型">
               <a-form-model-item label="入账类型">
                 <v-select
                 <v-select
-                  v-model="queryParam.dealerLevel"
-                  ref="dealerLevel"
-                  id="tireSalesDealerList-dealerLevel"
-                  code="DEALER_LEVEL"
+                  v-model="queryParam.amountType"
+                  ref="amountType"
+                  id="checkRecordModal-amountType"
+                  code="DEALER_AMOUNT_TYPE"
                   placeholder="请选择入账类型"
                   placeholder="请选择入账类型"
                   allowClear></v-select>
                   allowClear></v-select>
               </a-form-model-item>
               </a-form-model-item>
@@ -38,10 +36,9 @@
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-model-item label="审核状态">
               <a-form-model-item label="审核状态">
                 <v-select
                 <v-select
-                  v-model="queryParam.dealerLevel"
-                  ref="dealerLevel"
-                  id="tireSalesDealerList-dealerLevel"
-                  code="DEALER_LEVEL"
+                  v-model="queryParam.status"
+                  id="checkRecordModal-status"
+                  code="DEALER_ADJU_ADUIT"
                   placeholder="请选择审核状态"
                   placeholder="请选择审核状态"
                   allowClear></v-select>
                   allowClear></v-select>
               </a-form-model-item>
               </a-form-model-item>
@@ -57,24 +54,33 @@
       <s-table
       <s-table
         class="sTable fixPagination"
         class="sTable fixPagination"
         ref="table"
         ref="table"
-        :style="{ height: tableHeight+70+'px' }"
+        :style="{ height:770+'px' }"
         size="small"
         size="small"
         :rowKey="(record) => record.id"
         :rowKey="(record) => record.id"
         :columns="columns"
         :columns="columns"
         :data="loadData"
         :data="loadData"
         :pageSize="30"
         :pageSize="30"
-        :scroll="{ y: tableHeight }"
+        :scroll="{ y: 730 }"
         :defaultLoadData="false"
         :defaultLoadData="false"
         bordered>
         bordered>
-        <!-- 轮胎补贴金额 -->
-        <template slot="moneyNum" slot-scope="text, record">
-          <span v-if="$hasPermissions('B_salesDetail')" class="link-bule" @click="handleDetail(record)">111111111111</span>
-          <span v-else>111111111111</span>
+        <!-- 记账日期   审核通过时显示审核时间 -->
+        <template slot="postingDate" slot-scope="text, record">
+          {{ record.status==='AUDIT_PASS'?record.auditDate:'--' }}
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            v-if="$hasPermissions('B_dealerAccount_edit')"
+            class="button-info"
+            @click="handleCheck(record)"
+            :id="'checkRecordModal-audit-btn'+record.id">审核进度</a-button>
         </template>
         </template>
       </s-table>
       </s-table>
     </a-spin>
     </a-spin>
     <!-- 审核进度 -->
     <!-- 审核进度 -->
-    <verifyModal v-drag :openModal="openVerifyModal" :itemId="itemId" :itemSn="itemSn" @close="openVerifyModal=false"></verifyModal>
+    <verifyModal v-drag :openModal="openVerifyModal" :itemSn="itemSn" @close="openVerifyModal=false"></verifyModal>
   </a-drawer>
   </a-drawer>
 </template>
 </template>
 
 
@@ -82,17 +88,15 @@
 import { commonMixin } from '@/utils/mixin'
 import { commonMixin } from '@/utils/mixin'
 // 组件
 // 组件
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
-import chooseDealer from '@/views/dealerManagement/provincialWarehouseManagement/chooseDealer.vue'
-import { saveBatchDealerList } from '@/api/provinceServiceCenter'
 import rangeDate from '@/views/common/rangeDate.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import verifyModal from './verifyModal.vue'
 import verifyModal from './verifyModal.vue'
 // 接口
 // 接口
-import { dealerUserList } from '@/api/dealer'
+import { dealerAccountRecordList } from '@/api/dealerAccount'
 
 
 export default {
 export default {
-  name: 'AddDealerModal',
+  name: 'CheckRecordModal',
   mixins: [commonMixin],
   mixins: [commonMixin],
-  components: { STable, VSelect, chooseDealer, rangeDate, verifyModal },
+  components: { STable, VSelect, rangeDate, verifyModal },
   props: {
   props: {
     openModal: { //  弹框显示状态
     openModal: { //  弹框显示状态
       type: Boolean,
       type: Boolean,
@@ -100,28 +104,37 @@ export default {
     }
     }
   },
   },
   data () {
   data () {
+    const _this = this
     return {
     return {
       spinning: false,
       spinning: false,
+      disabled: false, // 查询、重置按钮是否可操作
       isShow: this.openModal, //  是否打开弹框
       isShow: this.openModal, //  是否打开弹框
-      titVal: '(经销商名称)',
-      queryParam: { time: [], dealerLevel: '' },
-      openVerifyModal: true, // 审核进度弹窗
+      time: [], // 申请时间
+      queryParam: {
+        beginDate: '', // 开始时间
+        endDate: '', // 结束时间
+        amountType: undefined, // 入账类型
+        status: undefined// 审核状态
+      },
+      openVerifyModal: false, // 审核进度弹窗
+      itemSn: null, // 当前行sn
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '申请时间', dataIndex: 'dealerTypeName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '审核时间', dataIndex: 'dealerTypeName1', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '记账日期', dataIndex: 'dealerTypeName2', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '入账类型', dataIndex: 'dealerTypeName3', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '金额(¥)', dataIndex: 'dealerLevelDictValue', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '审核状态', dataIndex: 'dealerTypeName4', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'moneyNum' }, width: '10%', align: 'center' },
-        { title: '备注', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
+        { title: '申请时间', dataIndex: 'createDate', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审核时间', dataIndex: 'auditDate', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '记账日期', width: '13%', align: 'center', scopedSlots: { customRender: 'postingDate' } },
+        { title: '入账类型', dataIndex: 'amountTypeDictValue', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '金额(¥)', dataIndex: 'changeAmount', width: '13%', align: 'right', customRender: text => { return (text || text == 0) ? _this.toThousands(text) : '--' } },
+        { title: '审核状态', dataIndex: 'statusDictValue', width: '13%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '13%', align: 'center' },
+        { title: '备注', dataIndex: 'remark', width: '15%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
         this.disabled = true
         this.disabled = true
         this.spinning = true
         this.spinning = true
-        return dealerUserList(Object.assign(parameter, this.queryParam)).then(res => {
+        this.queryParam.dealerSn = this.$route.params.sn
+        return dealerAccountRecordList(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           let data
           if (res.status == 200) {
           if (res.status == 200) {
             data = res.data
             data = res.data
@@ -140,36 +153,29 @@ export default {
   },
   },
   methods: {
   methods: {
     // 审核进度
     // 审核进度
-    handleDetail () {
+    handleCheck (row) {
+      this.itemSn = row.accountChangeSn
       this.openVerifyModal = true
       this.openVerifyModal = true
     },
     },
     //  日期选择  change
     //  日期选择  change
     dateChange (date) {
     dateChange (date) {
       if (date[0] && date[1]) {
       if (date[0] && date[1]) {
-        this.queryParam.time = date
+        this.time = date
       } else {
       } else {
-        this.queryParam.time = []
+        this.time = []
       }
       }
-      this.queryParam.bizBeginDate = date[0] ? date[0].replace(/-/g, '') : ''
-      this.queryParam.bizEndDate = date[1] ? date[1].replace(/-/g, '') : ''
+      this.queryParam.beginDate = date[0] || ''
+      this.queryParam.endDate = date[1] || ''
     },
     },
-    handleAddDealer (list) {
-      const newList = list.map(item => {
-        return {
-          dealerSn: item.dealerSn,
-          dealerName: item.dealerName,
-          dealerLevel: item.dealerLevel
-        }
-      })
-      this.spinning = true
-      saveBatchDealerList(newList).then(res => {
-        if (res.status == 200) {
-          this.$message.success(res.message)
-        }
-        this.spinning = false
-        this.$emit('ok')
-        this.isShow = false
-      })
+    // 重置
+    resetSearchForm () {
+      this.time = []
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.amountType = undefined
+      this.queryParam.status = undefined
+      this.$refs.rangeDate.resetDate()
+      this.$refs.table.refresh(true)
     }
     }
   },
   },
   watch: {
   watch: {
@@ -181,6 +187,11 @@ export default {
     isShow (newValue, oldValue) {
     isShow (newValue, oldValue) {
       if (!newValue) {
       if (!newValue) {
         this.$emit('close')
         this.$emit('close')
+        this.resetSearchForm()
+      } else {
+        this.$nextTick(() => {
+          this.$refs.table.refresh(true)
+        })
       }
       }
     }
     }
   }
   }

+ 57 - 173
src/views/dealerManagement/dealerAccount/detail.vue

@@ -1,33 +1,37 @@
 <template>
 <template>
-  <div class="categorySet-wrap">
+  <div class="dealerAccountDetail-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
     <a-spin :spinning="spinning" tip="Loading...">
       <div>
       <div>
         <a-page-header :ghost="false" :backIcon="false" class="header-bar">
         <a-page-header :ghost="false" :backIcon="false" class="header-bar">
           <!-- 自定义的二级文字标题 -->
           <!-- 自定义的二级文字标题 -->
           <template slot="subTitle">
           <template slot="subTitle">
-            <a id="salesEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
-            <span class="subTitle-word text-overflow" style="margin:0 15px;">轮胎补贴金额(箭冠汽配东莞店):<span style="font-size:20px;">11212121</span></span>
-            <a-button type="danger" style="margin-right:15px;" ghost id="settingsIndex-addArea" @click="openCheckAccountModal=true">调账</a-button>
-            <a-button type="primary" class="button-info" ghost id="settingsIndex-addArea" @click="openCheckRecordModal=true">调整记录</a-button>
+            <a id="dealerAccountDetail-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
+            <span class="subTitle-word text-overflow" style="margin:0 15px;">轮胎补贴金额({{ $route.params.name }}):<span style="vertical-align: middle;">¥</span><span style="font-size:20px;vertical-align: text-bottom;">{{ toThousands($route.params.num) }}</span></span>
+            <a-button type="danger" style="margin-right:15px;" ghost id="dealerAccountDetail-checkAccount" @click="openCheckAccountModal = true">调账</a-button>
+            <a-button type="primary" class="button-info" ghost id="dealerAccountDetail-checkRecord" @click="openCheckRecordModal=true">调账记录</a-button>
           </template>
           </template>
         </a-page-header>
         </a-page-header>
       </div>
       </div>
       <a-card size="small" :bordered="false">
       <a-card size="small" :bordered="false">
         <div ref="tableSearch" class="table-page-search-wrapper newTableSearchName" >
         <div ref="tableSearch" class="table-page-search-wrapper newTableSearchName" >
-          <a-form layout="inline" id="settingsIndex-form" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-form-model
+            layout="inline"
+            :model="queryParam"
+            id="dealerAccountDetail-form"
+            @keyup.enter.native="$refs.table.refresh(true)">
             <a-row :gutter="15">
             <a-row :gutter="15">
               <a-col :md="6" :sm="24">
               <a-col :md="6" :sm="24">
-                <a-form-model-item label="时间" prop="time">
-                  <rangeDate ref="rangeDate" id="actualSalesReportList-time" :value="queryParam.time" @change="dateChange" />
+                <a-form-model-item label="时间">
+                  <rangeDate ref="rangeDate" id="dealerAccountDetail-time" :value="time" @change="dateChange" />
                 </a-form-model-item>
                 </a-form-model-item>
               </a-col>
               </a-col>
               <a-col :md="6" :sm="24">
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="业务类型">
                 <a-form-model-item label="业务类型">
                   <v-select
                   <v-select
-                    v-model="queryParam.dealerLevel"
-                    ref="dealerLevel"
-                    id="actualSalesReportList-dealerLevel"
-                    code="DEALER_LEVEL"
+                    v-model="queryParam.flowBizType"
+                    ref="flowBizType"
+                    id="dealerAccountDetail-flowBizType"
+                    code="FLOW_BIZ_TYPE"
                     placeholder="请选择业务类型"
                     placeholder="请选择业务类型"
                     allowClear></v-select>
                     allowClear></v-select>
                 </a-form-model-item>
                 </a-form-model-item>
@@ -35,17 +39,17 @@
               <a-col :md="6" :sm="24">
               <a-col :md="6" :sm="24">
                 <a-form-model-item label="入账类型">
                 <a-form-model-item label="入账类型">
                   <v-select
                   <v-select
-                    v-model="queryParam.dealerLevel"
-                    ref="dealerLevel"
-                    id="actualSalesReportList-dealerLevel"
-                    code="DEALER_LEVEL"
+                    v-model="queryParam.amountType"
+                    ref="amountType"
+                    id="dealerAccountDetail-amountType"
+                    code="DEALER_AMOUNT_TYPE"
                     placeholder="请选择入账类型"
                     placeholder="请选择入账类型"
                     allowClear></v-select>
                     allowClear></v-select>
                 </a-form-model-item>
                 </a-form-model-item>
               </a-col>
               </a-col>
               <a-col :md="6" :sm="24">
               <a-col :md="6" :sm="24">
-                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="settingsIndex-refresh">查询</a-button>
-                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="settingsIndex-reset">重置</a-button>
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="dealerAccountDetail-refresh">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="dealerAccountDetail-reset">重置</a-button>
                 <a-button
                 <a-button
                   style="margin-left: 10px"
                   style="margin-left: 10px"
                   type="primary"
                   type="primary"
@@ -54,10 +58,10 @@
                   :disabled="disabled"
                   :disabled="disabled"
                   :loading="exportLoading"
                   :loading="exportLoading"
                   v-if="$hasPermissions('B_actualSalesReport_export')"
                   v-if="$hasPermissions('B_actualSalesReport_export')"
-                  id="actualSalesReportList-export">导出</a-button>
+                  id="dealerAccountDetail-export">导出</a-button>
               </a-col>
               </a-col>
             </a-row>
             </a-row>
-          </a-form>
+          </a-form-model>
         </div>
         </div>
         <!-- 列表 -->
         <!-- 列表 -->
         <s-table
         <s-table
@@ -76,7 +80,7 @@
       </a-card>
       </a-card>
     </a-spin>
     </a-spin>
     <!-- 调账 -->
     <!-- 调账 -->
-    <check-account-modal v-drag :openModal="openCheckAccountModal" @ok="$refs.table.refresh(true)" @close="openCheckAccountModal = false" />
+    <check-account-modal v-drag ref="checkAccountModal" :openModal="openCheckAccountModal" @ok="$refs.table.refresh(true)" @close="openCheckAccountModal = false" />
     <!-- 调账记录 -->
     <!-- 调账记录 -->
     <check-record-modal v-drag :openModal="openCheckRecordModal" @ok="$refs.table.refresh(true)" @close="openCheckRecordModal = false" />
     <check-record-modal v-drag :openModal="openCheckRecordModal" @ok="$refs.table.refresh(true)" @close="openCheckRecordModal = false" />
   </div>
   </div>
@@ -89,41 +93,44 @@ import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import checkAccountModal from './checkAccountModal.vue'
 import checkAccountModal from './checkAccountModal.vue'
 import checkRecordModal from './checkRecordModal.vue'
 import checkRecordModal from './checkRecordModal.vue'
+import { hdExportExcel } from '@/libs/exportExcel'
 // 接口
 // 接口
-import { queryDealerScopePage, bizuserScopeDelete, findById, queryAreaScope, queryDealerScope, saveAreaScope, saveDealerScope } from '@/api/bizuser'
+import { dealerAccountFlowList, dealerAccountFlowExport } from '@/api/dealerAccount'
 export default {
 export default {
-  name: 'SettingsIndex',
+  name: 'DealerAccountDetail',
   mixins: [commonMixin],
   mixins: [commonMixin],
   components: { STable, VSelect, rangeDate, checkAccountModal, checkRecordModal },
   components: { STable, VSelect, rangeDate, checkAccountModal, checkRecordModal },
   data () {
   data () {
+    const _this = this
     return {
     return {
       spinning: false,
       spinning: false,
       tableHeight: 0, // 表格高度
       tableHeight: 0, // 表格高度
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出时加载状态
       openCheckAccountModal: false, // 打开调账弹窗
       openCheckAccountModal: false, // 打开调账弹窗
       openCheckRecordModal: false, // 打开调账记录弹窗
       openCheckRecordModal: false, // 打开调账记录弹窗
       // 查询参数
       // 查询参数
+      time: [],
       queryParam: {
       queryParam: {
-        hasDetail: 0,
-        bizType: undefined, // 区域分区区别
-        bizSn: undefined, // 当前行sn
-        dealerName: '', // 经销商
-        dealerLevel: undefined
+        beginDate: '', // 开始时间
+        endDate: '', // 结束时间
+        flowBizType: undefined, // 业务类型
+        amountType: undefined // 入账类型
       },
       },
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '记账日期', dataIndex: 'createDate', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '业务类型', dataIndex: 'subareaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '入账类型', dataIndex: 'subareaAreaName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '金额(¥)', dataIndex: 'dealerName', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '备注', dataIndex: 'dealerName', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+        { title: '记账日期', dataIndex: 'accountDate', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务类型', dataIndex: 'flowBizTypeDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '入账类型', dataIndex: 'amountTypeDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '金额(¥)', dataIndex: 'flowAmount', width: '16%', align: 'center', customRender: text => { return (text || text == 0) ? _this.toThousands(text) : '--' } },
+        { title: '备注', dataIndex: 'remark', width: '16%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
       ],
       ],
       loadData: parameter => {
       loadData: parameter => {
         this.disabled = true
         this.disabled = true
         this.spinning = true
         this.spinning = true
-        this.queryParam.userSn = this.$route.query.sn
+        this.queryParam.dealerSn = this.$route.params.sn
         // 获取列表数据  有分页
         // 获取列表数据  有分页
-        return queryDealerScopePage(Object.assign(parameter, this.queryParam)).then(res => {
+        return dealerAccountFlowList(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           let data
           if (res.status == 200) {
           if (res.status == 200) {
             data = res.data
             data = res.data
@@ -144,157 +151,35 @@ export default {
     //  时间  change
     //  时间  change
     dateChange (date) {
     dateChange (date) {
       if (date[0] && date[1]) {
       if (date[0] && date[1]) {
-        this.queryParam.time = date
+        this.time = date
       } else {
       } else {
-        this.queryParam.time = []
+        this.time = []
       }
       }
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.beginDate = date[0] || ''
       this.queryParam.endDate = date[1] || ''
       this.queryParam.endDate = date[1] || ''
     },
     },
-    // 选择区域>分区
-    handleArea (con) {
-      const chooseData = con.checked
-      const newData = []
-      chooseData.forEach(item => {
-        const obj = {}
-        obj.userSn = this.$route.query.sn
-        obj.bizUserSn = this.infoObj.bizUserSn
-        if (item.indexOf('_') != -1) { // 分区获取数据带_    区域不带下划线
-          obj.bizType = 'subarea_area'
-          obj.bizSn = item.replace('_', '')
-          newData.push(obj)
-        } else {
-          obj.bizType = 'subarea'
-          obj.bizSn = item
-          newData.push(obj)
-        }
-      })
-      this.saveChooseArea(newData)
-    },
-    // 保存区域分区数据
-    saveChooseArea (list) {
-      const _this = this
-      const newAjaxData = {}
-      newAjaxData.userSn = _this.$route.query.sn
-      newAjaxData.bizUserScopeList = list
-      saveAreaScope(newAjaxData).then(res => {
-        if (res.status == 200) {
-          _this.openChooseArea = false
-          _this.resetSearchForm()
-        }
-      })
-    },
-    // tabs 选择
-    handleTabs (val) {
-      this.activeKeyVal = val
-      if (val == 2) {
-        this.$refs.setCategory.pageInit()
-      } else if (val == 3) {
-        this.$refs.setSupplier.pageInit()
-      }
-    },
-    // 所在区域分区查询
-    subareaChange (val) {
-      if (val.length == 1) {
-        this.queryParam.bizSn = val[0]
-        this.queryParam.bizType = 'subarea'
-      } else if (val.length == 2) {
-        this.queryParam.bizSn = val[1]
-        this.queryParam.bizType = 'subarea_area'
-      } else {
-        this.queryParam.bizSn = undefined
-        this.queryParam.bizType = undefined
-      }
-    },
     // 重置
     // 重置
     resetSearchForm () {
     resetSearchForm () {
       this.queryParam = {
       this.queryParam = {
-        bizSn: undefined,
-        bizType: undefined,
-        dealerName: '',
-        hasDetail: 0
+        beginDate: '', // 开始时间
+        endDate: '', // 结束时间
+        flowBizType: undefined, // 业务类型
+        amountType: undefined // 入账类型
       }
       }
-      this.$refs.subarea.clearData()
+      this.time = []
+      this.$refs.rangeDate.resetDate()
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
     },
     },
-    // 选择区域
-    async openAreaModal () {
-      const _this = this
-      const checkedArr = []
-      const dataList = await queryAreaScope({ userSn: this.$route.query.sn, hasDetail: 0 })
-      if (dataList.data && dataList.data.length > 0) {
-        dataList.data.forEach(item => {
-          if (item.bizType == 'subarea_area') {
-            item.bizSn = item.bizSn + '_'
-          }
-          checkedArr.push(item.bizSn)
-        })
-        const newCheckedArr = [...new Set(checkedArr)]
-        console.log('end choose:', newCheckedArr)
-        this.newChooseData.checked = newCheckedArr
-      } else {
-        this.newChooseData.checked = []
-      }
-      this.$refs.partQuery.pageInit()
-      _this.$nextTick(() => {
-        _this.openChooseArea = true
-      })
-    },
-    // 打开经销商弹窗
-    async openDealerModal (params = {}) {
-      const _this = this
-      const arr = []
-      const dataList = await queryDealerScope({ userSn: this.$route.query.sn, hasDetail: 0 })
-      if (dataList.data && dataList.data.length > 0) {
-        dataList.data.forEach(con => {
-          arr.push(con.bizSn)
-        })
-        _this.chooseInfo = [...new Set(arr)]
-      } else {
-        _this.chooseInfo = []
-      }
-      const dataInfo = {
-        list: _this.chooseInfo,
-        sn: _this.$route.query.sn
-      }
-      _this.openChooseDealer = true
-      if (_this.openChooseDealer) {
-        _this.$refs.dealerChoose.pageInit(dataInfo)
-      }
-    },
-    // 经销商
-    handleAddDealer (list) {
      const newData = []
      list.forEach(con => {
        const obj = {}
-        obj.userSn = this.$route.query.sn
-        obj.bizUserSn = this.infoObj.bizUserSn
        obj.bizType = 'dealer'
        obj.bizSn = con
        newData.push(obj)
      })
      this.saveChooseDealer(newData)
    },
-    // 保存所选区域或经销商
-    saveChooseDealer (list) {
+    // 导出
+    handleExport () {
       const _this = this
       const _this = this
-      const ajaxData = {}
-      ajaxData.userSn = _this.$route.query.sn
-      ajaxData.bizUserScopeList = list
-      saveDealerScope(ajaxData).then(res => {
-        if (res.status == 200) {
-          _this.openChooseDealer = false
-          _this.resetSearchForm()
-        }
+      _this.exportLoading = true
+      _this.spinning = true
+      hdExportExcel(dealerAccountFlowExport, _this.queryParam, '轮胎补贴金额列表', function () {
+        _this.exportLoading = false
+        _this.spinning = false
       })
       })
     },
     },
-    //  删除
-    handleDel (row) {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '确认要删除吗?删除后当前用户权限以最新权限为准',
-        centered: true,
-        onOk () {
-          bizuserScopeDelete({ id: row.bizUserScopeSn }).then(res => {
-            if (res.status == 200) {
-              _this.resetSearchForm()
-            }
-          })
-        }
-      })
-    },
     //  返回
     //  返回
     handleBack () {
     handleBack () {
       this.$router.push({ name: 'dealerAccountList' })
       this.$router.push({ name: 'dealerAccountList' })
@@ -309,7 +194,6 @@ export default {
     },
     },
     // 计算列表高度
     // 计算列表高度
     setTableH () {
     setTableH () {
-      console.log('1111:', this.$refs)
       const searchHeight = this.$refs.tableSearch.offsetHeight
       const searchHeight = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - searchHeight - 240
       this.tableHeight = window.innerHeight - searchHeight - 240
     }
     }

+ 21 - 17
src/views/dealerManagement/dealerAccount/list.vue

@@ -7,7 +7,7 @@
           <a-row :gutter="15">
           <a-row :gutter="15">
             <a-col :md="5" :sm="24">
             <a-col :md="5" :sm="24">
               <a-form-item label="经销商名称">
               <a-form-item label="经销商名称">
-                <dealerSubareaScopeList placeholder="请输入经销商名称搜索" ref="dealerSubareaScopeList" id="dealerAccountNewList-dealerName" @change="custChange" />
+                <custList ref="custList" id="dealerAccountNewList-dealerName" placeholder="请输入经销商名称搜索" @change="custChange"></custList>
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
             <a-col :md="5" :sm="24">
             <a-col :md="5" :sm="24">
@@ -58,8 +58,12 @@
           bordered>
           bordered>
           <!-- 轮胎补贴金额 -->
           <!-- 轮胎补贴金额 -->
           <template slot="moneyNum" slot-scope="text, record">
           <template slot="moneyNum" slot-scope="text, record">
-            <span v-if="$hasPermissions('B_salesDetail')" :id="'dealerAccountNewList-tireMoney'+record.id" class="link-bule" @click="handleDetail(record)">111111111111</span>
-            <span v-else>111111111111</span>
+            <span v-if="$hasPermissions('B_salesDetail')&&(record.subsidyTire||record.subsidyTire==0)" :id="'dealerAccountNewList-tireMoney'+record.id" class="link-bule" @click="handleDetail(record)">{{ toThousands(record.subsidyTire) }}</span>
+            <span v-else>{{ toThousands(record.subsidyTire) }}</span>
+          </template>
+          <!-- 商户类型 -->
+          <template slot="dealerType" slot-scope="text, record">
+            {{ record.dealerTypeName1 }}{{ record.dealerTypeName1?'>':'' }}{{ record.dealerTypeName2 }}
           </template>
           </template>
         </s-table>
         </s-table>
       </a-spin>
       </a-spin>
@@ -74,20 +78,20 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import subarea from '@/views/common/subarea.js'
 import subarea from '@/views/common/subarea.js'
 import dealerType from '@/views/common/dealerType.js'
 import dealerType from '@/views/common/dealerType.js'
-import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import custList from '@/views/common/custList.vue'
 import { hdExportExcel } from '@/libs/exportExcel'
 import { hdExportExcel } from '@/libs/exportExcel'
 // 接口
 // 接口
-import { dealerUserList } from '@/api/dealer'
+import { dealerAccountList, dealerAccountExport } from '@/api/dealerAccount'
 export default {
 export default {
   name: 'DealerAccountNewList',
   name: 'DealerAccountNewList',
   mixins: [commonMixin],
   mixins: [commonMixin],
-  components: { STable, VSelect, dealerSubareaScopeList, subarea, dealerType },
+  components: { STable, VSelect, custList, subarea, dealerType },
   data () {
   data () {
-    const _this = this
     return {
     return {
       spinning: false,
       spinning: false,
       tableHeight: 0, // 表格高度
       tableHeight: 0, // 表格高度
       disabled: false, //  查询、重置按钮是否可操作
       disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false, // 导出加载状态
       queryParam: { //  查询条件
       queryParam: { //  查询条件
         dealerSn: undefined, // 经销商sn
         dealerSn: undefined, // 经销商sn
         subareaArea: {
         subareaArea: {
@@ -101,19 +105,19 @@ export default {
       dealerType: [], // 所选商户类型 列表
       dealerType: [], // 所选商户类型 列表
       columns: [
       columns: [
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
         { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
-        { title: '经销商名称', dataIndex: 'org.name', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '经销商名称', dataIndex: 'dealerEntity.dealerName', width: '20%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '轮胎补贴金额(¥)', scopedSlots: { customRender: 'moneyNum' }, width: '12%', align: 'right' },
         { title: '轮胎补贴金额(¥)', scopedSlots: { customRender: 'moneyNum' }, width: '12%', align: 'right' },
         { title: '区域', dataIndex: 'subareaArea.subareaName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '区域', dataIndex: 'subareaArea.subareaName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '分区', dataIndex: 'subareaArea.subareaAreaName', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '商户级别', dataIndex: 'dealerLevelDictValue', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '商户类型', dataIndex: 'dealerTypeName', width: '16%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '商户级别', dataIndex: 'dealerEntity.dealerLevelDictValue', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '商户类型', dataIndex: 'dealerType', scopedSlots: { customRender: 'dealerType' }, width: '16%', align: 'center', ellipsis: true },
         { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
         { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } }
       ],
       ],
       // 加载数据方法 必须为 Promise 对象
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
       loadData: parameter => {
         this.disabled = true
         this.disabled = true
         this.spinning = true
         this.spinning = true
-        return dealerUserList(Object.assign(parameter, this.queryParam)).then(res => {
+        return dealerAccountList(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           let data
           if (res.status == 200) {
           if (res.status == 200) {
             data = res.data
             data = res.data
@@ -147,7 +151,7 @@ export default {
     },
     },
     // 轮胎补贴金额  点击跳转详情页
     // 轮胎补贴金额  点击跳转详情页
     handleDetail (row) {
     handleDetail (row) {
-      this.$router.push({ name: 'dealerAccountDetail', params: { sn: row.tenantSn } })
+      this.$router.push({ name: 'dealerAccountDetail', params: { sn: row.dealerSn, name: row.dealerEntity.dealerName, num: row.subsidyTire } })
     },
     },
     //  重置
     //  重置
     resetSearchForm () {
     resetSearchForm () {
@@ -158,21 +162,21 @@ export default {
       this.queryParam.dealerType1 = undefined
       this.queryParam.dealerType1 = undefined
       this.queryParam.dealerType2 = undefined
       this.queryParam.dealerType2 = undefined
       this.dealerType = []
       this.dealerType = []
-      this.$refs.dealerSubareaScopeList.resetForm()
+      this.$refs.custList.resetForm()
       this.$refs.subarea.clearData()
       this.$refs.subarea.clearData()
       this.$refs.table.refresh(true)
       this.$refs.table.refresh(true)
     },
     },
     //  导出
     //  导出
     handleExport () {
     handleExport () {
       const _this = this
       const _this = this
-      _this.$store.state.app.curActionPermission = 'B_sales_export'
+      // _this.$store.state.app.curActionPermission = 'B_sales_export'
       _this.exportLoading = true
       _this.exportLoading = true
       _this.spinning = true
       _this.spinning = true
-      hdExportExcel(salesDetailExport, _this.queryParam, '经销商账户列表', function () {
+      hdExportExcel(dealerAccountExport, _this.queryParam, '经销商账户列表', function () {
         _this.exportLoading = false
         _this.exportLoading = false
         _this.spinning = false
         _this.spinning = false
         _this.showExport = true
         _this.showExport = true
-        _this.$store.state.app.curActionPermission = ''
+        // _this.$store.state.app.curActionPermission = ''
       })
       })
     },
     },
     // 初始化
     // 初始化
@@ -185,7 +189,7 @@ export default {
     // 计算表格高度
     // 计算表格高度
     setTableH () {
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 200
+      this.tableHeight = window.innerHeight - tableSearchH - 195
     }
     }
   },
   },
   watch: {
   watch: {

+ 3 - 7
src/views/dealerManagement/dealerAccount/verifyModal.vue

@@ -3,7 +3,7 @@
     centered
     centered
     :footer="null"
     :footer="null"
     :maskClosable="false"
     :maskClosable="false"
-    title="费用报销单审核进度"
+    title="调账审核进度"
     v-model="isShow"
     v-model="isShow"
     @cancel="isShow=false"
     @cancel="isShow=false"
     width="50%">
     width="50%">
@@ -36,11 +36,7 @@ export default {
       type: Boolean,
       type: Boolean,
       default: false
       default: false
     },
     },
-    itemSn: { // 费用单sn
-      type: [Number, String],
-      default: ''
-    },
-    itemId: {// 费用单id
+    itemSn: { // sn
       type: [Number, String],
       type: [Number, String],
       default: ''
       default: ''
     }
     }
@@ -61,7 +57,7 @@ export default {
         this.spinning = true
         this.spinning = true
         delete parameter.tableId
         delete parameter.tableId
         delete parameter.index
         delete parameter.index
-        return getProcessInstance({ businessType: 'EXPENSES', businessSn: this.itemSn }).then(res => {
+        return getProcessInstance({ businessType: 'DEALER_ACCOUNT_CHANGE', businessSn: this.itemSn }).then(res => {
           let data
           let data
           if (res.status == 200) {
           if (res.status == 200) {
             data = res.data ? res.data[0] ? res.data[0].opinionList ? res.data[0].opinionList : [] : [] : []
             data = res.data ? res.data[0] ? res.data[0].opinionList ? res.data[0].opinionList : [] : [] : []

+ 3 - 3
src/views/dealerManagement/tireStorageManagement/list.vue

@@ -7,7 +7,7 @@
           <a-row :gutter="15">
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
               <a-form-item label="轮胎省仓名称">
               <a-form-item label="轮胎省仓名称">
-                <dealerSubareaScopeList ref="provinceDealerList" placeholder="请输入轮胎省仓名称" id="tireStorageManagement-provinceDealerName" @change="custProvinceChange" />
+                <custList ref="provinceDealerList" id="tireStorageManagement-provinceDealerName" placeholder="请输入轮胎省仓名称" @change="custProvinceChange"></custList>
               </a-form-item>
               </a-form-item>
             </a-col>
             </a-col>
             <a-col :md="6" :sm="24">
             <a-col :md="6" :sm="24">
@@ -80,13 +80,13 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import { STable, VSelect } from '@/components'
 import addDealerModal from './addDealerModal.vue'
 import addDealerModal from './addDealerModal.vue'
 import changeRecordList from './changeRecordList.vue'
 import changeRecordList from './changeRecordList.vue'
-import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import custList from '@/views/common/custList.vue'
 // 接口
 // 接口
 import { tireStorageList, tireStorageEnable } from '@/api/provinceServiceCenter'
 import { tireStorageList, tireStorageEnable } from '@/api/provinceServiceCenter'
 export default {
 export default {
   name: 'TireStorageManagement',
   name: 'TireStorageManagement',
   mixins: [commonMixin],
   mixins: [commonMixin],
-  components: { STable, VSelect, addDealerModal, changeRecordList, dealerSubareaScopeList },
+  components: { STable, VSelect, addDealerModal, changeRecordList, custList },
   data () {
   data () {
     return {
     return {
       spinning: false,
       spinning: false,

+ 3 - 3
src/views/setting/tireSubsidySetting/addSubsidyList.vue

@@ -12,7 +12,7 @@
           <a-row :gutter="15">
           <a-row :gutter="15">
             <a-col :md="5" :sm="24">
             <a-col :md="5" :sm="24">
               <a-form-model-item label="客户名称">
               <a-form-model-item label="客户名称">
-                <dealerSubareaScopeList ref="dealerSubareaScopeList" id="addSubsidyList-dealerName" @change="custChange" />
+                <custList ref="dealerSubareaScopeList" id="addSubsidyList-dealerName" placeholder="请输入客户名称" @change="custChange"></custList>
               </a-form-model-item>
               </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :md="5" :sm="24">
             <a-col :md="5" :sm="24">
@@ -135,13 +135,13 @@ import subarea from '@/views/common/subarea.js'
 import AreaList from '@/views/common/areaList.js'
 import AreaList from '@/views/common/areaList.js'
 import addSubsidyModal from './addSubsidyModal.vue'
 import addSubsidyModal from './addSubsidyModal.vue'
 import editModal from './editModal.vue'
 import editModal from './editModal.vue'
-import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import custList from '@/views/common/custList.vue'
 // 接口
 // 接口
 import { tireSubsidyRuleList, endSubsidyRule, delSubsidyRule } from '@/api/subsidyRule'
 import { tireSubsidyRuleList, endSubsidyRule, delSubsidyRule } from '@/api/subsidyRule'
 export default {
 export default {
   name: 'AddSubsidyList',
   name: 'AddSubsidyList',
   mixins: [commonMixin],
   mixins: [commonMixin],
-  components: { STable, VSelect, subarea, AreaList, dealerSubareaScopeList, addSubsidyModal, editModal },
+  components: { STable, VSelect, subarea, AreaList, custList, addSubsidyModal, editModal },
   props: {
   props: {
     pageType: { //  弹框显示状态
     pageType: { //  弹框显示状态
       type: String,
       type: String,

+ 3 - 3
src/views/setting/tireSubsidySetting/addSubsidyModal.vue

@@ -29,7 +29,7 @@
             </a-radio-group>
             </a-radio-group>
           </div>
           </div>
           <a-form-model-item label="客户名称" prop="dealerSn" v-if="form.defaultFlag==0">
           <a-form-model-item label="客户名称" prop="dealerSn" v-if="form.defaultFlag==0">
-            <dealerSubareaScopeList style="width:90%;" ref="dealerSubareaScopeList" id="addSubsidyModal-dealerName" @change="custChange" />
+            <custList style="width:90%;" ref="dealerSubareaScopeList" id="addSubsidyModal-dealerName" @change="custChange"></custList>
           </a-form-model-item>
           </a-form-model-item>
           <a-form-model-item label="增量补贴(季度)" prop="ruleTarget1">
           <a-form-model-item label="增量补贴(季度)" prop="ruleTarget1">
             <div>
             <div>
@@ -110,12 +110,12 @@
 <script>
 <script>
 // 组件
 // 组件
 import { VSelect } from '@/components'
 import { VSelect } from '@/components'
-import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import custList from '@/views/common/custList.vue'
 // 接口
 // 接口
 import { subsidyRuleSave, createSubsidyRule, getSubsidyRuleList } from '@/api/subsidyRule'
 import { subsidyRuleSave, createSubsidyRule, getSubsidyRuleList } from '@/api/subsidyRule'
 export default {
 export default {
   name: 'AddSubsidyModal',
   name: 'AddSubsidyModal',
-  components: { VSelect, dealerSubareaScopeList },
+  components: { VSelect, custList },
   props: {
   props: {
     openModal: { //  弹框显示状态
     openModal: { //  弹框显示状态
       type: Boolean,
       type: Boolean,

+ 3 - 3
src/views/setting/tireSubsidySetting/costAddModal.vue

@@ -29,7 +29,7 @@
             </a-radio-group>
             </a-radio-group>
           </div>
           </div>
           <a-form-model-item label="客户名称" prop="dealerSn" v-if="form.defaultFlag==0">
           <a-form-model-item label="客户名称" prop="dealerSn" v-if="form.defaultFlag==0">
-            <dealerSubareaScopeList style="width:90%;" ref="dealerSubareaScopeList" id="costAddModal-dealerName" @change="custChange" />
+            <custList style="width:90%;" ref="dealerSubareaScopeList" id="costAddModal-dealerName" @change="custChange"></custList>
           </a-form-model-item>
           </a-form-model-item>
           <a-form-model-item :label="pageType==='SERVICE_FEE'?'服务费比例':'运费补贴'" prop="ruleValue1">
           <a-form-model-item :label="pageType==='SERVICE_FEE'?'服务费比例':'运费补贴'" prop="ruleValue1">
             <a-input-number
             <a-input-number
@@ -68,12 +68,12 @@
 <script>
 <script>
 // 组件
 // 组件
 import { VSelect } from '@/components'
 import { VSelect } from '@/components'
-import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import custList from '@/views/common/custList.vue'
 // 接口
 // 接口
 import { getSubsidyRuleList, subsidyRuleSave, createSubsidyRule } from '@/api/subsidyRule'
 import { getSubsidyRuleList, subsidyRuleSave, createSubsidyRule } from '@/api/subsidyRule'
 export default {
 export default {
   name: 'CostAddModal',
   name: 'CostAddModal',
-  components: { VSelect, dealerSubareaScopeList },
+  components: { VSelect, custList },
   props: {
   props: {
     openModal: { //  弹框显示状态
     openModal: { //  弹框显示状态
       type: Boolean,
       type: Boolean,

+ 3 - 3
src/views/setting/tireSubsidySetting/costCollectionList.vue

@@ -12,7 +12,7 @@
           <a-row :gutter="15">
           <a-row :gutter="15">
             <a-col :md="5" :sm="24">
             <a-col :md="5" :sm="24">
               <a-form-model-item label="客户名称">
               <a-form-model-item label="客户名称">
-                <dealerSubareaScopeList ref="dealerSubareaScopeList" id="costCollectionList-dealerName" @change="custChange" />
+                <custList ref="dealerSubareaScopeList" id="costCollectionList-dealerName" placeholder="请输入客户名称" @change="custChange"></custList>
               </a-form-model-item>
               </a-form-model-item>
             </a-col>
             </a-col>
             <a-col :md="5" :sm="24">
             <a-col :md="5" :sm="24">
@@ -135,13 +135,13 @@ import subarea from '@/views/common/subarea.js'
 import AreaList from '@/views/common/areaList.js'
 import AreaList from '@/views/common/areaList.js'
 import costAddModal from './costAddModal.vue'
 import costAddModal from './costAddModal.vue'
 import editModal from './editModal.vue'
 import editModal from './editModal.vue'
-import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import custList from '@/views/common/custList.vue'
 // 接口
 // 接口
 import { tireSubsidyRuleList, delSubsidyRule, endSubsidyRule } from '@/api/subsidyRule'
 import { tireSubsidyRuleList, delSubsidyRule, endSubsidyRule } from '@/api/subsidyRule'
 export default {
 export default {
   name: 'CostCollectionList',
   name: 'CostCollectionList',
   mixins: [commonMixin],
   mixins: [commonMixin],
-  components: { STable, VSelect, subarea, AreaList, dealerSubareaScopeList, costAddModal, editModal },
+  components: { STable, VSelect, subarea, AreaList, custList, costAddModal, editModal },
   props: {
   props: {
     pageType: { //  弹框显示状态
     pageType: { //  弹框显示状态
       type: String,
       type: String,