Parcourir la source

Merge branch 'develop_lb2' of jianguan-web/jg-ocs-html into pre-release

李磊 il y a 3 ans
Parent
commit
44bbb42209
100 fichiers modifiés avec 3505 ajouts et 558 suppressions
  1. 1 1
      public/version.json
  2. 0 3
      src/App.vue
  3. 19 3
      src/api/allocateBill.js
  4. 21 0
      src/api/data.js
  5. 15 1
      src/api/dispatch.js
  6. 103 0
      src/api/financeBook.js
  7. 51 0
      src/api/sendBill.js
  8. 32 4
      src/api/settleReceipt.js
  9. 3 2
      src/api/waitDispatchDetail.js
  10. 7 1
      src/components/index.less
  11. 219 24
      src/config/router.config.js
  12. 147 10
      src/libs/JGPrint.js
  13. 19 0
      src/libs/tools.js
  14. 10 0
      src/main.js
  15. 2 1
      src/store/getters.js
  16. 15 1
      src/store/modules/app.js
  17. 3 1
      src/views/Home.vue
  18. 288 0
      src/views/allocationManagement/matchSendOutOrder/list.vue
  19. 4 7
      src/views/allocationManagement/transferOut/basicInfoModal.vue
  20. 1 1
      src/views/allocationManagement/transferOut/chooseImportModal.vue
  21. 22 34
      src/views/allocationManagement/transferOut/detail.vue
  22. 159 0
      src/views/allocationManagement/transferOut/dsModal.vue
  23. 51 46
      src/views/allocationManagement/transferOut/edit.vue
  24. 1 1
      src/views/allocationManagement/transferOut/importGuideModal.vue
  25. 78 7
      src/views/allocationManagement/transferOut/list.vue
  26. 21 9
      src/views/allocationManagement/transferOut/printModal.vue
  27. 1 1
      src/views/allocationManagement/transferReturn/basicInfoModal.vue
  28. 1 1
      src/views/allocationManagement/transferReturn/chooseImportModal.vue
  29. 1 1
      src/views/allocationManagement/transferReturn/edit.vue
  30. 1 1
      src/views/allocationManagement/transferReturn/editGrp.vue
  31. 1 1
      src/views/allocationManagement/transferReturn/importGuideModal.vue
  32. 9 37
      src/views/allocationManagement/transferReturn/print.vue
  33. 3 3
      src/views/allocationManagement/transferReturn/printModal.vue
  34. 331 0
      src/views/allocationManagement/transfersPrint/list.vue
  35. 146 0
      src/views/allocationManagement/transfersPrint/recordModal.vue
  36. 1 1
      src/views/basicData/transferTypeManagement/editModal.vue
  37. 1 1
      src/views/basicData/warehouse/editModal.vue
  38. 1 1
      src/views/basicData/warehouse/storingLocation/editModal.vue
  39. 1 1
      src/views/bnSetting/menu/childModal.vue
  40. 1 1
      src/views/common/auditModal.vue
  41. 1 1
      src/views/common/chooseBrandModal.vue
  42. 1 1
      src/views/common/chooseCustomerModal.vue
  43. 1 1
      src/views/common/chooseProductsModal.vue
  44. 1 1
      src/views/common/chooseSupplierModal.vue
  45. 1 1
      src/views/common/chooseTypeModal.vue
  46. 25 9
      src/views/common/commonModal.vue
  47. 10 1
      src/views/common/dealerSubareaScopeList.vue
  48. 1 1
      src/views/dealerManagement/dealerAccountManagement/detailModal.vue
  49. 1 1
      src/views/dealerManagement/dealerAccountManagement/editModal.vue
  50. 1 1
      src/views/dealerManagement/dealerRelationshipBinding/associateModal.vue
  51. 1 1
      src/views/dealerManagement/marketingDivisionSet/editModal.vue
  52. 2 1
      src/views/dealerManagement/merchantInfoManagement/detailModal.vue
  53. 17 0
      src/views/dealerManagement/merchantInfoManagement/edit.vue
  54. 1 1
      src/views/dealerManagement/merchantInfoManagement/updateCooperate.vue
  55. 1 1
      src/views/dealerManagement/merchantInfoManagement/updateDealerLevel.vue
  56. 1 1
      src/views/dealerManagement/rebateSettings/associateModal.vue
  57. 1 1
      src/views/expenseManagement/expenseReimbursement/chooseDepartUserModal.vue
  58. 1 1
      src/views/expenseManagement/expenseReimbursement/chooseImportModal.vue
  59. 0 5
      src/views/expenseManagement/expenseReimbursement/detail.vue
  60. 10 7
      src/views/expenseManagement/expenseReimbursement/employee.js
  61. 1 1
      src/views/expenseManagement/expenseReimbursement/epenseDetailModal.vue
  62. 1 1
      src/views/expenseManagement/expenseReimbursement/importGuideModal.vue
  63. 1 1
      src/views/expenseManagement/expenseReimbursement/productInfoModal.vue
  64. 1 1
      src/views/expenseManagement/expenseReimbursement/verifyModal.vue
  65. 1 1
      src/views/financialManagement/allocateReturnConfirmation/detailModal.vue
  66. 197 0
      src/views/financialManagement/financialCollection/baseModal.vue
  67. 209 0
      src/views/financialManagement/financialCollection/detail.vue
  68. 158 0
      src/views/financialManagement/financialCollection/dispatchModal.vue
  69. 324 0
      src/views/financialManagement/financialCollection/edit.vue
  70. 368 0
      src/views/financialManagement/financialCollection/fcDetailModal.vue
  71. 81 0
      src/views/financialManagement/financialCollection/fcDetailSxItem.vue
  72. 165 222
      src/views/financialManagement/financialCollection/list.vue
  73. 98 0
      src/views/financialManagement/financialCollection/verifyModal.vue
  74. 1 1
      src/views/financialManagement/returnConfirmation/detailModal.vue
  75. 1 1
      src/views/financialManagement/warehousingConfirmation/detailModal.vue
  76. 1 1
      src/views/financialManagement/warehousingConfirmation/list.vue
  77. 1 1
      src/views/inventoryManagement/intelligentReplenishment/detailModal.vue
  78. 1 1
      src/views/inventoryManagement/intelligentReplenishment/serviceLevelModal.vue
  79. 1 1
      src/views/inventoryManagement/inventoryCheck/addModal.vue
  80. 1 1
      src/views/inventoryManagement/inventoryQuery/detailModal.vue
  81. 1 1
      src/views/inventoryManagement/inventoryQuery/exportExcelModal.vue
  82. 3 31
      src/views/inventoryManagement/makeInventory/check.vue
  83. 3 31
      src/views/inventoryManagement/supervisionDisk/check.vue
  84. 1 1
      src/views/power/dataDictionary/codeItemModal.vue
  85. 1 1
      src/views/power/dataDictionary/codeModal.vue
  86. 1 1
      src/views/power/menu/childModal.vue
  87. 1 1
      src/views/power/role/menuModal.vue
  88. 1 1
      src/views/power/role/roleModal.vue
  89. 1 1
      src/views/power/user/updateAreal.vue
  90. 1 1
      src/views/power/user/userModal.vue
  91. 1 1
      src/views/productManagement/productBrand/detailModal.vue
  92. 1 1
      src/views/productManagement/productBrand/editModal.vue
  93. 1 1
      src/views/productManagement/productBrand/list.vue
  94. 1 1
      src/views/productManagement/productCategory/editModal.vue
  95. 1 1
      src/views/productManagement/productInfo/detailModal.vue
  96. 1 1
      src/views/productManagement/productInfo/offlineModal.vue
  97. 1 1
      src/views/productManagement/productLevel/editModal.vue
  98. 1 1
      src/views/productManagement/productPricing/auditModal.vue
  99. 1 1
      src/views/productManagement/productPricing/editModal.vue
  100. 1 1
      src/views/productManagement/productUniversal/editModal.vue

+ 1 - 1
public/version.json

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

+ 0 - 3
src/App.vue

@@ -10,9 +10,6 @@
 <script>
 import zhCN from 'ant-design-vue/es/locale/zh_CN'
 import { AppDeviceEnquire } from '@/utils/mixin'
-import moment from 'moment'
-import 'moment/locale/zh-cn'
-moment.locale('zh-cn')
 export default {
   mixins: [AppDeviceEnquire],
   data () {

+ 19 - 3
src/api/allocateBill.js

@@ -54,12 +54,28 @@ export const allocateBillAudit = params => {
     method: 'get'
   })
 }
+// 允许打印
+export const allocateBillAblePrint = params => {
+  return axios({
+    url: `/allocateBill/ablePrint/${params.sn}`,
+    data: params,
+    method: 'post'
+  })
+}
+// 对单通过
+export const allocateBillCheck = params => {
+  return axios({
+    url: `/allocateBill/check/${params.sn}`,
+    data: params,
+    method: 'post'
+  })
+}
 // 调拨管理  提交
 export const allocateBillSubmit = params => {
   return axios({
-    url: `/allocateBill/submit/${params.sn}`,
-    data: {},
-    method: 'get'
+    url: `/allocateBill/submit`,
+    data: params,
+    method: 'post'
   })
 }
 //  调拨管理 导出

+ 21 - 0
src/api/data.js

@@ -135,3 +135,24 @@ export const getArea = (params) => {
     method: 'post'
   })
 }
+
+// 打印记录-分页列表
+export const printLogQueryPage = (params) => {
+  const url = `/printLog/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 打印记录-新增
+export const printLogSave = (params) => {
+  return axios({
+    url: `/printLog/save`,
+    data: params,
+    method: 'post'
+  })
+}

+ 15 - 1
src/api/dispatch.js

@@ -46,7 +46,14 @@ export const dispatchQueryCount = (params) => {
     method: 'post'
   })
 }
-
+// 对单通过
+export const dispatchCheck = (params) => {
+  return axios({
+    url: `/dispatch/check/${params.dispatchBillSn}`,
+    data: params,
+    method: 'post'
+  })
+}
 // 出库
 export const dispatchStockOut = (params) => {
   return axios({
@@ -63,6 +70,13 @@ export const dispatchStockUpAduit = (params) => {
     method: 'post'
   })
 }
+// 允许备货打印
+export const dispatchPrintStatus = (params) => {
+  return axios({
+    url: `/dispatch/updatePrintStatus/${params.dispatchBillSn}/${params.printStatus}`,
+    method: 'get'
+  })
+}
 // 下推 详情  打印
 export const dispatchDetailPrint = params => {
   const url = `/dispatch/print/${params.type}`

+ 103 - 0
src/api/financeBook.js

@@ -0,0 +1,103 @@
+import { axios } from '@/utils/request'
+
+// 财务收款分页列表
+export const financeBookQueryPage = (params) => {
+  const url = `/financeBook/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 详情
+export const financeBookFindBySn = (params) => {
+  const url = `/financeBook/queryBySn/${params.bookSn}`
+  return axios({
+    url: url,
+    method: 'get'
+  })
+}
+// 关联备货单接口
+export const queryDispatchBillListBySn = (params) => {
+  const url = `/financeBook/queryDispatchBillListBySn/${params.bookSn}`
+  return axios({
+    url: url,
+    method: 'get'
+  })
+}
+// 删除
+export const financeBookDeleteBySn = (params) => {
+  const url = `/financeBook/deleteBySn/${params.bookSn}`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 再次编辑
+export const financeBookDgainEditBySn = (params) => {
+  const url = `/financeBook/againEdit/${params.bookSn}`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 保存
+export const financeBookSave = (params) => {
+  const url = `/financeBook/save`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 提交
+export const financeBookSubmit = (params) => {
+  const url = `/financeBook/submit`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 明细-列表
+export const financeBookDetailQueryList = (params) => {
+  const url = `/financeBook/detail/queryList/${params.bookSn}`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 明细-保存
+export const financeBookDetailSave = (params) => {
+  const url = `/financeBook/detail/save`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 明细-详情
+export const financeBookDetailQueryBySn = (params) => {
+  const url = `/financeBook/detail/queryBySn/${params.bookDetailSn}`
+  return axios({
+    url: url,
+    method: 'get'
+  })
+}
+// 明细-删除
+export const financeBookDetailDelete = (params) => {
+  const url = `/financeBook/detail/deleteBySn/${params.bookDetailSn}`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}

+ 51 - 0
src/api/sendBill.js

@@ -0,0 +1,51 @@
+import { axios } from '@/utils/request'
+// 新增发货
+export const sendBillInsert = params => {
+  return axios({
+    url: '/sendBill/insert',
+    data: params,
+    method: 'post'
+  })
+}
+// 修改发货单
+export const sendBillUpdate = params => {
+  return axios({
+    url: '/sendBill/update',
+    data: params,
+    method: 'post'
+  })
+}
+// 获取客户信息
+export const getCustomerInfo = params => {
+  return axios({
+    url: '/sendBill/getCustomerInfo',
+    data: params,
+    method: 'post'
+  })
+}
+// 发货单列表分页查询
+export const sendBillQueryPageList = (params) => {
+  const url = `/sendBill/queryPage/${params.pageNo}/${params.pageSize}`
+  delete params.pageNo
+  delete params.pageSize
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+// 更新发货单物流信息
+export const updateTransportInfo = params => {
+  return axios({
+    url: '/sendBill/updateTransportInfo',
+    data: params,
+    method: 'post'
+  })
+}
+// 根据sn查找详情
+export const sendBillFindBySn = params => {
+  return axios({
+    url: `/sendBill/findBySn/${params.sn}`,
+    method: 'get'
+  })
+}

+ 32 - 4
src/api/settleReceipt.js

@@ -1,6 +1,6 @@
 import { axios } from '@/utils/request'
 
-//  财务收款  列表  分页
+//  销售收款  列表  分页
 export const settleReceiptList = (params) => {
   const url = `/settleReceipt/queryPage/${params.pageNo}/${params.pageSize}`
   delete params.pageNo
@@ -11,12 +11,40 @@ export const settleReceiptList = (params) => {
     method: 'post'
   })
 }
-//  财务收款  收款
-export const settleReceipt = (params) => {
-  const url = `/settleReceipt/receipt/${params.sn}`
+//  仅标记收款
+export const settleReceiptBatch = (params) => {
+  const url = `/settleReceipt/receiptBatch`
   return axios({
     url: url,
     data: params,
     method: 'post'
   })
 }
+
+// 关联收款单
+export const settleReceiptBookBatch = (params) => {
+  const url = `/settleReceipt/receiptBookBatch`
+  return axios({
+    url: url,
+    data: params,
+    method: 'post'
+  })
+}
+
+// 凭证
+export const settleReceiptFindBySn = (params) => {
+  const url = `/settleReceipt/findBySn/${params.sn}`
+  return axios({
+    url: url,
+    method: 'get'
+  })
+}
+
+// 收款打印
+export const settleReceiptPrintFindBySn = (params) => {
+  const url = `/settleReceipt/printFindBySn/${params.sn}`
+  return axios({
+    url: url,
+    method: 'get'
+  })
+}

+ 3 - 2
src/api/waitDispatchDetail.js

@@ -12,8 +12,9 @@ export const deleteBatch = (params) => {
 // 下推
 export const pushDown = (params) => {
   return axios({
-    url: `/dispatch/pushDown/${params.dispatchBillSn}`,
-    method: 'get'
+    url: `/dispatch/pushDown`,
+	data:params,
+    method: 'post'
   })
 }
 

+ 7 - 1
src/components/index.less

@@ -18,6 +18,7 @@
     overflow: hidden;
 }
 
+
 /* 扩展ant design pro按钮组件颜色 */
 .ant-btn-primary.button-primary,.ant-btn-primary.button-info,.ant-btn-primary.button-warning,.ant-btn-primary.button-geekblue,.ant-btn-primary.button-purple {
   background-color: #39f;
@@ -34,7 +35,9 @@
     border-color: #3d80bf;
   }
 }
- 
+.ant-btn-primary.button-primary[disabled],.ant-btn-primary.button-info[disabled],.ant-btn-primary.button-warning[disabled],.ant-btn-primary.button-geekblue[disabled],.ant-btn-primary.button-purple[disabled]{
+   color: rgba(255, 255, 255, 0.5);
+ }
 .ant-btn-primary.button-success {
   background-color: #11b116;
   border-color: #00af54;
@@ -237,6 +240,9 @@
     box-shadow: 0 0 20px #dcdee2;
   }
 }
+.ant-descriptions-item > span{
+    word-break: break-all!important;
+  }
 // 页签样式
 .multi-tab-con{
   .ant-tabs-nav-container{

+ 219 - 24
src/config/router.config.js

@@ -188,6 +188,142 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/salesManagement/pushOrderManagement',
+            redirect: '/salesManagement/pushOrderManagement/list',
+            name: 'pushOrderManagement',
+            component: BlankLayout,
+            meta: {
+              title: '下推订单列表',
+              icon: 'vertical-align-bottom',
+              permission: 'M_pushOrderManagementList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'pushOrderManagementList',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/pushOrderManagement/list.vue'),
+                meta: {
+                  title: '下推订单列表',
+                  icon: 'vertical-align-bottom',
+                  hidden: true,
+                  permission: 'M_pushOrderManagementList'
+                }
+              },
+              {
+                path: 'detail/:sn/:type',
+                name: 'pushOrderDetail',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/pushOrderManagement/detail.vue'),
+                meta: {
+                  title: '下推订单详情',
+                  icon: 'vertical-align-bottom',
+                  hidden: true
+                  // permission: 'M_outboundList'
+                }
+              }
+            ]
+          },
+          {
+            path: '/salesManagement/salesCollection',
+            redirect: '/salesManagement/salesCollection/list',
+            name: 'salesCollection',
+            component: BlankLayout,
+            meta: {
+              title: '销售收款',
+              icon: 'vertical-align-bottom',
+              permission: 'M_salesCollectionList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'salesCollectionList',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/salesCollection/list.vue'),
+                meta: {
+                  title: '销售收款',
+                  icon: 'vertical-align-bottom',
+                  hidden: true,
+                  permission: 'M_salesCollectionList'
+                }
+              },
+            ]
+          },
+          {
+            path: '/salesManagement/stockPrint',
+            redirect: '/salesManagement/stockPrint/list',
+            name: 'stockPrint',
+            component: BlankLayout,
+            meta: {
+              title: '备货打印',
+              icon: 'vertical-align-bottom',
+              permission: 'M_stockPrintList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'stockPrintList',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/stockPrint/list.vue'),
+                meta: {
+                  title: '备货打印',
+                  icon: 'vertical-align-bottom',
+                  hidden: true,
+                  permission: 'M_stockPrintList'
+                }
+              },
+            ]
+          },
+          {
+            path: '/salesManagement/receiptPrint',
+            redirect: '/salesManagement/receiptPrint/list',
+            name: 'receiptPrint',
+            component: BlankLayout,
+            meta: {
+              title: '收款打印',
+              icon: 'vertical-align-bottom',
+              permission: 'M_receiptPrintList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'receiptPrintList',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/receiptPrint/list.vue'),
+                meta: {
+                  title: '收款打印',
+                  icon: 'vertical-align-bottom',
+                  hidden: true,
+                  permission: 'M_receiptPrintList'
+                }
+              },
+            ]
+          },
+          {
+            path: '/salesManagement/matchSendOutOrder',
+            redirect: '/salesManagement/matchSendOutOrder/list',
+            name: 'matchSendOutOrder',
+            component: BlankLayout,
+            meta: {
+              title: '发货对单',
+              icon: 'vertical-align-bottom',
+              permission: 'M_matchSendOutOrderList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'matchSendOutOrderList',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/matchSendOutOrder/list.vue'),
+                meta: {
+                  title: '发货对单',
+                  icon: 'vertical-align-bottom',
+                  hidden: true,
+                  permission: 'M_matchSendOutOrderList'
+                }
+              },
+            ]
+          },
           {
             path: '/salesManagement/examineVerify',
             redirect: '/salesManagement/examineVerify/list',
@@ -239,37 +375,26 @@ export const asyncRouterMap = [
             ]
           },
           {
-            path: '/salesManagement/pushOrderManagement',
-            redirect: '/salesManagement/pushOrderManagement/list',
-            name: 'pushOrderManagement',
+            path: '/salesManagement/sendOutOrder',
+            redirect: '/salesManagement/sendOutOrder/list',
+            name: 'sendOutOrder',
             component: BlankLayout,
             meta: {
-              title: '下推订单列表',
-              icon: 'vertical-align-bottom',
-              permission: 'M_pushOrderManagementList'
+              title: '发货单列表',
+              icon: 'export',
+              permission: 'M_sendOutOrderList'
             },
             hideChildrenInMenu: true,
             children: [
               {
                 path: 'list',
-                name: 'pushOrderManagementList',
-                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/pushOrderManagement/list.vue'),
+                name: 'sendOutOrderList',
+                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/sendOutOrder/list.vue'),
                 meta: {
-                  title: '下推订单列表',
-                  icon: 'vertical-align-bottom',
+                  title: '发货单列表',
+                  icon: 'export',
                   hidden: true,
-                  permission: 'M_pushOrderManagementList'
-                }
-              },
-              {
-                path: 'detail/:sn/:type',
-                name: 'pushOrderDetail',
-                component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/pushOrderManagement/detail.vue'),
-                meta: {
-                  title: '下推订单详情',
-                  icon: 'vertical-align-bottom',
-                  hidden: true
-                  // permission: 'M_outboundList'
+                  permission: 'M_sendOutOrderList'
                 }
               }
             ]
@@ -386,7 +511,7 @@ export const asyncRouterMap = [
                 name: 'shortageStatisticsCList',
                 component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/shortageStatisticsC/list.vue'),
                 meta: {
-                  title: '缺货统计列表',
+                  title: '缺货统计(按客户)',
                   icon: 'file-done',
                   hidden: true,
                   permission: 'M_shortageStatisticsCList'
@@ -411,7 +536,7 @@ export const asyncRouterMap = [
                 name: 'shortageStatisticsPList',
                 component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/shortageStatisticsP/list.vue'),
                 meta: {
-                  title: '缺货统计列表',
+                  title: '缺货统计(按产品)',
                   icon: 'file-protect',
                   hidden: true,
                   permission: 'M_shortageStatisticsPList'
@@ -648,6 +773,26 @@ export const asyncRouterMap = [
                   hidden: true,
                   permission: 'M_financialCollectionList'
                 }
+              },
+              {
+                path: 'detail/:sn',
+                name: 'financialCollectionDetail',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/financialCollection/detail.vue'),
+                meta: {
+                  title: '财务收款详情',
+                  icon: 'monitor',
+                  hidden: true
+                }
+              },
+              {
+                path: 'edit/:sn',
+                name: 'financialCollectionEdit',
+                component: () => import(/* webpackChunkName: "financialManagement" */ '@/views/financialManagement/financialCollection/edit.vue'),
+                meta: {
+                  title: '编辑财务收款',
+                  icon: 'monitor',
+                  hidden: true
+                }
               }
             ]
           }
@@ -1085,6 +1230,56 @@ export const asyncRouterMap = [
               }
             ]
           },
