Просмотр исходного кода

Merge commit '2cd4ac6e74b80e86c68fdae5e5c2933f297eaa12' into HEAD

gitadmin 1 неделя назад
Родитель
Сommit
dc4da8a42a
29 измененных файлов с 3840 добавлено и 48 удалено
  1. 1 1
      public/version.json
  2. 0 11
      src/api/expenseManagement.js
  3. 203 0
      src/api/verifyAccount.js
  4. 130 0
      src/api/verifyAccountChange.js
  5. 3 2
      src/components/Select/index.js
  6. 98 0
      src/config/financialManagement.js
  7. 9 7
      src/views/common/dealerSubareaScopeList.vue
  8. 1 1
      src/views/common/productTypeAll.js
  9. 1 1
      src/views/dealerManagement/merchantInfoManagement/detailModal.vue
  10. 3 3
      src/views/dealerManagement/merchantInfoManagement/edit.vue
  11. 2 2
      src/views/dealerManagement/merchantInfoManagement/list.vue
  12. 4 1
      src/views/expenseManagement/expenseReimbursement/add.vue
  13. 23 4
      src/views/expenseManagement/expenseReimbursement/baseDataModal.vue
  14. 4 1
      src/views/expenseManagement/expenseReimbursement/detail.vue
  15. 14 1
      src/views/expenseManagement/expenseReimbursement/productInfoModal.vue
  16. 172 0
      src/views/financialManagement/accountStatement/baseModal.vue
  17. 512 0
      src/views/financialManagement/accountStatement/confrontModal.vue
  18. 463 0
      src/views/financialManagement/accountStatement/edit.vue
  19. 342 0
      src/views/financialManagement/accountStatement/list.vue
  20. 287 0
      src/views/financialManagement/accountStatement/queryPart.vue
  21. 119 0
      src/views/financialManagement/accountStatementBill/baseModal.vue
  22. 316 0
      src/views/financialManagement/accountStatementBill/detail.vue
  23. 283 0
      src/views/financialManagement/accountStatementBill/list.vue
  24. 211 0
      src/views/financialManagement/manualEntryForm/baseModal.vue
  25. 183 0
      src/views/financialManagement/manualEntryForm/chooseDepartUserModal.vue
  26. 337 0
      src/views/financialManagement/manualEntryForm/list.vue
  27. 101 0
      src/views/financialManagement/manualEntryForm/verifyModal.vue
  28. 16 11
      src/views/salesReturnManagement/salesReturn/chooseDepartUserModal.vue
  29. 2 2
      vue.config.js

+ 1 - 1
public/version.json

@@ -1,4 +1,4 @@
 {
-    "version": "2.2.59",
+    "version": "2.2.60",
     "message": "发现有新版本发布,确定更新系统?"
 }

+ 0 - 11
src/api/expenseManagement.js

@@ -272,17 +272,6 @@ export const expenseAcctDetailReport = (params) => {
   })
 }
 
-// 费用报销单审批进度
-// export const getProcessInstance = (params) => {
-//   return axios({
-//     url: `/dingTalk/getProcessInstance/${params.businessType}/${params.businessSn}`,
-//     data: params,
-//     method: 'post',
-//     headers:{
-//       'module': encodeURIComponent('审核进度')
-//     }
-//   })
-// }
 export const getProcessInstance = (params) => {
   return axios({
     url: `/dingTalk/queryList`,

+ 203 - 0
src/api/verifyAccount.js

@@ -0,0 +1,203 @@
+import { axios } from '@/utils/request'
+
+//  对账单管理 列表  分页
+export const verifyAcountBillList = (params) => {
+  const url = `/verifyAccountBill/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('列表查询')
+    }
+  })
+}
+// 对账单-待选单据列表
+export const verifyAccountBillQueryWaitSelectList = (params) => {
+  const url = `/verifyAccountBillDetail/queryWaitSelectPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('对账单待选单据列表查询')
+    }
+  })
+}
+
+// 创建对账单
+export const verifyAccountBillCreate = params => {
+  return axios({
+    url: '/verifyAccountBill/create',
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('创建对账单')
+    }
+  })
+}
+// 对账单修改
+export const verifyAccountBillModify = params => {
+  return axios({
+    url: '/verifyAccountBill/modify',
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('对账单修改')
+    }
+  })
+}
+// 对账单管理  删除
+export const verifyAcountBillDel = params => {
+  return axios({
+    url: `/verifyAccountBill/delete/${params.sn}`,
+    data: {},
+    method: 'get',
+    headers: {
+      'module': encodeURIComponent('删除对账单')
+    }
+  })
+}
+// 对账单管理  详情
+export const verifyAcountBillDetail = params => {
+  return axios({
+    url: `/verifyAccountBill/findBySn/${params.sn}`,
+    data: {},
+    method: 'get',
+    headers: {
+      'module': encodeURIComponent('查看对账单详情')
+    }
+  })
+}
+// 对账单 提交前
+export const verifyAcountBillSubmitCheck = params => {
+  return axios({
+    url: `/verifyAccountBill/submitCheck/${params.sn}`,
+    data: {},
+    method: 'get',
+    headers: {
+      'module': encodeURIComponent('对账单提交前')
+    }
+  })
+}
+// 对账单管理  提交
+export const verifyAcountBillSubmit = params => {
+  return axios({
+    url: `/verifyAccountBill/submit/${params.sn}`,
+    data: {},
+    method: 'get',
+    headers: {
+      'module': encodeURIComponent('对账单提交')
+    }
+  })
+}
+
+// 对账单 对单前校验
+export const verifyAcountBillConfirmCheck = params => {
+  return axios({
+    url: `/verifyAccountBill/confirmCheck/${params.sn}`,
+    data: {},
+    method: 'get',
+    headers: {
+      'module': encodeURIComponent('对单前校验')
+    }
+  })
+}
+// 对账单 对单
+export const verifyAcountBillConfirm = params => {
+  return axios({
+    url: `/verifyAccountBill/confirm/${params.sn}`,
+    data: {},
+    method: 'get',
+    headers: {
+      'module': encodeURIComponent('对单')
+    }
+  })
+}
+
+// 对账单管理  对账
+export const verifyAcountBillVerify = params => {
+  return axios({
+    url: `/verifyAccountBill/verify/${params.sn}`,
+    data: {},
+    method: 'get',
+    headers: {
+      'module': encodeURIComponent('对账')
+    }
+  })
+}
+ 
+//  对账单管理  明细 列表  分页
+export const verifyAcountBillDetailList = (params) => {
+  const url = `/verifyAccountBillDetail/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('明细列表查询')
+    }
+  })
+}
+//  对账单管理  明细 列表  不分页
+export const verifyAcountBillDetailQueryList = (params) => {
+  const url = `/verifyAccountBillDetail/queryList`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('明细不分页列表查询')
+    }
+  })
+}
+// 对账单管理  详情  统计信息
+export const verifyAcountBillDetailQueryCount = params => {
+  return axios({
+    url: `/verifyAccountBillDetail/queryCount`,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('对账单单据详情统计信息')
+    }
+  })
+} 
+// 对账单管理  详情  批量删除
+export const verifyAcountBillDetailDel = params => {
+  return axios({
+    url: `/verifyAccountBillDetail/deleteBatch`,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('对账单单据详情列表批量删除')
+    }
+  })
+} 
+// 对账单管理  详情 批量添加
+export const verifyAcountBillDetailSave = params => {
+  return axios({
+    url: '/verifyAccountBillDetail/insertBatch',
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('对账单单据详情列表批量添加')
+    }
+  })
+} 
+// 对账单管理  详情 修改
+export const verifyAcountBillDetailModify = params => {
+  return axios({
+    url: '/verifyAccountBillDetail/modify',
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('对账单单据详情列表备注修改')
+    }
+  })
+} 

+ 130 - 0
src/api/verifyAccountChange.js

@@ -0,0 +1,130 @@
+import { axios } from '@/utils/request'
+
+//  调账调账 列表  分页
+export const verifyAccountChangeList = (params) => {
+  const url = `/verifyAccountChange/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('列表查询')
+    }
+  })
+}
+// 调账保存
+export const verifyAccountChangeSave = params => {
+  return axios({
+    url: '/verifyAccountChange/save',
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('创建调账')
+    }
+  })
+}
+// 调账调账  删除
+export const verifyAccountChangeDel = params => {
+  return axios({
+    url: `/verifyAccountChange/deleteBySn/${params.sn}`,
+    data: {},
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('删除调账')
+    }
+  })
+}
+// 调账调账  详情
+export const verifyAccountChangeDetail = params => {
+  return axios({
+    url: `/verifyAccountChange/queryBySn/${params.sn}`,
+    data: {},
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('查看调账详情')
+    }
+  })
+}
+ 
+// 调账调账  提交
+export const verifyAcountBillSubmit = params => {
+  return axios({
+    url: `/verifyAccountChange/submit`,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('调账提交')
+    }
+  })
+}
+
+// 经销商余额-分页列表
+export const verifyAccountBalanceQueryPage = (params) => {
+  const url = `/verifyAccountBalance/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('经销商余额列表查询')
+    }
+  })
+}
+
+//对账余额明细接口
+export const verifyAccountBalanceQueryDetailPage = (params) => {
+  const url = `/verifyAccountBalance/queryDetailPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('对账余额明细列表查询')
+    }
+  })
+}
+
+// 对账余额明细统计
+export const verifyAccountBalanceQueryDetailCount = (params) => {
+  const url = `/verifyAccountBalance/queryDetailCount`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    headers: {
+      'module': encodeURIComponent('对账余额明细统计')
+    }
+  })
+}
+// 对账余额导出
+export const verifyAccountBalanceExport = (params) => {
+  const url = `/verifyAccountBalance/export`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    responseType: 'blob',
+    headers:{
+      'module': encodeURIComponent('对账余额列表导出')
+    }
+  })
+}
+// 对账余额明细导出
+export const verifyAccountBalanceDetailExport = (params) => {
+  const url = `/verifyAccountBalance/detailExport`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post',
+    responseType: 'blob',
+    headers:{
+      'module': encodeURIComponent('对账余额明细列表导出')
+    }
+  })
+}

+ 3 - 2
src/components/Select/index.js

@@ -44,6 +44,9 @@ export default {
   watch: {
     notIn (newVal, oldVal) {
       this.getDataList()
+    },
+    code (newVal, oldVal) {
+      this.getDataList()
     }
   },
   methods: {
@@ -56,7 +59,6 @@ export default {
     },
     getDataList () {
       const _this = this
-      // console.log(_this.code, '_this.code')
       getLookUpData({
         pageNo: 1,
         pageSize: 1000,
@@ -79,7 +81,6 @@ export default {
     },
     // 根据名称 获取code
     getCodeByName (dispName) {
-      console.log(this.dataList)
       return this.datalist.find(item => item.dispName == dispName)
     }
   },

+ 98 - 0
src/config/financialManagement.js

@@ -112,6 +112,104 @@ export default {
                 }
               }
             ]
+          },
+          {
+            path: '/financialManagement/accountStatement',
+            redirect: '/financialManagement/accountStatement/list',
+            name: 'accountStatement',
+            component: BlankLayout,
+            meta: {
+              title: '对账单管理',
+              icon: 'vertical-align-top',
+              permission: 'M_accountStatement_list'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'accountStatementList',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/accountStatement/list.vue'),
+                meta: {
+                  title: '对账单列表',
+                  icon: 'vertical-align-top',
+                  hidden: true,
+                  permission: 'M_accountStatement_list'
+                }
+              },
+              {
+                path: 'edit/:sn',
+                name: 'accountStatementEdit',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/accountStatement/edit.vue'),
+                meta: {
+                  title: '编辑对账单',
+                  icon: 'vertical-align-top',
+                  hidden: true,
+                  permission: 'M_as_edit'
+                }
+              }
+            ]
+          },
+          {
+            path: '/financialManagement/accountStatementBill',
+            redirect: '/financialManagement/accountStatementBill/list',
+            name: 'accountStatementBill',
+            component: BlankLayout,
+            meta: {
+              title: '经销商对账余额',
+              icon: 'vertical-align-top',
+              permission: 'M_accountStatementBill_list'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'accountStatementBillList',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/accountStatementBill/list.vue'),
+                meta: {
+                  title: '待对单单据列表',
+                  icon: 'vertical-align-top',
+                  hidden: true,
+                  permission: 'M_accountStatementBill_list'
+                }
+              },
+              {
+                path: 'detail/:sn/:name',
+                name: 'accountStatementBillDetail',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/accountStatementBill/detail.vue'),
+                meta: {
+                  title: '待对单单据明细',
+                  icon: 'vertical-align-top',
+                  hidden: true,
+                  permission: 'B_asb_detail',
+                  replaceTab: true,
+                }
+              },
+            ]
+          },
+          {
+            path: '/financialManagement/manualEntryForm',
+            redirect: '/financialManagement/manualEntryForm/list',
+            name: 'manualEntryForm',
+            component: BlankLayout,
+            meta: {
+              title: '人工录入单',
+              icon: 'vertical-align-top',
+              permission: 'M_verifyAccountChange_list'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'manualEntryFormList',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/manualEntryForm/list.vue'),
+                meta: {
+                  title: '人工录入单列表',
+                  icon: 'vertical-align-top',
+                  hidden: true,
+                  permission: 'M_verifyAccountChange_list'
+                }
+              }
+            ]
           }
         ]
       }

+ 9 - 7
src/views/common/dealerSubareaScopeList.vue

@@ -96,16 +96,18 @@ export default {
       this.setData({ key: itemSn })
     },
     // 查询详细