+          {
+            path: '/allocationManagement/transfersPrint',
+            redirect: '/allocationManagement/transfersPrint/list',
+            name: 'transfersPrint',
+            component: BlankLayout,
+            meta: {
+              title: '调拨打印',
+              icon: 'pull-request',
+              permission: 'M_transfersPrintList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'transfersPrintList',
+                component: () => import(/* webpackChunkName: "allocationManagement" */ '@/views/allocationManagement/transfersPrint/list.vue'),
+                meta: {
+                  title: '调拨打印',
+                  icon: 'pull-request',
+                  hidden: true,
+                  permission: 'M_transfersPrintList'
+                }
+              },
+            ]
+          },
+          {
+            path: '/allocationManagement/matchSendOutOrder',
+            redirect: '/allocationManagement/matchSendOutOrder/list',
+            name: 'matchSendOutOrderAllocation',
+            component: BlankLayout,
+            meta: {
+              title: '调拨发货对单',
+              icon: 'vertical-align-bottom',
+              permission: 'M_matchSendOutOrderAllocationList'
+            },
+            hideChildrenInMenu: true,
+            children: [
+              {
+                path: 'list',
+                name: 'matchSendOutOrderAllocationList',
+                component: () => import(/* webpackChunkName: "allocationManagement" */ '@/views/allocationManagement/matchSendOutOrder/list.vue'),
+                meta: {
+                  title: '调拨发货对单',
+                  icon: 'vertical-align-bottom',
+                  hidden: true,
+                  permission: 'M_matchSendOutOrderAllocationList'
+                }
+              },
+            ]
+          },
           {
             path: '/allocationManagement/transferReturn',
             redirect: '/allocationManagement/transferReturn/list',

+ 147 - 10
src/libs/JGPrint.js

@@ -1,6 +1,7 @@
 import confirm from 'ant-design-vue/es/modal/confirm'
 import notification from 'ant-design-vue/es/notification'
 import { getLodop } from '@/libs/LodopFuncs'
+import { printLogSave } from '@/api/data'
 import moment from 'moment'
 // 打印页签,支持批量打印
 export const JGPrintTag = function (html, width, height, data) {
@@ -34,8 +35,26 @@ export const JGPrintTag = function (html, width, height, data) {
   LODOP.SET_PRINT_PAGESIZE(1, width, height)
   LODOP.PRINT()
 }
- 
-// 导出下载excel
+// 导出文件
+export const exportExcel = function(url,params,fileName,callback){
+  url(params).then(res => {
+    if (res.type == 'application/json') {
+      var reader = new FileReader()
+      reader.addEventListener('loadend', function () {
+        const obj = JSON.parse(reader.result)
+        notification.error({
+          message: '提示',
+          description: obj.message
+        })
+      })
+      reader.readAsText(res)
+    } else {
+       downloadExcel(res,fileName)
+    }
+    callback()
+  })
+}
+// 下载excel
 export const downloadExcel = function (data, fileName) {
   if (!data) { return }
   const a = moment().format('YYYYMMDDHHmmss')
@@ -56,8 +75,17 @@ export const downloadExcel = function (data, fileName) {
   }
 }
 
-// 打印控件
-export const jGPrint = function (data, type) {
+// pdf blob 转 base64
+export const blobToBaseByPdf = function(data,callback){
+  const reader = new FileReader()
+  reader.readAsDataURL(new Blob([data], { type: 'application/pdf' }))
+  reader.addEventListener('load', () => {
+    callback(reader.result)
+  })
+}
+
+// 打印html
+export const jGPrint = function (data, type, callback, printLogParams,printPageSize) {
     if (!data) {
       return
     }
@@ -81,13 +109,122 @@ export const jGPrint = function (data, type) {
       return
     }
     LODOP.SET_SHOW_MODE('HIDE_PAPER_BOARD', 1) //  隐藏底图上有模拟走纸板的条纹线
-    // LODOP.SET_PRINT_MODE('POS_BASEON_PAPER', true) // 可使输出以纸张边缘为基点
-    // LODOP.SET_PRINT_STYLEA(0,"TableRowThickNess",50)
-    LODOP.ADD_PRINT_HTM(10, 2, '98%', '100%', data)
-    LODOP.SET_PRINT_PAGESIZE(1,2100,0,"");
+    //执行该语句之后,PRINT指令不再返回那个所谓“打印成功”,才能获取到打印状态
+    LODOP.SET_PRINT_MODE("CATCH_PRINT_STATUS",true);
+    //TaskID:任务id,Value:job代码
+    LODOP.On_Return=function(TaskID,Value){
+       console.log(TaskID,Value)
+       // 已打印
+       if(Value&&printLogParams){
+         console.log('已打印,统计打印次数')
+         printLog(printLogParams,callback)
+       }else{
+         callback()
+       }
+    };
+    LODOP.ADD_PRINT_HTM(0, 0, '98%', '', data)
+    LODOP.SET_PRINT_PAGESIZE(printPageSize||1,2090,printPageSize?100:40,"");
     if (type == 'preview') { //  预览
       LODOP.PREVIEW()
     } else if (type == 'print') { //  打印
-      LODOP.PRINT()
+      LODOP.PRINTA()
+    }
+}
+
+// 打印
+export const printFun = function(url,params,type,taskName,callback,printLogParams){
+  url(params).then(res => {
+    if (res.type == 'application/json') {
+      var reader = new FileReader()
+      reader.addEventListener('loadend', function () {
+        const obj = JSON.parse(reader.result)
+        notification.error({
+          message: '提示',
+          description: obj.message
+        })
+      })
+      reader.readAsText(res)
+    } else {
+       console.log(res,'printFun')
+       jGPrintPdf(res,type,taskName,printLogParams,callback)
+    }
+  })
+}
+// 获取系统信息
+export const getSystemInfo = function (strINFOType,callback){
+     LODOP=getLodop(); 
+     if (LODOP.CVERSION) CLODOP.On_Return=function(TaskID,Value){callback(Value)}; 
+     var strResult=LODOP.GET_SYSTEM_INFO(strINFOType);
+     if (!LODOP.CVERSION) return strResult; else return "";
+ }
+// 打印记录保存
+export const printLog = function(data,callback){
+  getSystemInfo('NetworkAdapter.1.IPAddress',function(ret){
+    data.printIp =  ret
+    printLogSave(data).then(res => {
+      callback(res)
+    })
+  })
+}
+// 打印pdf
+export const jGPrintPdf = function (data, type, taskName, printLogParams,callback) {
+    if (!data) {
+      return
+    }
+    const LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'))
+    if (!LODOP) {
+      confirm({
+        title: '提示?',
+        content: h => <div>打印控件未安装,请先下载并安装。安装完成后,刷新页面即可打印。</div>,
+        okText: '立即下载',
+        okType: 'danger',
+        cancelText: '暂不打印',
+        onOk () {
+          var agent = navigator.userAgent.toLowerCase();
+          if (agent.indexOf("win32") >= 0 || agent.indexOf("wow32") >= 0) {
+              window.open('http://www.lodop.net/demolist/CLodop_Setup_for_Win32NT.zip')
+          }else if (agent.indexOf("win64") >= 0 || agent.indexOf("wow64") >= 0) {
+              window.open('http://www.lodop.net/download/CLodop_Setup_for_Win64NT_4.155EN.zip')
+          }
+        }
+      })
+      return
+    }
+    blobToBaseByPdf(data, function (dataurl) {
+      // console.log(dataurl)
+      LODOP.PRINT_INIT(taskName)
+      LODOP.SET_SHOW_MODE('HIDE_PAPER_BOARD', 1) //  隐藏底图上有模拟走纸板的条纹线
+      //执行该语句之后,PRINT指令不再返回那个所谓“打印成功”,才能获取到打印状态
+      LODOP.SET_PRINT_MODE("CATCH_PRINT_STATUS",true);
+      //TaskID:任务id,Value:job代码
+      LODOP.On_Return=function(TaskID,Value){
+         console.log(TaskID,Value)
+         // 已打印
+         if(Value&&printLogParams){
+           console.log('已打印,统计打印次数')
+           printLog(printLogParams,callback)
+         }else{
+           callback()
+         }
+      };
+      LODOP.ADD_PRINT_PDF(0, 0, '100%', '100%', dataurl.replace('data:application/pdf;base64,', ''))
+      LODOP.SET_PRINT_PAGESIZE(3,2090,30,"");
+      if (type == 'preview') { //  预览
+        LODOP.PREVIEW()
+      } else if (type == 'print') { //  打印
+        LODOP.PRINTA()
+      }
+    })
+}
+
+// 获取打印机状态
+export const getStatusValue = function (ValueType,ValueIndex,callback){
+		const LODOP = getLodop(document.getElementById('LODOP_OB'), document.getElementById('LODOP_EM'))
+		if (LODOP.CVERSION) {
+      LODOP.On_Return=function(TaskID,Value){
+        callback(Value)
+      };
     }
-}
+		var strResult=LODOP.GET_VALUE(ValueType,ValueIndex);
+		if (!LODOP.CVERSION) return callback(strResult); else return callback('');
+	}

+ 19 - 0
src/libs/tools.js

@@ -3,6 +3,24 @@ export const getOperationalPrecision = (num1, num2) => {
   const val = ((num1 * 10000) * (num2 * 10000) / 100000000).toFixed(2) || 0
   return val != 0 ? val : 0
 }
+
+// 金额转大写
+export const dealBigMoney = (n) =>{       
+   if (!/^(0|[1-9]\d*)(\.\d+)?$/.test(n))
+   return "数据非法";
+   let unit = "千百拾亿千百拾万千百拾元角分", str = "";
+   n += "00";
+   let p = n.indexOf('.');
+   if (p >= 0){
+      n = n.substring(0, p) + n.substr(p+1, 2);
+      unit = unit.substr(unit.length - n.length);
+  }
+   
+   for (var i=0; i < n.length; i++)
+   str += '零壹贰叁肆伍陆柒捌玖'.charAt(n.charAt(i)) + unit.charAt(i);
+   return  str.replace(/零(千|百|拾|角)/g, "零").replace(/(零)+/g, "零").replace(/零(万|亿|元)/g, "$1").replace(/(亿)万|壹(拾)/g, "$1$2").replace(/^元零?|零分/g, "").replace(/元$/g, "元整");
+}
+
 export const forEach = (arr, fn) => {
   if (!arr.length || !fn) return
   let i = -1
@@ -457,3 +475,4 @@ export const checkIdNumberValid = (tex) => {
   }
   return true
 }
+

+ 10 - 0
src/main.js

@@ -29,6 +29,16 @@ Vue.config.productionTip = false
 Vue.use(VueAxios)
 Vue.use(VueCookies)
 Vue.$cookies.config('7d')
+
+import LocaleProvider from 'ant-design-vue'
+Vue.use(LocaleProvider)
+
+// moment
+import moment from 'moment'; 
+import 'moment/locale/zh-cn';
+moment.locale('zh-cn'); //设置语言 或 moment.lang('zh-cn'); 
+Vue.prototype.$moment = moment;//挂载到当前vue实例对象
+ 
 /**
  * 权限检查
  */

+ 2 - 1
src/store/getters.js

@@ -15,7 +15,8 @@ const getters = {
   isNewTab: state => state.app.isNewTab,
   isNewSubTab: state => state.app.isNewSubTab,
   closeTabPages: state => state.app.closeTabPages,
-  loadingStatus: state => state.app.loadingStatus
+  loadingStatus: state => state.app.loadingStatus,
+  employeeList: state => state.app.employeeList
 }
 
 export default getters

+ 15 - 1
src/store/modules/app.js

@@ -1,4 +1,5 @@
 import Vue from 'vue'
+import { employeeQueryList } from '@/api/expenseManagement'
 import {
   SIDEBAR_TYPE,
   DEFAULT_THEME,
@@ -31,6 +32,7 @@ const app = {
     winHeight: 0 ,//  窗口高度
     loadingStatus: false,
     closeTabPages: [], // 已关闭的页面
+    employeeList: [], // 申请人列表
   },
   mutations: {
     SET_SIDEBAR_TYPE: (state, type) => {
@@ -87,6 +89,9 @@ const app = {
     SET_loadingStatus: (state, val) => {
       state.loadingStatus = val
     },
+    SET_employeeList:(state, val) => {
+      state.employeeList = val
+    },
   },
   actions: {
     setSidebar ({ commit }, type) {
@@ -130,7 +135,16 @@ const app = {
     },
     SetWinHeight ({ commit }, val) {
       commit('SET_WIN_HEIGHT', val)
-    }
+    },
+    GetEmployeeList({ commit }, val) {
+      employeeQueryList({}).then(res => {
+        if (res.status == 200) {
+          commit('SET_employeeList', res.data)
+        } else {
+          commit('SET_employeeList', [])
+        }
+      })
+    },
   }
 }
 

+ 3 - 1
src/views/Home.vue

@@ -33,7 +33,7 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import { mapGetters } from 'vuex'
+import { mapGetters, mapActions } from 'vuex'
 import ResetPwd from '@/views/user/ResetPwd.vue'
 import newProduct from '@/views/productManagement/newProduct/modal.vue'
 import { queryNewProductPage } from '@/api/product'
@@ -55,7 +55,9 @@ export default {
   created () {
   },
   methods: {
+    ...mapActions(['GetEmployeeList']),
     hasNewProduct () {
+      this.GetEmployeeList()
       queryNewProductPage({ pageNo: 1, pageSize: 20, onlineFalg: this.onlineFalg }).then(res => {
         if (res.status == 200) {
           if (res.data.count > 0) {

+ 288 - 0
src/views/allocationManagement/matchSendOutOrder/list.vue

@@ -0,0 +1,288 @@
+<template>
+  <a-card size="small" :bordered="false" class="allocateBillList-wrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <!-- 搜索条件 -->
+      <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 ref="rangeDate" :value="time" @change="dateChange" />
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="调往对象">
+                <a-input id="allocateBillList-targetName" v-model.trim="queryParam.targetName" allowClear placeholder="请输入调往对象"/>
+              </a-form-item>
+            </a-col>
+            <a-col :md="6" :sm="24">
+              <a-form-item label="调拨类型">
+                <AllocateType id="allocateBillList-allocateTypeSn" v-model="queryParam.allocateTypeSn"></AllocateType>
+              </a-form-item>
+            </a-col>
+            <template v-if="advanced">
+              <a-col :md="6" :sm="24">
+                <a-form-item label="收货客户名称">
+                  <dealerSubareaScopeList ref="receiverSn" defValKey="buyerSn" @change="custChange" v-model="queryParam.receiverSn" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="业务状态">
+                  <v-select
+                    v-model="queryParam.state"
+                    ref="state"
+                    id="allocateBillList-state"
+                    code="ALLOCATE_STATUS"
+                    placeholder="请选择业务状态"
+                    allowClear
+                  ></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="调拨单号">
+                  <a-input id="allocateBillList-allocateNo" v-model.trim="queryParam.allocateNo" allowClear placeholder="请输入调拨单号"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="对单状态">
+                  <v-select
+                    v-model="queryParam.checkStatus"
+                    ref="checkStatus"
+                    id="allocateBillList-checkStatus"
+                    code="CHECK_STATUS"
+                    placeholder="请选择对单状态"
+                    allowClear
+                  ></v-select>
+                </a-form-item>
+              </a-col>
+            </template>
+            <a-col :md="6" :sm="24">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="allocateBillList-refresh">查询</a-button>
+              <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="allocateBillList-reset">重置</a-button>
+              <a @click="advanced=!advanced" style="margin-left: 5px">
+                {{ advanced ? '收起' : '展开' }}
+                <a-icon :type="advanced ? 'up' : 'down'"/>
+              </a>
+            </a-col>
+          </a-row>
+        </a-form>
+      </div>
+      <!-- 列表 -->
+      <s-table
+        class="sTable fixPagination"
+        ref="table"
+        :style="{ height: tableHeight+84.5+'px' }"
+        size="small"
+        :rowKey="(record) => record.id"
+        :columns="columns"
+        :data="loadData"
+        :defaultLoadData="false"
+        :scroll="{ y: tableHeight }"
+        bordered>
+        <!-- 单号 -->
+        <template slot="allocateNo" slot-scope="text, record">
+          <span v-if="$hasPermissions('M_mso_detail')" class="link-bule" @click="handleDetail(record)">{{ record.allocateNo }}</span>
+          <span v-else>{{ record.allocateNo }}</span>
+        </template>
+        <!-- 操作 -->
+        <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.checkStatus == 'WAIT'&&$hasPermissions('B_YxAudit')"
+            class="button-warning"
+            @click="handleYxAudit(record)"
+            id="allocateBillList-checkStatus">对单通过</a-button>
+          <span v-else>--</span>
+        </template>
+      </s-table>
+    </a-spin>
+  </a-card>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import { allocateBillList, allocateBillCheck } from '@/api/allocateBill'
+import AllocateType from '@/views/common/allocateType.js'
+export default {
+  name: 'MatchSendOutOrderAllocationList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, rangeDate, AllocateType, dealerSubareaScopeList },
+  data () {
+    return {
+      spinning: false,
+      advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      time: [
+        moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
+        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
+      ],
+      queryParam: { //  查询条件
+        beginDate: getDate.getThreeMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
+        targetName: '', //  调往对象
+        allocateTypeSn: undefined, //  调拨类型
+        state: undefined, //  业务状态
+        allocateNo: '', //  调拨单号
+        receiverSn: undefined,
+        checkStatus: undefined,
+        printState: undefined
+      },
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return allocateBillList(Object.assign(parameter, this.queryParam)).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.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      visibleAudit: false,
+      auditInfo: null,
+      spinningAudit: false,
+      openModal: false //  新增编辑  弹框
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '3.5%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调拨单号', scopedSlots: { customRender: 'allocateNo' }, align: 'center', width: '13.5%' },
+        { title: '调往对象', dataIndex: 'targetName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '发货编号', dataIndex: 'sendNo', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '收货客户名称', dataIndex: 'receiverName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '总数量', dataIndex: 'totalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '调拨类型', dataIndex: 'allocateTypeName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '对单状态', dataIndex: 'checkStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '对单人员', dataIndex: 'checkPersonName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '对单时间', dataIndex: 'checkDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    custChange (val) {
+      this.queryParam.receiverSn = val.key || ''
+      this.queryParam.receiverName = val.name || ''
+    },
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
+    //  重置
+    resetSearchForm () {
+      this.$refs.rangeDate.resetDate(this.time)
+      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      this.queryParam.targetName = ''
+      this.queryParam.allocateTypeSn = undefined
+      this.queryParam.state = undefined
+      this.queryParam.allocateNo = ''
+      this.queryParam.receiverSn = ''
+      this.queryParam.receiverName = ''
+      this.queryParam.checkStatus = undefined
+      this.$refs.table.refresh(true)
+      this.$refs.receiverSn.resetForm()
+    },
+    // 允许打印
+    handleYxAudit (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认对单通过吗?',
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          allocateBillCheck({ sn: row.allocateSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
+        }
+      })
+    },
+    //  详情
+    handleDetail (row) {
+      if (this.$hasPermissions('M_transferOut_detail')) {
+        this.$router.push({ path: `/allocationManagement/transferOut/detail/${row.allocateSn}` })
+      }
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.openModal = false
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 238
+    }
+  },
+  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">
+	.active{
+		color: #ed1c24;
+		cursor: pointer;
+	}
+	.common{
+		color: rgba(0, 0, 0);
+	}
+</style>

+ 4 - 7
src/views/allocationManagement/transferOut/basicInfoModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="新增"
     v-model="isShow"
-    @cancle="isShow = false"
+    @cancel="isShow = false"
     :width="800">
     <a-spin :spinning="spinning" tip="Loading...">
       <a-form-model
@@ -59,7 +59,7 @@
         </a-form-model-item>
       </a-form-model>
       <div class="btn-cont">
-        <a-button type="primary" id="allocateBill-basicInfo-modal-save" @click="handleSave">保存</a-button>
+        <a-button type="primary" :loading="spinning" id="allocateBill-basicInfo-modal-save" @click="handleSave">保存</a-button>
         <a-button id="allocateBill-basicInfo-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
       </div>
     </a-spin>
@@ -177,11 +177,8 @@ export default {
           allocateBillSave(form).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
-              setTimeout(() => {
-                _this.isShow = false
-                _this.$emit('ok', res.data)
-                _this.spinning = false
-              }, 1000)
+              _this.isShow = false
+              _this.$emit('ok', res.data)
             } else {
               _this.spinning = false
             }

+ 1 - 1
src/views/allocationManagement/transferOut/chooseImportModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="导入"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="900">
     <div class="chooseImport-con">
       <!-- 可导入数据 -->

+ 22 - 34
src/views/allocationManagement/transferOut/detail.vue

@@ -14,7 +14,7 @@
             @click.stop="handleEdit">编辑</a-button>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
-        <template slot="extra">
+        <template slot="extra" v-if="basicInfoData&&basicInfoData.printState!='UNABLE_PRINT'">
           <a-button
             key="3"
             type="primary"
@@ -47,9 +47,12 @@
           <a-collapse-panel key="1" header="基础信息">
             <a-descriptions :column="3">
               <a-descriptions-item label="调往对象">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="发货编号">{{ (basicInfoData&&basicInfoData.sendNo) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收货客户名称">{{ (basicInfoData&&basicInfoData.receiverName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="调拨单号">{{ (basicInfoData&&basicInfoData.allocateNo) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="调拨类型">{{ (basicInfoData&&basicInfoData.allocateTypeName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="打印状态">{{ (basicInfoData&&basicInfoData.printStateDictValue) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="起止时间">
                 <span v-if="basicInfoData&&(basicInfoData.promoStartDate || basicInfoData.promoEndDate)">{{ (basicInfoData&&basicInfoData.promoStartDate) || '--' }} ~ {{ (basicInfoData&&basicInfoData.promoEndDate) || '--' }}</span>
                 <span v-else>--</span>
@@ -83,8 +86,6 @@
     </a-spin>
     <!-- 打印导出 -->
     <print-modal :openModal="openModal" :itemData="basicInfoData" :nowType="nowType" @ok="handleOk" @close="openModal=false" />
-    <!-- 打印 -->
-    <div id="print"></div>
   </div>
 </template>
 
@@ -92,7 +93,7 @@
 import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import printModal from './printModal.vue'
-import { hdExportExcel } from '@/libs/exportExcel'
+import { printFun, exportExcel } from '@/libs/JGPrint.js'
 import { allocateBillDetailList, allocateBillDetail, allocateBillDetailCount, allocateBillDetailPrint, allocateBillDetailExcel } from '@/api/allocateBill'
 export default {
   name: 'TransferOutDetail',
@@ -193,7 +194,7 @@ export default {
     handleExcel () {
       const _this = this
       this.spinning = true
-      hdExportExcel(allocateBillDetailExcel, { allocateSn: this.outBizSn || this.$route.params.sn }, '调拨明细', function () {
+      exportExcel(allocateBillDetailExcel, { allocateSn: this.outBizSn || this.$route.params.sn }, '调拨明细', function () {
         _this.spinning = false
       })
     },
@@ -207,35 +208,22 @@ export default {
       const params = JSON.parse(JSON.stringify(objs))
       delete params.type
       _this.spinning = true
-      allocateBillDetailPrint(params).then(res => {
-        _this.spinning = false
-        if (res.type == 'application/json') {
-          var reader = new FileReader()
-          reader.addEventListener('loadend', function () {
-            const obj = JSON.parse(reader.result)
-            _this.$notification.error({
-              message: '提示',
-              description: obj.message
-            })
-          })
-          reader.readAsText(res)
-        } else {
-          this.print(res, objs.isPreview)
-        }
-      })
-    },
-    print (data, type) {
-      if (!data) {
-        return
-      }
-      const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
-      document.getElementById('print').innerHTML = '<iframe id="printftod" name="printftod" src="' + url + '" hidden></iframe>'
-      if (type == '1') { //  预览
-        window.open(url)
-      } else if (type == '0') { //  打印
-        window.frames['printftod'].focus()
-        window.frames['printftod'].print()
-      }
+      const taskName = this.nowType == 'dbPrint' ? '调拨' : '调拨分类'
+      printFun(
+        allocateBillDetailPrint,
+        params,
+        objs.isPreview ? 'preview' : 'print',
+        taskName,
+        (res) => {
+          _this.$message.info(res.message)
+          _this.spinning = false
+        },
+        {
+          billType: 'ALLOCATE',
+          billSn: objs.allocateSn,
+          billNo: objs.allocateNo,
+          printType: taskName + '打印'
+        })
     },
     pageInit () {
       this.$refs.table.refresh(true)

+ 159 - 0
src/views/allocationManagement/transferOut/dsModal.vue

@@ -0,0 +1,159 @@
+<template>
+  <a-modal
+    centered
+    class="dealerAccountEdit-modal"
+    :footer="null"
+    :maskClosable="false"
+    title="提交调拨单"
+    v-model="isShow"
+    @cancel="isShow=false"
+    :width="800">
+    <!-- 表单 -->
+    <div>
+      <a-spin :spinning="spinning" tip="Loading...">
+        <a-form-model
+          id="dealerAccountEdit-form"
+          ref="ruleForm"
+          :model="form"
+          :rules="rules"
+          :label-col="formItemLayout.labelCol"
+          :wrapper-col="formItemLayout.wrapperCol"
+        >
+          <a-form-model-item label="收货客户名称">
+            <dealerSubareaScopeList ref="custList" defValKey="buyerSn" @change="custChange" v-model="form.receiverSn" />
+          </a-form-model-item>
+          <a-form-model-item label="发货编号" prop="sendNo">
+            <a-input
+              id="dealerAccountEdit-phone"
+              :maxLength="30"
+              v-model.trim="form.sendNo"
+              placeholder="请输入发货编号"
+              allowClear />
+            <div style="height: 24px;line-height: normal;">
+              常用:<a-button size="small" v-for="i in 5" @click="setSendNo(i)" type="link">{{ i }}</a-button>
+            </div>
+          </a-form-model-item>
+          <a-form-model-item label="备货打印" prop="printState">
+            <a-radio-group v-model="form.printState">
+              <a-radio value="NO_PRINT">
+                允许打印
+              </a-radio>
+              <a-radio value="UNABLE_PRINT">
+                暂不打印
+              </a-radio>
+            </a-radio-group>
+          </a-form-model-item>
+        </a-form-model>
+        <div class="btn-cont">
+          <a-button type="primary" id="dealerAccountEdit-save" @click="handleSave">确定</a-button>
+          <a-button id="dealerAccountEdit-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
+        </div>
+      </a-spin>
+    </div>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+export default {
+  name: 'DealerAccountEditModal',
+  mixins: [commonMixin],
+  components: { dealerSubareaScopeList },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      spinning: false,
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 18 }
+      },
+      form: {
+        sendNo: '',
+        printState: '',
+        receiverSn: '',
+        receiverName: ''
+      },
+      rules: {
+        sendNo: [{ required: true, message: '请输入发货编号', trigger: 'change' }],
+        printState: [{ required: true, message: '请选择备货打印', trigger: 'change' }]
+      },
+      detailData: null //  详情数据
+    }
+  },
+  methods: {
+    setSendNo (i) {
+      this.form.sendNo = i
+      this.$refs.ruleForm.validateField('sendNo')
+    },
+    custChange (val) {
+      this.form.receiverSn = val.key || ''
+      this.form.receiverName = val.name || ''
+    },
+    //  保存
+    handleSave () {
+      const _this = this
+      _this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          const formData = JSON.parse(JSON.stringify(_this.form))
+          _this.$emit('ok', formData)
+        } else {
+          return false
+        }
+      })
+    },
+    //  获取详情
+    setDetail (data) {
+      this.detailData = data
+    },
+    // 重置表单
+    resetForm () {
+      this.detailData = null
+      this.$refs.ruleForm.resetFields()
+      this.form = {
+        sendNo: '',
+        printState: '',
+        receiverSn: '',
+        receiverName: ''
+      }
+      this.$refs.custList.resetForm()
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('close')
+        this.resetForm()
+      }
+    },
+    itemId (newValue, oldValue) {
+      if (this.isShow && newValue) {
+        this.getDetail()
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .dealerAccountEdit-modal{
+    .ant-modal-body {
+      padding: 40px 40px 24px;
+    }
+    .btn-cont {
+      text-align: center;
+      margin: 35px 0 10px;
+    }
+  }
+</style>

+ 51 - 46
src/views/allocationManagement/transferOut/edit.vue

@@ -8,7 +8,7 @@
           <a id="allocateBillEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
         </template>
         <!-- 操作区,位于 title 行的行尾 -->
-        <template slot="extra">
+        <template slot="extra" v-if="basicInfoData&&basicInfoData.printState!='UNABLE_PRINT'">
           <a-button
             key="3"
             type="primary"
@@ -41,11 +41,14 @@
           <a-collapse-panel key="0" header="基础信息">
             <a-descriptions :column="3">
               <a-descriptions-item label="调往对象">{{ (basicInfoData&&basicInfoData.targetName) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="发货编号">{{ (basicInfoData&&basicInfoData.sendNo) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="收货客户名称">{{ (basicInfoData&&basicInfoData.receiverName) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="调拨单号">{{ (basicInfoData&&basicInfoData.allocateNo) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="调拨类型">
                 <AllocateType id="allocateEdit-allocateTypeSn" style="width: 200px;" @change="changeAllocateType" v-model="basicInfoData.allocateTypeSn"></AllocateType>
               </a-descriptions-item>
               <a-descriptions-item label="业务状态">{{ (basicInfoData&&basicInfoData.stateDictValue) || '--' }}</a-descriptions-item>
+              <a-descriptions-item label="打印状态">{{ (basicInfoData&&basicInfoData.printStateDictValue) || '--' }}</a-descriptions-item>
               <a-descriptions-item label="起止时间">
                 <span v-if="basicInfoData&&(basicInfoData.promoStartDate || basicInfoData.promoEndDate)">{{ (basicInfoData&&basicInfoData.promoStartDate) || '--' }} ~ {{ (basicInfoData&&basicInfoData.promoEndDate) || '--' }}</span>
                 <span v-else>--</span>
@@ -205,22 +208,22 @@
       </a-card>
     <!-- </a-spin> -->
     </div>
-    <div class="affix-cont">
+    <div class="affix-cont" v-if="basicInfoData">
       <a-button
         type="primary"
         id="allocateBillEdit-submit"
         size="large"
-        :disabled="spinning"
+        :loading="spinning"
         class="button-primary"
-        @click="handleSubmit"
+        @click="handleOpen"
         style="padding: 0 60px;">提交</a-button>
     </div>
     <!-- 导入产品 -->
     <importGuideModal :openModal="openGuideModal" :params="{allocateSn: $route.params.sn}" @close="openGuideModal=false" @ok="handleGuideOk" />
     <!-- 打印导出 -->
     <print-modal :openModal="openModal" :itemData="basicInfoData" :nowType="nowType" @ok="handleOk" @close="openModal=false" />
-    <!-- 打印 -->
-    <div id="print"></div>
+    <!-- 提交调拨单 -->
+    <dsModal ref="dsModal" :openModal="showDsModal" @close="showDsModal=false" @ok="handleSubmit" />
   </div>
 </template>
 
@@ -229,7 +232,8 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import ImportGuideModal from './importGuideModal.vue'
 import printModal from './printModal.vue'
-import { hdExportExcel } from '@/libs/exportExcel'
+import dsModal from './dsModal.vue'
+import { printFun, exportExcel } from '@/libs/JGPrint.js'
 import { queryStockProductPage } from '@/api/stock'
 import { productPriceInfo } from '@/api/product'
 import AllocateType from '@/views/common/allocateType.js'
@@ -238,10 +242,11 @@ import { allocateBillSave, allocateBillDetailList, allocateBillDetailCount, allo
 export default {
   name: 'TransferOutEdit',
   mixins: [commonMixin],
-  components: { STable, VSelect, ImportGuideModal, AllocateType, printModal },
+  components: { STable, VSelect, ImportGuideModal, AllocateType, printModal, dsModal },
   data () {
     return {
       spinning: false,
+      showDsModal: false,
       queryParam: {
         productCode: '',
         productName: '',
@@ -471,16 +476,29 @@ export default {
       })
     },
     //  提交
-    handleSubmit () {
+    handleOpen () {
+      if (this.localDataSource.length) {
+        // 待提交
+        if (this.basicInfoData.state == 'WAIT_SUBMIT') {
+          this.showDsModal = true
+        }
+        // 待审核或审核不通过时
+        if (this.basicInfoData.state == 'AUDIT_REJECT' || this.basicInfoData.state == 'WAIT_AUDIT') {
+          this.handleSubmit()
+        }
+      } else {
+        this.$message.warning('请选择产品')
+      }
+    },
+    handleSubmit (params) {
       const _this = this
+      const data = Object.assign({ allocateSn: this.$route.params.sn }, params || {})
       _this.spinning = true
-      allocateBillSubmit({ sn: this.$route.params.sn }).then(res => {
+      _this.showDsModal = false
+      allocateBillSubmit(data).then(res => {
         if (res.status == 200) {
-          this.$message.success(res.message)
-          setTimeout(() => {
-            _this.handleBack()
-            _this.spinning = false
-          }, 1000)
+          _this.$message.success(res.message)
+          _this.handleBack()
         } else {
           _this.spinning = false
         }
@@ -516,7 +534,7 @@ export default {
     qtyBlur (val, record) {
       //  光标移出,值发生改变再调用编辑接口
       if (val != record.qtyBackups) {
-        this.handleAdd(record, 'edit')
+        this.handleAdd(record, 'edit', 'noRefresh')
       }
     },
     // 已选产品 售价  change
@@ -542,7 +560,7 @@ export default {
     handleExcel () {
       const _this = this
       this.spinning = true
-      hdExportExcel(allocateBillDetailExcel, { allocateSn: this.$route.params.sn }, '调拨明细', function () {
+      exportExcel(allocateBillDetailExcel, { allocateSn: this.outBizSn || this.$route.params.sn }, '调拨明细', function () {
         _this.spinning = false
       })
     },
@@ -556,35 +574,22 @@ export default {
       const params = JSON.parse(JSON.stringify(objs))
       delete params.type
       _this.spinning = true
-      allocateBillDetailPrint(params).then(res => {
-        _this.spinning = false
-        if (res.type == 'application/json') {
-          var reader = new FileReader()
-          reader.addEventListener('loadend', function () {
-            const obj = JSON.parse(reader.result)
-            _this.$notification.error({
-              message: '提示',
-              description: obj.message
-            })
-          })
-          reader.readAsText(res)
-        } else {
-          this.print(res, objs.isPreview)
-        }
-      })
-    },
-    print (data, type) {
-      if (!data) {
-        return
-      }
-      const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
-      document.getElementById('print').innerHTML = '<iframe id="printftoe" name="printftoe" src="' + url + '" hidden></iframe>'
-      if (type == '1') { //  预览
-        window.open(url)
-      } else if (type == '0') { //  打印
-        window.frames['printftoe'].focus()
-        window.frames['printftoe'].print()
-      }
+      const taskName = this.nowType == 'dbPrint' ? '调拨' : '调拨分类'
+      printFun(
+        allocateBillDetailPrint,
+        params,
+        objs.isPreview ? 'preview' : 'print',
+        taskName,
+        (res) => {
+          _this.$message.info(res.message)
+          _this.spinning = false
+        },
+        {
+          billType: 'ALLOCATE',
+          billSn: objs.allocateSn,
+          billNo: objs.allocateNo,
+          printType: taskName + '打印'
+        })
     },
     // 刷新当前页面
     refashPage () {

+ 1 - 1
src/views/allocationManagement/transferOut/importGuideModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="导入"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="750">
     <div class="importGuide-con">
       <div class="explain-con">

+ 78 - 7
src/views/allocationManagement/transferOut/list.vue

@@ -22,6 +22,11 @@
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
+                <a-form-item label="收货客户名称">
+                  <dealerSubareaScopeList ref="receiverSn" defValKey="buyerSn" @change="custChange" v-model="queryParam.receiverSn" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
                 <a-form-item label="业务状态">
                   <v-select
                     v-model="queryParam.state"
@@ -33,11 +38,35 @@
                   ></v-select>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
+              <a-col :md="4" :sm="24">
                 <a-form-item label="调拨单号">
                   <a-input id="allocateBillList-allocateNo" v-model.trim="queryParam.allocateNo" allowClear placeholder="请输入调拨单号"/>
                 </a-form-item>
               </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="打印状态">
+                  <v-select
+                    v-model="queryParam.printState"
+                    ref="printState"
+                    id="allocateBillList-printState"
+                    code="PRINT_STATUS"
+                    placeholder="请选择打印状态"
+                    allowClear
+                  ></v-select>
+                </a-form-item>
+              </a-col>
+              <a-col :md="4" :sm="24">
+                <a-form-item label="对单状态">
+                  <v-select
+                    v-model="queryParam.checkStatus"
+                    ref="checkStatus"
+                    id="allocateBillList-checkStatus"
+                    code="CHECK_STATUS"
+                    placeholder="请选择对单状态"
+                    allowClear
+                  ></v-select>
+                </a-form-item>
+              </a-col>
             </template>
             <a-col :md="6" :sm="24">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="allocateBillList-refresh">查询</a-button>
@@ -87,6 +116,13 @@
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
+          <a-button
+            size="small"
+            type="link"
+            v-if="record.state == 'WAIT_AUDIT'&&record.printState=='UNABLE_PRINT' && $hasPermissions('B_tfo_yxPrint')"
+            class="button-warning"
+            @click="handleYxPrint(record)"
+            id="allocateBillList-examine-btn">允许打印</a-button>
           <a-button
             size="small"
             type="link"
@@ -127,13 +163,14 @@ import { STable, VSelect } from '@/components'
 import basicInfoModal from './basicInfoModal.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
 import auditModal from '@/views/common/auditModal.vue'
-import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport } from '@/api/allocateBill'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import { allocateBillList, allocateBillDel, allocateBillAudit, allocateBillExport, allocateBillAblePrint } from '@/api/allocateBill'
 import AllocateType from '@/views/common/allocateType.js'
 import { hdExportExcel } from '@/libs/exportExcel'
 export default {
   name: 'TransferOutList',
   mixins: [commonMixin],
-  components: { STable, VSelect, basicInfoModal, rangeDate, auditModal, AllocateType },
+  components: { STable, VSelect, basicInfoModal, rangeDate, auditModal, AllocateType, dealerSubareaScopeList },
   data () {
     return {
       spinning: false,
@@ -149,7 +186,10 @@ export default {
         targetName: '', //  调往对象
         allocateTypeSn: undefined, //  调拨类型
         state: undefined, //  业务状态
-        allocateNo: '' //  调拨单号
+        allocateNo: '', //  调拨单号
+        receiverSn: undefined,
+        checkStatus: undefined,
+        printState: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
       exportLoading: false,
@@ -186,7 +226,8 @@ export default {
         { title: '起止时间', scopedSlots: { customRender: 'promoDate' }, align: 'center', width: '8%' },
         { title: '调往对象', dataIndex: 'targetName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '客户类型', dataIndex: 'dealerLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        // { title: '总成本', dataIndex: 'totalCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '发货编号', dataIndex: 'sendNo', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '收货客户名称', dataIndex: 'receiverName', width: '8%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
         { title: '总数量', dataIndex: 'totalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         // { title: '总售价', dataIndex: 'totalPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
         { title: '审核时间', dataIndex: 'auditTime', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
@@ -194,19 +235,24 @@ export default {
         { title: '业务状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '打印状态', dataIndex: 'printStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '打印次数', dataIndex: 'printCount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '对单状态', dataIndex: 'checkStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
       ]
       if (this.$hasPermissions('B_isShowCost')) { //  成本价权限
-        arr.splice(6, 0, { title: '总成本', dataIndex: 'totalCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
+        arr.splice(8, 0, { title: '总成本', dataIndex: 'totalCost', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
       if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
-        const ind = this.$hasPermissions('B_isShowCost') ? 8 : 7
+        const ind = this.$hasPermissions('B_isShowCost') ? 10 : 9
         arr.splice(ind, 0, { title: '总售价', dataIndex: 'totalPrice', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
       }
       return arr
     }
   },
   methods: {
+    custChange (val) {
+      this.queryParam.receiverSn = val.key || ''
+      // this.queryParam.receiverName = val.name || ''
+    },
     //  创建时间  change
     dateChange (date) {
       this.queryParam.beginDate = date[0]
@@ -220,7 +266,11 @@ export default {
       this.queryParam.targetName = ''
       this.queryParam.allocateTypeSn = undefined
       this.queryParam.state = undefined
+      this.queryParam.checkStatus = undefined
+      this.queryParam.printState = undefined
       this.queryParam.allocateNo = ''
+      this.queryParam.receiverSn = undefined
+      this.$refs.receiverSn.resetForm()
       this.$refs.table.refresh(true)
     },
     //  基本信息  保存
@@ -248,6 +298,27 @@ export default {
         }
       })
     },
+    // 允许打印
+    handleYxPrint (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确定要允许打印吗?',
+        centered: true,
+        onOk () {
+          _this.spinning = true
+          allocateBillAblePrint({ sn: row.allocateSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.$refs.table.refresh()
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
+        }
+      })
+    },
     //  审核
     handleExamine (row) {
       this.auditInfo = row

+ 21 - 9
src/views/allocationManagement/transferOut/printModal.vue

@@ -6,7 +6,7 @@
     class="allocateBill-print-type-modal"
     :title="modalTit"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="600">
     <a-spin :spinning="spinning" tip="Loading...">
       <a-form-model
@@ -17,9 +17,11 @@
         :label-col="formItemLayout.labelCol"
         :wrapper-col="formItemLayout.wrapperCol"
       >
-        <a-form-model-item label="调拨单号">{{ itemData&&itemData.allocateNo || '--' }}</a-form-model-item>
-        <a-form-model-item label="客户名称">{{ itemData&&itemData.targetName || '--' }}</a-form-model-item>
-        <a-form-model-item label="产品分类" prop="id" v-if="nowType=='dbflPrint'">
+        <a-form-model-item style="margin-bottom: 0;" label="调拨单号">{{ itemData&&itemData.allocateNo || '--' }}</a-form-model-item>
+        <a-form-model-item style="margin-bottom: 0;" label="调往对象">{{ itemData&&itemData.targetName || '--' }}</a-form-model-item>
+        <a-form-model-item style="margin-bottom: 0;" label="发货编号">{{ itemData&&itemData.sendNo || '--' }}</a-form-model-item>
+        <a-form-model-item style="margin-bottom: 0;" label="收货客户名称">{{ itemData&&itemData.receiverName || '--' }}</a-form-model-item>
+        <a-form-model-item style="margin-bottom: 0;" label="产品分类" prop="id" v-if="nowType=='dbflPrint'">
           <a-select id="allocateBill-print-form" v-model="form.id" placeholder="请选择产品分类">
             <a-select-option v-for="item in typeList" :value="item.id" :key="item.id">
               <span v-if="item.id != 'all'">{{ item.productBrandName }} - {{ item.productTypeName3 }}</span>
@@ -36,8 +38,9 @@
         </a-form-model-item>
       </a-form-model>
       <div class="btn-cont">
-        <a-button id="allocateBill-print-save" @click="handleSave('preview')">打印预览</a-button>
-        <a-button type="primary" id="allocateBill-print-back" @click="handleSave('print')" style="margin-left: 15px;">快捷打印</a-button>
+        <a-button id="allocateBill-print-close" @click="handleClose('preview')">取消</a-button>
+        <a-button id="allocateBill-print-save" @click="handleSave('preview')" style="margin-left: 15px;">打印预览</a-button>
+        <a-button type="primary" id="allocateBill-print-back" @click="handleSave('print')" style="margin-left: 15px;">确定打印</a-button>
       </div>
     </a-spin>
   </a-modal>
@@ -75,7 +78,7 @@ export default {
       },
       formItemLayout: {
         labelCol: { span: 6 },
-        wrapperCol: { span: 18 }
+        wrapperCol: { span: 16 }
       },
       spinning: false,
       typeList: []
@@ -103,6 +106,7 @@ export default {
             if (item) {
               const obj = {
                 allocateSn: _this.itemData.allocateSn,
+                allocateNo: _this.itemData.allocateNo,
                 productBrandSn: item.productBrandSn,
                 productTypeSn3: item.productTypeSn3,
                 printType: 'ALLOCATE_BILL_TYPE',
@@ -113,6 +117,7 @@ export default {
           } else {
             const obj = {
               allocateSn: _this.itemData.allocateSn,
+              allocateNo: _this.itemData.allocateNo,
               printType: _this.form.priceType,
               isPreview: type == 'preview' ? 1 : 0
             }
@@ -135,6 +140,14 @@ export default {
           }
         }
       })
+    },
+    handleClose () {
+      this.$emit('close')
+      this.$refs.ruleForm.resetFields()
+      this.form = {
+        id: 'all',
+        priceType: undefined
+      }
     }
   },
   watch: {
@@ -145,8 +158,7 @@ export default {
     //  重定义的弹框状态
     isShow (newValue, oldValue) {
       if (!newValue) {
-        this.$emit('close')
-        this.$refs.ruleForm.resetFields()
+        this.handleClose()
       } else {
         if (this.nowType == 'dbflPrint') {
           this.getTypeData()

+ 1 - 1
src/views/allocationManagement/transferReturn/basicInfoModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="新增调拨退货"
     v-model="isShow"
-    @cancle="isShow = false"
+    @cancel="isShow = false"
     :width="800">
     <a-spin :spinning="spinning" tip="Loading...">
       <a-form-model

+ 1 - 1
src/views/allocationManagement/transferReturn/chooseImportModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="导入"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="900">
     <div class="chooseImport-con">
       <!-- 可导入数据 -->

+ 1 - 1
src/views/allocationManagement/transferReturn/edit.vue

@@ -220,7 +220,7 @@
       :maskClosable="false"
       title="修改备注"
       v-model="editRemark"
-      @cancle="editRemark = false"
+      @cancel="editRemark = false"
       :width="600">
       <a-textarea
         v-model="basicInfoData.remarks"

+ 1 - 1
src/views/allocationManagement/transferReturn/editGrp.vue

@@ -212,7 +212,7 @@
       :maskClosable="false"
       title="修改备注"
       v-model="editRemark"
-      @cancle="editRemark = false"
+      @cancel="editRemark = false"
       :width="600">
       <a-textarea
         v-model="basicInfoData.remarks"

+ 1 - 1
src/views/allocationManagement/transferReturn/importGuideModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="导入"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="750">
     <div class="importGuide-con">
       <div class="explain-con">

+ 9 - 37
src/views/allocationManagement/transferReturn/print.vue

@@ -6,7 +6,7 @@
       v-if="$hasPermissions('B_transferReturnPrint')"
       id="editGrap-db-print-btn"
       :disabled="disabled"
-      @click="handlePrint('views')">打印预览</a-button>
+      @click="handlePrint('preview')">打印预览</a-button>
     <a-button
       key="2"
       type="primary"
@@ -32,7 +32,7 @@
 </template>
 
 <script>
-import { hdExportExcel } from '@/libs/exportExcel'
+import { printFun, exportExcel } from '@/libs/JGPrint.js'
 import printModal from './printModal.vue'
 import { allocateReturnExcel, allocateReturnPrint } from '@/api/allocateReturn'
 export default {
@@ -69,46 +69,18 @@ export default {
     },
     handleOk (obj) {
       const _this = this
-      const params = JSON.parse(JSON.stringify(obj))
-      delete params.type
-      this.$emit('loading')
-      allocateReturnPrint(params).then(res => {
-        _this.spinning = false
-        if (res.type == 'application/json') {
-          var reader = new FileReader()
-          reader.addEventListener('loadend', function () {
-            const obj = JSON.parse(reader.result)
-            _this.$notification.error({
-              message: '提示',
-              description: obj.message
-            })
-          })
-          reader.readAsText(res)
-        } else {
-          this.print(res, obj.isPreview)
-        }
-        _this.$emit('unloading')
-      })
-    },
-    print (data, type) {
-      if (!data) {
-        return
-      }
-      const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
-      console.log(url)
-      document.getElementById('print').innerHTML = '<iframe id="printftoe" name="printftoe" src="' + url + '" hidden></iframe>'
-      if (type == 'views') { //  预览
-        window.open(url)
-      } else if (type == 'print') { //  打印
-        window.frames['printftoe'].focus()
-        window.frames['printftoe'].print()
+      const params = {
+        allocateReturnSn: obj.allocateReturnSn || '',
+        printType: obj.printType
       }
+      _this.$emit('loading')
+      printFun(allocateReturnPrint, params, obj.isPreview, '调拨退货单', () => { _this.$emit('unloading') })
     },
     // 导出
     handleExcel () {
       const _this = this
-      this.$emit('loading')
-      hdExportExcel(allocateReturnExcel, { allocateReturnSn: this.params.allocateReturnSn || '' }, '调拨退货单明细', function () {
+      _this.$emit('loading')
+      exportExcel(allocateReturnExcel, { allocateReturnSn: this.params.allocateReturnSn || '' }, '调拨退货单明细', function () {
         _this.$emit('unloading')
       })
     }

+ 3 - 3
src/views/allocationManagement/transferReturn/printModal.vue

@@ -6,7 +6,7 @@
     class="allocateBill-print-type-modal"
     title="调拨退货打印"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="600">
     <a-spin :spinning="spinning" tip="Loading...">
       <a-form-model
@@ -17,8 +17,8 @@
         :label-col="formItemLayout.labelCol"
         :wrapper-col="formItemLayout.wrapperCol"
       >
-        <a-form-model-item label="调拨退货单号">{{ itemData&&itemData.allocateReturnNo || '--' }}</a-form-model-item>
-        <a-form-model-item label="调拨退货对象">{{ itemData&&itemData.targetName || '--' }}</a-form-model-item>
+        <a-form-model-item style="margin:0" label="调拨退货单号">{{ itemData&&itemData.allocateReturnNo || '--' }}</a-form-model-item>
+        <a-form-model-item style="margin:0" label="调拨退货对象">{{ itemData&&itemData.targetName || '--' }}</a-form-model-item>
         <a-form-model-item label="产品价格" prop="priceType">
           <a-radio-group v-model="form.priceType">
             <a-radio value="thj">退货价</a-radio>

+ 331 - 0
src/views/allocationManagement/transfersPrint/list.vue

@@ -0,0 +1,331 @@
+<template>
+  <div class="allocateBillList-wrap">
+    <div style="background-color: #fff;margin-bottom: 5px;">
+      <a-tabs v-model="currentTab" @change="changeTab">
+        <a-tab-pane :key="1" tab="全部">
+        </a-tab-pane>
+        <a-tab-pane :key="2" tab="待打印">
+        </a-tab-pane>
+      </a-tabs>
+    </div>
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 搜索条件 -->
+        <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 ref="rangeDate" :value="time" @change="dateChange" />
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="调往对象">
+                  <a-input id="allocateBillList-targetName" v-model.trim="queryParam.targetName" allowClear placeholder="请输入调往对象"/>
+                </a-form-item>
+              </a-col>
+              <a-col :md="6" :sm="24">
+                <a-form-item label="调拨类型">
+                  <AllocateType id="allocateBillList-allocateTypeSn" v-model="queryParam.allocateTypeSn"></AllocateType>
+                </a-form-item>
+              </a-col>
+              <template v-if="advanced">
+                <a-col :md="6" :sm="24">
+                  <a-form-item label="收货客户名称">
+                    <dealerSubareaScopeList ref="receiverSn" defValKey="buyerSn" @change="custChange" v-model="queryParam.receiverSn" />
+                  </a-form-item>
+                </a-col>
+                <a-col :md="4" :sm="24">
+                  <a-form-item label="业务状态">
+                    <v-select
+                      v-model="queryParam.state"
+                      ref="state"
+                      id="allocateBillList-state"
+                      code="ALLOCATE_STATUS"
+                      placeholder="请选择业务状态"
+                      allowClear
+                    ></v-select>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="4" :sm="24">
+                  <a-form-item label="调拨单号">
+                    <a-input id="allocateBillList-allocateNo" v-model.trim="queryParam.allocateNo" allowClear placeholder="请输入调拨单号"/>
+                  </a-form-item>
+                </a-col>
+                <a-col :md="4" :sm="24" v-if="currentTab == 1">
+                  <a-form-item label="打印状态">
+                    <v-select
+                      v-model="queryParam.printState"
+                      ref="printState"
+                      id="allocateBillList-printState"
+                      code="PRINT_STATUS"
+                      placeholder="请选择打印状态"
+                      allowClear
+                    ></v-select>
+                  </a-form-item>
+                </a-col>
+              </template>
+              <a-col :md="6" :sm="24">
+                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="allocateBillList-refresh">查询</a-button>
+                <a-button style="margin-left: 5px" @click="resetSearchForm" :disabled="disabled" id="allocateBillList-reset">重置</a-button>
+                <a @click="advanced=!advanced" style="margin-left: 5px">
+                  {{ advanced ? '收起' : '展开' }}
+                  <a-icon :type="advanced ? 'up' : 'down'"/>
+                </a>
+              </a-col>
+            </a-row>
+          </a-form>
+        </div>
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+84.5+'px' }"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :defaultLoadData="false"
+          :scroll="{ y: tableHeight }"
+          bordered>
+          <!-- 单号 -->
+          <template slot="allocateNo" slot-scope="text, record">
+            <span v-if="$hasPermissions('M_tfoPrint_detail')" class="link-bule" @click="handleDetail(record)">{{ record.allocateNo }}</span>
+            <span v-else>{{ record.allocateNo }}</span>
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              v-if="record.printState == 'NO_PRINT'&&$hasPermissions('B_transferOut_type_print')"
+              class="button-warning"
+              @click="handlePrint(record)"
+              id="allocateBillList-printState">调拨分类打印</a-button>
+            <a-button
+              size="small"
+              type="link"
+              v-else-if="record.printState == 'PRINT'&&$hasPermissions('B_tfoPrint_record')"
+              class="button-warning"
+              @click="handlePrintRecord(record)"
+              id="allocateBillList-printRecord">打印记录</a-button>
+            <span v-else>--</span>
+          </template>
+        </s-table>
+      </a-spin>
+    </a-card>
+    <!-- 打印导出 -->
+    <print-modal :openModal="openModal" :itemData="itemData" nowType="dbflPrint" @ok="handleOk" @close="openModal=false" />
+    <!-- 打印记录 -->
+    <recordModal ref="recordModal" modalTit="打印记录" :openModal="showRecordModal" @cancel="showRecordModal=false"></recordModal>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
+import { STable, VSelect } from '@/components'
+import rangeDate from '@/views/common/rangeDate.vue'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import printModal from '@/views/allocationManagement/transferOut/printModal.vue'
+import recordModal from './recordModal.vue'
+import { allocateBillList, allocateBillDetailPrint } from '@/api/allocateBill'
+import AllocateType from '@/views/common/allocateType.js'
+import { printFun } from '@/libs/JGPrint.js'
+export default {
+  name: 'TransfersPrintList',
+  mixins: [commonMixin],
+  components: { STable, VSelect, rangeDate, AllocateType, dealerSubareaScopeList, printModal, recordModal },
+  data () {
+    return {
+      spinning: false,
+      advanced: true, // 高级搜索 展开/关闭
+      tableHeight: 0,
+      itemData: null,
+      showRecordModal: false,
+      time: [
+        moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
+        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
+      ],
+      queryParam: { //  查询条件
+        beginDate: getDate.getThreeMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
+        targetName: '', //  调往对象
+        allocateTypeSn: undefined, //  调拨类型
+        state: undefined, //  业务状态
+        allocateNo: '', //  调拨单号
+        receiverSn: undefined,
+        checkStatus: undefined,
+        printState: 'NO_PRINT'
+      },
+      currentTab: 2,
+      disabled: false, //  查询、重置按钮是否可操作
+      exportLoading: false,
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return allocateBillList(Object.assign(parameter, this.queryParam)).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.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      },
+      visibleAudit: false,
+      auditInfo: null,
+      spinningAudit: false,
+      openModal: false //  打印弹框
+    }
+  },
+  computed: {
+    columns () {
+      const arr = [
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '7%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '调拨单号', scopedSlots: { customRender: 'allocateNo' }, align: 'center', width: '10%' },
+        { title: '调往对象', dataIndex: 'targetName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '发货编号', dataIndex: 'sendNo', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '收货客户名称', dataIndex: 'receiverName', width: '10%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '总数量', dataIndex: 'totalQty', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '调拨类型', dataIndex: 'allocateTypeName', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '业务状态', dataIndex: 'stateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '打印状态', dataIndex: 'printStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '打印次数', dataIndex: 'printCount', width: '5%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
+      ]
+      return arr
+    }
+  },
+  methods: {
+    custChange (val) {
+      this.queryParam.receiverSn = val.key || ''
+    },
+    changeTab (v) {
+      this.currentTab = v
+      this.resetSearchForm()
+    },
+    //  创建时间  change
+    dateChange (date) {
+      this.queryParam.beginDate = date[0]
+      this.queryParam.endDate = date[1]
+    },
+    //  重置
+    resetSearchForm () {
+      this.$refs.rangeDate.resetDate(this.time)
+      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
+      this.queryParam.targetName = ''
+      this.queryParam.allocateTypeSn = undefined
+      this.queryParam.state = undefined
+      this.queryParam.allocateNo = ''
+      this.queryParam.receiverName = ''
+      this.queryParam.receiverSn = undefined
+      this.$refs.receiverSn.resetForm()
+      this.queryParam.printState = this.currentTab == 2 ? 'NO_PRINT' : undefined
+      this.$refs.table.refresh(true)
+    },
+    // 分类打印
+    handlePrint (row) {
+      this.itemData = row
+      this.openModal = true
+    },
+    // 打印记录
+    handlePrintRecord (row) {
+      this.showRecordModal = true
+      this.$refs.recordModal.setData(row, {
+        billType: 'ALLOCATE',
+        billSn: row.allocateSn
+      })
+    },
+    // 确定打印
+    handleOk (objs) {
+      const _this = this
+      const params = JSON.parse(JSON.stringify(objs))
+      delete params.type
+      _this.spinning = true
+      printFun(
+        allocateBillDetailPrint,
+        params,
+        objs.isPreview ? 'preview' : 'print',
+        '调拨分类',
+        (res) => {
+          _this.spinning = false
+          if (res.status == 200) {
+            _this.$refs.table.refresh()
+          }
+          _this.$message.info(res.message)
+        }, {
+          billType: 'ALLOCATE',
+          billSn: objs.allocateSn,
+          billNo: objs.allocateNo,
+          printType: '调拨分类打印'
+        })
+    },
+    //  详情
+    handleDetail (row) {
+      if (this.$hasPermissions('M_tfoPrint_detail')) {
+        this.$router.push({ path: `/allocationManagement/transferOut/detail/${row.allocateSn}` })
+      }
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.openModal = false
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 240
+    }
+  },
+  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">
+  .allocateBillList-wrap{
+    .ant-tabs-bar{
+      margin: 0;
+    }
+  }
+</style>

+ 146 - 0
src/views/allocationManagement/transfersPrint/recordModal.vue

@@ -0,0 +1,146 @@
+<template>
+  <a-modal
+    centered
+    class="record-detail-modal"
+    :footer="null"
+    :maskClosable="false"
+    v-model="isShow"
+    :title="modalTit"
+    @cancel="isShow=false"
+    width="60%">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div class="common-main">
+        <a-descriptions :column="2">
+          <a-descriptions-item label="调拨单号">
+            {{ tipData&&tipData.allocateNo }}
+          </a-descriptions-item>
+          <a-descriptions-item label="调拨类型">
+            {{ tipData&&tipData.allocateTypeName }}
+          </a-descriptions-item>
+          <a-descriptions-item label="调往对象">
+            {{ tipData&&tipData.targetName }}
+          </a-descriptions-item>
+          <a-descriptions-item label="收货客户名称">
+            {{ tipData&&tipData.receiverName }}
+          </a-descriptions-item>
+        </a-descriptions>
+        <div>
+          <s-table
+            class="sTable"
+            ref="table"
+            size="small"
+            :rowKey="(record) => record.id"
+            :columns="columns"
+            :data="loadData"
+            :defaultLoadData="false"
+            :scroll="{ y: 240 }"
+            bordered>
+          </s-table>
+        </div>
+        <div class="btn-box">
+          <a-button @click="handleCommonCancel" v-if="isCancel">{{ cancelText }}</a-button>
+        </div>
+      </div>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { STable, VSelect } from '@/components'
+import { printLogQueryPage } from '@/api/data'
+export default {
+  name: 'RecordModal',
+  components: { STable, VSelect },
+  props: {
+    openModal: { //  弹框显示状态
+      type: Boolean,
+      default: false
+    },
+    modalTit: { // 弹框标题
+      type: String,
+      default: null
+    },
+    cancelText: { // 取消 按钮文字
+      type: String,
+      default: '关闭'
+    },
+    isCancel: { // 是否显示  取消 按钮
+      type: Boolean,
+      default: true
+    }
+  },
+  data () {
+    return {
+      isShow: this.openModal, //  是否打开弹框
+      disabled: false,
+      spinning: false,
+      tipData: null,
+      params: null,
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '打印时间', dataIndex: 'printDate', width: '20%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '打印人', dataIndex: 'printPersonName', width: '25%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: 'IP', dataIndex: 'printIp', width: '25%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '打印方式', dataIndex: 'printType', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.disabled = true
+        this.spinning = true
+        return printLogQueryPage(Object.assign(parameter, this.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.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  methods: {
+    setData (data, params) {
+      this.tipData = data
+      this.params = params
+      this.$nextTick(() => {
+        this.$refs.table.refresh(true)
+      })
+    },
+    // 取消
+    handleCommonCancel () {
+      this.$emit('cancel')
+    }
+  },
+  watch: {
+    //  父页面传过来的弹框状态
+    openModal (newValue, oldValue) {
+      this.isShow = newValue
+    },
+    //  重定义的弹框状态
+    isShow (newValue, oldValue) {
+      if (!newValue) {
+        this.$emit('cancel')
+      }
+    }
+  }
+}
+</script>
+
+<style lang="less">
+  .record-detail-modal{
+    .common-main{
+      .btn-box{
+        text-align: center;
+        margin-top: 30px;
+        .ant-btn{
+          margin:0 10px;
+        }
+      }
+    }
+  }
+</style>

+ 1 - 1
src/views/basicData/transferTypeManagement/editModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     :title="modalTit"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="800">
     <!-- 表单 -->
     <div>

+ 1 - 1
src/views/basicData/warehouse/editModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     :title="modalTit"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="800">
     <!-- 表单 -->
     <div>

+ 1 - 1
src/views/basicData/warehouse/storingLocation/editModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     :title="modalTit"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="800">
     <!-- 表单 -->
     <div>

+ 1 - 1
src/views/bnSetting/menu/childModal.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <a-modal class="modalBox" :title="titleText" v-model="isshow" @cancle="cancel">
+    <a-modal class="modalBox" :title="titleText" v-model="isshow" @cancel="cancel">
       <a-form :form="form" @submit="handleSubmit">
         <!-- 上级菜单 -->
         <a-form-item label="上级菜单" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">

+ 1 - 1
src/views/common/auditModal.vue

@@ -5,7 +5,7 @@
     :footer="null"
     :maskClosable="false"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="416">
     <a-spin :spinning="spinning" tip="Loading...">
       <div class="audit-main">

+ 1 - 1
src/views/common/chooseBrandModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="选择产品品牌"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="800">
     <div class="chooseBrand-con">
       <div>

+ 1 - 1
src/views/common/chooseCustomerModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="选择客户"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="900">
     <a-spin :spinning="spinning" tip="Loading...">
       <div class="chooseCustomer-con">

+ 1 - 1
src/views/common/chooseProductsModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="选择产品"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="900">
     <a-spin :spinning="spinning" tip="Loading...">
       <div class="products-con">

+ 1 - 1
src/views/common/chooseSupplierModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="选择供应商"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="900">
     <a-spin :spinning="spinning" tip="Loading...">
       <div class="products-con">

+ 1 - 1
src/views/common/chooseTypeModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="选择产品分类"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     width="50%">
     <div class="chooseType-con">
       <div>

+ 25 - 9
src/views/common/commonModal.vue

@@ -6,14 +6,15 @@
     :maskClosable="false"
     v-model="isShow"
     :title="modalTit"
-    :bodyStyle="{padding: modalTit?'25px 32px 20px':'50px 32px 15px'}"
-    @cancle="isShow=false"
-    :width="416">
+    :bodyStyle="bodyPadding?{padding:bodyPadding}:{padding: modalTit?'25px 32px 20px':'50px 32px 15px'}"
+    @cancel="isShow=false"
+    :width="width">
     <a-spin :spinning="spinning" tip="Loading...">
       <div class="common-main" v-html="modalHtml"></div>
-      <div class="btn-box">
-        <a-button type="primary" class="button-warning" @click="handleCommonCancel" v-if="isCancel">{{ cancelText }}</a-button>
-        <a-button type="primary" class="button-info" @click="handleCommonOk">{{ okText }}</a-button>
+      <slot></slot>
+      <div class="btn-box" v-if="showFooter">
+        <a-button @click="handleCommonCancel" v-if="isCancel">{{ cancelText }}</a-button>
+        <a-button type="primary" @click="handleCommonOk">{{ okText }}</a-button>
       </div>
     </a-spin>
   </a-modal>
@@ -27,6 +28,10 @@ export default {
       type: Boolean,
       default: false
     },
+    width: {
+      type: String,
+      default: '500px'
+    },
     modalTit: { // 弹框标题
       type: String,
       default: null
@@ -50,6 +55,14 @@ export default {
     spinning: { // 加载中
       type: Boolean,
       default: false
+    },
+    bodyPadding: {
+      type: String,
+      default: ''
+    },
+    showFooter: {
+      type: Boolean,
+      default: true
     }
   },
   data () {
@@ -75,7 +88,7 @@ export default {
     //  重定义的弹框状态
     isShow (newValue, oldValue) {
       if (!newValue) {
-        this.$emit('close')
+        this.$emit('cancel')
       }
     }
   }
@@ -104,8 +117,11 @@ export default {
       }
     }
     .btn-box{
-      text-align: right;
-      margin-top: 20px;
+      text-align: center;
+      margin-top: 30px;
+      .ant-btn{
+        margin:0 10px;
+      }
     }
   }
 </style>

+ 10 - 1
src/views/common/dealerSubareaScopeList.vue

@@ -46,7 +46,7 @@ export default {
       const fetchId = this.lastFetchId
       this.data = []
       this.fetching = true
-      dealerSubareaScopeList({ nameLike: dealerName, pageNo: 1, pageSize: 20 }).then(res => {
+      dealerSubareaScopeList({ nameLike: dealerName.replace(/\s+/g, ''), pageNo: 1, pageSize: 20 }).then(res => {
         if (fetchId !== this.lastFetchId) {
           return
         }
@@ -58,6 +58,7 @@ export default {
       if (value && value.key) {
         const obj = this.data.find(item => item.dealerSn == value.key)
         value.name = obj.dealerName
+        value.row = obj
       }
       Object.assign(this, {
         dealerName: value,
@@ -72,6 +73,14 @@ export default {
     // 查询详细
     getDetail (sn) {
       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)
         this.$emit('dealerDetail', res.data || null)
       })
     }

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

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="详情"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="800">
     <div>
       <a-descriptions bordered size="small" :column="2">

+ 1 - 1
src/views/dealerManagement/dealerAccountManagement/editModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="账号信息"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="800">
     <!-- 表单 -->
     <div>

+ 1 - 1
src/views/dealerManagement/dealerRelationshipBinding/associateModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="关联下级"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="800">
     <!-- 表单 -->
     <div>

+ 1 - 1
src/views/dealerManagement/marketingDivisionSet/editModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     :title="modalTit"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="800">
     <!-- 表单 -->
     <div>

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

@@ -6,7 +6,7 @@
     :maskClosable="false"
     :title="title"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="960">
     <a-spin :spinning="spinning" tip="Loading...">
       <div style="max-height: 400px;overflow: auto;" ref="merchantInfoDetail">
@@ -34,6 +34,7 @@
           <a-descriptions :column="2" bordered size="small">
             <a-descriptions-item label="经营方式">{{ form&&form.busniessMode ? form.busniessMode : '--' }}</a-descriptions-item>
             <a-descriptions-item label="经营项目">{{ form&&form.busniessItmes ? form.busniessItmes : '--' }}</a-descriptions-item>
+            <a-descriptions-item label="营业执照名称">{{ form&&form.licenseName ? form.licenseName : '--' }}</a-descriptions-item>
             <a-descriptions-item label="公司规模">{{ form&&form.busniessScope ? form.busniessScope : '--' }}</a-descriptions-item>
             <a-descriptions-item label="成立时间">{{ form&&form.buildDate ? form.buildDate : '--' }}</a-descriptions-item>
             <a-descriptions-item label="一般纳税人">

+ 17 - 0
src/views/dealerManagement/merchantInfoManagement/edit.vue

@@ -146,6 +146,16 @@
                       placeholder="请输入经营项目(最多100个字符)" />
                   </a-form-model-item>
                 </a-col>
+                <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
+                  <a-form-model-item label="营业执照名称" prop="licenseName">
+                    <a-input
+                      v-model.trim="form.licenseName"
+                      id="merchantInfoManagementEdit-licenseName"
+                      :maxLength="100"
+                      allowClear
+                      placeholder="请输入营业执照名称(最多100个字符)" />
+                  </a-form-model-item>
+                </a-col>
                 <a-col :xs="24" :sm="24" :md="12" :lg="8" :xl="8">
                   <a-form-model-item label="公司规模" prop="busniessScope" help="(例:100-999人)">
                     <a-input-number
@@ -315,6 +325,7 @@
                   <a-form-model-item label="银行账号" prop="tradeBankAccount" help="(例:1123 5677 1112 22342 1123)">
                     <a-input
                       v-model.trim="form.tradeBankAccount"
+                      @change="bankAccountChange"
                       id="merchantInfoManagementEdit-tradeBankAccount"
                       :maxLength="30"
                       allowClear
@@ -429,6 +440,7 @@ export default {
         dealerTelephone: '',
         busniessMode: '',
         busniessItmes: '',
+        licenseName: '',
         busniessScope: '',
         buildDate: '',
         isTaxpayer: undefined,
@@ -520,6 +532,11 @@ export default {
     }
   },
   methods: {
+    bankAccountChange (e) {
+      const { value } = e.target
+      console.log(value, value.replace(/\s*/g, ''))
+      this.form.tradeBankAccount = value.replace(/\s*/g, '')
+    },
     // 不可选日期
     disabledDate (date, dateStrings) {
       return date && date.valueOf() > Date.now()

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

@@ -6,7 +6,7 @@
     :maskClosable="false"
     :title="title"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="600">
     <div>
       <a-spin :spinning="spinning" tip="Loading...">

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

@@ -6,7 +6,7 @@
     :maskClosable="false"
     :title="title"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="600">
     <div>
       <a-spin :spinning="spinning" tip="Loading...">

+ 1 - 1
src/views/dealerManagement/rebateSettings/associateModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="编辑"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="800">
     <!-- 表单 -->
     <div>

+ 1 - 1
src/views/expenseManagement/expenseReimbursement/chooseDepartUserModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     :title="title+'费用明细'"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     width="60%">
     <a-spin :spinning="spinning" tip="Loading...">
       <div>

+ 1 - 1
src/views/expenseManagement/expenseReimbursement/chooseImportModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="确认导入"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     width="80%">
     <div class="chooseImport-con">
       <!-- 可导入数据 -->

+ 0 - 5
src/views/expenseManagement/expenseReimbursement/detail.vue

@@ -163,11 +163,6 @@ export default {
     // 打印
     handlePrint (type) {
       const html = document.getElementById('printTest').innerHTML
-      // var iframe = document.getElementById('printfsqd')
-      // var iframedoc = iframe.contentDocument || iframe.contentWindow.document
-      // iframedoc.body.innerHTML = html
-      // window.frames['printfsqd'].focus()
-      // window.frames['printfsqd'].print()
       jGPrint(html, type)
     },
     //  详情

+ 10 - 7
src/views/expenseManagement/expenseReimbursement/employee.js

@@ -57,13 +57,16 @@ const Employee = {
       this.$emit('input', value);
     },
     getList () {
-      employeeQueryList({}).then(res => {
-        if (res.status == 200) {
-          this.list = res.data
-        } else {
-          this.list = []
-        }
-      })
+      this.list = this.$store.state.app.employeeList
+      if(this.list.length==0){
+        employeeQueryList({}).then(res => {
+          if (res.status == 200) {
+            this.list = res.data
+          } else {
+            this.list = []
+          }
+        })
+      }
     },
   },
 };

+ 1 - 1
src/views/expenseManagement/expenseReimbursement/epenseDetailModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     :title="title+'费用明细'"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     width="60%">
     <a-spin :spinning="spinning" tip="Loading...">
       <div>

+ 1 - 1
src/views/expenseManagement/expenseReimbursement/importGuideModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="导入费用明细"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="800">
     <div class="importGuide-con">
       <div class="explain-con">

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

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="新增产品信息"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     width="60%">
     <a-spin :spinning="spinning" tip="Loading...">
       <div>

+ 1 - 1
src/views/expenseManagement/expenseReimbursement/verifyModal.vue

@@ -5,7 +5,7 @@
     :maskClosable="false"
     title="费用报销单审核进度"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     width="50%">
     <p>说明:以下信息来自钉钉</p>
     <a-spin :spinning="spinning" tip="Loading...">

+ 1 - 1
src/views/financialManagement/allocateReturnConfirmation/detailModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="详情"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="960">
     <div>
       <detail :outBizSn="itemSn" pageType="modal" ref="detail"></detail>

+ 197 - 0
src/views/financialManagement/financialCollection/baseModal.vue

@@ -0,0 +1,197 @@
+<template>
+  <a-modal
+    v-model="opened"
+    :title="title"
+    centered
+    :maskClosable="false"
+    :width="800"
+    :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="applyPersonSn">
+          <employee style="width: 100%;" @change="employeeChange" ref="applyPerson" v-model="form.applyPersonSn"></employee>
+        </a-form-model-item>
+        <a-form-model-item label="收款事由" prop="bookReason">
+          <a-input :maxLength="100" placeholder="请输入收款事由(最多100个字符)" v-model="form.bookReason"></a-input>
+        </a-form-model-item>
+        <a-form-model-item label="备注">
+          <a-textarea :rows="4" :maxLength="500" placeholder="请输入备注(最多500个字符)" v-model="form.remarks"></a-textarea>
+        </a-form-model-item>
+        <a-form-model-item label="附件" help="(支持图片、word、excel、PDF等格式,最多10个附件)">
+          <Upload
+            style="height: 100%;"
+            v-model="form.attachmentList"
+            ref="attachList"
+            :fileSize="10"
+            :maxNums="10"
+            fileType="*"
+            uploadType="attach"
+            :action="attachAction"
+            @change="changeAttach"
+            upText="上传附件"></Upload>
+        </a-form-model-item>
+        <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 50px;">
+          <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
+          <a-button @click="cancel" style="margin-left: 15px" id="chooseCustom-btn-back">取消</a-button>
+        </a-form-model-item>
+      </a-form-model>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { VSelect, Upload } from '@/components'
+import employee from '../../expenseManagement/expenseReimbursement/employee.js'
+import { financeBookSave, financeBookFindBySn } from '@/api/financeBook.js'
+export default {
+  name: 'FcBaseModal',
+  mixins: [commonMixin],
+  components: { VSelect, Upload, employee },
+  props: {
+    show: [Boolean],
+    itemSn: {
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    return {
+      opened: this.show,
+      spinning: false,
+      disabled: false,
+      title: '新增财务收款单',
+      confirmLoading: false,
+      bookSn: this.itemSn,
+      formItemLayout: {
+        labelCol: { span: 4 },
+        wrapperCol: { span: 18 }
+      },
+      attachList: [],
+      attachAction: process.env.VUE_APP_API_BASE_URL + '/uploadGetFileInfo',
+      form: {
+        applyPersonSn: undefined,
+        bookReason: '',
+        remarks: '',
+        attachmentList: ''
+      },
+      rules: {
+        applyPersonSn: [ { required: true, message: '请选择申请人', trigger: ['change', 'blur'] } ],
+        bookReason: [ { required: true, message: '请输入收款事由', trigger: ['change', 'blur'] } ]
+      }
+    }
+  },
+  methods: {
+    // 申请人员
+    employeeChange (v, r) {
+      this.$nextTick(() => {
+        this.$refs.ruleForm.validateField(['applyPersonSn'])
+      })
+    },
+    //  附件上传
+    changeAttach (file) {
+      this.attachList = JSON.parse(file)
+      this.attachList.map(item => {
+        item.fileType = item.extName
+      })
+    },
+    //  保存
+    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))
+      form.attachmentList = this.attachList
+      _this.spinning = true
+      financeBookSave(form).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          if (this.bookSn) {
+            _this.$emit('refashData')
+          } else {
+            _this.$router.push({ name: 'financialCollectionEdit', params: { sn: res.data.bookSn } })
+          }
+          _this.cancel()
+          _this.spinning = false
+        } else {
+          _this.spinning = false
+        }
+      })
+    },
+    //  详情
+    getDetail () {
+      this.spinning = true
+      this.confirmLoading = true
+      financeBookFindBySn({ bookSn: this.bookSn }).then(res => {
+        if (res.status == 200) {
+          const data = res.data
+          this.form = Object.assign(this.form, data)
+          // 获取附件列表
+          this.form.attachmentList = ''
+          this.attachList = res.data.attachmentList
+          this.$refs.attachList.setFileList(this.attachList)
+          // 回显客户
+          // if (this.form.applyPersonSn) {
+          //   this.$refs.applyPerson.getDetail(this.form.applyPersonSn)
+          // }
+        } else {
+          this.$refs.ruleForm.resetFields()
+        }
+        this.spinning = false
+        this.confirmLoading = false
+      })
+    },
+    cancel () {
+      this.opened = false
+      this.$emit('cancel')
+      this.$refs.ruleForm.resetFields()
+    },
+    pageInit () {
+      this.$nextTick(() => {
+        this.attachList = []
+        this.$refs.attachList.setFileList('')
+        this.$refs.ruleForm.resetFields()
+        this.form = {
+          applyPersonSn: undefined,
+          bookReason: '',
+          remarks: '',
+          attachmentList: ''
+        }
+        if (this.bookSn) { //  编辑页
+          this.getDetail()
+          this.title = '编辑财务收款单'
+        }
+      })
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+      if (!newValue) {
+        this.pageInit()
+      }
+    },
+    itemSn (a, b) {
+      this.bookSn = a
+    }
+  }
+}
+</script>

+ 209 - 0
src/views/financialManagement/financialCollection/detail.vue

@@ -0,0 +1,209 @@
+<template>
+  <div class="financialCollectionAddwrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="financialCollectionAddcont" v-if="!bookSn" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="purchaseOrderEdit-back-btn" href="javascript:;" @click="handleBack(0)"><a-icon type="left" /> 返回列表</a>
+        </template>
+      </a-page-header>
+      <a-collapse :activeKey="['1']" class="financialCollectionAddcont" v-if="detailData">
+        <a-collapse-panel key="1" header="基础信息">
+          <a-descriptions :column="{ xs: 2, sm: 3, md: 3}">
+            <a-descriptions-item label="创建时间">{{ detailData&&detailData.createDate || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="申请人">{{ detailData&&detailData.applyPersonName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="审核时间">{{ detailData&&detailData.auditDate || '--' }}</a-descriptions-item>
+            <a-descriptions-item span="2" label="收款事由">{{ detailData&&detailData.bookReason || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="状态">{{ detailData&&detailData.statusDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="备注" :span="3">{{ detailData&&detailData.remarks||'--' }}</a-descriptions-item>
+            <a-descriptions-item label="附件" :span="3">
+              <a target="_blank" style="color: #00aaff;text-decoration: underline;margin-right: 15px;" :href="item.filePath" v-for="item in detailData.attachmentList" :key="item.id">
+                {{ item.fileName }}
+              </a>
+            </a-descriptions-item>
+          </a-descriptions>
+        </a-collapse-panel>
+      </a-collapse>
+      <!-- 财务明细 -->
+      <a-card :bordered="false" size="small" class="financialCollectionAddcont" v-if="$route.params.sn||bookSn">
+        <div slot="title">
+          <div style="display: flex;justify-content: space-between;align-items: center;">
+            <div>财务明细</div>
+          </div>
+        </div>
+        <a-alert type="info" style="margin-bottom:10px" v-if="detailData">
+          <div slot="message">
+            共 {{ total }} 条,
+            订单金额合计¥{{ detailData.orderTotalAmount }},
+            收款金额合计¥{{ detailData.receiptTotalAmount }},
+            使用授信合计¥{{ detailData.useTotalAmount }},
+            授信还款合计¥{{ detailData.payTotalAmount }},
+            余款抵扣合计¥{{ detailData.balanceTotalAmount }}
+          </div>
+        </a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :defaultLoadData="false"
+          :showPagination="false"
+          bordered>
+          <template slot="expandedRowRender" slot-scope="record">
+            <div style="padding:10px;overflow: hidden;" v-if="record.detailItemUseList.length || record.detailItemPayList.length">
+              <a-table
+                style="width:45%;background:#fff;float:left;border-bottom: 1px solid #eee;"
+                :bordered="false"
+                :pagination="false"
+                :columns="useCol"
+                :data-source="record.detailItemUseList">
+              </a-table>
+              <a-table
+                :bordered="false"
+                style="width:45%;background:#fff;float:left;border-bottom: 1px solid #eee;margin-left:2%;"
+                :pagination="false"
+                :columns="payCol"
+                :data-source="record.detailItemPayList">
+              </a-table>
+            </div>
+            <div style="padding:10px;text-align:center;" v-else>暂无数据</div>
+          </template>
+        </s-table>
+      </a-card>
+    </a-spin>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { VSelect, STable } from '@/components'
+import { financeBookFindBySn, financeBookDetailQueryList } from '@/api/financeBook.js'
+export default {
+  name: 'FinancialCollectionEdit',
+  mixins: [commonMixin],
+  components: { VSelect, STable },
+  data () {
+    return {
+      spinning: false,
+      detailData: null,
+      openDepartUserModal: false,
+      total: 0,
+      bookSn: null,
+      loadData: parameter => {
+        const params = Object.assign(parameter, { bookSn: this.$route.params.sn || this.bookSn })
+        return financeBookDetailQueryList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = 0
+            for (var i = 0; i < data.length; i++) {
+              data[i].no = no + i + 1
+              // 计算使用授信和授信还款的合计
+              data[i].useTotalAmount = this.getTotal(data[i].detailItemUseList)
+              data[i].payTotalAmount = this.getTotal(data[i].detailItemPayList)
+            }
+            this.total = data.length
+            this.disabled = false
+            this.spinning = false
+          }
+          return data
+        })
+      },
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '收款日期', dataIndex: 'receiptDate', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerEntity.dealerName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
+        { title: '客户编码', dataIndex: 'dealerEntity.kdMidCustomerFnumber', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
+        { title: '营业执照名称', dataIndex: 'dealerEntity.licenseName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
+        { title: '订单金额', dataIndex: 'orderAmount', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '收款金额', dataIndex: 'receiptAmount', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '使用授信', dataIndex: 'useTotalAmount', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '授信还款', dataIndex: 'payTotalAmount', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '跨月打款', dataIndex: 'nextMonthAmount', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '户名', dataIndex: 'bankAccount', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
+        { title: '汇入银行', dataIndex: 'bankName', align: 'center', width: '10%', customRender: function (text) { return text || '--' } },
+        { title: '足额打款', dataIndex: 'fullPaymentFlagDictValue', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '备注', dataIndex: 'remarks', align: 'center', width: '13%', customRender: function (text) { return text || '--' } }
+      ],
+      useCol: [
+        { title: '使用授信项目', dataIndex: 'itemName', width: '50%', align: 'center' },
+        { title: '使用授信金额', dataIndex: 'itemAmount', width: '50%', align: 'center' }
+      ],
+      payCol: [
+        { title: '授信还款项目', dataIndex: 'itemName', width: '50%', align: 'center' },
+        { title: '授信还款金额', dataIndex: 'itemAmount', width: '50%', align: 'center' }
+      ]
+    }
+  },
+  methods: {
+    getTotal (data) {
+      let ret = 0
+      data.map(item => {
+        ret = ret + item.itemAmount
+      })
+      return ret.toFixed(2)
+    },
+    //  财务单基础详情
+    getDetail (type) {
+      this.spinning = true
+      this.disabled = true
+      financeBookFindBySn({ bookSn: this.$route.params.sn || this.bookSn }).then(res => {
+        if (res.status == 200) {
+          this.detailData = res.data
+          if (!type) {
+            // 刷新明细列表
+            this.$refs.table.refresh()
+          } else {
+            this.spinning = false
+            this.disabled = false
+          }
+        }
+      })
+    },
+    // 返回
+    handleBack (data) {
+      this.$router.push({ name: 'financialCollectionList' })
+    },
+    pageInit (bookSn) {
+      this.bookSn = bookSn
+      if (this.$route.params.sn || this.bookSn) { //  编辑页
+        this.getDetail()
+      }
+    }
+  },
+  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">
+  .financialCollectionAddwrap{
+    position: relative;
+    height: 100%;
+    padding-bottom: 51px;
+    box-sizing: border-box;
+    .financialCollectionAddcont{
+      margin-bottom: 10px;
+    }
+    .affix{
+      .ant-affix{
+        z-index: 101;
+      }
+    }
+  }
+</style>

+ 158 - 0
src/views/financialManagement/financialCollection/dispatchModal.vue

@@ -0,0 +1,158 @@
+<template>
+  <a-modal
+    centered
+    :footer="null"
+    :maskClosable="false"
+    title="关联备货单"
+    v-model="isShow"
+    @cancel="handleCommonCancel"
+    width="50%">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <div v-if="detailData">
+        <a-descriptions :column="{ xs: 2, sm: 3, md: 2}">
+          <a-descriptions-item label="收款单号">{{ detailData&&detailData.bookNo || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="申请人">{{ detailData&&detailData.applyPersonName || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="收款事由">{{ detailData&&detailData.bookReason || '--' }}</a-descriptions-item>
+          <a-descriptions-item label="状态">{{ detailData&&detailData.statusDictValue || '--' }}</a-descriptions-item>
+        </a-descriptions>
+      </div>
+      <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>
+        <!-- 销售单号 -->
+        <template slot="salesBillNo" slot-scope="text, record">
+          <span class="link-bule" v-if="$hasPermissions('B_salesDetail')" @click="handleDetail(record,0)">{{ record.salesBillNo }}</span>
+          <span v-else>{{ record.salesBillNo }}</span>
+        </template>
+        <!-- 备货单号 -->
+        <template slot="dispatchBillNo" slot-scope="text, record">
+          <span class="link-bule" v-if="$hasPermissions('B_dispatchDetail')" @click="handleDetail(record,1)">{{ record.dispatchBillNo }}</span>
+          <span v-else>{{ record.dispatchBillNo }}</span>
+        </template>
+      </s-table>
+      <div class="btn-box" style="text-align:center;padding-top:20px;">
+        <a-button @click="handleCommonCancel">关闭</a-button>
+      </div>
+    </a-spin>
+    <!-- 查看销售单或备货单详情 -->
+    <commonModal
+      :modalTit="detailType?'备货单详情':'销售单详情'"
+      bodyPadding="10px"
+      width="70%"
+      :showFooter="false"
+      :openModal="showDetailModal"
+      @cancel="cancelDetail">
+      <salesDetail v-if="detailType==0" ref="salesDetail" :bizSn="bizSn"></salesDetail>
+      <dispatchDetail v-if="detailType==1" ref="dispatchDetail" :bizSn="bizSn"></dispatchDetail>
+    </commonModal>
+  </a-modal>
+</template>
+
+<script>
+import { STable } from '@/components'
+import commonModal from '@/views/common/commonModal.vue'
+import salesDetail from '@/views/salesManagement/salesQuery/detail.vue'
+import dispatchDetail from '@/views/salesManagement/pushOrderManagement/detail.vue'
+import { queryDispatchBillListBySn } from '@/api/financeBook.js'
+export default {
+  name: 'DispatchModal',
+  components: { STable, commonModal, salesDetail, dispatchDetail },
+  props: {
+    openModal: {
+      type: Boolean,
+      default: false
+    },
+    itemSn: {
+      type: [Number, String],
+      default: ''
+    }
+  },
+  data () {
+    return {
+      spinning: false,
+      showDetailModal: false,
+      detailType: 2,
+      bizSn: null,
+      isShow: this.openModal,
+      detailData: null,
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '6%', align: 'center' },
+        { title: '销售单号', scopedSlots: { customRender: 'salesBillNo' }, width: '13%', align: 'center' },
+        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '13%', align: 'center' },
+        { title: '发货编号', dataIndex: 'sendNo', width: '8%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '客户名称', dataIndex: 'buyerName', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '收货客户名称', dataIndex: 'receiverName', width: '14%', align: 'left', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '产品款数', dataIndex: 'totalCategory', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '产品数量', dataIndex: 'totalQty', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '总售价', dataIndex: 'totalAmount', width: '8%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '8%', align: 'center', customRender: function (text) { return text || '--' } }
+      ],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.spinning = true
+        delete parameter.tableId
+        delete parameter.index
+        return queryDispatchBillListBySn({ bookSn: this.itemSn }).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = 0
+            for (var i = 0; i < data.length; i++) {
+              data[i].no = no + i + 1
+            }
+            this.total = data.length
+            this.disabled = false
+          }
+          this.spinning = false
+          return data
+        })
+      }
+    }
+  },
+  methods: {
+    handleCommonCancel () {
+      this.$emit('close')
+      this.$refs.table.clearTable()
+      this.detailData = null
+    },
+    setDetail (data) {
+      this.detailData = data
+    },
+    handleDetail (row, type) {
+      this.detailType = type
+      this.bizSn = type == 0 ? row.salesBillSn : row.dispatchBillSn
+      this.showDetailModal = true
+    },
+    cancelDetail () {
+      this.showDetailModal = false
+      this.detailType = 2
+      this.bizSn = null
+    }
+  },
+  watch: {
+    openModal (nVal, oVal) {
+      this.isShow = nVal
+    },
+    isShow (nVal, oVal) {
+      if (!nVal) {
+        this.handleCommonCancel()
+      } else {
+        this.$nextTick(() => {
+          this.$refs.table.refresh(true)
+        })
+      }
+    }
+  }
+}
+</script>
+
+<style>
+</style>

+ 324 - 0
src/views/financialManagement/financialCollection/edit.vue

@@ -0,0 +1,324 @@
+<template>
+  <div class="financialCollectionAddwrap">
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-page-header :ghost="false" :backIcon="false" class="financialCollectionAddcont" >
+        <!-- 自定义的二级文字标题 -->
+        <template slot="subTitle">
+          <a id="purchaseOrderEdit-back-btn" href="javascript:;" @click="handleBack(0)"><a-icon type="left" /> 返回列表</a>
+        </template>
+      </a-page-header>
+      <a-collapse :activeKey="['1']" class="financialCollectionAddcont" v-if="detailData">
+        <a-collapse-panel key="1" header="基础信息">
+          <div slot="extra" style="padding: 0 20px; color: #00aaff;" @click.stop="handleEditBase" >
+            <a-icon type="edit" /> 编辑基础信息
+          </div>
+          <a-descriptions :column="{ xs: 2, sm: 3, md: 3}">
+            <a-descriptions-item label="创建时间">{{ detailData&&detailData.createDate || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="申请人">{{ detailData&&detailData.applyPersonName || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="审核时间">{{ detailData&&detailData.auditDate || '--' }}</a-descriptions-item>
+            <a-descriptions-item span="2" label="收款事由">{{ detailData&&detailData.bookReason || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="状态">{{ detailData&&detailData.statusDictValue || '--' }}</a-descriptions-item>
+            <a-descriptions-item label="备注" :span="3">{{ detailData&&detailData.remarks||'--' }}</a-descriptions-item>
+            <a-descriptions-item label="附件" :span="3">
+              <a target="_blank" style="color: #00aaff;text-decoration: underline;margin-right: 15px;" :href="item.filePath" v-for="item in detailData.attachmentList" :key="item.id">
+                {{ item.fileName }}
+              </a>
+            </a-descriptions-item>
+          </a-descriptions>
+        </a-collapse-panel>
+      </a-collapse>
+      <!-- 财务明细 -->
+      <a-card :bordered="false" size="small" class="financialCollectionAddcont" v-if="$route.params.sn">
+        <div slot="title">
+          <div style="display: flex;justify-content: space-between;align-items: center;">
+            <div>财务明细</div>
+            <div>
+              <a-button size="small" class="button-error" type="primary" @click="handleEdit">新增收款明细</a-button>
+            </div>
+          </div>
+        </div>
+        <a-alert type="info" style="margin-bottom:10px" v-if="detailData">
+          <div slot="message">
+            共 {{ total }} 条,
+            订单金额合计¥{{ detailData.orderTotalAmount }},
+            收款金额合计¥{{ detailData.receiptTotalAmount }},
+            使用授信合计¥{{ detailData.useTotalAmount }},
+            授信还款合计¥{{ detailData.payTotalAmount }},
+            余款抵扣合计¥{{ detailData.balanceTotalAmount }}
+          </div>
+        </a-alert>
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :defaultLoadData="false"
+          :showPagination="false"
+          bordered>
+          <template slot="expandedRowRender" slot-scope="record">
+            <div style="padding:10px;overflow: hidden;" v-if="record.detailItemUseList.length || record.detailItemPayList.length">
+              <a-table
+                style="width:45%;background:#fff;float:left;border-bottom: 1px solid #eee;"
+                :bordered="false"
+                :pagination="false"
+                :columns="useCol"
+                :data-source="record.detailItemUseList">
+              </a-table>
+              <a-table
+                :bordered="false"
+                style="width:45%;background:#fff;float:left;border-bottom: 1px solid #eee;margin-left:2%;"
+                :pagination="false"
+                :columns="payCol"
+                :data-source="record.detailItemPayList">
+              </a-table>
+            </div>
+            <div style="padding:10px;text-align:center;" v-else>暂无数据</div>
+          </template>
+          <template slot="action" slot-scope="text,record">
+            <a-button
+              size="small"
+              type="link"
+              class="button-info"
+              @click="handleEdit(record)"
+            >编辑</a-button>
+            <a-button
+              size="small"
+              type="link"
+              class="button-error"
+              @click="handleDel(record)"
+            >删除</a-button>
+          </template>
+        </s-table>
+      </a-card>
+    </a-spin>
+    <div class="affix-cont">
+      <a-button
+        type="primary"
+        class="button-primary"
+        :disabled="spinning"
+        id="financialCollectionAddsubmit-btn"
+        size="large"
+        @click="beforeSubmit"
+        style="padding: 0 60px;">提交</a-button>
+    </div>
+    <!-- 基础信息 -->
+    <baseModal
+      ref="baseModal"
+      @refashData="refashData"
+      :show="openBaseModal"
+      :itemSn="$route.params.sn"
+      @cancel="openBaseModal=false"></baseModal>
+    <!-- 明细弹框 -->
+    <fcDetailModal
+      ref="fcDetailModal"
+      @refashData="fcDetailOk"
+      :show="openFcDetailModal"
+      :bookSn="$route.params.sn"
+      :bookNo="detailData?detailData.bookNo:''"
+      @cancel="openFcDetailModal=false"></fcDetailModal>
+    <!-- 选择审核人员 -->
+    <chooseDepartUserModal :openModal="openDepartUserModal" @close="openDepartUserModal=false" @submit="handleSubmit"></chooseDepartUserModal>
+  </div>
+</template>
+
+<script>
+import { commonMixin } from '@/utils/mixin'
+import { VSelect, STable } from '@/components'
+import baseModal from './baseModal.vue'
+import fcDetailModal from './fcDetailModal.vue'
+import chooseDepartUserModal from '../../expenseManagement/expenseReimbursement/chooseDepartUserModal.vue'
+import { financeBookFindBySn, financeBookDetailDelete, financeBookDetailQueryList, financeBookSubmit } from '@/api/financeBook.js'
+export default {
+  name: 'FinancialCollectionEdit',
+  mixins: [commonMixin],
+  components: { VSelect, STable, baseModal, fcDetailModal, chooseDepartUserModal },
+  data () {
+    return {
+      spinning: false,
+      detailData: null,
+      openBaseModal: false,
+      openDepartUserModal: false,
+      openFcDetailModal: false, // 财务明细弹框
+      total: 0,
+      loadData: parameter => {
+        const params = Object.assign(parameter, { bookSn: this.$route.params.sn })
+        return financeBookDetailQueryList(params).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = 0
+            for (var i = 0; i < data.length; i++) {
+              data[i].no = no + i + 1
+              // 计算使用授信和授信还款的合计
+              data[i].useTotalAmount = this.getTotal(data[i].detailItemUseList)
+              data[i].payTotalAmount = this.getTotal(data[i].detailItemPayList)
+            }
+            this.total = data.length
+            this.disabled = false
+            this.spinning = false
+          }
+          return data
+        })
+      },
+      columns: [
+        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
+        { title: '收款日期', dataIndex: 'receiptDate', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
+        { title: '客户名称', dataIndex: 'dealerEntity.dealerName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
+        { title: '客户编码', dataIndex: 'dealerEntity.kdMidCustomerFnumber', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
+        { title: '营业执照名称', dataIndex: 'dealerEntity.licenseName', align: 'center', width: '8%', customRender: function (text) { return text || '--' } },
+        { title: '订单金额', dataIndex: 'orderAmount', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '收款金额', dataIndex: 'receiptAmount', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '使用授信', dataIndex: 'useTotalAmount', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '授信还款', dataIndex: 'payTotalAmount', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '跨月打款', dataIndex: 'nextMonthAmount', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '户名', dataIndex: 'bankAccount', align: 'center', width: '5%', customRender: function (text) { return text || '--' } },
+        { title: '汇入银行', dataIndex: 'bankName', align: 'center', width: '5%', customRender: function (text) { return text || '--' } },
+        { title: '足额打款', dataIndex: 'fullPaymentFlagDictValue', align: 'center', width: '5%', customRender: function (text) { return (text == 0 || text) ? text : '--' } },
+        { title: '备注', dataIndex: 'remarks', align: 'center', width: '13%', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+      ],
+      useCol: [
+        { title: '使用授信项目', dataIndex: 'itemName', width: '50%', align: 'center' },
+        { title: '使用授信金额', dataIndex: 'itemAmount', width: '50%', align: 'center' }
+      ],
+      payCol: [
+        { title: '授信还款项目', dataIndex: 'itemName', width: '50%', align: 'center' },
+        { title: '授信还款金额', dataIndex: 'itemAmount', width: '50%', align: 'center' }
+      ]
+    }
+  },
+  methods: {
+    getTotal (data) {
+      let ret = 0
+      data.map(item => {
+        ret = ret + item.itemAmount
+      })
+      return ret.toFixed(2)
+    },
+    // 编辑基础信息
+    handleEditBase (event) {
+      this.openBaseModal = true
+      this.$refs.baseModal.getDetail()
+    },
+    refashData () {
+      this.getDetail(1)
+    },
+    //  财务单基础详情
+    getDetail (type) {
+      this.spinning = true
+      this.disabled = true
+      financeBookFindBySn({ bookSn: this.$route.params.sn }).then(res => {
+        if (res.status == 200) {
+          this.detailData = res.data
+          if (!type) {
+            // 刷新明细列表
+            this.$refs.table.refresh()
+          } else {
+            this.spinning = false
+            this.disabled = false
+          }
+        }
+      })
+    },
+    // 新增明细成功
+    fcDetailOk () {
+      this.openFcDetailModal = false
+      this.getDetail(false)
+    },
+    // 新增、编辑明细
+    handleEdit (row) {
+      this.openFcDetailModal = true
+      if (row && row.bookDetailSn) {
+        this.$refs.fcDetailModal.getDetail(row.bookDetailSn)
+      }
+    },
+    // 删除明细
+    handleDel (row) {
+      const _this = this
+      this.$confirm({
+        title: '提示',
+        content: '确认要删除吗?',
+        centered: true,
+        closable: true,
+        onOk () {
+          _this.spinning = true
+          financeBookDetailDelete({ bookDetailSn: row.bookDetailSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.getDetail(false)
+              _this.spinning = false
+            } else {
+              _this.spinning = false
+            }
+          })
+        }
+      })
+    },
+    beforeSubmit () {
+      if (this.total) {
+        this.openDepartUserModal = true
+      } else {
+        this.$message.info('请新增财务明细')
+      }
+    },
+    // 提交信息
+    handleSubmit (data) {
+      this.spinning = true
+      financeBookSubmit({ bookSn: this.$route.params.sn, ...data }).then(res => {
+        if (res.status == '200') {
+          this.$message.success(res.message)
+          this.handleBack()
+        }
+        this.spinning = false
+      })
+    },
+    // 返回
+    handleBack (data) {
+      this.$router.push({ name: 'financialCollectionList' })
+    },
+    pageInit () {
+      if (this.$route.params.sn) { //  编辑页
+        this.getDetail()
+      }
+    }
+  },
+  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">
+  .financialCollectionAddwrap{
+    position: relative;
+    height: 100%;
+    padding-bottom: 51px;
+    box-sizing: border-box;
+    >.ant-spin-nested-loading{
+      overflow-y: scroll;
+      height: 100%;
+    }
+    .financialCollectionAddcont{
+      margin-bottom: 10px;
+    }
+    .affix{
+      .ant-affix{
+        z-index: 101;
+      }
+    }
+  }
+</style>

+ 368 - 0
src/views/financialManagement/financialCollection/fcDetailModal.vue

@@ -0,0 +1,368 @@
+<template>
+  <a-modal
+    v-model="opened"
+    :title="title"
+    centered
+    :maskClosable="false"
+    width="60%"
+    :footer="null"
+    @cancel="cancel"
+  >
+    <a-spin :spinning="spinning" tip="Loading...">
+      <a-form-model
+        ref="ruleForm"
+        :model="form"
+        :rules="rules"
+        :label-col="formItemLayout.labelCol"
+        :wrapper-col="formItemLayout.wrapperCol">
+        <a-row>
+          <a-col :span="12">
+            <a-form-model-item style="margin-bottom:5px;" label="收款日期" prop="receiptDate">
+              <a-date-picker inputReadOnly style="width:100%" format="YYYY-MM-DD" v-model="form.receiptDate" placeholder="请选择收款日期" />
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item style="margin-bottom:5px;" label="客户名称" prop="dealerSn">
+              <dealerSubareaScopeList ref="settleClientName" @change="custChange" />
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+        <a-row>
+          <a-col :span="12">
+            <a-form-model-item style="margin-bottom:5px;" label="客户编码">
+              {{ form.dealerCode||'--' }}
+              <!-- <a-input :maxLength="100" placeholder="请输入客户编码" v-model="form.dealerCode"></a-input> -->
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item style="margin-bottom:5px;" label="营业执照名称">
+              {{ form.licenseName||'--' }}
+              <!-- <a-input :maxLength="100" placeholder="请输入营业执照名称" v-model="form.licenseName"></a-input> -->
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item style="margin-bottom:5px;" label="订单金额">
+              <a-input-number
+                style="width:100%"
+                :min="0"
+                :max="999999"
+                :precision="2"
+                placeholder="请输入订单金额"
+                v-model="form.orderAmount"></a-input-number>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item style="margin-bottom:5px;" label="收款金额">
+              <a-input-number
+                style="width:100%"
+                :min="0"
+                :max="999999"
+                :precision="2"
+                placeholder="请输入收款金额"
+                v-model="form.receiptAmount"></a-input-number>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item style="margin-bottom:5px;" label="使用授信">
+              <a-checkbox v-model="form.useCreditFlag" @change="form.detailItemUseList=[]">是</a-checkbox>
+              <span v-if="form.useCreditFlag">合计: {{ useTotalAmount||'--' }}</span>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item style="margin-bottom:5px;" label="授信还款">
+              <a-checkbox v-model="form.payCreditFlag" @change="form.detailItemPayList=[]">是</a-checkbox>
+              <span v-if="form.payCreditFlag">合计:  {{ payTotalAmount||'--' }}</span>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item style="margin-bottom:5px;" label="余款抵扣">
+              <a-input-number
+                style="width:100%"
+                :min="0"
+                :max="999999"
+                :precision="2"
+                placeholder="请输入余款抵扣"
+                v-model="form.balanceAmount"></a-input-number>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item style="margin-bottom:5px;" label="跨月打款">
+              <a-input-number
+                style="width:100%"
+                :min="0"
+                :max="999999"
+                :precision="2"
+                placeholder="请输入跨月打款金额"
+                v-model="form.nextMonthAmount"></a-input-number>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item style="margin-bottom:5px;" label="户名">
+              <a-select placeholder="请选择户名" v-model="form.bankAccount" style="width: 100%" @change="handleChange">
+                <a-select-option v-for="item in bankList" :value="item.bankAccount">
+                  {{ item.bankAccount }}
+                </a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item style="margin-bottom:5px;" label="汇入银行">
+              <a-select placeholder="请选择汇入银行" v-model="form.bankName" style="width: 100%">
+                <a-select-option v-for="item in bankNameList" :value="item">
+                  {{ item }}
+                </a-select-option>
+              </a-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="12">
+            <a-form-model-item style="margin-bottom:5px;" label="足额打款">
+              <v-select
+                v-model="form.fullPaymentFlag"
+                code="FLAG"
+                placeholder="请选择是否足额打款"
+                allowClear></v-select>
+            </a-form-model-item>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item style="margin-bottom:5px;" label="备注" :labelCol="{span:3}" :wrapper-col="{ span: 20 }">
+              <a-textarea :rows="2" :maxLength="500" placeholder="请输入备注(最多500个字符)" v-model="form.remarks"></a-textarea>
+            </a-form-model-item>
+          </a-col>
+          <!-- 使用授信列表 -->
+          <a-col :span="22" :offset="1" v-if="form.useCreditFlag">
+            <div style="padding:10px 0">使用授信项目:</div>
+            <fcDetailSxItem title="使用授信" @updateItemAmount="updateUseAmount" :list="form.detailItemUseList" ref="useCreditItem"></fcDetailSxItem>
+          </a-col>
+          <!-- 授信还款列表 -->
+          <a-col :span="22" :offset="1" v-if="form.payCreditFlag">
+            <div style="padding:10px 0">授信还款项目:</div>
+            <fcDetailSxItem title="授信还款" @updateItemAmount="updatePayAmount" :list="form.detailItemPayList" ref="payCreditItem"></fcDetailSxItem>
+          </a-col>
+          <a-col :span="24">
+            <a-form-model-item :wrapper-col="{ span: 12, offset: 6 }" style="text-align: center;margin-top: 50px;">
+              <a-button type="primary" :loading="confirmLoading" @click="handleSubmit" id="chooseCustom-btn-submit">保存</a-button>
+              <a-button @click="cancel" style="margin-left: 15px" id="chooseCustom-btn-back">取消</a-button>
+            </a-form-model-item>
+          </a-col>
+        </a-row>
+      </a-form-model>
+    </a-spin>
+  </a-modal>
+</template>
+
+<script>
+import moment from 'moment'
+import { commonMixin } from '@/utils/mixin'
+import { VSelect, Upload } from '@/components'
+import dealerSubareaScopeList from '@/views/common/dealerSubareaScopeList.vue'
+import fcDetailSxItem from './fcDetailSxItem.vue'
+import { financeBookDetailSave, financeBookDetailQueryBySn } from '@/api/financeBook.js'
+export default {
+  name: 'FcDetailModal',
+  mixins: [commonMixin],
+  components: { VSelect, Upload, dealerSubareaScopeList, fcDetailSxItem },
+  props: {
+    show: {
+      type: [Boolean],
+      default: false
+    },
+    bookSn: {
+      type: String,
+      default: ''
+    },
+    bookNo: {
+      type: String,
+      default: ''
+    }
+  },
+  data () {
+    return {
+      opened: this.show,
+      spinning: false,
+      disabled: false,
+      title: '新增收款明细',
+      confirmLoading: false,
+      bookDetailSn: '',
+      formItemLayout: {
+        labelCol: { span: 6 },
+        wrapperCol: { span: 16 }
+      },
+      form: {
+        dealerSn: undefined,
+        dealerName: '',
+        receiptDate: moment(),
+        dealerCode: '',
+        licenseName: '',
+        orderAmount: '',
+        receiptAmount: '',
+        useCreditFlag: false,
+        detailItemUseList: [],
+        payCreditFlag: false,
+        detailItemPayList: [],
+        balanceAmount: '',
+        nextMonthAmount: '',
+        bankAccount: undefined,
+        bankName: undefined,
+        fullPaymentFlag: undefined,
+        remarks: ''
+      },
+      rules: {
+        receiptDate: [ { required: true, message: '请选择收款日期', trigger: ['change', 'blur'] } ],
+        dealerSn: [ { required: true, message: '请选择客户', trigger: ['change', 'blur'] } ]
+      },
+      useTotalAmount: '',
+      payTotalAmount: '',
+      bankList: [
+        {
+          bankAccount: '张丽友',
+          bankName: ['建设银行', '微信收款']
+        },
+        {
+          bankAccount: '张丽添',
+          bankName: ['农业银行']
+        },
+        {
+          bankAccount: '东莞箭冠',
+          bankName: ['东莞银行']
+        },
+        {
+          bankAccount: '江西箭冠',
+          bankName: ['九江银行']
+        }
+      ],
+      bankNameList: []
+    }
+  },
+  methods: {
+    handleChange (v) {
+      console.log(v)
+      const row = this.bankList.find(item => item.bankAccount == v)
+      this.bankNameList = row.bankName
+      this.form.bankName = undefined
+    },
+    // 客户
+    custChange (v) {
+      this.form.dealerSn = v.key
+      this.form.dealerName = v.name
+      this.form.licenseName = v.row ? v.row.licenseName : ''
+      this.form.dealerCode = v.row ? v.row.kdMidCustomerFnumber : ''
+    },
+    updateUseAmount (v) {
+      this.useTotalAmount = v
+    },
+    updatePayAmount (v) {
+      this.payTotalAmount = v
+    },
+    //  保存
+    handleSubmit (e) {
+      e.preventDefault()
+      const _this = this
+      this.$refs.ruleForm.validate(valid => {
+        if (valid) {
+          _this.salesSaveFun()
+        } else {
+          return false
+        }
+      })
+    },
+    validItem (data) {
+      return data.find(item => !item.itemName || !item.itemAmount)
+    },
+    // 新建或编辑销售单
+    salesSaveFun () {
+      const _this = this
+      const form = JSON.parse(JSON.stringify(_this.form))
+      form.receiptDate = moment(form.receiptDate).format('YYYY-MM-DD')
+      form.payCreditFlag = form.payCreditFlag ? 1 : 0
+      form.useCreditFlag = form.useCreditFlag ? 1 : 0
+      form.bookSn = this.bookSn
+      form.bookNo = this.bookNo
+      delete form.dealerName
+      delete form.licenseName
+      delete form.dealerCode
+      console.log(form)
+      if ((form.useCreditFlag && form.detailItemUseList.length == 0) || this.validItem(form.detailItemUseList)) {
+        this.$message.info('使用授信项目不能为空')
+        return
+      }
+      if ((form.payCreditFlag && form.detailItemPayList.length == 0) || this.validItem(form.detailItemPayList)) {
+        this.$message.info('授信还款项目不能为空')
+        return
+      }
+      _this.spinning = true
+      financeBookDetailSave(form).then(res => {
+        if (res.status == 200) {
+          _this.$message.success(res.message)
+          _this.$emit('refashData')
+          _this.cancel()
+          _this.spinning = false
+        } else {
+          _this.spinning = false
+        }
+      })
+    },
+    //  详情
+    getDetail (bookDetailSn) {
+      this.spinning = true
+      this.confirmLoading = true
+      this.title = '编辑收款明细'
+      this.bookDetailSn = bookDetailSn
+      financeBookDetailQueryBySn({ bookDetailSn: this.bookDetailSn }).then(res => {
+        if (res.status == 200) {
+          const data = res.data
+          this.form = Object.assign(this.form, data)
+          this.form.receiptDate = moment(this.form.receiptDate).format('YYYY-MM-DD')
+          this.form.payCreditFlag = this.form.payCreditFlag == 1
+          this.form.useCreditFlag = this.form.useCreditFlag == 1
+          // 回显客户
+          if (this.form.dealerSn) {
+            this.$refs.settleClientName.getDetail(this.form.dealerSn)
+          }
+        }
+        this.spinning = false
+        this.confirmLoading = false
+      })
+    },
+    cancel () {
+      this.opened = false
+      this.$emit('cancel')
+      this.pageInit()
+    },
+    pageInit () {
+      this.$nextTick(() => {
+        this.title = '新增收款明细'
+        this.$refs.ruleForm.resetFields()
+        this.$refs.settleClientName.resetForm()
+        this.bankNameList = []
+        this.form = {
+          dealerSn: undefined,
+          dealerName: '',
+          receiptDate: moment(),
+          dealerCode: '',
+          licenseName: '',
+          orderAmount: '',
+          receiptAmount: '',
+          useCreditFlag: false,
+          detailItemUseList: [],
+          payCreditFlag: false,
+          detailItemPayList: [],
+          balanceAmount: '',
+          nextMonthAmount: '',
+          bankAccount: undefined,
+          bankName: undefined,
+          fullPaymentFlag: undefined,
+          remarks: ''
+        }
+      })
+    }
+  },
+  watch: {
+    show (newValue, oldValue) {
+      this.opened = newValue
+      if (!newValue) {
+        this.pageInit()
+      }
+    }
+  }
+}
+</script>

+ 81 - 0
src/views/financialManagement/financialCollection/fcDetailSxItem.vue

@@ -0,0 +1,81 @@
+<template>
+  <div>
+    <a-table bordered :pagination="false" :columns="columns" :data-source="detailItemList">
+      <template slot="itemName" slot-scope="text, record">
+        <a-input v-model="record.itemName" :maxLength="20" :placeholder="'请输入'+title+'项目'"></a-input>
+      </template>
+      <template slot="itemAmount" slot-scope="text, record">
+        <a-input-number
+          style="width:100%"
+          :min="0"
+          :max="999999"
+          :precision="2"
+          :placeholder="'请输入'+title+'金额'"
+          @change="getTotal"
+          v-model="record.itemAmount"></a-input-number>
+      </template>
+      <template slot="action" slot-scope="text, record,index">
+        <a-button
+          size="small"
+          type="link"
+          class="button-error"
+          @click="delItem(record,index)"
+        >删除</a-button>
+      </template>
+    </a-table>
+    <div style="border:1px solid #eee;border-top:0;"><a-button @click="addItem" type="link" ghost class="button-info" block>+ 新增{{ title }}明细</a-button></div>
+  </div>
+</template>
+
+<script>
+export default {
+  name: 'SxItemList',
+  props: {
+    title: {
+      type: String,
+      default: ''
+    },
+    list: [Array]
+  },
+  data () {
+    return {
+      // 使用授信合集
+      columns: [
+        { title: this.title + '项目', scopedSlots: { customRender: 'itemName' }, width: '45%', align: 'center' },
+        { title: this.title + '金额', scopedSlots: { customRender: 'itemAmount' }, width: '45%', align: 'center' },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '10%', align: 'center' }
+      ],
+      detailItemList: this.list
+    }
+  },
+  mounted () {
+    if (this.detailItemList.length == 0) {
+      this.addItem()
+    }
+    this.getTotal()
+  },
+  methods: {
+    getTotal () {
+      let ret = 0
+      this.detailItemList.map(item => {
+        ret = ret + item.itemAmount
+        delete item.id
+      })
+      this.$emit('updateItemAmount', ret.toFixed(2))
+    },
+    addItem () {
+      this.detailItemList.push({
+        itemName: '',
+        itemAmount: ''
+      })
+    },
+    delItem (row, index) {
+      this.detailItemList.splice(index, 1)
+      this.getTotal()
+    }
+  }
+}
+</script>
+
+<style>
+</style>

+ 165 - 222
src/views/financialManagement/financialCollection/list.vue

@@ -6,118 +6,47 @@
         <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 ref="rangeAuditDate" :value="auditDate" @change="dateAuditChange" />
+              <a-form-item label="创建时间">
+                <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="financialCollectionList-bizNo" v-model.trim="queryParam.bizNo" allowClear placeholder="请输入销售单号"/>
+              <a-form-item label="收款单号">
+                <a-input id="financialCollectionList-bookNo" v-model.trim="queryParam.bookNo" allowClear placeholder="请输入收款单号"/>
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
-              <a-form-item label="备货单号">
+              <a-form-item label="关联备货单号">
                 <a-input id="financialCollectionList-dispatchBillNo" v-model.trim="queryParam.dispatchBillNo" allowClear placeholder="请输入备货单号"/>
               </a-form-item>
             </a-col>
             <template v-if="advanced">
               <a-col :md="6" :sm="24">
-                <a-form-item label="经销商名称">
-                  <a-input id="financialCollectionList-settleClientName" v-model.trim="queryParam.settleClientName" allowClear placeholder="请输入经销商名称"/>
+                <a-form-item label="申请人">
+                  <employee style="width: 100%;" id="financialCollectionList-Employee" placeholder="请选择申请人" v-model="queryParam.applyPersonSn"></employee>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="商户级别">
-                  <v-select
-                    v-model="queryParam.dealerLevel"
-                    ref="dealerLevel"
-                    id="financialCollectionList-dealerLevel"
-                    code="DEALER_LEVEL"
-                    placeholder="请选择商户级别"
-                    allowClear></v-select>
-                </a-form-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-item label="收款方式">
-                  <v-select
-                    v-model="queryParam.settleStyle"
-                    ref="settleStyle"
-                    id="financialCollectionList-settleStyle"
-                    code="SETTLE_STYLE"
-                    placeholder="请选择收款方式"
-                    allowClear></v-select>
+                <a-form-item label="收款事由">
+                  <a-input id="financialCollectionList-bookReason" v-model.trim="queryParam.bookReason" allowClear placeholder="请输入收款事由"/>
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="区域">
-                  <subarea id="financialCollectionList-subarea" v-model="queryParam.subareaSn"></subarea>
+                <a-form-item label="审核时间">
+                  <rangeDate ref="rangeAuditDate" :value="auditDate" @change="dateAuditChange" />
                 </a-form-item>
               </a-col>
               <a-col :md="6" :sm="24">
-                <a-form-item label="业务状态">
+                <a-form-item label="状态">
                   <v-select
-                    v-model="queryParam.billStatus"
-                    ref="billStatus"
-                    id="financialCollectionList-billStatus"
-                    code="DISPATCH_BILL_STATUS"
-                    placeholder="请选择业务状态"
+                    v-model="queryParam.status"
+                    ref="status"
+                    id="financialCollectionList-status"
+                    code="FINANCE_BOOK_STATE"
+                    placeholder="请选择状态"
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-item label="财务状态">
-                  <v-select
-                    v-model="queryParam.settleState"
-                    ref="settleState"
-                    id="financialCollectionList-settleState"
-                    code="FINANCIAL_RECEIVE_STATUS"
-                    placeholder="请选择财务状态"
-                    allowClear></v-select>
-                </a-form-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-item label="单据状态">
-                  <v-select
-                    v-model="queryParam.voidFlag"
-                    ref="voidFlag"
-                    id="financialCollectionList-voidFlag"
-                    code="VOID_FLAG"
-                    placeholder="请选择单据状态"
-                    allowClear></v-select>
-                </a-form-item>
-              </a-col>
-              <a-col :md="6" :sm="24">
-                <a-form-item label="收款时间">
-                  <rangeDate ref="rangeSettleDate" @change="dateSettleChange" />
-                </a-form-item>
-              </a-col>
-              <a-col :md="12" :sm="24">
-                <a-row>
-                  <a-form-item label="经销商地区">
-                    <a-col span="7">
-                      <a-form-item prop="dealerProvinceSn" style="margin: 0;">
-                        <a-select v-model="queryParam.dealerProvinceSn" allowClear @change="getCityList" placeholder="请选择省">
-                          <a-select-option v-for="item in addrProvinceList" :value="item.id" :key="item.id + 'a'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-item>
-                    </a-col>
-                    <a-col span="7" offset="1">
-                      <a-form-item prop="dealerCitySn" style="margin: 0;">
-                        <a-select v-model="queryParam.dealerCitySn" allowClear @change="getAreaList" placeholder="请选择市">
-                          <a-select-option v-for="item in addrCityList" :value="item.id" :key="item.id + 'b'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-item>
-                    </a-col>
-                    <a-col span="7" offset="1">
-                      <a-form-item prop="dealerCountySn" style="margin: 0;">
-                        <a-select v-model="queryParam.dealerCountySn" allowClear placeholder="请选择区/县">
-                          <a-select-option v-for="item in addrDistrictList" :value="item.id" :key="item.id + 'c'">{{ item.name }}</a-select-option>
-                        </a-select>
-                      </a-form-item>
-                    </a-col>
-                  </a-form-item>
-                </a-row>
-              </a-col>
             </template>
             <a-col :md="6" :sm="24" style="margin-bottom: 10px;">
               <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="financialCollectionList-refresh">查询</a-button>
@@ -130,6 +59,10 @@
           </a-row>
         </a-form>
       </div>
+      <!-- 操作按钮 -->
+      <div class="table-operator" v-if="$hasPermissions('B_fc_new')">
+        <a-button type="primary" class="button-error" @click="handleAdd">新增</a-button>
+      </div>
       <!-- 列表 -->
       <s-table
         class="sTable fixPagination"
@@ -143,77 +76,106 @@
         :defaultLoadData="false"
         bordered>
         <!-- 单号 -->
-        <template slot="bizNo" slot-scope="text, record">
-          <span v-if="$hasPermissions('B_salesDetail')" class="link-bule" @click="handleDetail(record)">{{ record.bizNo }}</span>
-          <span v-else>{{ record.bizNo }}</span>
+        <template slot="bookNo" slot-scope="text, record">
+          <span v-if="$hasPermissions('B_fc_detail')" class="link-bule" @click="handleDetail(record)">{{ record.bookNo }}</span>
+          <span v-else>{{ record.bookNo }}</span>
         </template>
-        <!-- 下推单号 -->
-        <template slot="dispatchBillNo" slot-scope="text, record">
-          <span v-if="$hasPermissions('B_dispatchDetail')" class="link-bule" @click="handleBhDetail(record)">{{ record.dispatchBillNo }}</span>
-          <span v-else>{{ record.dispatchBillNo || '--' }}</span>
+        <!-- 关联备货单 -->
+        <template slot="dispatchNum" slot-scope="text, record">
+          <span v-if="$hasPermissions('B_glDispatch')&&record.dispatchNum" class="link-bule" @click="handleBhDetail(record)">{{ record.dispatchNum }}单</span>
+          <span v-else>--</span>
         </template>
         <!-- 操作 -->
         <template slot="action" slot-scope="text, record">
           <a-button
+            v-if="record.status=='WAIT_SUBMIT'&&$hasPermissions('B_fc_edit')"
             size="small"
             type="link"
-            v-if="record.settleState=='WAIT' && record.voidFlag!=1 && $hasPermissions('B_financialCollection_receipt')"
-            class="button-warning"
-            @click="handleAudit(record)"
-            id="financialCollectionList-audit-btn">收款</a-button>
-          <span v-else>--</span>
+            class="button-info"
+            @click="handleEdit(record)"
+          >
+            编辑
+          </a-button>
+          <a-button
+            v-if="record.status=='WAIT_SUBMIT'&&$hasPermissions('B_fc_del')"
+            size="small"
+            type="link"
+            class="button-error"
+            @click="handleDel(record)"
+          >
+            删除
+          </a-button>
+          <a-button
+            v-if="record.status!='WAIT_SUBMIT'&&$hasPermissions('B_fc_Audit')"
+            size="small"
+            type="link"
+            class="button-info"
+            @click="handleSH(record)"
+          >
+            审核进度
+          </a-button>
+          <a-button
+            v-if="record.status=='AUDIT_REJECT'&&$hasPermissions('B_againEdit')"
+            size="small"
+            type="link"
+            class="button-info"
+            @click="againEdit(record)"
+          >
+            再次编辑
+          </a-button>
         </template>
       </s-table>
     </a-spin>
+    <!-- 审核进度 -->
+    <verifyModal :openModal="openModal" :itemSn="itemSn" @close="openModal=false"></verifyModal>
+    <!-- 基础信息 -->
+    <baseModal :show="baseModal" @cancel="baseModal=false"></baseModal>
+    <!-- 关联备货单 -->
+    <dispatchModal ref="openDisModal" :openModal="openDisModal" :itemSn="itemSn" @close="openDisModal=false"></dispatchModal>
   </a-card>
 </template>
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import moment from 'moment'
-import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import rangeDate from '@/views/common/rangeDate.vue'
-import subarea from '@/views/common/subarea.js'
-import { getArea } from '@/api/data'
-import { settleReceiptList, settleReceipt } from '@/api/settleReceipt'
+import baseModal from './baseModal.vue'
+import employee from '../../expenseManagement/expenseReimbursement/employee.js'
+import verifyModal from './verifyModal.vue'
+import dispatchModal from './dispatchModal.vue'
+import { financeBookQueryPage, financeBookDeleteBySn, financeBookDgainEditBySn } from '@/api/financeBook.js'
 export default {
   name: 'FinancialCollectionList',
   mixins: [commonMixin],
-  components: { STable, VSelect, subarea, rangeDate },
+  components: { STable, VSelect, rangeDate, baseModal, employee, verifyModal, dispatchModal },
   data () {
     return {
       spinning: false,
+      openModal: false,
+      openDisModal: false,
+      baseModal: false,
       tableHeight: 0,
       queryParam: { //  查询条件
-        beginDate: getDate.getThreeMonthDays().starttime + ' 00:00:00',
-        endDate: getDate.getCurrMonthDays().endtime + ' 23:59:59',
-        bizNo: '',
+        beginDate: '',
+        endDate: '',
+        bookNo: '',
         dispatchBillNo: '',
-        beginDateSettle: '',
-        endDateSettle: '',
-        settleClientName: '',
-        dealerLevel: undefined,
-        settleStyle: undefined,
-        subareaSn: undefined,
-        billStatus: undefined,
-        settleState: undefined,
-        voidFlag: undefined,
-        dealerProvinceSn: undefined,
-        dealerCitySn: undefined,
-        dealerCountySn: undefined
+        auditBeginDate: '',
+        auditEndDate: '',
+        applyPersonSn: undefined,
+        bookReason: '',
+        status: undefined
       },
       disabled: false, //  查询、重置按钮是否可操作
-      auditDate: [
-        moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
-        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
-      ], //  审核时间
+      creatDate: [], //  创建时间
+      auditDate: [], // 审核时间
       advanced: false,
+      itemSn: null,
       // 加载数据方法 必须为 Promise 对象
       loadData: parameter => {
         this.disabled = true
         this.spinning = true
-        return settleReceiptList(Object.assign(parameter, this.queryParam)).then(res => {
+        return financeBookQueryPage(Object.assign(parameter, this.queryParam)).then(res => {
           let data
           if (res.status == 200) {
             data = res.data
@@ -228,89 +190,92 @@ export default {
           return data
         })
       },
-      total: 0, // 合计
-      addrProvinceList: [], //  省下拉
-      addrCityList: [], //  市下拉
-      addrDistrictList: [] //  区下拉
+      total: 0 // 合计
     }
   },
   // 根据权限显示列表字段
   computed: {
     columns () {
       const arr = [
-        { title: '审核时间', dataIndex: 'createDate', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售单号', scopedSlots: { customRender: 'bizNo' }, width: '10%', align: 'center' },
-        { title: '备货单号', scopedSlots: { customRender: 'dispatchBillNo' }, width: '10%', align: 'center' },
-        { title: '经销商名称', dataIndex: 'settleClientName', align: 'left', width: '9%', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '商户级别', dataIndex: 'dealerLevelDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '销售数量', dataIndex: 'qty', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        // { title: '销售金额', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '收款时间', dataIndex: 'settleTime', width: '9%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '收款方式', dataIndex: 'settleStyleDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '备注', dataIndex: 'remark', width: '7%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '业务状态', dataIndex: 'billStatusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '财务状态', dataIndex: 'settleStateDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '单据状态', dataIndex: 'voidFlagDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '4%', align: 'center' }
+        { title: '序号', dataIndex: 'no', width: '4%', align: 'center' },
+        { title: '创建时间', dataIndex: 'createDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '收款单号', scopedSlots: { customRender: 'bookNo' }, width: '8%', align: 'center' },
+        { title: '关联备货单', scopedSlots: { customRender: 'dispatchNum' }, width: '6%', align: 'center' },
+        { title: '申请人', dataIndex: 'applyPersonName', align: 'center', width: '6%', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '收款事由', dataIndex: 'bookReason', width: '12%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '订单总金额', dataIndex: 'orderTotalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '收款总金额', dataIndex: 'receiptTotalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '使用授信总金额', dataIndex: 'useTotalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '授信还款总金额', dataIndex: 'payTotalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '余款抵扣总金额', dataIndex: 'balanceTotalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '审核时间', dataIndex: 'auditDate', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', dataIndex: 'statusDictValue', width: '6%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '操作', scopedSlots: { customRender: 'action' }, width: '12%', align: 'center' }
       ]
-      if (this.$hasPermissions('B_isShowPrice')) { //  售价权限
-        arr.splice(6, 0, { title: '销售金额', dataIndex: 'totalAmount', width: '6%', align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } })
-      }
       return arr
     }
   },
   methods: {
-    //  审核时间  change
-    dateAuditChange (date) {
+    //  创建时间  change
+    dateChange (date) {
       this.queryParam.beginDate = date[0] ? date[0] + ' 00:00:00' : ''
       this.queryParam.endDate = date[1] ? date[1] + ' 23:59:59' : ''
     },
-    //  收款时间  change
-    dateSettleChange (date) {
-      this.queryParam.beginDateSettle = date[0] ? date[0] + ' 00:00:00' : ''
-      this.queryParam.endDateSettle = date[1] ? date[1] + ' 23:59:59' : ''
+    //  审核时间  change
+    dateAuditChange (date) {
+      this.queryParam.auditBeginDate = date[0] ? date[0] + ' 00:00:00' : ''
+      this.queryParam.auditEndDate = date[1] ? date[1] + ' 23:59:59' : ''
     },
     //  重置
     resetSearchForm () {
-      this.$refs.rangeAuditDate.resetDate(this.auditDate)
-      if (this.advanced) { //  查询条件未展开时,该组件未渲染
-        this.$refs.rangeSettleDate.resetDate()
+      this.creatDate = []
+      this.$refs.rangeDate.resetDate(this.creatDate)
+      this.queryParam.beginDate = ''
+      this.queryParam.endDate = ''
+      this.auditDate = []
+      if (this.advanced) {
+        this.$refs.rangeAuditDate.resetDate(this.auditDate)
       }
-      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime + ' 00:00:00'
-      this.queryParam.endDate = getDate.getCurrMonthDays().endtime + ' 23:59:59'
-      this.queryParam.bizNo = ''
+      this.queryParam.auditBeginDate = ''
+      this.queryParam.auditEndDate = ''
+      this.queryParam.bookNo = ''
       this.queryParam.dispatchBillNo = ''
-      this.queryParam.beginDateSettle = ''
-      this.queryParam.endDateSettle = ''
-      this.queryParam.settleClientName = ''
-      this.queryParam.dealerLevel = undefined
-      this.queryParam.settleStyle = undefined
-      this.queryParam.subareaSn = undefined
-      this.queryParam.billStatus = undefined
-      this.queryParam.settleState = undefined
-      this.queryParam.voidFlag = undefined
-      this.queryParam.dealerProvinceSn = undefined
-      this.queryParam.dealerCitySn = undefined
-      this.queryParam.dealerCountySn = undefined
+      this.queryParam.applyPersonSn = undefined
+      this.queryParam.bookReason = ''
+      this.queryParam.status = undefined
       this.$refs.table.refresh(true)
     },
+    // 新增
+    handleAdd () {
+      this.baseModal = true
+    },
+    // 查看关联备货单
+    handleBhDetail (row) {
+      this.openDisModal = true
+      this.itemSn = row.bookSn
+      this.$nextTick(() => {
+        this.$refs.openDisModal.setDetail(row)
+      })
+    },
     // 详情
     handleDetail (row) {
-      this.$router.push({ name: 'salesDetail', params: { sn: row.bizSn, type: 'financialCollection' } })
+      this.$router.push({ name: 'financialCollectionDetail', params: { sn: row.bookSn } })
     },
-    handleBhDetail (row) {
-      this.$router.push({ name: 'pushOrderDetail', params: { sn: row.dispatchBillSn, type: 'financialCollection' } })
+    // 编辑
+    handleEdit (row) {
+      this.$router.push({ name: 'financialCollectionEdit', params: { sn: row.bookSn } })
     },
-    // 收款
-    handleAudit (row) {
+    // 删除
+    handleDel (row) {
       const _this = this
       this.$confirm({
         title: '提示',
-        content: '确认要收款吗?',
+        content: '确认要删除吗?',
         centered: true,
+        closable: true,
         onOk () {
           _this.spinning = true
-          settleReceipt({ sn: row.accountReceiptSn }).then(res => {
+          financeBookDeleteBySn({ bookSn: row.bookSn }).then(res => {
             if (res.status == 200) {
               _this.$message.success(res.message)
               _this.$refs.table.refresh()
@@ -322,49 +287,28 @@ export default {
         }
       })
     },
-    // 获取城市列表
-    getCityList (val) {
-      this.addrCityList = []
-      this.addrDistrictList = []
-      this.queryParam.dealerCitySn = undefined
-      this.queryParam.dealerCountySn = undefined
-      if (val) {
-        this.getArea('city', val)
-      }
+    // 审核进度
+    handleSH (row) {
+      this.openModal = true
+      this.itemSn = row.bookSn
     },
-    // 获取区县列表
-    getAreaList (val) {
-      this.addrDistrictList = []
-      this.queryParam.dealerCountySn = undefined
-      if (val) {
-        this.getArea('district', val)
-      }
-    },
-    //  省/市/区
-    getArea (leve, sn) {
-      let params
-      if (leve == 'province') {
-        params = { type: '2' }
-      } else {
-        params = { parentId: sn, type: leve == 'city' ? '3' : '4' }
-      }
-      getArea(params).then(res => {
-        if (res.status == 200) {
-          if (leve == 'province') {
-            this.addrProvinceList = res.data || []
-          } else if (leve == 'city') {
-            this.addrCityList = res.data || []
-          } else if (leve == 'district') {
-            this.addrDistrictList = res.data || []
-          }
-        } else {
-          if (leve == 'province') {
-            this.addrProvinceList = []
-          } else if (leve == 'city') {
-            this.addrCityList = []
-          } else if (leve == 'district') {
-            this.addrDistrictList = []
-          }
+    // 再次编辑
+    againEdit (row) {
+      const _this = this
+      this.$confirm({
+        title: '操作提示',
+        content: '系统将自动生成一个新的财务收款单,与原审核不通过的单据内容相同。您可以对新单据进行编辑、提交等操作,原单据保持不变,确认操作吗?',
+        centered: true,
+        closable: true,
+        onOk () {
+          _this.spinning = true
+          financeBookDgainEditBySn({ bookSn: row.bookSn }).then(res => {
+            if (res.status == 200) {
+              _this.$message.success(res.message)
+              _this.resetSearchForm()
+            }
+            _this.spinning = false
+          })
         }
       })
     },
@@ -373,11 +317,10 @@ export default {
       this.$nextTick(() => { // 页面渲染完成后的回调
         _this.setTableH()
       })
-      this.getArea('province')
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 195
+      this.tableHeight = window.innerHeight - tableSearchH - 235
     }
   },
   watch: {

+ 98 - 0
src/views/financialManagement/financialCollection/verifyModal.vue

@@ -0,0 +1,98 @@
+<template>
+  <a-modal
+    centered
+    :footer="null"
+    :maskClosable="false"
+    title="财务收款单审核进度"
+    v-model="isShow"
+    @cancel="isShow=false"
+    width="50%">
+    <p>说明:以下信息来自钉钉</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,
+      columns: [{ title: '序号', dataIndex: 'no', width: '8%', align: 'center' },
+        { title: '人员姓名', width: '12%', dataIndex: 'userName', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '人员类型', dataIndex: 'userType', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '状态', dataIndex: 'state', width: '10%', align: 'center', customRender: function (text) { return text || '--' } },
+        { title: '审批意见', dataIndex: 'remark', width: '20%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
+        { title: '附件', dataIndex: 'hasAttachments', width: '20%', align: 'center', customRender: function (text) { return text != '0' ? '请在钉钉中查看附件内容' : '--' } },
+        { title: '操作时间', dataIndex: 'date', width: '20%', align: 'center', customRender: function (text) { return text || '--' } }],
+      // 加载数据方法 必须为 Promise 对象
+      loadData: parameter => {
+        this.spinning = true
+        delete parameter.tableId
+        delete parameter.index
+        return getProcessInstance({ businessType: 'FINANCE_BOOK', businessSn: this.itemSn }).then(res => {
+          let data
+          if (res.status == 200) {
+            data = res.data
+            const no = 0
+            for (var i = 0; i < data.length; i++) {
+              data[i].no = no + i + 1
+            }
+            this.disabled = false
+          }
+          this.spinning = false
+          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>

+ 1 - 1
src/views/financialManagement/returnConfirmation/detailModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="详情"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="960">
     <div>
       <!-- <div style="padding: 0 12px;text-align: right;">

+ 1 - 1
src/views/financialManagement/warehousingConfirmation/detailModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="详情"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="960">
     <div>
       <a-descriptions size="small" :column="3" style="margin-bottom: 10px;">

+ 1 - 1
src/views/financialManagement/warehousingConfirmation/list.vue

@@ -76,7 +76,7 @@
       :footer="null"
       :maskClosable="false"
       v-model="confirmationModal"
-      @cancle="confirmationModal=false"
+      @cancel="confirmationModal=false"
       :width="416">
       <div class="confirmation-main">
         <a-icon type="question-circle" style="color: #faad14;font-size: 22px;margin-right: 16px;" />

+ 1 - 1
src/views/inventoryManagement/intelligentReplenishment/detailModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="预测单详情"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="800">
     <a-spin :spinning="spinning" tip="Loading...">
       <div>

+ 1 - 1
src/views/inventoryManagement/intelligentReplenishment/serviceLevelModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="选择服务水平"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="800">
     <div>
       <s-table

+ 1 - 1
src/views/inventoryManagement/inventoryCheck/addModal.vue

@@ -7,7 +7,7 @@
     :closable="false"
     title="新增盘点单"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="600">
     <a-spin :spinning="spinning" tip="Loading...">
       <div>

+ 1 - 1
src/views/inventoryManagement/inventoryQuery/detailModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="库存详情"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="960">
     <!-- 合计 -->
     <a-alert type="info" style="margin-bottom:10px">

+ 1 - 1
src/views/inventoryManagement/inventoryQuery/exportExcelModal.vue

@@ -6,7 +6,7 @@
     class="export-excel-modal"
     title="选择导出方式"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="600">
     <a-spin :spinning="spinning" tip="Loading...">
       <a-form-model

+ 3 - 31
src/views/inventoryManagement/makeInventory/check.vue

@@ -150,8 +150,6 @@
       @close="visiblePrint=false"
       @ok="printOkText == '好的' ? visiblePrint=false : handlePrint('print')"
       @fail="handlePrint('preview')" />
-    <!-- 打印 -->
-    <div id="print"></div>
   </div>
 </template>
 
@@ -160,6 +158,7 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import tablePagination from '@/views/common/tablePagination.vue'
 import printModal from '@/views/common/auditModal.vue'
+import { printFun, exportExcel } from '@/libs/JGPrint.js'
 import { checkWarehouseDetail, checkWarehouseDetailList, checkWarehouseDetailCount, checkWarehouseDetailPrint, checkWarehousePrintCheck, checkWarehouseDetailSave, checkWarehouseCheck } from '@/api/checkWarehouse'
 export default {
   name: 'MakeInventoryCheck',
@@ -382,35 +381,8 @@ export default {
     handlePrint (type) {
       const _this = this
       _this.spinningPrint = true
-      checkWarehouseDetailPrint({ checkWarehouseSn: this.$route.params.sn, type: 'CHECK_WAREHOUSE' }).then(res => {
-        _this.spinningPrint = false
-        if (res.type == 'application/json') {
-          var reader = new FileReader()
-          reader.addEventListener('loadend', function () {
-            const obj = JSON.parse(reader.result)
-            _this.$notification.error({
-              message: '提示',
-              description: obj.message
-            })
-          })
-          reader.readAsText(res)
-        } else {
-          this.print(res, type)
-        }
-      })
-    },
-    print (data, type) {
-      if (!data) {
-        return
-      }
-      const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
-      document.getElementById('print').innerHTML = '<iframe id="printfbod" name="printfbod" src="' + url + '" hidden></iframe>'
-      if (type == 'preview') { //  预览
-        window.open(url)
-      } else if (type == 'print') { //  打印
-        window.frames['printfbod'].focus()
-        window.frames['printfbod'].print()
-      }
+      const params = { checkWarehouseSn: this.$route.params.sn, type: 'CHECK_WAREHOUSE' }
+      printFun(checkWarehouseDetailPrint, params, type, '盘点单', () => { _this.spinningPrint = false })
     }
   },
   mounted () {

+ 3 - 31
src/views/inventoryManagement/supervisionDisk/check.vue

@@ -159,8 +159,6 @@
       @close="visiblePrint=false"
       @ok="printOkText == '好的' ? visiblePrint=false : handlePrint('print')"
       @fail="handlePrint('preview')" />
-    <!-- 打印 -->
-    <div id="print"></div>
   </div>
 </template>
 
@@ -169,6 +167,7 @@ import { commonMixin } from '@/utils/mixin'
 import { STable, VSelect } from '@/components'
 import tablePagination from '@/views/common/tablePagination.vue'
 import printModal from '@/views/common/auditModal.vue'
+import { printFun, exportExcel } from '@/libs/JGPrint.js'
 import { checkWarehouseDetail, checkWarehouseDetailList, checkWarehouseDetailCount, checkWarehouseDetailPrint, checkWarehousePrintCheck, checkWarehouseDetailSave, checkWarehouseSupervise, checkWarehouseReCheck } from '@/api/checkWarehouse'
 export default {
   name: 'SupervisionDiskCheck',
@@ -414,35 +413,8 @@ export default {
     handlePrint (type) {
       const _this = this
       _this.spinningPrint = true
-      checkWarehouseDetailPrint({ checkWarehouseSn: this.$route.params.sn, type: 'CHECK_WAREHOUSE_SUPERVISE' }).then(res => {
-        _this.spinningPrint = false
-        if (res.type == 'application/json') {
-          var reader = new FileReader()
-          reader.addEventListener('loadend', function () {
-            const obj = JSON.parse(reader.result)
-            _this.$notification.error({
-              message: '提示',
-              description: obj.message
-            })
-          })
-          reader.readAsText(res)
-        } else {
-          this.print(res, type)
-        }
-      })
-    },
-    print (data, type) {
-      if (!data) {
-        return
-      }
-      const url = window.URL.createObjectURL(new Blob([data], { type: 'application/pdf' }))
-      document.getElementById('print').innerHTML = '<iframe id="printfbod" name="printfbod" src="' + url + '" hidden></iframe>'
-      if (type == 'preview') { //  预览
-        window.open(url)
-      } else if (type == 'print') { //  打印
-        window.frames['printfbod'].focus()
-        window.frames['printfbod'].print()
-      }
+      const params = { checkWarehouseSn: this.$route.params.sn, type: 'CHECK_WAREHOUSE_SUPERVISE' }
+      printFun(checkWarehouseDetailPrint, params, type, '盘点单', () => { _this.spinningPrint = false })
     }
   },
   mounted () {

+ 1 - 1
src/views/power/dataDictionary/codeItemModal.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <a-modal class="modalBox" :title="titleText" v-model="isshow" @cancle="cancel">
+    <a-modal class="modalBox" :title="titleText" v-model="isshow" @cancel="cancel">
       <a-form :form="form" @submit="handleSubmit">
         <a-row :gutter="24">
           <a-col :span="24">

+ 1 - 1
src/views/power/dataDictionary/codeModal.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <a-modal class="modalBox" :title="titleText" v-model="isshow" @cancle="cancel">
+    <a-modal class="modalBox" :title="titleText" v-model="isshow" @cancel="cancel">
       <a-form :form="form" @submit="handleSubmit">
         <!-- 类别编码 -->
         <a-form-item label="类别编码" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">

+ 1 - 1
src/views/power/menu/childModal.vue

@@ -1,6 +1,6 @@
 <template>
   <div>
-    <a-modal class="modalBox" :title="titleText" v-model="isshow" @cancle="cancel">
+    <a-modal class="modalBox" :title="titleText" v-model="isshow" @cancel="cancel">
       <a-form :form="form" @submit="handleSubmit">
         <!-- 上级菜单 -->
         <a-form-item label="上级菜单" :label-col="{ span: 5 }" :wrapper-col="{ span: 14 }">

+ 1 - 1
src/views/power/role/menuModal.vue

@@ -7,7 +7,7 @@
       :maskClosable="false"
       :title="titleText"
       v-model="isshow"
-      @cancle="isshow=false"
+      @cancel="isshow=false"
       :width="800">
       <a-spin :spinning="spinning" tip="Loading...">
         <a-form-model

+ 1 - 1
src/views/power/role/roleModal.vue

@@ -7,7 +7,7 @@
       :maskClosable="false"
       :title="titleText"
       v-model="isshow"
-      @cancle="isshow=false"
+      @cancel="isshow=false"
       :width="800">
       <a-spin :spinning="spinning" tip="Loading...">
         <a-form-model

+ 1 - 1
src/views/power/user/updateAreal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     :title="title"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="600">
     <div>
       <a-spin :spinning="spinning" tip="Loading...">

+ 1 - 1
src/views/power/user/userModal.vue

@@ -7,7 +7,7 @@
       :maskClosable="false"
       :title="titleText"
       v-model="isshow"
-      @cancle="isshow=false"
+      @cancel="isshow=false"
       :width="800">
       <a-spin :spinning="spinning" tip="Loading...">
         <a-form-model

+ 1 - 1
src/views/productManagement/productBrand/detailModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="产品详情"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="960">
     <div>
       <a-descriptions bordered size="small" :column="1">

+ 1 - 1
src/views/productManagement/productBrand/editModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     :title="modalTit"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="960">
     <!-- 表单 -->
     <div>

+ 1 - 1
src/views/productManagement/productBrand/list.vue

@@ -88,7 +88,7 @@
       :maskClosable="false"
       title="品牌图片"
       v-model="openPicModal"
-      @cancle="nowPic=''">
+      @cancel="nowPic=''">
       <img :src="nowPic" width="100%" />
     </a-modal>
   </a-card>

+ 1 - 1
src/views/productManagement/productCategory/editModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     :title="modalTit"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="800">
     <!-- 表单 -->
     <div>

+ 1 - 1
src/views/productManagement/productInfo/detailModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="产品详情"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="800">
     <!-- 产品详情 -->
     <div>

+ 1 - 1
src/views/productManagement/productInfo/offlineModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="提示"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="800">
     <p v-if="loadData.length==1" style="font-weight: bold;margin-left: 20px;">确认要下线吗?</p>
     <p v-else style="font-weight: bold;margin-left: 20px;">已选有效数据{{ loadData.length }}条,确认要批量下线吗?</p>

+ 1 - 1
src/views/productManagement/productLevel/editModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="编辑价格"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="800">
     <!-- 编辑价格 -->
     <div>

+ 1 - 1
src/views/productManagement/productPricing/auditModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="定价审核"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="800">
     <a-spin :spinning="spinning" tip="Loading...">
       <!-- 定价审核 -->

+ 1 - 1
src/views/productManagement/productPricing/editModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     title="编辑价格"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="800">
     <!-- 编辑价格 -->
     <div>

+ 1 - 1
src/views/productManagement/productUniversal/editModal.vue

@@ -6,7 +6,7 @@
     :maskClosable="false"
     :title="modalTit"
     v-model="isShow"
-    @cancle="isShow=false"
+    @cancel="isShow=false"
     :width="800">
     <div>
       <a-spin :spinning="spinning" tip="Loading...">

Certains fichiers n'ont pas été affichés car il y a eu trop de fichiers modifiés dans ce diff