-    getDetail (sn) {
+    getDetail (sn, flag) {
       dealerDetailBySn({ sn: sn }).then(res => {
         const val = { key: sn }
         val.row = res.data
-        Object.assign(this, {
-          dealerName: val,
-          data: [res.data],
-          fetching: false
-        })
-        this.$emit('change', val)
+        if (!flag) {
+          Object.assign(this, {
+            dealerName: val,
+            data: [res.data],
+            fetching: false
+          })
+          this.$emit('change', val)
+        }
         this.$emit('dealerDetail', res.data || null)
       })
     }

+ 1 - 1
src/views/common/productTypeAll.js

@@ -65,13 +65,13 @@ const ProductType = {
   },
   methods: {
     filter (inputValue, path) {
-      console.log(inputValue, path)
       return path.some(option => option.productTypeName.indexOf(inputValue) > -1)
     },
     setDefValue (defaultVal, row) {
       this.handleChange(defaultVal, row)
     },
     handleChange (value, row) {
+      console.log(value, row)
       this.defaultVal = value
       this.$emit('change', this.defaultVal, this.id, row)
       this.$emit('input', this.defaultVal)

+ 1 - 1
src/views/dealerManagement/merchantInfoManagement/detailModal.vue

@@ -14,7 +14,7 @@
         <a-card title="基础信息" size="small" style="margin-bottom: 15px;">
           <a-descriptions :column="2" bordered size="small">
             <a-descriptions-item label="经销商名称">{{ form&&form.dealerName ? form.dealerName : '--' }}</a-descriptions-item>
-            <a-descriptions-item label="经销商别名">{{ form&&form.dealerAlias ? form.dealerAlias : '--' }}</a-descriptions-item>
+            <a-descriptions-item label="商别名">{{ form&&form.dealerAlias ? form.dealerAlias : '--' }}</a-descriptions-item>
             <a-descriptions-item label="商户类型">{{ form&&form.dealerTypeName1 ? form.dealerTypeName1+'>'+form.dealerTypeName2 : '--' }}</a-descriptions-item>
             <a-descriptions-item label="联系人1">{{ form&&form.contact ? form.contact : '--' }}</a-descriptions-item>
             <a-descriptions-item label="联系手机1">{{ form&&form.contactMobile ? form.contactMobile : '--' }}</a-descriptions-item>

+ 3 - 3
src/views/dealerManagement/merchantInfoManagement/edit.vue

@@ -25,8 +25,8 @@
                   </a-form-model-item>
                 </a-col>
                 <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
-                  <a-form-model-item label="经销商别名" prop="dealerAlias">
-                    <a-input v-model.trim="form.dealerAlias" id="merchantInfoManagementEdit-dealerAlias" :maxLength="30" allowClear placeholder="请输入经销商别名(最多30个字符)" />
+                  <a-form-model-item label="商别名" prop="dealerAlias">
+                    <a-input v-model.trim="form.dealerAlias" id="merchantInfoManagementEdit-dealerAlias" :maxLength="30" allowClear placeholder="请输入商别名(最多30个字符)" />
                   </a-form-model-item>
                 </a-col>
                 <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
@@ -443,7 +443,7 @@ export default {
       dealerType: [], // 商户类型
       form: {
         dealerName: '', // 经销商名称
-        dealerAlias: '', // 经销商别名
+        dealerAlias: '', // 商别名
         dealerType1: undefined, // 商户类型1
         dealerType2: undefined, // 商户类型2
         contact: '', // 联系人1

+ 2 - 2
src/views/dealerManagement/merchantInfoManagement/list.vue

@@ -11,7 +11,7 @@
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="商名称/别名">
+              <a-form-item label="经销商名称/商户别名">
                 <a-input id="merchantInfoManagementList-nameLike" v-model.trim="queryParam.nameLike" allowClear placeholder="请输入商户名称/别名"/>
               </a-form-item>
             </a-col>
@@ -189,7 +189,7 @@ export default {
         { title: '创建时间', dataIndex: 'createDate', 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: '商名称', scopedSlots: { customRender: 'dealerName' }, width: '12%', align: 'left' },
+        { title: '经销商名称', scopedSlots: { customRender: 'dealerName' }, width: '12%', align: 'left' },
         { title: '商户别名', dataIndex: 'dealerAlias', width: '12%', align: 'left', customRender: function (text) { return text || '--' } },
         { title: '商户类型', dataIndex: 'dealerTypeName', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '商户级别', dataIndex: 'dealerLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },

+ 4 - 1
src/views/expenseManagement/expenseReimbursement/add.vue

@@ -19,7 +19,7 @@
             <a-icon type="edit" /> 编辑基础信息
           </div>
         </div>
-        <a-descriptions :column="{ xs: 2, sm: 3, md: 3}" v-if="detailData">
+        <a-descriptions :column="{ xs: 2, sm: 3, md: 4}" v-if="detailData">
           <a-descriptions-item label="费用单号">{{ detailData&&detailData.expenseAccountNo || '--' }}</a-descriptions-item>
           <a-descriptions-item label="申请人">{{ detailData&&detailData.applyPersonName || '--' }}</a-descriptions-item>
           <a-descriptions-item label="申请部门">{{ detailData&&detailData.applyDepartmentName || '--' }}</a-descriptions-item>
@@ -43,6 +43,9 @@
           <a-descriptions-item label="关联单号" v-if="detailData&&detailData.bizNo">{{ detailData&&detailData.bizNo || '--' }}</a-descriptions-item>
           <a-descriptions-item label="主题" :span="3">{{ detailData&&detailData.title || '--' }}</a-descriptions-item>
           <a-descriptions-item label="详细说明" :span="4">{{ detailData&&detailData.content.join(',')||'' }}</a-descriptions-item>
+          <a-descriptions-item label="摘要" :span="4">
+            {{ detailData.digestInfo||'' }}
+          </a-descriptions-item>
           <a-descriptions-item label="附件" :span="4">
             <a
               target="_blank"

+ 23 - 4
src/views/expenseManagement/expenseReimbursement/baseDataModal.vue

@@ -96,6 +96,16 @@
                 allowClear/>
             </a-form-model-item>
           </a-col>
+          <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
+            <a-form-model-item label="摘要" prop="digestInfo" :label-col="{span:3}" :wrapper-col="{span:19}">
+              <a-textarea
+                id="expenseReimbursementAddform-digestInfo"
+                placeholder="请输入费用报销摘要(最多30个字符)"
+                v-model.trim="form.digestInfo"
+                :maxLength="30"
+                allowClear/>
+            </a-form-model-item>
+          </a-col>
         </a-row>
         <a-row>
           <a-col :xs="24" :sm="24" :md="24" :lg="24" :xl="24">
@@ -173,9 +183,14 @@ export default {
         productTypeSn3: '', //  产品三级分类
         expenseDate: moment().locale('zh-cn').format('YYYY-MM'), //  费用产生月
         title: '', // 主题
-        content: '' // 费用说明
-      },
-      rules: {
+        content: '', // 费用说明
+        digestInfo: '' // 摘要
+      }
+    }
+  },
+  computed: {
+    rules () {
+      return {
         applyPersonSn: [
           { required: true, message: '请选择申请人', trigger: 'change' }
         ],
@@ -193,6 +208,9 @@ export default {
         ],
         content: [
           { required: true, message: '请输入详细说明', trigger: 'blur' }
+        ],
+        digestInfo: [
+          { required: this.form.expenseTypeName == '促销费用', message: '请输入摘要', trigger: 'blur' }
         ]
       }
     }
@@ -231,7 +249,8 @@ export default {
         productTypeSn3: '', //  产品三级分类
         expenseDate: moment().locale('zh-cn').format('YYYY-MM'), //  费用产生月
         title: '', // 主题
-        content: '' // 费用说明
+        content: '', // 费用说明
+        digestInfo: '' // 摘要
       }
       this.rules.productBrandSn = []
       this.rules.productTypeSn2 = []

+ 4 - 1
src/views/expenseManagement/expenseReimbursement/detail.vue

@@ -35,7 +35,7 @@
       </a-page-header>
       <!-- 基础信息 -->
       <a-card size="small" :bordered="false" class="expenseManagementDetail-cont" v-show="showDetail">
-        <a-descriptions size="small" :column="{ xs: 2, sm: 3, md: 3}" v-if="detailData">
+        <a-descriptions size="small" :column="{ xs: 2, sm: 3, md: 4}" v-if="detailData">
           <a-descriptions-item label="费用单号">{{ detailData&&detailData.expenseAccountNo || '--' }}</a-descriptions-item>
           <a-descriptions-item label="申请人">{{ detailData&&detailData.applyPersonName || '--' }}</a-descriptions-item>
           <a-descriptions-item label="申请部门">{{ detailData&&detailData.applyDepartmentName || '--' }}</a-descriptions-item>
@@ -62,6 +62,9 @@
           <a-descriptions-item label="详细说明" :span="4">
             {{ detailData.content.join(',')||'' }}
           </a-descriptions-item>
+          <a-descriptions-item label="摘要" :span="4">
+            {{ detailData.digestInfo||'' }}
+          </a-descriptions-item>
           <a-descriptions-item label="附件" :span="4">
             <a target="_blank" style="color: #00aaff;text-decoration: underline;margin-right: 15px;" :href="item.filePath" v-for="item in detailData.expenseAccountFilesList" :key="item.id">
               {{ item.fileName }}

+ 14 - 1
src/views/expenseManagement/expenseReimbursement/productInfoModal.vue

@@ -190,6 +190,13 @@ export default {
           this.$refs['productType-' + row.no].setDefValue([], row)
         })
         this.$message.info('不能只选择一级分类')
+      } else {
+        row.productTypeSn1 = undefined
+        row.productTypeSn2 = undefined
+        row.productTypeSn3 = undefined
+        row.productTypeName1 = undefined
+        row.productTypeName2 = undefined
+        row.productTypeName3 = undefined
       }
     },
     // 添加
@@ -270,6 +277,7 @@ export default {
       expenseAcctDetailFindProductsBySn({ detailSn: this.expenseAccountDetailSn }).then(res => {
         if (res.data && res.data.length) {
           this.dataList = res.data
+          console.log(res.data, '------')
           this.dataList.map(item => {
             item.no = item.id
             this.$nextTick(() => {
@@ -278,7 +286,12 @@ export default {
               } else {
                 if (item.productTypeSn1 || item.productTypeSn2 || item.productTypeSn3) {
                   item.productType = [item.productTypeSn1, item.productTypeSn2, item.productTypeSn3]
-                  this.$refs['productType-' + item.no].setDefValue([item.productTypeSn1, item.productTypeSn2, item.productTypeSn3], item)
+                  this.$refs['productType-' + item.no].setDefValue(
+                    [item.productTypeSn1, item.productTypeSn2, item.productTypeSn3],
+                    [{ productTypeSn: item.productTypeSn1, productTypeName: item.productTypeName1 },
+                      { productTypeSn: item.productTypeSn2, productTypeName: item.productTypeName2 },
+                      { productTypeSn: item.productTypeSn3, productTypeName: item.productTypeName3 }]
+                  )
                 }
               }
             })

+ 172 - 0
src/views/financialManagement/accountStatement/baseModal.vue

@@ -0,0 +1,172 @@
+<template>
+  <a-modal
+    v-model="opened"
+    :title="title"
+    centered
+    :maskClosable="false"
+    :width="600"
+    :footer="null"
+    @cancel="cancel"
+  >
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="chooseCustom-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol">
+        <a-form-model-item label="客户名称" prop="dealerSn">
+          <dealerSubareaScopeList :disabled="!!itemSn" ref="dealer" @change="custChange" />
+        </a-form-model-item>
+        <a-form-model-item label="备注" prop="remarks">
+          <a-textarea :rows="4" :maxLength="300" placeholder="请输入备注(最多300个字符)" v-model="form.remarks"></a-textarea>
+        </a-form-model-item>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 50px;">
+          <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
+        </a-form-model-item>
+      </a-form-model>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { VSelect } from '@/components'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import { verifyAccountBillCreate, verifyAccountBillModify, verifyAcountBillDetail } from '@/api/verifyAccount.js'
+export default {
+  name: 'ASBaseModal',
+  mixins: [commonMixin],
+  components: { VSelect, dealerSubareaScopeList },
+  props: {
+    show: [Boolean],
+    itemSn: {
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    return {
+      opened: this.show,
+      spinning: false,
+      disabled: false,
+      title: '新增对账单',
+      confirmLoading: false,
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 18 }
+      },
+      form: {
+        dealerSn: undefined,
+        dealerName: undefined,
+        remarks: ''
+      },
+      rules: {
+        dealerSn: [ { required: true, message: '请选择客户', trigger: ['change', 'blur'] } ],
+        remarks: [{ required: true, message: '请输入备注', trigger: ['change', 'blur'] }]
+      }
+    }
+  },
+  methods: {
+    // 客户
+    custChange (v) {
+      if (v && v.key) {
+        this.form.dealerSn = v.key
+        this.form.dealerName = v.row ? v.row.dealerName : ''
+      } else {
+        this.form.dealerSn = ''
+        this.form.dealerName = ''
+      }
+    },
+    //  保存
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.salesSaveFun()
+        } else {
+          return false
+        }
+      })
+    },
+    // 新建或编辑销售单
+    salesSaveFun () {
+      const _this = this
+      const form = JSON.parse(JSON.stringify(_this.form))
+      // 编辑 or 新增
+      const funs = form.verifyAccountBillSn ? verifyAccountBillModify : verifyAccountBillCreate
+
+      _this.spinning = true
+      funs(form).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          // 编辑
+          if (this.itemSn) {
+            _this.$emit('refashData')
+          } else {
+            // 新增
+            _this.$router.push({ name: 'accountStatementEdit', params: { sn: res.data.verifyAccountBillSn } })
+          }
+          _this.cancel()
+        }
+        _this.spinning = false
+      })
+    },
+    //  详情
+    getDetail () {
+      this.title = '编辑对账单'
+      this.spinning = true
+      this.confirmLoading = true
+      verifyAcountBillDetail({ sn: this.itemSn }).then(res => {
+        if (res.status == 200) {
+          const data = res.data
+          this.form = Object.assign(this.form, data)
+          // 回显客户
+          if (this.form.dealerSn) {
+            this.$nextTick(() => {
+              this.$refs.dealer.getDetail(this.form.dealerSn)
+            })
+          }
+        } else {
+          this.$refs.ruleForm.resetFields()
+        }
+        this.spinning = false
+        this.confirmLoading = false
+      })
+    },
+    cancel () {
+      this.opened = false
+      this.$emit('cancel')
+      this.$refs.ruleForm.resetFields()
+    },
+    async pageInit () {
+      this.$nextTick(() => {
+        this.$refs.ruleForm.resetFields()
+        if (this.$refs.dealer) {
+          this.$refs.dealer.resetForm()
+        }
+      })
+      this.form = {
+        dealerSn: undefined,
+        dealerName: undefined,
+        remarks: ''
+      }
+      //  编辑页
+      if (this.itemSn) {
+        this.getDetail()
+      }
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+      if (newValue) {
+        this.pageInit()
+      }
+    }
+  }
+}
+</script>

+ 512 - 0
src/views/financialManagement/accountStatement/confrontModal.vue

@@ -0,0 +1,512 @@
+<template>
+  <a-modal
+    v-model="opened"
+    :title="title"
+    centered
+    :maskClosable="false"
+    width="80%"
+    :footer="null"
+    @cancel="cancel"
+  >
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-card size="small" :bordered="false" class="searchBoxNormal">
+        <!-- 搜索条件 -->
+        <div ref="tableSearch" class="table-page-search-wrapper">
+          <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+            <a-row :gutter="15">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="时间">
+                  <rangeDate id="conFrontModal-rangeDate" ref="rangeDate" :value="creatDate" @change="dateChange" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="业务单号">
+                  <a-input id="conFrontModal-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入业务单号"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="借贷类型">
+                  <v-select
+                    v-model="queryParam.changeType"
+                    ref="changeType"
+                    id="conFrontModal-changeType"
+                    code="VERIFY_ACCOUNT_CHANGE_TYPE"
+                    placeholder="请选择状态"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="业务类型">
+                  <v-select
+                    v-model="queryParam.bizType"
+                    ref="bizType"
+                    id="conFrontModal-bizType"
+                    code="VERIFY_ACCOUNT_BIZ_TYPE"
+                    placeholder="请选择业务类型"
+                    allowClear></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="conFrontModal-search">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="conFrontModal-reset">重置</a-button>
+                <a-button
+                  style="margin-left: 10px"
+                  type="primary"
+                  v-if="$hasPermissions('B_as_detail_export')"
+                  id="conFrontModal-export"
+                  class="button-warning"
+                  @click="handleExport"
+                  :disabled="disabled"
+                  :loading="exportLoading"
+                >导出</a-button>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
+      </a-card>
+      <a-card size="small" :bordered="false" class="conFrontModal-wrap">
+        <div class="action-bar">
+          列显示
+          <a-popover title="勾选显示列" trigger="click">
+            <template slot="content">
+              <div style="width:150px;">
+                <a-checkbox-group v-model="showCols">
+                  <a-row>
+                    <a-col :span="24" v-for="item in showColsOptions" :key="item.value">
+                      <a-checkbox v-show="item.show" :value="item.value">{{ item.label }}</a-checkbox>
+                    </a-col>
+                  </a-row>
+                </a-checkbox-group>
+              </div>
+            </template>
+            <a-button type="link" size="small">
+              设置 <a-icon type="setting" />
+            </a-button>
+          </a-popover>
+        </div>
+        <!-- 列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :showPagination="false"
+          :defaultLoadData="false"
+          bordered>
+        </s-table>
+        <div class="conFrontModal-info" v-if="detailData">
+          备注:{{ detailData.remarks }}
+        </div>
+        <div class="conFrontModal-flex" v-if="detailData">
+          <div class="conFrontModal-subTitle">
+            <div><span>公司名称:</span> 东莞市箭冠汽车配件制造有限公司</div>
+            <div><span>签名:</span>{{ detailData.signName }}</div>
+            <div><span>盖章</span></div>
+          </div>
+          <div class="conFrontModal-subTitle">
+            <div><span>公司名称:</span>{{ dealear.dealerAlias }}</div>
+            <div><span>签名:</span></div>
+            <div><span>盖章</span></div>
+          </div>
+        </div>
+        <div class="conFrontModal-footer-bar" v-if="detailData">
+          <a-button @click="cancel" style="margin-right: 15px" id="conFrontModal-btn-back">取消</a-button>
+          <a-button type="primary" v-if="orderType==1" :loading="confirmLoading" @click="handleSubmit" id="conFrontModal-btn-submit">对单</a-button>
+        </div>
+      </a-card>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import XLSX from 'xlsx-js-style'
+import moment from 'moment'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import {
+  verifyAcountBillDetailQueryList,
+  verifyAcountBillDetail,
+  verifyAcountBillConfirmCheck,
+  verifyAcountBillConfirm
+} from '@/api/verifyAccount'
+
+export default {
+  name: 'ConFrontModal',
+  mixins: [commonMixin],
+  components: { STable, VSelect, rangeDate },
+  props: {
+    show: [Boolean]
+  },
+  data () {
+    return {
+      opened: this.show,
+      spinning: false,
+      disabled: false,
+      confirmLoading: false,
+      title: '',
+      exportLoading: false,
+      queryParam: {
+        beginDate: '',
+        endDate: '',
+        bizNo: '',
+        changeType: undefined,
+        bizType: undefined
+      },
+      creatDate: [],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam)
+        params.verifyAccountBillSn = this.verifyAccountBillSn
+        return verifyAcountBillDetailQueryList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = 0
+            let prevTotalAmount = 0
+            for (var i = 0; i < data.length; i++) {
+              data[i].no = no + i + 1
+              const dates = data[i].bizDate.split('-')
+              data[i].year = dates[0]
+              data[i].month = dates[1]
+              data[i].day = dates[2].split(' ')[0]
+              // 正为借方, 负数为贷方
+              if (data[i].bizAmount > 0) {
+                data[i].debitAmount = Number(data[i].bizAmount).toFixed(2)
+              } else {
+                data[i].creditorAmount = Number(data[i].bizAmount * -1).toFixed(2)
+              }
+              data[i].totalAmount = Number(Number(prevTotalAmount || 0) + Number(data[i].debitAmount || 0) - Number(data[i].creditorAmount || 0)).toFixed(2)
+              prevTotalAmount = data[i].totalAmount
+            }
+            this.total = data.length || 0 + 1
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      total: 0, // 合计
+      detailData: null,
+      dealear: null,
+      verifyAccountBillSn: undefined,
+      orderType: 0,
+      showCols: []
+    }
+  },
+  computed: {
+    showColsOptions () {
+      return [
+        { label: '序号', value: 'no', show: false },
+        { label: '年', value: 'year', show: false },
+        { label: '月', value: 'month', show: false },
+        { label: '日', value: 'day', show: false },
+        { label: '业务单号', value: 'bizNo', show: false },
+        { label: '业务类型', value: 'bizTypeDictValue', show: false },
+        { label: '费用/调拨类型', value: 'expenseAllocateType', show: true },
+        { label: '摘要', value: 'digestInfo', show: true },
+        { label: '客诉索赔编码', value: 'productCode', show: true },
+        { label: '借方金额', value: 'debitAmount', show: false },
+        { label: '贷方金额', value: 'creditorAmount', show: false },
+        { label: '余额', value: 'totalAmount', show: true },
+        { label: '备注', value: 'remarks', show: true }
+      ]
+    },
+    columns () {
+      const renderContent = (value, row, index) => {
+        const obj = {
+          children: value || '--',
+          attrs: {}
+        }
+        return obj
+      }
+      return [
+        {
+          title: '箭冠汽配 应收账款明细表',
+          children: [
+            {
+              title: '营业执照名称',
+              children: [
+                {
+                  title: '财务编码',
+                  children: [
+                    { title: '序号',
+                      dataIndex: 'no',
+                      width: '4%',
+                      align: 'center',
+                      customRender: renderContent
+                    },
+                    { title: '年', dataIndex: 'year', width: '4%', align: 'center', customRender: renderContent },
+                    { title: '月', dataIndex: 'month', width: '4%', align: 'center', customRender: renderContent },
+                    { title: '日', dataIndex: 'day', width: '4%', align: 'center', customRender: renderContent },
+                    { title: '业务单号', dataIndex: 'bizNo', width: '8%', align: 'center', customRender: renderContent }
+                  ].filter(item => this.showCols.includes(item.dataIndex))
+                }
+              ]
+            },
+            {
+              title: this.dealear ? this.dealear.dealerAlias : '--',
+              children: [
+                {
+                  title: this.dealear ? this.dealear.kdMidCustomerFnumber : '--',
+                  children: [
+                    { title: '业务类型', dataIndex: 'bizTypeDictValue', width: '8%', align: 'center', customRender: renderContent },
+                    { title: '费用/调拨类型',
+                      dataIndex: 'expenseAllocateType',
+                      width: '8%',
+                      align: 'center',
+                      customRender: renderContent
+                    }
+                  ].filter(item => this.showCols.includes(item.dataIndex))
+                }
+              ]
+            },
+            {
+              title: '系统名称',
+              children: [
+                {
+                  title: '',
+                  children: [
+                    { title: '摘要', dataIndex: 'digestInfo', width: '10%', align: 'center', customRender: renderContent },
+                    { title: '客诉索赔编码', dataIndex: 'productCode', width: '8%', align: 'center', customRender: renderContent },
+                    { title: '借方', dataIndex: 'debitAmount', width: '6%', align: 'right', customRender: renderContent }
+                  ].filter(item => this.showCols.includes(item.dataIndex))
+                }
+              ]
+            },
+            {
+              title: this.dealear ? this.dealear.dealerName : '--',
+              children: [
+                {
+                  title: '',
+                  children: [
+                    { title: '贷方', dataIndex: 'creditorAmount', width: '6%', align: 'right', customRender: renderContent },
+                    { title: '余额', dataIndex: 'totalAmount', width: '6%', align: 'right', customRender: renderContent },
+                    { title: '备注', dataIndex: 'remarks', width: '15%', align: 'center', customRender: renderContent }
+                  ].filter(item => this.showCols.includes(item.dataIndex))
+                }
+              ]
+            }
+          ]
+        }
+      ]
+    }
+  },
+  methods: {
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0] ? date[0] : ''
+      this.queryParam.endDate = date[1] ? date[1] : ''
+    },
+    //  重置
+    resetSearchForm () {
+      this.creatDate = []
+      if (this.$refs.rangeDate) {
+        this.$refs.rangeDate.resetDate(this.creatDate)
+      }
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.bizNo = ''
+      this.queryParam.changeType = undefined
+      this.queryParam.bizType = undefined
+      this.$refs.table.refresh(true)
+    },
+    //  详情
+    getDetail () {
+      this.spinning = true
+      verifyAcountBillDetail({ sn: this.verifyAccountBillSn }).then(res => {
+        this.detailData = res.data
+        this.spinning = false
+        this.resetSearchForm()
+      })
+    },
+    // 关闭弹框
+    cancel () {
+      this.opened = false
+      this.$emit('cancel')
+    },
+    appendSplitMergedRow (ws, firstValue, secondValue) {
+      const colsLen = this.showCols.length
+      const s = Math.floor((colsLen % 2 == 0) ? (colsLen / 2) : ((colsLen - 1) / 2))
+      // 1. 获取当前数据范围
+      const range = XLSX.utils.decode_range(ws['!ref'])
+      const newRowNum = range.e.r + 1
+
+      // 2. 填充基础数据(仅设置有效单元格)
+      ws[XLSX.utils.encode_cell({ r: newRowNum, c: 0 })] = { v: firstValue, t: 's' } // 前7列合并值
+      ws[XLSX.utils.encode_cell({ r: newRowNum, c: s + 1 })] = { v: secondValue, t: 's' } // 后6列合并值
+
+      // 3. 设置合并区域
+      if (!ws['!merges']) ws['!merges'] = []
+      // 前7列合并(0-6列)
+      ws['!merges'].push(XLSX.utils.decode_range(
+        `${XLSX.utils.encode_cell({ r: newRowNum, c: 0 })}:${XLSX.utils.encode_cell({ r: newRowNum, c: s })}`
+      ))
+      // 后6列合并(7-12列)
+      ws['!merges'].push(XLSX.utils.decode_range(
+        `${XLSX.utils.encode_cell({ r: newRowNum, c: s + 1 })}:${XLSX.utils.encode_cell({ r: newRowNum, c: colsLen - 1 })}`
+      ))
+
+      // 4. 更新数据范围
+      range.e.r = newRowNum
+      ws['!ref'] = XLSX.utils.encode_range(range)
+      return ws
+    },
+    // 导出表格excel,dom 表格对象,title 导出表格名称
+    exportTable (dom, title) {
+      var ws = XLSX.utils.table_to_sheet(dom)
+      // console.log(ws)
+
+      // 4. 设置列宽
+      const colsLen = this.showCols.length
+      ws['!cols'] = Array(colsLen).fill().map((item, index) => ({ wch: index < 4 ? 6 : 20 }))
+
+      // 追加备注
+      const range = XLSX.utils.decode_range(ws['!ref'])
+      const newRowNum = range.e.r + 1
+
+      // 填充数据(首列填值,其余留空)
+      const mergedValue = '备注:' + this.detailData.remarks
+      for (let col = 0; col < colsLen; col++) {
+        const cellRef = XLSX.utils.encode_cell({ r: newRowNum, c: col })
+        ws[cellRef] = { v: col === 0 ? mergedValue : '', t: 's' }
+      }
+
+      // 设置全列合并(0-12列)
+      if (!ws['!merges']) ws['!merges'] = []
+      ws['!merges'].push(XLSX.utils.decode_range(
+        `${XLSX.utils.encode_cell({ r: newRowNum, c: 0 })}:${XLSX.utils.encode_cell({ r: newRowNum, c: colsLen - 1 })}`
+      ))
+
+      // 4. 更新数据范围
+      range.e.r = newRowNum
+      ws['!ref'] = XLSX.utils.encode_range(range)
+      ws['!rows'][0] = { hpt: 30 }
+      ws['!rows'][newRowNum] = { hpt: 30 }
+
+      // 追加表尾
+      const newWs = this.appendSplitMergedRow(ws, '公司名称:东莞市箭冠汽车配件制造有限公司', '公司名称:' + (this.dealear.dealerAlias || ''))
+      const newWs1 = this.appendSplitMergedRow(newWs, '签名:' + (this.detailData.signName || ''), '签名:')
+      const newWs2 = this.appendSplitMergedRow(newWs1, '盖章:', '盖章:')
+      // 设置单元格样式
+      Object.keys(newWs2).forEach(cell => {
+        if (!cell.startsWith('!')) {
+          const rowNum = parseInt(cell.match(/\d+/)[0])
+          newWs2[cell].s = cell === 'A1' ? {
+            font: { bold: true, color: { rgb: '000000' } },
+            alignment: { horizontal: 'center', vertical: 'center' }
+          } : rowNum === 4 ? {
+            font: { bold: true },
+            fill: { fgColor: { rgb: 'ffdd8d' } },
+            alignment: { horizontal: rowNum < newRowNum + 1 ? 'center' : 'left', vertical: 'center' }
+          } : {
+            alignment: { horizontal: rowNum < newRowNum + 1 ? 'center' : 'left', vertical: 'center' }
+          }
+        }
+      })
+      // 创建工作簿并导出
+      var wb = XLSX.utils.book_new()
+      // 5. 写入文件
+      XLSX.utils.book_append_sheet(wb, newWs2, 'Sheet1')
+      const timeStr = moment().format('YYYYMMDDHHmmss')
+      XLSX.writeFile(wb, title + '-' + timeStr + '.xlsx')
+    },
+    //  点击导出
+    handleExport () {
+      const excelTitle = '(' + this.detailData.dealerName + ')应收账款明细表'
+      this.exportTable(this.$refs.table.$el.querySelector('table'), excelTitle)
+    },
+    // 对单
+    async handleSubmit () {
+      const _this = this
+      this.confirmLoading = true
+      const ret = await verifyAcountBillConfirmCheck({ sn: this.verifyAccountBillSn })
+      this.confirmLoading = false
+      console.log(ret)
+      const snList = ret.data.length ? ret.data.map(item => item.bizNo) : []
+      if (snList.length) {
+        this.$info({
+          title: '提示(' + _this.dealear.dealerName + ')',
+          content: <div style="font-size:14px;">{snList.toString()}不可对单</div>,
+          centered: true,
+          closable: true,
+          onOk () {
+          }
+        })
+      } else {
+        this.confirmLoading = true
+        verifyAcountBillConfirm({ sn: this.verifyAccountBillSn }).then(res => {
+          this.confirmLoading = false
+          this.$message.success('对单成功')
+          this.$emit('confirm')
+          this.cancel()
+        })
+      }
+    },
+    // 初始化
+    async pageInit (row, dealear, type) {
+      // console.log(row, dealear, type)
+      this.orderType = type
+      this.verifyAccountBillSn = row.verifyAccountBillSn
+      this.dealear = dealear
+      this.title = type ? '对单' : '单据详情' + `(对账单号:${row.verifyAccountBillNo} 客户名称:${row.dealerName})`
+      this.getDetail()
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+      if (newValue) {
+        this.showCols = ['no', 'year', 'month', 'day', 'bizNo', 'bizTypeDictValue', 'expenseAllocateType', 'digestInfo', 'productCode', 'debitAmount', 'creditorAmount', 'totalAmount', 'remarks']
+      }
+    }
+  }
+}
+</script>
+<style lang="less">
+  .conFrontModal-title{
+    font-size: 16px;
+    font-weight: bold;
+    text-align: center;
+    margin-bottom: 10px;
+  }
+  .action-bar{
+    text-align: right;
+  }
+  .conFrontModal-flex{
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    flex-wrap: wrap;
+  }
+  .conFrontModal-subTitle{
+    width: 50%;
+    padding: 5px;
+    > span{
+      display: block;
+      font-size: 14px;
+      width: 100px;
+    }
+    > div{
+      display: block;
+      font-size: 14px;
+      width: 100%;
+      word-break: break-all;
+      margin: 5px 0;
+    }
+  }
+  .conFrontModal-info{
+    font-size: 14px;
+    padding: 15px 5px 10px;
+    line-height: 20px;
+    color: #333;
+  }
+  .conFrontModal-footer-bar{
+    text-align: center;
+    padding: 30px 0 20px;
+  }
+</style>

+ 463 - 0
src/views/financialManagement/accountStatement/edit.vue

@@ -0,0 +1,463 @@
+<template>
+  <div class="salesReturnEdit-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="salesReturnEdit-back">
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="salesReturnEdit-back-btn" href="javascript:;" @click="handleBack">
+            <a-icon type="left" />
+            返回列表
+          </a>
+          <span style="margin: 0 15px;color: #666;font-weight: bold;">单号:{{ detailData&&detailData.verifyAccountBillNo }}</span>
+          <span style="margin: 0 10px;color: #666;">客户名称:{{ detailData && detailData.dealerName }}</span>
+          <a-button type="link" size="small" class="button-default" @click.stop="handleEditBase" >
+            <a-icon type="edit" /> 编辑备注
+          </a-button>
+        </template>
+      </a-page-header>
+      <a-card size="small" :bordered="false" class="salesReturnEdit-cont">
+        <queryPart
+          ref="partQuery"
+          :newLoading="isInster"
+          :addMoreLoading="addMoreLoading"
+          :itemSn="verifyAccountBillSn"
+          :dealerSn="dealerSn"
+          @add="saveProduct"
+          @bachAdd="saveMoreProduct"></queryPart>
+      </a-card>
+      <a-card size="small" :bordered="false" class="salesReturnEdit-cont">
+        <a-alert style="margin-bottom: 10px;" type="info" v-if="countData">
+          <div slot="message" class="total-bar">
+            <div>
+              <span>余额:{{ countData && (countData.bizAmount || countData.bizAmount == 0) ? toThousands(countData.bizAmount) : '--' }};</span>
+              <span>借方:{{ countData && (countData.borrowAmount || countData.borrowAmount == 0) ? toThousands(countData.borrowAmount) : '--' }};</span>
+              <span>贷方:{{ countData && (countData.loanAmount || countData.loanAmount == 0) ? toThousands(countData.loanAmount*-1) : '--' }};</span>
+            </div>
+          </div>
+        </a-alert>
+        <div class="table-page-search-wrapper" style="display:flex;align-items: center;justify-content: space-between;">
+          <div style="flex-grow:1;">
+            <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+              <a-row :gutter="15">
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="时间">
+                    <rangeDate id="accountStatement-rangeDate" ref="rangeDate" :value="creatDate" @change="dateChange" />
+                  </a-form-item>
+                </a-col>
+                <a-col :md="4" :sm="24">
+                  <a-form-item label="业务单号">
+                    <a-input id="accountStatement-bizNo" v-model.trim="productForm.bizNo" allowClear placeholder="请输入业务单号" />
+                  </a-form-item>
+                </a-col>
+                <a-col :md="4" :sm="24">
+                  <a-form-item label="借贷类型">
+                    <v-select
+                      v-model="productForm.changeType"
+                      ref="changeType1"
+                      id="accountStatement-changeType1"
+                      code="VERIFY_ACCOUNT_CHANGE_TYPE"
+                      placeholder="请选择借贷类型"
+                      allowClear></v-select>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="4" :sm="24">
+                  <a-form-item label="业务类型">
+                    <v-select
+                      v-model="productForm.bizType"
+                      ref="bizType1"
+                      id="accountStatement-bizType1"
+                      code="VERIFY_ACCOUNT_BIZ_TYPE"
+                      placeholder="请选择业务类型"
+                      allowClear></v-select>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="4" :sm="24" style="margin-bottom: 10px;">
+                  <a-button id="accountStatement-2-search" type="primary" @click="$refs.table.refresh(true)">查询</a-button>
+                  <a-button id="accountStatement-2-restForm" style="margin-left: 5px" @click="resetSearchForm">重置</a-button>
+                </a-col>
+              </a-row>
+            </a-form>
+          </div>
+        </div>
+        <!-- 已选配件列表 -->
+        <s-table
+          class="sTable"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :defaultLoadData="false"
+          :scroll="{ y: 300 }"
+          bordered>
+          <!-- 备注 -->
+          <template slot="remark" slot-scope="text, record">
+            <div @dblclick.stop>
+              <a-input
+                size="small"
+                v-model="record.remarks"
+                :disabled="record.editFlag==0"
+                @blur="changeRemarks(record)"
+                style="width: 100%;"
+                placeholder="请输入备注"/>
+            </div>
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              :loading="delLoading"
+              class="button-error"
+              @click="handleDel(record)"
+              id="salesReturn-Del">删除</a-button>
+          </template>
+        </s-table>
+      </a-card>
+    </a-spin>
+    <div class="affix-cont">
+      <a-button
+        size="large"
+        style="padding: 0 60px;"
+        :disabled="spinning"
+        type="primary"
+        class="button-primary"
+        @click="handleSubmit"
+        id="salesReturn-handleSubmit">提交</a-button>
+    </div>
+    <!-- 编辑基础信息弹窗 -->
+    <baseModal v-drag :show="openModal" @cancel="openModal=false" :itemSn="verifyAccountBillSn" @refashData="getBasicsData"></baseModal>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import queryPart from './queryPart.vue'
+import baseModal from './baseModal.vue'
+import rangeDate from '@/views/common/rangeDate.vue'
+import {
+  verifyAcountBillDetailList,
+  verifyAcountBillDetailQueryCount,
+  verifyAcountBillDetailDel,
+  verifyAcountBillDetailSave,
+  verifyAcountBillDetailModify,
+  verifyAcountBillSubmit,
+  verifyAcountBillSubmitCheck,
+  verifyAcountBillDetail
+} from '@/api/verifyAccount'
+export default {
+  name: 'AccountStatementEdit',
+  mixins: [commonMixin],
+  components: {
+    STable,
+    VSelect,
+    queryPart,
+    baseModal,
+    rangeDate
+  },
+  data () {
+    return {
+      spinning: false,
+      isInster: false, // 是否正在添加产品
+      delLoading: false,
+      productForm: {
+        beginDate: '',
+        endDate: '',
+        bizNo: '',
+        changeType: undefined,
+        bizType: undefined
+      },
+      creatDate: [],
+      chooseList: [],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        const params = {
+          ...parameter,
+          verifyAccountBillSn: this.verifyAccountBillSn,
+          verifyAccountBillNo: this.detailData.verifyAccountBillNo,
+          ...this.productForm
+        }
+        return verifyAcountBillDetailList(params).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
+              const dates = data.list[i].bizDate.split('-')
+              data.list[i].year = dates[0]
+              data.list[i].month = dates[1]
+              data.list[i].day = dates[2].split(' ')[0]
+              // 正为借方, 负数为贷方
+              if (data.list[i].bizAmount > 0) {
+                data.list[i].debitAmount = data.list[i].bizAmount
+              } else {
+                data.list[i].creditorAmount = data.list[i].bizAmount * -1
+              }
+            }
+          }
+          this.getStatisticsData(params)
+          this.chooseList = data.list
+          return data
+        })
+      },
+      openModal: false, // 修改信息弹窗
+      countData: null, // 统计明细
+      detailData: null, // 基础信息数据
+      addMoreLoading: false, // 批量添加动画
+      verifyAccountBillSn: undefined // 单据sn
+    }
+  },
+  computed: {
+    dealerSn () {
+      return this.detailData ? this.detailData.dealerSn : ''
+    },
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '年', dataIndex: 'year', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '月', dataIndex: 'month', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '日', dataIndex: 'day', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务单号', dataIndex: 'bizNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务类型', dataIndex: 'bizTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'bizStatusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '费用/调拨类型', dataIndex: 'expenseAllocateType', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '摘要', dataIndex: 'digestInfo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客诉索赔编码', dataIndex: 'productCode', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
+        { title: '借方', dataIndex: 'debitAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
+        { title: '贷方', dataIndex: 'creditorAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
+        { title: '备注', scopedSlots: { customRender: 'remark' }, width: '15%', align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    // 编辑基础信息
+    handleEditBase () {
+      this.openModal = true
+    },
+    //  返回列表
+    handleBack () {
+      this.$router.push({ name: `accountStatementList` })
+    },
+    //  创建时间  change
+    dateChange (date) {
+      this.productForm.beginDate = date[0] ? date[0] : ''
+      this.productForm.endDate = date[1] ? date[1] : ''
+    },
+    // 删除所选产品
+    handleDel (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认要删除吗?',
+        centered: true,
+        closable: true,
+        onOk () {
+          _this.delDetail([row.detailSn])
+        }
+      })
+    },
+    delDetail (snList) {
+      const _this = this
+      _this.delLoading = true
+      _this.spinning = true
+      verifyAcountBillDetailDel({ verifyAccountBillSn: _this.verifyAccountBillSn, detailSnList: snList })
+        .then(res => {
+          if (res.status == 200) {
+            _this.resetTable(false)
+            _this.getChooseList()
+            _this.$refs.partQuery.clearSelected()
+          }
+          _this.$message.info(res.message)
+          _this.delLoading = false
+          _this.spinning = false
+        })
+        .catch(err => {
+          _this.delLoading = false
+        })
+    },
+    // 刷新已选表格
+    resetTable (flag) {
+      this.$refs.table.refresh(flag)
+    },
+    //  重置
+    resetSearchForm (flag) {
+      this.productForm.beginDate = ''
+      this.productForm.endDate = ''
+      this.productForm.bizNo = ''
+      this.productForm.changeType = undefined
+      this.productForm.bizType = undefined
+      this.productForm.bizStatus = undefined
+      this.creatDate = []
+      this.$refs.rangeDate.resetDate(this.creatDate)
+      this.$refs.table.refresh(!!flag)
+    },
+    // 修改备注
+    changeRemarks (record) {
+      this.spinning = true
+      verifyAcountBillDetailModify({ id: record.id, remarks: record.remarks }).then(res => {
+        this.spinning = false
+      })
+    },
+    // 单个添加单据
+    saveProduct (row) {
+      if (this.isInster) {
+        // 防止多次添加产品
+        return
+      }
+      this.isInster = true
+      const paramsData = {
+        verifyAccountBillSn: this.detailData.verifyAccountBillSn,
+        verifyAccountBillNo: this.detailData.verifyAccountBillNo,
+        verifyAccountBizSn: this.detailData.verifyAccountBizSn,
+        detailList: [row]
+      }
+      this.saveMore(paramsData)
+    },
+    // 批量添加
+    saveMoreProduct (data) {
+      if (this.addMoreLoading) {
+        // 防止多次添加产品
+        return
+      }
+      this.addMoreLoading = true
+      this.saveMore({
+        verifyAccountBillSn: this.detailData.verifyAccountBillSn,
+        verifyAccountBillNo: this.detailData.verifyAccountBillNo,
+        verifyAccountBizSn: this.detailData.verifyAccountBizSn,
+        detailList: data
+      })
+    },
+    // 添加
+    saveMore (params) {
+      this.spinning = true
+      verifyAcountBillDetailSave(params)
+        .then(res => {
+          if (res.status == 200) {
+            this.getChooseList()
+            this.$refs.table.refresh(true)
+            this.$refs.partQuery.clearSelected()
+          }
+          this.isInster = false
+          this.spinning = false
+          this.addMoreLoading = false
+        })
+        .catch(err => {
+          this.isInster = false
+          this.addMoreLoading = false
+          this.spinning = false
+        })
+    },
+    // 提交
+    async handleSubmit () {
+      this.spinning = true
+      const ret = await verifyAcountBillSubmitCheck({ sn: this.verifyAccountBillSn })
+      this.spinning = false
+      const noList = ret.data.length ? ret.data.map(item => item.bizNo) : []
+      const snList = ret.data.length ? ret.data.map(item => item.detailSn) : []
+      // 通过校验提交
+      if (noList.length == 0) {
+        this.spinning = true
+        verifyAcountBillSubmit({ sn: this.verifyAccountBillSn }).then(res => {
+          if (res.status == 200) {
+            this.handleBack()
+            this.$message.success(res.message)
+          }
+          this.spinning = false
+        })
+      } else {
+        // 提示不能参与的单子
+        const _this = this
+        this.$confirm({
+          title: '提示(' + _this.detailData.dealerName + ')',
+          content: <div style="font-size:14px;"><div>{noList.toString()}不能参与对单,</div><div>点击【确定】后自动移除上述单据</div></div>,
+          centered: true,
+          closable: true,
+          onOk () {
+            _this.delDetail(snList)
+          }
+        })
+      }
+    },
+    getChooseList () {
+      this.$refs.partQuery.pageInit()
+    },
+    // 获取页面统计数据
+    getStatisticsData (params) {
+      verifyAcountBillDetailQueryCount(params).then(res => {
+        this.countData = res.data
+      })
+    },
+    // 获取基础信息
+    getBasicsData (flag) {
+      const _this = this
+      verifyAcountBillDetail({ sn: this.verifyAccountBillSn }).then(res => {
+        _this.detailData = res.data
+        if (!flag) {
+          _this.$nextTick(() => {
+            _this.resetSearchForm(true)
+            _this.getChooseList()
+          })
+        }
+      })
+    },
+    pageInit () {
+      this.verifyAccountBillSn = this.$route.params.sn
+      this.getBasicsData()
+    }
+  },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) {
+      // 页签刷新时调用
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.pageInit()
+    }
+  },
+  beforeRouteEnter (to, from, next) {
+    next(vm => {})
+  }
+}
+</script>
+
+<style lang="less">
+.salesReturnEdit-wrap {
+  position: relative;
+  height: 100%;
+  padding-bottom: 51px;
+  box-sizing: border-box;
+  > .ant-spin-nested-loading {
+    overflow-y: scroll;
+    height: 100%;
+  }
+  .salesReturnEdit-cont {
+    margin-top: 6px;
+    .ant-divider-horizontal {
+      margin: 10px 0 24px;
+    }
+    .total-bar {
+      display: flex;
+      align-items: center;
+      justify-content: space-between;
+      > div {
+        &:last-child {
+          display: flex;
+          align-items: center;
+          justify-content: space-between;
+          > div {
+            padding: 0 10px;
+          }
+        }
+      }
+    }
+  }
+}
+</style>

+ 342 - 0
src/views/financialManagement/accountStatement/list.vue

@@ -0,0 +1,342 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="创建时间">
+                <rangeDate id="accountStatement-rangeDate" ref="rangeDate" :value="creatDate" @change="dateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="客户名称">
+                <dealerSubareaScopeList id="accountStatement-dealerName" ref="dealer" @change="custChange" @dealerDetail="getDealerDetail" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="对账单号">
+                <a-input id="accountStatement-verifyAccountBillNo" v-model.trim="queryParam.verifyAccountBillNo" allowClear placeholder="请输入对账单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="业务状态">
+                <v-select
+                  v-model="queryParam.billStatus"
+                  ref="status"
+                  id="accountStatement-status"
+                  code="VERIFY_ACCOUNT_STATUS"
+                  placeholder="请选择业务状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="24" :sm="24" style="margin-bottom: 10px;text-align: center;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="accountStatement-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="accountStatement-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+    </a-card>
+    <a-card size="small" :bordered="false" class="accountStatement-wrap">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 操作按钮 -->
+        <div class="table-operator">
+          <div class="flex-center">
+            <a-button type="primary" v-if="$hasPermissions('B_as_new')" @click="handleAdd">新增</a-button>
+            <div class="tongji-bar"></div>
+          </div>
+          <div></div>
+        </div>
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+80+'px' }"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight }"
+          :pageSize="30"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 单号 -->
+          <template slot="verifyAccountBillNo" slot-scope="text, record">
+            <span v-if="$hasPermissions('B_as_detail')" class="link-bule" @click="handleDetail(record,0)">{{ record.verifyAccountBillNo }}</span>
+            <span v-else>{{ record.verifyAccountBillNo }}</span>
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <div>
+              <a-button
+                v-if="record.billStatus=='WAIT_CONFIRM'&&$hasPermissions('B_as_confirm')"
+                size="small"
+                type="link"
+                class="button-info"
+                @click="handleDetail(record,1)"
+              >
+                对单
+              </a-button>
+              <a-button
+                v-if="record.billStatus=='WAIT_VERIFY'&&$hasPermissions('B_as_verify')"
+                size="small"
+                type="link"
+                class="button-info"
+                @click="checkAcount(record)"
+              >
+                对账
+              </a-button>
+              <a-button
+                size="small"
+                type="link"
+                v-if="(record.billStatus=='WAIT_SUBMIT'||record.billStatus=='WAIT_CONFIRM')&&$hasPermissions('M_as_edit')"
+                class="button-info"
+                @click="handleEdit(record)"
+              >
+                编辑
+              </a-button>
+              <a-button
+                v-if="(record.billStatus=='WAIT_SUBMIT'||record.billStatus=='WAIT_CONFIRM')&&$hasPermissions('M_as_del')"
+                size="small"
+                type="link"
+                class="button-error"
+                @click="handleDel(record)"
+              >
+                删除
+              </a-button>
+            </div>
+          </template>
+        </s-table>
+      </a-spin>
+      <!-- 基础信息 -->
+      <baseModal v-drag :show="baseModal" @cancel="baseModal=false"></baseModal>
+      <!-- 对单 -->
+      <confrontModal v-drag :show="openModal" ref="detailModal" @cancel="openModal=false" @confirm="confirmOk"></confrontModal>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import baseModal from './baseModal.vue'
+import confrontModal from './confrontModal.vue'
+import { verifyAcountBillList, verifyAcountBillDel, verifyAcountBillVerify } from '@/api/verifyAccount.js'
+export default {
+  name: 'AccountStatementList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, rangeDate, baseModal, confrontModal, dealerSubareaScopeList },
+  data () {
+    return {
+      spinning: false,
+      openModal: false,
+      baseModal: false,
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        beginDate: '',
+        endDate: '',
+        verifyAccountBillNo: '',
+        dealerName: undefined,
+        dealerSn: undefined,
+        billStatus: undefined
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      creatDate: [], //  创建时间
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam)
+        return verifyAcountBillList(params).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
+            }
+            this.total = data.count || 0
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      total: 0, // 合计
+      countData: null,
+      detailType: null,
+      editRow: null
+    }
+  },
+  // 根据权限显示列表字段
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '对账单号', scopedSlots: { customRender: 'verifyAccountBillNo' }, width: '10%', align: 'center' },
+        { title: '客户名称', dataIndex: 'dealerName', width: '26%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '余额', dataIndex: 'totalAmount', width: '10%', align: 'right', customRender: text => ((text || text == 0) ? this.toThousands(text) : '--') },
+        { title: '对单时间', dataIndex: 'confirmDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '对账时间', dataIndex: 'verifyDate', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0] ? date[0] : ''
+      this.queryParam.endDate = date[1] ? date[1] : ''
+    },
+    // 客户
+    custChange (v) {
+      if (v && v.key) {
+        this.queryParam.dealerSn = v.key
+        this.queryParam.dealerName = v.row ? v.row.dealerName : ''
+      } else {
+        this.queryParam.dealerSn = ''
+        this.queryParam.dealerName = ''
+      }
+    },
+    //  重置
+    resetSearchForm () {
+      this.creatDate = []
+      this.$refs.rangeDate.resetDate(this.creatDate)
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.dealerName = undefined
+      this.queryParam.dealerSn = undefined
+      this.queryParam.verifyAccountBillNo = ''
+      this.queryParam.billStatus = undefined
+      if (this.$refs.dealer) {
+        this.$refs.dealer.resetForm()
+      }
+      this.$refs.table.refresh(true)
+    },
+    // 新增
+    handleAdd () {
+      this.baseModal = true
+    },
+    // 编辑
+    handleEdit (row) {
+      this.$router.push({ name: 'accountStatementEdit', params: { sn: row.verifyAccountBillSn, type: 0 } })
+    },
+    // 删除
+    handleDel (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示(' + row.dealerName + ')',
+        content: <div style="font-size:14px;"><div>对账单号:{row.verifyAccountBillNo}</div><div>余额:{Number(row.totalAmount).toFixed(2)}元,确定删除吗?</div></div>,
+        centered: true,
+        closable: true,
+        onOk () {
+          _this.spinning = true
+          verifyAcountBillDel({ sn: row.verifyAccountBillSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
+        }
+      })
+    },
+    // 0详情,1对单
+    handleDetail (row, type) {
+      this.spinning = true
+      this.$refs.dealer.getDetail(row.dealerSn, true)
+      this.detailType = type
+      this.editRow = row
+    },
+    getDealerDetail (data) {
+      this.spinning = false
+      this.$refs.detailModal.pageInit(this.editRow, data, this.detailType)
+      this.openModal = true
+    },
+    // 对单成功
+    confirmOk () {
+      this.openModal = false
+      this.$refs.table.refresh()
+    },
+    // 对账
+    checkAcount (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示(' + row.dealerName + ')',
+        content: <div style="font-size:14px;"><div>对账单号:{row.verifyAccountBillNo}</div><div>余额:{row.totalAmount},确定对账吗?</div></div>,
+        centered: true,
+        closable: true,
+        onOk () {
+          _this.spinning = true
+          verifyAcountBillVerify({ sn: row.verifyAccountBillSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
+        }
+      })
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 250
+    }
+  },
+  watch: {
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  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) {
+    next(vm => {})
+  }
+}
+</script>
+
+<style lang="less">
+  .accountStatement-wrap{
+    .active{
+      color: #ed1c24;
+      cursor: pointer;
+    }
+    .common{
+      color: rgba(0, 0, 0);
+    }
+  }
+</style>

+ 287 - 0
src/views/financialManagement/accountStatement/queryPart.vue

@@ -0,0 +1,287 @@
+<template>
+  <div class="accountStatement-query-wrap">
+    <!-- 搜索条件 -->
+    <div class="table-page-search-wrapper">
+      <div style="width:100%">
+        <a-form layout="inline" @keyup.enter.native="$refs.chooseTable.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="4" :sm="24">
+              <a-form-item label="时间">
+                <rangeDate id="accountStatement-query-rangeDate" ref="rangeDate" :value="creatDate" @change="dateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
+              <a-form-item label="业务单号">
+                <a-input id="accountStatement-query-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入业务单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
+              <a-form-item label="借贷类型">
+                <v-select
+                  v-model="queryParam.changeType"
+                  ref="jdType"
+                  id="accountStatement-query-jdType"
+                  code="VERIFY_ACCOUNT_CHANGE_TYPE"
+                  placeholder="请选择借贷类型"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
+              <a-form-item label="业务类型">
+                <v-select
+                  v-model="queryParam.bizType"
+                  ref="bizType"
+                  id="accountStatement-query-bizType"
+                  code="VERIFY_ACCOUNT_BIZ_TYPE"
+                  placeholder="请选择业务类型"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="4" :sm="24" v-if="queryParam.bizType&&queryParam.bizType!='FINANCE_BOOK'&&queryParam.bizType!='CHANGE'">
+              <a-form-item label="业务状态">
+                <!-- 备货单状态,销售退货单,调拨单,费用报销单 -->
+                <v-select
+                  v-model="queryParam.bizStatus"
+                  ref="bizStatus"
+                  id="accountStatement-query-bizStatus"
+                  :code="bizStatusCode"
+                  :notIn="bizStatusNoCode"
+                  placeholder="请选择业务状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="4" :sm="24">
+              <a-button type="primary" @click="$refs.chooseTable.refresh(true)" id="accountStatement-query-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" id="accountStatement-query-reset">重置</a-button>
+            </a-col>
+            <a-col :md="24" :sm="24" style="margin-bottom: 10px;display: flex;align-items: center;justify-content: space-between;">
+              <div>
+                <a-button type="primary" style="margin-right: 5px" @click="handleBatchAdd" :loading="addMoreLoading">批量选择</a-button>
+                <span v-if="selNums&&selNums!=0" style="margin:0 0 0 10px;">已选中{{ selNums }}项</span>
+              </div>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+    </div>
+    <!-- 列表 -->
+    <s-table
+      class="sTable"
+      ref="chooseTable"
+      size="small"
+      :rowKey="(record) => record.verifyAccountBizSn"
+      rowKeyName="verifyAccountBizSn"
+      :row-selection="{ columnWidth: 40 }"
+      @rowSelection="rowSelectionFun"
+      :columns="columns"
+      :data="loadData"
+      :defaultLoadData="false"
+      :scroll="{ y: 300 }"
+      bordered>
+      <!-- 备注 -->
+      <template slot="remarks" slot-scope="text, record">
+        <div @dblclick.stop :title="record.remarks">
+          <a-input
+            size="small"
+            :disabled="record.disabled"
+            v-model="record.remarks"
+            style="width: 100%;"
+            placeholder="请输入备注"/>
+        </div>
+      </template>
+      <!-- 操作 -->
+      <template slot="action" slot-scope="text, record">
+        <a-button
+          size="small"
+          type="link"
+          class="button-info"
+          :loading="newLoading"
+          @click="handleAdd(record)"
+        >选择</a-button>
+      </template>
+    </s-table>
+  </div>
+</template>
+
+<script>
+import { verifyAccountBillQueryWaitSelectList } from '@/api/verifyAccount.js'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import { toThousands } from '@/libs/tools.js'
+export default {
+  name: 'QueryPart',
+  components: { STable, VSelect, rangeDate },
+  props: {
+    newLoading: Boolean,
+    addMoreLoading: {
+      type: Boolean,
+      default: false
+    },
+    itemSn: {
+      type: String,
+      default: ''
+    },
+    dealerSn: {
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    return {
+      buyerSn: '',
+      queryParam: { //  查询条件
+        beginDate: '',
+        endDate: '',
+        bizNo: '',
+        changeType: undefined,
+        bizType: undefined,
+        bizStatus: undefined
+      },
+      creatDate: [], //  创建时间
+      rowSelectionInfo: null,
+      isChecked: false,
+      repeatList: null,
+      warehouseSn: null,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        const params = {
+          ...parameter,
+          dealerSn: this.dealerSn,
+          ...this.queryParam
+        }
+        return verifyAccountBillQueryWaitSelectList(params).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
+              const dates = data.list[i].bizDate.split('-')
+              data.list[i].year = dates[0]
+              data.list[i].month = dates[1]
+              data.list[i].day = dates[2].split(' ')[0]
+              // 是否禁用输入框
+              data.list[i].disabled = data.list[i].remarks != '' && data.list[i].bizType == 'EXPENSE'
+              // 正为借方, 负数为贷方
+              if (data.list[i].bizAmount > 0) {
+                data.list[i].debitAmount = data.list[i].bizAmount
+              } else {
+                data.list[i].creditorAmount = data.list[i].bizAmount * -1
+              }
+            }
+          }
+          return data
+        })
+      },
+      bizStatusText: [],
+      codeArr: {
+        'DISPATCH': 'DISPATCH_BILL_STATUS',
+        'SALES_RETURN': 'SALES_RETURN_BILL_STATUS',
+        'ALLOCATE': 'ALLOCATE_STATUS',
+        'EXPENSE': 'EXPENSE_STATE',
+        'FINANCE_BOOK': 'FINANCE_BOOK_STATE',
+        'CHANGE': 'VERIFY_ACCOUNT_CHANGE_STATUS'
+      }
+    }
+  },
+  computed: {
+    bizStatusCode () {
+      return this.codeArr[this.queryParam.bizType]
+    },
+    bizStatusNoCode () {
+      const arr = [
+        'STOCK_UP_REJECT',
+        'WAIT_SUBMIT',
+        'AUDIT_REJECT',
+        'WAIT_CHECK',
+        'FINANCIAL_REJECT',
+        'CANCEL',
+        'WAIT_RECEIVE',
+        'WAIT_CUSTOMER_SERVICE_CONFIRM'
+      ]
+      if (this.queryParam.bizType == 'SALES_RETURN') {
+        arr.push('WAIT_AUDIT')
+      }
+      return arr
+    },
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '年', dataIndex: 'year', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '月', dataIndex: 'month', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '日', dataIndex: 'day', width: '4%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务单号', dataIndex: 'bizNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务类型', dataIndex: 'bizTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'bizStatusDictValue', width: '8%', align: 'center', customRender: function (text, record) { return text || '--' } },
+        { title: '费用/调拨类型', dataIndex: 'expenseAllocateType', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '摘要', dataIndex: 'digestInfo', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客诉索赔编码', dataIndex: 'productCode', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
+        { title: '借方', dataIndex: 'debitAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') } },
+        { title: '贷方', dataIndex: 'creditorAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? toThousands(text, 2) : '--') } },
+        { title: '备注', scopedSlots: { customRender: 'remarks' }, width: '18%', align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '7%', align: 'center' }
+      ]
+      return arr
+    },
+    selNums () {
+      return this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys.length || 0
+    }
+  },
+  methods: {
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0] ? date[0] : ''
+      this.queryParam.endDate = date[1] ? date[1] : ''
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.bizNo = ''
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.bizNo = ''
+      this.queryParam.changeType = undefined
+      this.queryParam.bizType = undefined
+      this.queryParam.bizStatus = undefined
+      this.creatDate = []
+      this.$refs.rangeDate.resetDate(this.creatDate)
+      this.$refs.chooseTable.refresh(true)
+    },
+    pageInit () {
+      this.$refs.chooseTable.refresh()
+      // this.clearSelected()
+    },
+    // 添加
+    handleAdd (row) {
+      this.$emit('add', row)
+    },
+    // 清空选择
+    clearSelected (row) {
+      this.$refs.chooseTable.clearSelected()
+    },
+    // 表格选中项
+    rowSelectionFun (obj) {
+      this.rowSelectionInfo = obj || null
+    },
+    // 批量添加
+    handleBatchAdd () {
+      const row = this.rowSelectionInfo && this.rowSelectionInfo.selectedRowKeys
+      if (!row || row.length == 0) {
+        this.$message.warning('请先选择单据!')
+        return
+      }
+      this.$emit('bachAdd', this.rowSelectionInfo.selectedRows)
+    }
+  }
+}
+</script>
+<style lang="less" scoped>
+  .accountStatement-query-wrap{
+    .redBg-row{
+      background-color: #f5cdc8;
+    }
+  }
+  /deep/.sTable input:disabled{
+    color:gray !important;
+    -webkit-text-fill-color:gray !important;
+  }
+</style>

+ 119 - 0
src/views/financialManagement/accountStatementBill/baseModal.vue

@@ -0,0 +1,119 @@
+<template>
+  <a-modal
+    v-model="opened"
+    :title="title"
+    centered
+    :maskClosable="false"
+    :width="600"
+    :footer="null"
+    @cancel="cancel"
+  >
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="chooseCustom-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol">
+        <a-form-model-item label="客户名称">
+          {{ form.dealerName }}
+        </a-form-model-item>
+        <a-form-model-item label="备注" prop="remarks">
+          <a-textarea :rows="4" :maxLength="300" placeholder="请输入备注(最多300个字符)" v-model="form.remarks"></a-textarea>
+        </a-form-model-item>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 50px;">
+          <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
+        </a-form-model-item>
+      </a-form-model>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { VSelect } from '@/components'
+import { verifyAccountBillCreate } from '@/api/verifyAccount.js'
+export default {
+  name: 'ASBaseModal',
+  mixins: [commonMixin],
+  components: { VSelect },
+  props: {
+    show: [Boolean],
+    itemSn: {
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    return {
+      opened: this.show,
+      spinning: false,
+      disabled: false,
+      title: '新增对账单',
+      confirmLoading: false,
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 18 }
+      },
+      form: {
+        dealerSn: undefined,
+        dealerName: undefined,
+        remarks: ''
+      },
+      rules: {
+        remarks: [{ required: true, message: '请输入备注', trigger: ['change', 'blur'] }]
+      }
+    }
+  },
+  methods: {
+    //  保存
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.salesSaveFun()
+        } else {
+          return false
+        }
+      })
+    },
+    // 新建或编辑销售单
+    salesSaveFun () {
+      const _this = this
+      const form = JSON.parse(JSON.stringify(_this.form))
+      _this.spinning = true
+      verifyAccountBillCreate(form).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$emit('refashData', res.data)
+          _this.cancel()
+        }
+        _this.spinning = false
+      })
+    },
+    cancel () {
+      this.opened = false
+      this.$emit('cancel')
+      this.$refs.ruleForm.resetFields()
+    },
+    async pageInit (data) {
+      this.$nextTick(() => {
+        this.$refs.ruleForm.resetFields()
+      })
+      this.form = {
+        dealerSn: data.dealerSn,
+        dealerName: data.dealerName,
+        remarks: ''
+      }
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+    }
+  }
+}
+</script>

+ 316 - 0
src/views/financialManagement/accountStatementBill/detail.vue

@@ -0,0 +1,316 @@
+<template>
+  <div class="accountStateBillDetail-wrap">
+    <a-page-header :ghost="false" :backIcon="false" class="accountStateBillDetail-back">
+      <!-- 自定义的二级文字标题 -->
+      <template slot="subTitle">
+        <a id="accountStateBillDetail-btn" href="javascript:;" @click="handleBack">
+          <a-icon type="left" />
+          返回列表
+        </a>
+        <span style="margin: 0 10px;color: #666;">客户名称:{{ $route.params.name }}</span>
+      </template>
+    </a-page-header>
+    <a-card size="small" :bordered="false" class="searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="时间">
+                <rangeDate id="accountStateBillDetail-rangeDate" ref="rangeDate" :value="creatDate" @change="dateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="业务单号">
+                <a-input id="accountStateBillDetail-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入业务单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="对账单号">
+                <a-input id="accountStateBillDetail-verifyAccountBillNo" v-model.trim="queryParam.verifyAccountBillNo" allowClear placeholder="请输入对账单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="借贷类型">
+                <v-select
+                  v-model="queryParam.changeType"
+                  ref="changeType"
+                  id="accountStateBillDetail-changeType"
+                  code="VERIFY_ACCOUNT_CHANGE_TYPE"
+                  placeholder="请选择借贷类型"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="业务类型">
+                <v-select
+                  v-model="queryParam.bizType"
+                  ref="bizType"
+                  id="accountStateBillDetail-bizType"
+                  code="VERIFY_ACCOUNT_BIZ_TYPE"
+                  placeholder="请选择业务类型"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="待选状态">
+                <a-select v-model="queryParam.waitSelect" allowClear placeholder="请选择待选状态" style="width: 100%" id="accountStateBillDetail-waitSelect">
+                  <a-select-option value="1">
+                    待选
+                  </a-select-option>
+                  <a-select-option value="0">
+                    已选
+                  </a-select-option>
+                </a-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="对单状态">
+                <v-select
+                  v-model="queryParam.billStatus"
+                  ref="billStatus"
+                  id="accountStatement-billStatus"
+                  code="VERIFY_ACCOUNT_STATUS"
+                  placeholder="请选择对单状态"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="accountStateBillDetail-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="accountStateBillDetail-reset">重置</a-button>
+              <a-button
+                style="margin-left: 10px"
+                type="primary"
+                v-if="$hasPermissions('B_asb_detail_export')"
+                id="accountStateBillDetail-export"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+              >导出</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+    </a-card>
+    <a-card size="small" :bordered="false">
+      <a-alert type="info" style="margin-bottom:10px">
+        <div slot="message">
+          余额:<strong>{{ totalData&&(totalData.bizAmount || totalData.bizAmount==0) ? toThousands(totalData.bizAmount) : '--' }}</strong>;
+          借方:<strong>{{ totalData&&(totalData.borrowAmount || totalData.borrowAmount==0) ? toThousands(totalData.borrowAmount) : '--' }}</strong>;
+          贷方:<strong>{{ totalData&&(totalData.loanAmount || totalData.loanAmount==0) ? toThousands(totalData.loanAmount*-1) : '--' }}</strong>;
+        </div>
+      </a-alert>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+80+'px' }"
+          size="small"
+          :rowKey="(record) => record.id"
+          :scroll="{ y: tableHeight }"
+          :columns="columns"
+          :data="loadData"
+          :pageSize="20"
+          :defaultLoadData="false"
+          bordered>
+        </s-table>
+      </a-spin>
+    </a-card>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { hdExportExcel } from '@/libs/exportExcel'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import {
+  verifyAccountBalanceQueryDetailPage,
+  verifyAccountBalanceQueryDetailCount,
+  verifyAccountBalanceDetailExport
+} from '@/api/verifyAccountChange'
+export default {
+  name: 'AccountStatementBillDetail',
+  mixins: [commonMixin],
+  components: { STable, VSelect, rangeDate },
+  data () {
+    return {
+      spinning: false,
+      exportLoading: false,
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        beginDate: '',
+        endDate: '',
+        bizNo: '',
+        verifyAccountBillNo: '',
+        changeType: undefined,
+        bizType: undefined,
+        waitSelect: undefined,
+        billStatus: undefined
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      creatDate: [], //  创建时间
+      advanced: true,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = {
+          ...parameter,
+          dealerSn: this.dealerSn,
+          ...this.queryParam
+        }
+        return verifyAccountBalanceQueryDetailPage(params).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
+              const dates = data.list[i].bizDate.split('-')
+              data.list[i].year = dates[0]
+              data.list[i].month = dates[1]
+              data.list[i].day = dates[2].split(' ')[0]
+              // 正为借方, 负数为贷方
+              if (data.list[i].bizAmount > 0) {
+                data.list[i].debitAmount = data.list[i].bizAmount
+              } else {
+                data.list[i].creditorAmount = data.list[i].bizAmount * -1
+              }
+            }
+            this.total = data.count || 0
+            this.disabled = false
+          }
+          this.spinning = false
+          this.getCount(params)
+          return data
+        })
+      },
+      total: 0, // 合计
+      totalData: null,
+      dealerSn: null
+    }
+  },
+  // 根据权限显示列表字段
+  computed: {
+    columns () {
+      const _this = this
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '年', dataIndex: 'year', width: '3%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '月', dataIndex: 'month', width: '3%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '日', dataIndex: 'day', width: '3%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务单号', dataIndex: 'bizNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '对账单号', dataIndex: 'verifyAccountBillNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务类型', dataIndex: 'bizTypeDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'bizStatusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '费用/调拨类型', dataIndex: 'expenseAllocateType', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '摘要', dataIndex: 'digestInfo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客诉索赔编码', dataIndex: 'productCode', width: '8%', align: 'center', customRender: function (text) { return (text || text == 0) ? text : '--' } },
+        { title: '借方', dataIndex: 'debitAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
+        { title: '贷方', dataIndex: 'creditorAmount', width: '6%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } },
+        { title: '备注', dataIndex: 'remarks', width: '10%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '对单状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    //  返回列表
+    handleBack () {
+      this.$router.push({ name: `accountStatementBillList` })
+    },
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0] ? date[0] : ''
+      this.queryParam.endDate = date[1] ? date[1] : ''
+    },
+    // 导出
+    handleExport () {
+      const _this = this
+      _this.exportLoading = true
+      hdExportExcel(verifyAccountBalanceDetailExport, { dealerSn: this.dealerSn, ..._this.queryParam }, '(' + _this.$route.params.name + ')余额-', function () {
+        _this.exportLoading = false
+      })
+    },
+    // 统计
+    getCount (params) {
+      verifyAccountBalanceQueryDetailCount(params).then(res => {
+        if (res.status == 200) {
+          this.totalData = res.data
+        }
+      })
+    },
+    //  重置
+    resetSearchForm () {
+      this.creatDate = []
+      this.$refs.rangeDate.resetDate(this.creatDate)
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+
+      this.queryParam.bizNo = ''
+      this.queryParam.verifyAccountBillNo = ''
+      this.queryParam.changeType = undefined
+      this.queryParam.bizType = undefined
+      this.queryParam.waitSelect = undefined
+      this.queryParam.billStatus = undefined
+
+      this.$refs.table.refresh(true)
+    },
+    pageInit () {
+      const _this = this
+      this.dealerSn = this.$route.params.sn
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 320
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  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) {
+    next(vm => {})
+  }
+}
+</script>
+
+<style lang="less">
+  .accountStateBillDetail-wrap{
+    .accountStateBillDetail-back{
+      padding-top: 10px;
+      margin-bottom: 6px;
+    }
+  }
+</style>

+ 283 - 0
src/views/financialManagement/accountStatementBill/list.vue

@@ -0,0 +1,283 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="经销商名称/商户别名">
+                <a-input id="accountStatementBill-dealerName" v-model.trim="queryParam.nameLike" allowClear placeholder="请输入经销商名称/商户别名"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="区域">
+                <subarea id="accountStatementBill-subarea" ref="subarea" @change="subareaChange"></subarea>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="商户级别">
+                <v-select code="DEALER_LEVEL" id="accountStatementBill-dealerLevel" v-model="queryParam.dealerLevel" allowClear placeholder="请选择商户级别"></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="商户类型">
+                <dealerType id="accountStatementBill-dealerType" changeOnSelect v-model="dealerType" @change="getDealerType" allowClear></dealertype>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="客服">
+                <customerService ref="customerName" id="matchSendOutOrderList-bizUserSn" v-model="queryParam.subareaArea.kfSn"></customerService>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="财务编码">
+                <a-input id="accountStatementBill-bookNo" v-model.trim="queryParam.kdMidCustomerFnumber" allowClear placeholder="请输入财务编码"/>
+              </a-form-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>
+              <a-button
+                style="margin-left: 10px"
+                type="primary"
+                id="conFrontModal-export"
+                v-if="$hasPermissions('B_asb_export')"
+                class="button-warning"
+                @click="handleExport"
+                :disabled="disabled"
+                :loading="exportLoading"
+              >导出</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+    </a-card>
+    <a-card size="small" :bordered="false" class="accountStatementBill-wrap">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+80+'px' }"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight }"
+          :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>
+          <template slot="dealerType" slot-scope="text, record">
+            {{ record.dealerTypeName1 }}>{{ record.dealerTypeName2 }}
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <div>
+              <a-button
+                v-if="$hasPermissions('B_asb_newOrder')"
+                size="small"
+                type="link"
+                class="button-info"
+                @click="handleAdd(record)"
+              >
+                创建对账单
+              </a-button>
+            </div>
+          </template>
+        </s-table>
+      </a-spin>
+    </a-card>
+    <baseModal v-drag ref="baseModal" :show="openModal" @cancel="openModal=false" @refashData="creatOrder"></baseModal>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import { hdExportExcel } from '@/libs/exportExcel'
+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'
+export default {
+  name: 'AccountStatementBillList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, subarea, dealerType, customerService, baseModal },
+  data () {
+    return {
+      spinning: false,
+      exportLoading: false,
+      tableHeight: 0,
+      openModal: false,
+      dealerType: [], // 商户类型
+      queryParam: { //  查询条件
+        nameLike: '', // 经销商名称/别名
+        dealerType1: undefined, //  商户类型
+        dealerType2: undefined, //  商户类型
+        dealerLevel: null, // 商户级别
+        subareaArea: {
+          subareaSn: undefined, // 区域
+          subareaAreaSn: undefined, // 分区
+          kfSn: undefined // 客服
+        },
+        kdMidCustomerFnumber: '' // 财务编码
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      advanced: true,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam)
+
+        return verifyAccountBalanceQueryPage(params).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
+            }
+            this.total = data.count || 0
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      total: 0 // 合计
+    }
+  },
+  // 根据权限显示列表字段
+  computed: {
+    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: '总余额', scopedSlots: { customRender: 'totalAmount' }, width: '6%', align: 'center' },
+        { title: '待选余额', dataIndex: 'waitAmount', 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: '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: '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' }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    // 区域分区
+    subareaChange (val) {
+      this.queryParam.subareaArea.subareaSn = val[0] ? val[0] : undefined
+      this.queryParam.subareaArea.subareaAreaSn = val[1] ? val[1] : undefined
+    },
+    // 商户类型 change
+    getDealerType (v, o) {
+      this.queryParam.dealerType1 = v[0]
+      this.queryParam.dealerType2 = v[1]
+    },
+    //  重置
+    resetSearchForm () {
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.nameLike = ''
+      this.queryParam.dealerType1 = undefined
+      this.queryParam.dealerType2 = undefined
+      this.queryParam.dealerLevel = undefined
+      this.queryParam.subareaArea.subareaAreaSn = undefined
+      this.queryParam.subareaArea.subareaSn = undefined
+      this.queryParam.subareaArea.kfSn = undefined
+      this.dealerType = []
+      this.$refs.subarea.clearData()
+      this.queryParam.kdMidCustomerFnumber = ''
+      this.$refs.table.refresh(true)
+    },
+    // 导出
+    handleExport () {
+      const _this = this
+      _this.exportLoading = true
+      hdExportExcel(verifyAccountBalanceExport, _this.queryParam, '经销商对账单据余额-', function () {
+        _this.exportLoading = false
+      })
+    },
+    // 新增
+    handleAdd (row) {
+      this.openModal = true
+      this.$refs.baseModal.pageInit(row)
+    },
+    // 创建对账单成功
+    creatOrder (data) {
+      this.$refs.table.refresh()
+      this.$router.push({ name: 'accountStatementEdit', params: { sn: data.verifyAccountBillSn } })
+    },
+    // 详情
+    handleDetail (row) {
+      this.$router.push({ name: 'accountStatementBillDetail', params: { sn: row.dealerSn, name: row.dealerName } })
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 250
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  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) {
+    next(vm => {})
+  }
+}
+</script>
+
+<style lang="less">
+  .accountStatementBill-wrap{
+    .active{
+      color: #ed1c24;
+      cursor: pointer;
+    }
+    .common{
+      color: rgba(0, 0, 0);
+    }
+  }
+</style>

+ 211 - 0
src/views/financialManagement/manualEntryForm/baseModal.vue

@@ -0,0 +1,211 @@
+<template>
+  <a-modal
+    v-model="opened"
+    :title="title"
+    centered
+    :maskClosable="false"
+    :width="600"
+    :footer="null"
+    @cancel="cancel"
+  >
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        id="chooseCustom-form"
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol">
+        <a-form-model-item label="客户名称" prop="dealerSn">
+          <dealerSubareaScopeList id="manualEntryForm-dealer" :disabled="!!itemSn" ref="settleClientName" @change="custChange" />
+        </a-form-model-item>
+        <a-form-model-item label="借贷类型" prop="changeType">
+          <v-select
+            v-model="form.changeType"
+            ref="changeType"
+            showType="radio"
+            id="manualEntryForm-type"
+            code="VERIFY_ACCOUNT_CHANGE_TYPE"
+            placeholder="请选择借贷类型"
+            allowClear></v-select>
+        </a-form-model-item>
+        <a-form-model-item label="借贷金额" prop="changeAmount">
+          <a-input-number
+            id="manualEntryForm-amount"
+            :min="0"
+            :max="99999999"
+            v-model.trim="form.changeAmount"
+            allowClear
+            style="width:200px;"
+            placeholder="请输入借贷金额"/>
+          元
+        </a-form-model-item>
+        <a-form-model-item label="备注">
+          <a-textarea :rows="4" :maxLength="100" placeholder="请输入备注(最多100个字符)" v-model="form.remarks"></a-textarea>
+        </a-form-model-item>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 30px;">
+          <a-button @click="cancel" style="margin-right: 15px" id="chooseCustom-btn-back">取消</a-button>
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
+        </a-form-model-item>
+      </a-form-model>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { VSelect } from '@/components'
+// 组件
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import { verifyAccountChangeSave, verifyAccountChangeDetail } from '@/api/verifyAccountChange.js'
+export default {
+  name: 'ASBaseModal',
+  mixins: [commonMixin],
+  components: { VSelect, dealerSubareaScopeList },
+  props: {
+    show: [Boolean],
+    itemSn: {
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    let checkPending
+    const checkAmount = (rule, value, callback) => {
+      clearTimeout(checkPending)
+      if (!value && value != 0) {
+        return callback(new Error('请输入借贷金额'))
+      }
+      checkPending = setTimeout(() => {
+        if (value <= 0) {
+          callback(new Error('借贷金额必需大于0'))
+        } else {
+          callback()
+        }
+      }, 500)
+    }
+    return {
+      opened: this.show,
+      spinning: false,
+      disabled: false,
+      title: '调账',
+      confirmLoading: false,
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 18 }
+      },
+      form: {
+        dealerSn: undefined,
+        dealerName: undefined,
+        changeType: undefined,
+        changeAmount: undefined,
+        remarks: ''
+      },
+      rules: {
+        dealerSn: [ { required: true, message: '请选择客户', trigger: ['change', 'blur'] } ],
+        changeType: [ { required: true, message: '请选择借贷类型', trigger: ['change', 'blur'] } ],
+        changeAmount: [
+          { required: true, validator: checkAmount, trigger: ['change', 'blur'] }
+        ]
+      }
+    }
+  },
+  methods: {
+    // 客户
+    custChange (v) {
+      if (v && v.key) {
+        this.form.dealerSn = v.key
+        this.form.dealerName = v.row ? v.row.dealerName : ''
+      } else {
+        this.form.dealerSn = ''
+        this.form.dealerName = ''
+      }
+    },
+    //  保存
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.salesSaveFun()
+        } else {
+          return false
+        }
+      })
+    },
+    // 新建或编辑销售单
+    salesSaveFun () {
+      const _this = this
+      const form = JSON.parse(JSON.stringify(_this.form))
+      _this.spinning = true
+      verifyAccountChangeSave(form).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          this.$emit('ok', res.data)
+          // 选择审批人员
+          _this.cancel()
+        }
+        _this.spinning = false
+      })
+    },
+    //  详情
+    getDetail () {
+      this.title = '编辑调账'
+      this.spinning = true
+      this.confirmLoading = true
+      verifyAccountChangeDetail({ sn: this.itemSn }).then(res => {
+        if (res.status == 200) {
+          const data = res.data
+          data.changeAmount = Math.abs(data.changeAmount)
+          this.form = Object.assign(this.form, data)
+          // 回显客户
+          if (this.form.dealerSn) {
+            this.$nextTick(() => {
+              this.$refs.settleClientName.getDetail(this.form.dealerSn)
+            })
+          }
+        } else {
+          this.$refs.ruleForm.resetFields()
+        }
+        this.spinning = false
+        this.confirmLoading = false
+      })
+    },
+    cancel () {
+      this.opened = false
+      if (this.$refs.settleClientName) {
+        this.$refs.settleClientName.resetForm()
+      }
+      this.$refs.ruleForm.resetFields()
+      this.$emit('cancel')
+    },
+    pageInit () {
+      this.$nextTick(() => {
+        this.$refs.ruleForm.resetFields()
+        if (this.$refs.settleClientName) {
+          this.$refs.settleClientName.resetForm()
+        }
+      })
+      this.form = {
+        dealerSn: undefined,
+        dealerName: undefined,
+        changeType: undefined,
+        changeAmount: undefined,
+        remarks: ''
+      }
+      //  编辑页
+      if (this.itemSn) {
+        this.getDetail()
+      }
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+      if (newValue) {
+        this.pageInit()
+      }
+    }
+  }
+}
+</script>

+ 183 - 0
src/views/financialManagement/manualEntryForm/chooseDepartUserModal.vue

@@ -0,0 +1,183 @@
+<template>
+  <a-modal
+    centered
+    class="departUser-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="选择审批人员"
+    v-model="isShow"
+    @cancel="cancel"
+    width="60%">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div>
+        <div class="departUser-con">
+          <a-form-model
+            id="departUser-form"
+            ref="ruleForm"
+            :model="form"
+            :rules="rules"
+            :label-col="formItemLayout.labelCol"
+            :wrapper-col="formItemLayout.wrapperCol">
+            <a-form-model-item label="申请人员" prop="applyPersonSn">
+              <employee style="width: 100%;" @change="employeeChange" id="departUser-Employee" v-model="form.applyPersonSn"></employee>
+            </a-form-model-item>
+            <a-form-model-item label="审批人员" prop="approvers">
+              <dingDepartUser
+                ref="departUserApp"
+                @loaded="uploading=false"
+                id="departUser-approvers"
+                :disabled="uploading"
+                v-model="form.approvers"
+                @change="changeApprovers"
+                allowClear
+                placeholder="请选择审批人员"
+              ></dingDepartUser>
+            </a-form-model-item>
+            <a-form-model-item label="抄送人" prop="ccList">
+              <dingDepartUser
+                ref="departUserCc"
+                @loaded="uploading=false"
+                :disabled="uploading"
+                id="departUser-ccList"
+                v-model="form.ccList"
+                allowClear
+                placeholder="请选择抄送人"
+              ></dingDepartUser>
+            </a-form-model-item>
+          </a-form-model>
+        </div>
+        <div class="btn-cont">
+          <a-button type="primary" id="departUser-save" @click="handleSave">提交审核</a-button>
+          <a-button :loading="uploading" style="margin-left: 15px;" @click="updateUser">刷新人员</a-button>
+          <a-button id="departUser-back" @click="cancel" style="margin-left: 15px;">取消</a-button>
+        </div>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import dingDepartUser from '@/views/common/dingDepartUser.js'
+import employee from '@/views/expenseManagement/expenseReimbursement/employee.js'
+export default {
+  name: 'ChooseDepartUserModal',
+  components: { dingDepartUser, employee },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      uploading: false,
+      spinning: false,
+      isShow: this.openModal, //  是否打开弹框
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 16 }
+      },
+      form: {
+        applyPersonSn: undefined,
+        approvers: [], // 审批人
+        ccList: [] // 抄送人
+      },
+      rules: {
+        applyPersonSn: [
+          { required: true, message: '请选择申请人员', trigger: 'change' }
+        ],
+        approvers: [
+          { required: true, type: 'array', message: '请选择审批人员', trigger: 'change' }
+        ]
+      }
+    }
+  },
+  methods: {
+    // 申请人员
+    employeeChange (v, r) {
+      this.$nextTick(() => {
+        this.$refs.ruleForm.validateField(['applyPersonSn'])
+      })
+    },
+    updateUser () {
+      this.uploading = true
+      this.$refs.departUserApp.updateDeptUser()
+      this.$refs.departUserCc.updateDeptUser()
+    },
+    changeApprovers (value) {
+      this.form.approvers = value
+      this.$refs.ruleForm.clearValidate()
+    },
+    getTreeVal (data) {
+      const ret = []
+      data.map(item => {
+        ret.push(item.value)
+      })
+      return ret.join(',')
+    },
+    // 确定
+    handleSave (e) {
+      e.preventDefault()
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const form = JSON.parse(JSON.stringify(_this.form))
+          if (form.approvers) {
+            form.approvers = this.getTreeVal(form.approvers)
+          }
+          if (form.ccList) {
+            form.ccList = this.getTreeVal(form.ccList)
+          }
+          this.$emit('submit', form)
+          this.$emit('close')
+        } else {
+          return false
+        }
+      })
+    },
+    getDetail (data) {
+      this.form = Object.assign(this.form, {
+        applyPersonSn: data.applyPersonSn
+      })
+    },
+    resetForm () {
+      this.$nextTick(() => {
+        this.$refs.ruleForm.resetFields()
+      })
+      this.form = {
+        applyPersonSn: undefined,
+        ccList: undefined,
+        approvers: undefined
+      }
+    },
+    cancel () {
+      this.isShow = false
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.resetForm()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .departUser-modal{
+    .ant-modal-body {
+      padding: 30px 40px 24px;
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+  }
+</style>

+ 337 - 0
src/views/financialManagement/manualEntryForm/list.vue

@@ -0,0 +1,337 @@
+<template>
+  <div>
+    <a-card size="small" :bordered="false" class="searchBoxNormal">
+      <!-- 搜索条件 -->
+      <div ref="tableSearch" class="table-page-search-wrapper">
+        <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
+          <a-row :gutter="15">
+            <a-col :md="6" :sm="24">
+              <a-form-item label="创建时间">
+                <rangeDate id="manualEntryForm-rangeDate" ref="rangeDate" :value="creatDate" @change="dateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="调账单号">
+                <a-input id="manualEntryForm-dealerName" v-model.trim="queryParam.changeNo" allowClear placeholder="请输入调账单号"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="客户名称">
+                <dealerSubareaScopeList id="accountStatement-dealerName" ref="dealer" @change="custChange"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="借贷类型">
+                <v-select
+                  v-model="queryParam.changeType"
+                  ref="changeType"
+                  id="conFrontModal-changeType"
+                  code="VERIFY_ACCOUNT_CHANGE_TYPE"
+                  placeholder="请选择借贷类型"
+                  allowClear></v-select>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="状态">
+                <v-select
+                  v-model="queryParam.status"
+                  ref="status"
+                  id="conFrontModal-status"
+                  code="VERIFY_ACCOUNT_CHANGE_STATUS"
+                  placeholder="请选择状态"
+                  allowClear></v-select>
+              </a-form-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="manualEntryForm-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="manualEntryForm-reset">重置</a-button>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+    </a-card>
+    <a-card size="small" :bordered="false" class="manualEntryForm-wrap">
+      <!-- 操作按钮 -->
+      <div class="table-operator">
+        <div class="flex-center">
+          <a-button type="primary" @click="handleAdd" v-if="$hasPermissions('B_vac_creat')">调账</a-button>
+          <div class="tongji-bar"></div>
+        </div>
+        <div></div>
+      </div>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+80+'px' }"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight }"
+          :pageSize="30"
+          :defaultLoadData="false"
+          bordered>
+          <template slot="actions" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              v-if="record.status=='WAIT_SUBMIT'&&$hasPermissions('B_vac_edit')"
+              class="button-info"
+              @click="handleEdit(record)"
+            >
+              编辑
+            </a-button>
+            <a-button
+              v-if="record.status=='WAIT_SUBMIT'&&$hasPermissions('B_vac_del')"
+              size="small"
+              type="link"
+              class="button-error"
+              @click="handleDel(record)"
+            >
+              删除
+            </a-button>
+            <a-button
+              v-if="record.status!='WAIT_SUBMIT'&&$hasPermissions('B_vac_auditStatus')"
+              size="small"
+              type="link"
+              @click="auditStatus(record)"
+              class="button-info"
+            >
+              审核进度
+            </a-button>
+          </template>
+        </s-table>
+      </a-spin>
+    </a-card>
+    <!-- 审核进度 -->
+    <verifyModal v-drag :openModal="openModal" :itemSn="itemSn" ref="verifyModal" @close="openModal=false"></verifyModal>
+    <!-- 基础信息 -->
+    <baseModal v-drag :show="baseModal" :itemSn="itemSn" @cancel="baseModal=false" @ok="hanldAudit"></baseModal>
+    <!-- 提交  选择审批人员 -->
+    <chooseDepartUserModal :openModal="openDepartUserModal" @close="openDepartUserModal=false" @submit="handleSave"></chooseDepartUserModal>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { STable, VSelect } from '@/components'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import rangeDate from '@/views/common/rangeDate.vue'
+import baseModal from './baseModal.vue'
+import verifyModal from './verifyModal.vue'
+import chooseDepartUserModal from './chooseDepartUserModal.vue'
+import { verifyAccountChangeList, verifyAcountBillSubmit, verifyAccountChangeDel } from '@/api/verifyAccountChange.js'
+export default {
+  name: 'ManualEntryFormList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, rangeDate, baseModal, chooseDepartUserModal, dealerSubareaScopeList, verifyModal },
+  data () {
+    return {
+      spinning: false,
+      baseModal: false,
+      openModal: false,
+      tableHeight: 0,
+      queryParam: { //  查询条件
+        beginDate: '',
+        endDate: '',
+        changeNo: '',
+        dealerName: '',
+        changeType: undefined,
+        status: undefined
+      },
+      creatDate: [], //  创建时间
+      disabled: false, //  查询、重置按钮是否可操作
+      advanced: true,
+      openDepartUserModal: false,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        const params = Object.assign(parameter, this.queryParam)
+        return verifyAccountChangeList(params).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
+              // 借方
+              if (data.list[i].changeType == 'DEBIT') {
+                data.list[i].borrowAmount = this.toThousands(data.list[i].changeAmount, 2)
+              }
+              // 贷方
+              if (data.list[i].changeType == 'LENDER') {
+                data.list[i].loanAmount = this.toThousands(data.list[i].changeAmount * -1, 2)
+              }
+            }
+            this.total = data.count || 0
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      total: 0, // 合计
+      itemSn: null
+    }
+  },
+  // 根据权限显示列表字段
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调账单号', dataIndex: 'changeNo', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerName', width: '15%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '借方', dataIndex: 'borrowAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '贷方', dataIndex: 'loanAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '备注', dataIndex: 'remarks', width: '30%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '审核时间', dataIndex: 'auditDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', dataIndex: 'statusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'actions' }, width: '8%', align: 'center' }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0] ? date[0] : ''
+      this.queryParam.endDate = date[1] ? date[1] : ''
+    },
+    // 客户
+    custChange (v) {
+      if (v && v.key) {
+        this.queryParam.dealerSn = v.key
+        this.queryParam.dealerName = v.row ? v.row.dealerName : ''
+      } else {
+        this.queryParam.dealerSn = ''
+        this.queryParam.dealerName = ''
+      }
+    },
+    //  重置
+    resetSearchForm () {
+      this.creatDate = []
+      this.$refs.rangeDate.resetDate(this.creatDate)
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.queryParam.changeNo = ''
+      this.queryParam.dealerName = ''
+      this.queryParam.dealerSn = ''
+      if (this.$refs.dealer) {
+        this.$refs.dealer.resetForm()
+      }
+      this.queryParam.changeType = undefined
+      this.queryParam.status = undefined
+      this.$refs.table.refresh(true)
+    },
+    // 审核进度
+    auditStatus (row) {
+      this.openModal = true
+      this.itemSn = row.changeSn
+    },
+    // 删除
+    handleDel (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示(' + row.dealerName + ')',
+        content: <div style="font-size:14px;"><div>调账单号:{row.changeNo}</div><div>确定删除吗?</div></div>,
+        centered: true,
+        closable: true,
+        onOk () {
+          _this.spinning = true
+          verifyAccountChangeDel({ sn: row.changeSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+            }
+            _this.spinning = false
+          })
+        }
+      })
+    },
+    // 调账
+    handleAdd () {
+      this.itemSn = null
+      this.baseModal = true
+    },
+    // 编辑
+    handleEdit (row) {
+      this.itemSn = row.changeSn
+      this.baseModal = true
+    },
+    // 审核提交弹框
+    hanldAudit (data) {
+      this.$refs.table.refresh()
+      this.itemSn = data.changeSn
+      this.openDepartUserModal = true
+    },
+    // 提交审核人员
+    handleSave (data) {
+      verifyAcountBillSubmit({ changeSn: this.itemSn, ...data }).then(res => {
+        if (res.status == 200) {
+          this.$message.success('提交成功')
+          this.openDepartUserModal = false
+          this.$refs.table.refresh()
+        }
+      })
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 250
+    }
+  },
+  watch: {
+    advanced (newValue, oldValue) {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    '$store.state.app.winHeight' (newValue, oldValue) { //  窗口变更时,需同时更改表格高度
+      this.setTableH()
+    }
+  },
+  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) {
+    next(vm => {})
+  }
+}
+</script>
+
+<style lang="less">
+  .manualEntryForm-wrap{
+    .active{
+      color: #ed1c24;
+      cursor: pointer;
+    }
+    .common{
+      color: rgba(0, 0, 0);
+    }
+  }
+</style>

+ 101 - 0
src/views/financialManagement/manualEntryForm/verifyModal.vue

@@ -0,0 +1,101 @@
+<template>
+  <a-modal
+    centered
+    :footer="null"
+    :maskClosable="false"
+    title="人工录入单审核进度"
+    v-model="isShow"
+    @cancel="isShow=false"
+    width="50%">
+    <p>说明:以下信息来自钉钉</p>
+    <p>提审时间:{{ auditDate }}</p>
+    <a-spin :spinning="spinning" tip="Loading...">
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :scroll="{ y: 500 }"
+        :showPagination="false"
+        :defaultLoadData="true"
+        bordered>
+      </s-table>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { STable } from '@/components'
+import { getProcessInstance } from '@/api/expenseManagement'
+export default {
+  name: 'VerifyModal',
+  components: { STable },
+  props: {
+    openModal: {
+      type: Boolean,
+      default: false
+    },
+    itemSn: {
+      type: [Number, String],
+      default: ''
+    }
+  },
+  data () {
+    return {
+      spinning: false,
+      isShow: this.openModal,
+      auditDate: '',
+      columns: [{ title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
+        { title: '人员姓名', width: '12%', dataIndex: 'approvalName', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '人员类型', dataIndex: 'processTaskType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', dataIndex: 'approvalStateDictValue', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审批意见', dataIndex: 'approvalOpinion', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '附件', dataIndex: 'attachmentNames', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作时间', dataIndex: 'approvalTime', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.spinning = true
+        delete parameter.tableId
+        delete parameter.index
+        return getProcessInstance({ businessType: 'VERIFY_ACCOUNT_CHANGE', businessSn: this.itemSn }).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data ? res.data[0] ? res.data[0].opinionList ? res.data[0].opinionList : [] : [] : []
+            const no = 0
+            for (var i = 0; i < data.length; i++) {
+              data[i].no = no + i + 1
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          this.auditDate = res.data[data.length - 1].createDate
+          return data
+        })
+      }
+    }
+  },
+  watch: {
+    openModal (nVal, oVal) {
+      this.isShow = nVal
+    },
+    isShow (nVal, oVal) {
+      if (!nVal) {
+        this.$emit('close')
+        this.$refs.table.clearTable()
+      } else {
+        this.$nextTick(() => {
+          this.$refs.table.refresh()
+        })
+      }
+    },
+    itemSn (nVal, oVal) {
+
+    }
+  }
+}
+</script>
+
+<style>
+</style>

+ 16 - 11
src/views/salesReturnManagement/salesReturn/chooseDepartUserModal.vue

@@ -81,7 +81,7 @@
 import { VSelect, Upload } from '@/components'
 import dingDepartUser from '@/views/common/dingDepartUser.js'
 import employee from '@/views/expenseManagement/expenseReimbursement/employee.js'
-import { sign } from 'core-js/fn/number'
+import { getDefaultCofig } from '@/api/data.js'
 import { queryLastFinishDingUser } from '@/api/salesReturn'
 export default {
   name: 'ChooseDepartUserModal',
@@ -144,7 +144,6 @@ export default {
     updateUser () {
       this.uploading = true
       this.$refs.departUserApp.updateDeptUser()
-      // this.$refs.departUserCc.updateDeptUser()
     },
     changeApprovers (value) {
       this.form.approvers = value
@@ -157,9 +156,10 @@ export default {
       })
       return ret.join(',')
     },
-    getFormatUser (data) {
+    // 格式化人员数据
+    getFormatUser (list) {
       const ret = []
-      data.map(item => {
+      list.map(item => {
         ret.push({ label: item.userName, value: item.userId || item.userid })
       })
       return ret
@@ -217,19 +217,24 @@ export default {
     cancel () {
       this.isShow = false
     },
-    pageInit () {
+    async pageInit () {
       // 获取审批人员默认值
       if (this.showDefUser) {
+        // 默认写死的人员
+        this.spinning = true
+        const data = await getDefaultCofig({ code: 'SALE_RETURN_DING_USER' }).then(res => res.data)
+        const ret = JSON.parse(data.value)
+        if (ret) {
+          this.form.approvers = this.getFormatUser(ret.approvers || [])
+          this.form.ccList = this.getFormatUser(ret.ccList || [])
+        }
+        this.spinning = false
+        this.spinning = true
         queryLastFinishDingUser({}).then(res => {
           if (res.status == 200) {
             this.form.applyPersonSn = res.data.applyPersonSn
-            if (res.data.approversTaskList) {
-              this.form.approvers = this.getFormatUser(res.data.approversTaskList)
-            }
-            if (res.data.ccTaskList) {
-              this.form.ccList = this.getFormatUser(res.data.ccTaskList)
-            }
           }
+          this.spinning = false
         })
       }
     }

+ 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.122/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: {