Kaynağa Gözat

Merge branch 'feature/Feature-basic_data' of https://gogs.zfire.top/zfire-front/supply-front into feature/Feature-basic_data

chen 3 yıl önce
ebeveyn
işleme
4a1a7b4500
100 değiştirilmiş dosya ile 14306 ekleme ve 3108 silme
  1. 51 0
      src/api/basic_data/material.js
  2. 1 1
      src/api/common.js
  3. 26 0
      src/api/finance/change_apply.js
  4. 43 0
      src/api/finance/change_list.js
  5. 51 0
      src/api/finance/credit_list.js
  6. 18 0
      src/api/finance/standbook_list.js
  7. 26 0
      src/api/finance/wallet.js
  8. 9 0
      src/api/setting.js
  9. 28 1
      src/api/stock.js
  10. 109 0
      src/api/supply/apply.js
  11. 19 0
      src/api/supply/displace.js
  12. 20 2
      src/api/supply/engin.js
  13. 19 0
      src/api/supply/implement.js
  14. 27 0
      src/api/supply/purchase.js
  15. 195 0
      src/api/supply/retail.js
  16. 257 2
      src/api/supply/sales.js
  17. 1 2
      src/components/Common/image-upload.vue
  18. 2 2
      src/layout/components/AppMain.vue
  19. 1 3
      src/main.js
  20. 11 1
      src/mixin/index.js
  21. 2 1
      src/store/getters.js
  22. 3 1
      src/store/index.js
  23. 45 0
      src/store/modules/sales.js
  24. 6 2
      src/store/modules/user.js
  25. 1 0
      src/utils/index.js
  26. 22 19
      src/views/basic_data/dealer/dealer_stock.vue
  27. 443 0
      src/views/basic_data/material/classify_list.vue
  28. 118 0
      src/views/basic_data/material/components/classify_list-small.vue
  29. 5 3
      src/views/basic_data/material/relation_list.vue
  30. 101 85
      src/views/basic_data/warehouse/warehouse_site.vue
  31. 221 0
      src/views/engin_deposit/components/deposit-apply-deduction.vue
  32. 221 0
      src/views/engin_deposit/components/deposit-apply-surrender.vue
  33. 307 0
      src/views/engin_deposit/components/deposit_list-detail.vue
  34. 286 0
      src/views/engin_deposit/components/nodeduct_list-detail.vue
  35. 286 0
      src/views/engin_deposit/components/refund_list-detail.vue
  36. 259 0
      src/views/engin_deposit/deposit_list.vue
  37. 219 0
      src/views/engin_deposit/nodeduct_list.vue
  38. 47 58
      src/views/engin_deposit/refund_list.vue
  39. 1 1
      src/views/finance/account_list.vue
  40. 114 134
      src/views/finance/balance_sum.vue
  41. 222 0
      src/views/finance/change_apply.vue
  42. 393 0
      src/views/finance/change_list.vue
  43. 1 1
      src/views/finance/components/account_list-detail.vue
  44. 14 38
      src/views/finance/components/balance_sum-detail.vue
  45. 179 0
      src/views/finance/components/change_list-detail.vue
  46. 210 0
      src/views/finance/components/change_list-examine.vue
  47. 251 0
      src/views/finance/components/change_list-review.vue
  48. 116 22
      src/views/finance/components/credit_list-detail.vue
  49. 285 0
      src/views/finance/components/rebate_list-apply.vue
  50. 41 24
      src/views/finance/components/rebate_list-detail.vue
  51. 175 0
      src/views/finance/components/rebate_list-examine.vue
  52. 287 0
      src/views/finance/components/rebate_list-review.vue
  53. 200 0
      src/views/finance/components/receipt_list-detail.vue
  54. 61 86
      src/views/finance/components/receivable_list-add.vue
  55. 88 104
      src/views/finance/components/receivable_list-approval.vue
  56. 251 0
      src/views/finance/components/receivable_list-detail.vue
  57. 280 50
      src/views/finance/credit_list.vue
  58. 9 2
      src/views/finance/finance_sum.vue
  59. 132 0
      src/views/finance/rebate_form.vue
  60. 155 17
      src/views/finance/rebate_list.vue
  61. 240 0
      src/views/finance/receipt_list.vue
  62. 231 0
      src/views/finance/receivable_list.vue
  63. 512 0
      src/views/finance/standbook_list.vue
  64. 123 360
      src/views/finance/wallet.vue
  65. 108 91
      src/views/sales_policy/codealer_list.vue
  66. 550 70
      src/views/sales_policy/components/AddCondition.vue
  67. 2 16
      src/views/sales_policy/components/AddModel.vue
  68. 472 279
      src/views/sales_policy/components/AddPolicy.vue
  69. 173 163
      src/views/sales_policy/components/Distributor.vue
  70. 380 228
      src/views/sales_policy/components/Examine.vue
  71. 16 297
      src/views/sales_policy/components/TabelTransfer.vue
  72. 129 173
      src/views/sales_policy/components/Transfer.vue
  73. 413 190
      src/views/sales_policy/policy_list.vue
  74. 278 82
      src/views/sales_rebate/rebate_list.vue
  75. 206 131
      src/views/sales_rebate/salestype_list.vue
  76. 30 3
      src/views/setting/account.vue
  77. 166 0
      src/views/setting/api.vue
  78. 86 0
      src/views/setting/other.vue
  79. 43 55
      src/views/stock/reserved_stock.vue
  80. 56 56
      src/views/stock/stock_list.vue
  81. 5 0
      src/views/supply/apply.vue
  82. 320 0
      src/views/supply/apply/apply_list.vue
  83. 296 0
      src/views/supply/apply/components/apply_detail.vue
  84. 294 0
      src/views/supply/apply/components/apply_examine.vue
  85. 541 0
      src/views/supply/apply/components/apply_form.vue
  86. 321 0
      src/views/supply/apply/components/engin_detail.vue
  87. 247 0
      src/views/supply/apply/components/engin_examine.vue
  88. 1 1
      src/views/supply/apply/components/engin_return.vue
  89. 25 20
      src/views/supply/apply/engin_list.vue
  90. 1 1
      src/views/supply/deliver/engin_list.vue
  91. 5 0
      src/views/supply/displace.vue
  92. 206 0
      src/views/supply/displace/components/displace_detail.vue
  93. 185 0
      src/views/supply/displace/components/displace_form.vue
  94. 263 0
      src/views/supply/displace/displace_list.vue
  95. 288 0
      src/views/supply/engin/commerce_list.vue
  96. 2 2
      src/views/supply/engin/components/commerce_detail.vue
  97. 2 2
      src/views/supply/engin/components/commerce_examine.vue
  98. 2 2
      src/views/supply/engin/components/commerce_form.vue
  99. 2 2
      src/views/supply/engin/components/commerce_return.vue
  100. 115 222
      src/views/supply/engin/components/engin_detail.vue

+ 51 - 0
src/api/basic_data/material.js

@@ -227,3 +227,54 @@ export function getRebate(params) {
     params
   })
 }
+
+//产品品类
+
+//产品品类列表
+export function getProductCategoryList(params) {
+  return request({
+    url:'/product-category/list',
+    method: 'get',
+    params
+  })
+}
+//产品品类小类列表
+export function getProductCategorySubList(params) {
+  return request({
+    url:'/product-category/sub-list',
+    method: 'get',
+    params
+  })
+}
+//新增产品品类
+export function getProductCategoryAdd(data) {
+  return request({
+    url:'/product-category/add',
+    method: 'post',
+    data
+  })
+}
+//编辑产品品类
+export function getProductCategoryEdit(data) {
+  return request({
+    url:'/product-category/edit',
+    method: 'post',
+    data
+  })
+}
+//金蝶存货类别列表
+export function getProductCategoryKingDeeCategoryList() {
+  return request({
+    url:'/product-category/king-dee-category-list',
+    method: 'get',
+    
+  })
+}
+//新增产品品类小类
+export function getProductCategoryAddSub(data) {
+  return request({
+    url:'/product-category/add-sub',
+    method: 'post',
+    data
+  })
+}

+ 1 - 1
src/api/common.js

@@ -10,7 +10,7 @@ export function getDictList(params) {
 }
 
 // 销售列表
-export function getTypeList() {
+export function getTypeList(params) {
   return request({
     url: '/sale/type/list',
     method: 'get',

+ 26 - 0
src/api/finance/change_apply.js

@@ -0,0 +1,26 @@
+import request from '@/utils/request'
+//经销商钱包列表
+export function getWalletCustomerList(params) {
+    return request({
+      url: '/wallet/customer/list',
+      method: 'get',
+      params
+    })
+  }
+
+//用户详情
+export function getUserInfo(params) {
+    return request({
+      url: '/admin/user/detail',
+      method: 'get',
+      params
+    })
+  }
+//返利互转-新增
+export function getTransferAdd(params) {
+    return request({
+      url: '/finance/transfer/add',
+      method: 'post',
+      params
+    })
+  }

+ 43 - 0
src/api/finance/change_list.js

@@ -0,0 +1,43 @@
+import request from '@/utils/request'
+
+// 获取列表
+export function getChangeList(params) {
+  return request({
+    url: '/finance/transfer/list',
+    method: 'get',
+    params
+  })
+}
+//列表详情
+export function getChangeListDetail(params) {
+    return request({
+      url: '/finance/transfer/detail',
+      method: 'get',
+      params
+    })
+  }
+//返利互转-审核
+export function getChangeListExamine(params) {
+    return request({
+      url: '/finance/transfer/examine',
+      method: 'post',
+      params
+    })
+  }
+//返利互转-提审
+export function getTransferSubmit(params) {
+  return request({
+    url: '/finance/transfer/apply',
+    method: 'post',
+    params
+  })
+}
+//返利互转-修改
+export function getTransferEdit(params) {
+  return request({
+    url: '/finance/transfer/update',
+    method: 'post',
+    params
+  })
+}
+

+ 51 - 0
src/api/finance/credit_list.js

@@ -0,0 +1,51 @@
+import request from '@/utils/request'
+
+// 信用额度列表-新增
+export function getCreditListAdd(params) {
+    return request({
+      url: '/credit/add',
+      method: 'post',
+      params
+    })
+  }
+// 信用额度列表
+export function getCreditList(params) {
+    return request({
+      url: '/credit/list',
+      method: 'get',
+      params
+    })
+  }
+// 设置信用额度
+export function getCreditListEdit(params) {
+    return request({
+      url: '/credit/record/add',
+      method: 'post',
+      params
+    })
+  }
+// 信用额度列表-导出
+export function getCreditListExport(params) {
+    return request({
+      url: '/credit/exportData',
+      method: 'get',
+      params
+    })
+  }
+//信用额度记录-导出
+export function getCreditExport(params) {
+    return request({
+      url: '/credit/record/export',
+      method: 'get',
+      params
+    })
+  }
+// 信用额度记录
+export function getCredit(params) {
+    return request({
+      url: '/credit/record/list',
+      method: 'get',
+      params
+    })
+  }
+

+ 18 - 0
src/api/finance/standbook_list.js

@@ -0,0 +1,18 @@
+import request from '@/utils/request'
+
+// 台账列表
+export function getStandbookList(params) {
+    return request({
+      url: '/finance/standing/book/list',
+      method: 'get',
+      params
+    })
+  }
+// 字典
+export function getDictList(params) {
+    return request({
+      url: '/common/dict/list',
+      method: 'get',
+      params
+    })
+  }

+ 26 - 0
src/api/finance/wallet.js

@@ -0,0 +1,26 @@
+import request from '@/utils/request'
+
+// 返利钱包列表
+export function getRebateList(params) {
+    return request({
+      url: '/wallet/rebate/list',
+      method: 'get',
+      params
+    })
+  }
+// 钱包列表(非返利钱包)
+export function getWalletList(params) {
+    return request({
+      url: '/wallet/list',
+      method: 'get',
+      params
+    })
+  }
+// 经销商一键生成钱包
+export function getfinanceInit(params) {
+    return request({
+      url: '/finance/init',
+      method: 'post',
+      params
+    })
+  }

+ 9 - 0
src/api/setting.js

@@ -369,6 +369,15 @@ export function getMerchantList(params) {
   })
 }
 
+// 获取经销商列表
+export function getDealerList(params) {
+  return request({
+    url: '/customer/list',
+    method: 'get',
+    params
+  })
+}
+
 // 获取用户协议
 export function getAgreement(params) {
   return request({

+ 28 - 1
src/api/stock.js

@@ -3,7 +3,34 @@ import request from '@/utils/request'
 // 获取库存列表
 export function getStockList(params) {
   return request({
-    url: '/admin/user/mch/list',
+    url: '/stock/manager/list',
+    method: 'get',
+    params
+  })
+}
+
+// 获取仓库列表
+export function getWarehouseList(params) {
+  return request({
+    url: '/stock/list',
+    method: 'get',
+    params
+  })
+}
+
+// 获取销售类型列表
+export function getSalesTypeList(params) {
+  return request({
+    url: '/sale/type/list',
+    method: 'get',
+    params
+  })
+}
+
+// 获取预留库存列表
+export function getReservedList(params) {
+  return request({
+    url: '/stock/manager/listCustomer',
     method: 'get',
     params
   })

+ 109 - 0
src/api/supply/apply.js

@@ -0,0 +1,109 @@
+import request from '@/utils/request'
+
+// 获取列表
+export function getApplyList(params) {
+  return request({
+    url: '/invoice/list',
+    method: 'get',
+    params
+  })
+}
+
+// 获取详情
+export function getApplyDetail(params) {
+  return request({
+    url: '/invoice/detail',
+    method: 'get',
+    params
+  })
+}
+
+// 审批
+export function examineApply(params) {
+  return request({
+    url: '/invoice/approvalInvoice',
+    method: 'post',
+    data: params
+  })
+}
+
+// 获取仓位列表
+export function getPositionList(params) {
+  return request({
+    url: '/stock/listPosition',
+    method: 'get',
+    params
+  })
+}
+
+// 检查库存
+export function checkStock(params) {
+  return request({
+    url: '/invoice/stockNumber',
+    method: 'get',
+    params
+  })
+}
+
+// 申请/撤回
+export function submitApply(params) {
+  return request({
+    url: '/invoice/submit',
+    method: 'post',
+    params
+  })
+}
+
+// 删除
+export function deleteApply(params) {
+  return request({
+    url: '/invoice/delete',
+    method: 'post',
+    params
+  })
+}
+
+// 新增
+export function addApply(params) {
+  return request({
+    url: '/invoice/add',
+    method: 'post',
+    data: params
+  })
+}
+
+// 编辑
+export function editApply(params) {
+  return request({
+    url: '/invoice/update',
+    method: 'post',
+    data: params
+  })
+}
+
+// 获取仓库列表
+export function getWarehouseList(params) {
+  return request({
+    url: '/stock/listStock',
+    method: 'get',
+    params
+  })
+}
+
+// 获取产品列表
+export function getGoodsList(params) {
+  return request({
+    url: '/retail/list',
+    method: 'get',
+    params
+  })
+}
+
+// 获取经销商列表
+export function getDealerList(params) {
+  return request({
+    url: '/customer/list',
+    method: 'get',
+    params
+  })
+}

+ 19 - 0
src/api/supply/displace.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request'
+
+// 获取列表
+export function getList(params) {
+  return request({
+    url: '/retreat/list',
+    method: 'get',
+    params
+  })
+}
+
+// 获取详情
+export function getDetail(params) {
+  return request({
+    url: '/retreat/detail',
+    method: 'get',
+    params
+  })
+}

+ 20 - 2
src/api/supply/engin.js

@@ -3,7 +3,7 @@ import request from '@/utils/request'
 // 获取列表
 export function getList(params) {
   return request({
-    url: '/ship/list',
+    url: '/engin-info-order/list',
     method: 'get',
     params
   })
@@ -12,7 +12,25 @@ export function getList(params) {
 // 获取详情
 export function getDetail(params) {
   return request({
-    url: '/ship/detail',
+    url: '/retail/detail',
+    method: 'get',
+    params
+  })
+}
+
+// 获取列表
+export function getEnginList(params) {
+  return request({
+    url: '/engin-info-order/list',
+    method: 'get',
+    params
+  })
+}
+
+// 获取详情
+export function getEnginDetail(params) {
+  return request({
+    url: '/engin-info-order/detail',
     method: 'get',
     params
   })

+ 19 - 0
src/api/supply/implement.js

@@ -0,0 +1,19 @@
+import request from '@/utils/request'
+
+// 获取列表
+export function getList(params) {
+  return request({
+    url: '/transfer/list',
+    method: 'get',
+    params
+  })
+}
+
+// 获取详情
+export function getDetail(params) {
+  return request({
+    url: '/transfer/detail',
+    method: 'get',
+    params
+  })
+}

+ 27 - 0
src/api/supply/purchase.js

@@ -34,4 +34,31 @@ export function getEnterDetail(params) {
     method: 'get',
     params
   })
+}
+
+// 获取采购计划单列表
+export function getPlanList(params) {
+  return request({
+    url: '/plan/list',
+    method: 'get',
+    params
+  })
+}
+
+// 获取经销商采购计划单汇总列表
+export function getSumList(params) {
+  return request({
+    url: '/plan/listCustomer',
+    method: 'get',
+    params
+  })
+}
+
+// 提交经销商采购计划单
+export function submitPlan(params) {
+  return request({
+    url: '/plan/submitPlan',
+    method: 'post',
+    data: params
+  })
 }

+ 195 - 0
src/api/supply/retail.js

@@ -0,0 +1,195 @@
+import request from '@/utils/request'
+
+// 获取列表
+export function getList(params) {
+  return request({
+    url: '/retail/list',
+    method: 'get',
+    params
+  })
+}
+
+// 获取详情
+export function getDetail(params) {
+  return request({
+    url: '/retail/detail',
+    method: 'get',
+    params
+  })
+}
+
+// 关闭
+export function closeData(params) {
+  return request({
+    url: '/retail/close',
+    method: 'post',
+    params
+  })
+}
+
+// 审批
+export function examineData(params) {
+  return request({
+    url: '/retail/examine',
+    method: 'post',
+    params
+  })
+}
+
+// 退订
+export function returnData(params) {
+  return request({
+    url: '/retail/return',
+    method: 'post',
+    params
+  })
+}
+
+// 提交审核
+export function submitData(params) {
+  return request({
+    url: '/retail/submit',
+    method: 'post',
+    params
+  })
+}
+
+// 新增
+export function addData(params) {
+  return request({
+    url: '/retail/add',
+    method: 'post',
+    data: params
+  })
+}
+
+// 编辑
+export function editData(params) {
+  return request({
+    url: '/retail/update',
+    method: 'post',
+    data: params
+  })
+}
+
+// 获取销售类型列表
+export function getSalesTypeList(params) {
+  return request({
+    url: '/sale/type/list',
+    method: 'get',
+    params
+  })
+}
+
+// 获取产品列表
+export function getGoodsList(params) {
+  return request({
+    url: '/retail/product/list',
+    method: 'get',
+    params
+  })
+}
+
+// 获取钱包列表
+export function getWalletList(params) {
+  return request({
+    url: '/wallet/customer/list',
+    method: 'get',
+    params
+  })
+}
+
+// 获取仓库列表
+export function getWarehouseList(params) {
+  return request({
+    url: '/stock/listStock',
+    method: 'get',
+    params
+  })
+}
+
+// 检查库存
+export function checkStock(params) {
+  return request({
+    url: '/stock/manager/stockStatus',
+    method: 'get',
+    params
+  })
+}
+
+
+export function submitCancel(params) {
+  return request({
+    url: '/retail/submit/cancel',
+    method: 'post',
+    params
+  })
+}
+// 销售类型
+export function typeList(params) {
+  return request({
+    url: '/sale/type/list',
+    method: 'get',
+    params
+  })
+}
+
+
+
+// 销售政策
+export function policyList(params) {
+  return request({
+    url: '/policy/list',
+    method: 'get',
+    params
+  })
+}
+
+// 根据政策id和物料id反查政策条件
+export function getpolicyList(params) {
+  return request({
+    url: '/policy/condition/get',
+    method: 'get',
+    params
+  })
+}
+
+//政策条件的机型列表
+export function getConditionList(params) {
+  return request({
+    url: '/policy/condition/material/list',
+    method: 'get',
+    params
+  })
+}
+
+
+
+export function getpolicyTypeList(params) {
+  return request({
+    url: '/policy/type1/material/list',
+    method: 'get',
+    params
+  })
+}
+
+
+
+export function getMaterialTypeList(params) {
+  return request({
+    url: '/policy/material/list',
+    method: 'get',
+    params
+  })
+}
+
+
+
+
+export function getConditionDetail(params) {
+  return request({
+    url: '/policy/condition/detail',
+    method: 'get',
+    params
+  })
+}

+ 257 - 2
src/api/supply/sales.js

@@ -1,9 +1,264 @@
 import request from '@/utils/request'
 
-// 获取列表
+
+// 销售政策
 export function getList(params) {
   return request({
-    url: '/admin/user/mch/list',
+    url: '/policy/list',
+    method: 'get',
+    params
+  })
+}
+//新增政策
+export function addPoliy(params) {
+  return request({
+    url: '/policy/add',
+    method: 'post',
+    data: params
+  })
+}
+//新增政策条件
+
+export function addPoliyCondition(params) {
+  return request({
+    url: '/policy/condition/add',
+    method: 'post',
+    data: params
+  })
+}
+//政策条件列表
+export function getConditionList(params) {
+  return request({
+    url: '/policy/condition/list',
+    method: 'get',
+    params
+  })
+}
+
+export function updatePolicy(params) {
+  return request({
+    url: '/policy/update',
+    method: 'post',
+    data: params
+  })
+}
+
+export function deletePolicy(params) {
+  return request({
+    url: '/policy/delete',
+    method: 'post',
+    params
+  })
+}
+
+export function getConditionMaterialDetail(params) {
+  return request({
+    url: '/policy/condition/detail',
+    method: 'post',
+    params
+  })
+}
+//政策条件的机型列表
+export function getConditionMaterialList(params) {
+  return request({
+    url: '/policy/condition/material/list',
+    method: 'get',
+    params
+  })
+}
+//经销商api
+
+export function getCrList(params) {
+  return request({
+    url: '/customer/list',
+    method: 'get',
+    params
+  })
+}
+
+//政策销售商列表
+export function getCustomerList(params) {
+  return request({
+    url: '/policy/customer/list',
+    method: 'get',
+    params
+  })
+}
+//获取销售政策编号
+export function getId(params) {
+  return request({
+    url: '/policy/id',
+    method: 'get',
+    params
+  })
+}
+
+
+
+export function deleteCondition(params) {
+  return request({
+    url: '/policy/condition/delete',
+    method: 'post',
+    params
+  })
+}
+export function toExamine(params) {
+  return request({
+    url: '/policy/examine',
+    method: 'post',
+    params
+  })
+}
+//导入政策货品
+// /policy/material/import
+
+//政策货品列表
+export function getMaterialList(params) {
+  return request({
+    url: '/policy/material/list',
+    method: 'get',
+    params
+  })
+}
+//提审政策
+export function getpolicySubmit(params) {
+  return request({
+    url: '/policy/policy/submit',
+    method: 'post',
+    params
+  })
+}
+
+//删除政策货品
+
+export function deleteMaterialPolicy(params) {
+  return request({
+    url: '/policy/material/delete',
+    method: 'post',
+    params
+  })
+}
+
+//获取经销商详情
+export function getPolicyDetail(params) {
+  return request({
+    url: '/policy/detail',
+    method: 'get',
+    params
+  })
+}
+
+// 对应经销商
+
+export function getCustomerlist(params) {
+  return request({
+    url: '/policy/customer_count/list',
+    method: 'get',
+    params
+  })
+}
+
+export function eidtBatch(params) {
+  return request({
+    url: '/policy/customer_count/batch',
+    method: 'post',
+    params
+  })
+}
+
+
+
+//销售类型
+
+export function getTypeList(params) {
+  return request({
+    url: '/sale/type/list',
+    method: 'get',
+    params
+  })
+}
+
+export function DeleteData(params) {
+  return request({
+    url: '/policy/material/delete',
+    method: 'psot',
+    params
+  })
+}
+
+export function addData(params) {
+  return request({
+    url: '/sale/type/add',
+    method: 'post',
+    data: params
+  })
+}
+
+export function delTypeData(params) {
+  return request({
+    url: '/sale/type/delete',
+    method: 'post',
+    params
+  })
+}
+
+export function getDetail(params) {
+  return request({
+    url: '/sale/type/detail',
+    method: 'post',
+    data: params
+  })
+}
+
+export function updateType(params) {
+  return request({
+    url: '/sale/type/update',
+    method: 'post',
+    data: params
+  })
+}
+
+// 返利钱包列表
+
+export function getWalletList(params) {
+  return request({
+    url: '/wallet/rebate/list',
+    method: 'get',
+    params
+  })
+}
+
+
+export function addWallet(params) {
+  return request({
+    url: '/wallet/add',
+    method: 'post',
+    data: params
+  })
+}
+
+
+export function getWalletDetail(params) {
+  return request({
+    url: '/wallet/rebate/detail',
+    method: 'get',
+    params
+  })
+}
+
+export function updateWallet(params) {
+  return request({
+    url: '/wallet/update',
+    method: 'post',
+    data: params
+  })
+}
+
+
+// 销售品类
+export function getDictList(params) {
+  return request({
+    url: '/common/dict/list',
     method: 'get',
     params
   })

+ 1 - 2
src/components/Common/image-upload.vue

@@ -96,7 +96,6 @@ export default {
       this.fileType.includes('excel') && (whiteList = whiteList.concat(excelList));
       this.fileType.includes('ppt') && (whiteList = whiteList.concat(pptList));
       this.fileType.includes('pdf') && (whiteList = whiteList.concat(pdfList));
-      
 			return whiteList.join(',');
 		},
 		previewImages() {
@@ -281,4 +280,4 @@ export default {
 	.uploader {
     height: 0;
   }
-</style>
+</style>

+ 2 - 2
src/layout/components/AppMain.vue

@@ -1,9 +1,9 @@
 <template>
   <section class="app-main">
     <transition name="fade-transform" mode="out-in">
-      <keep-alive :include="cachedViews">
+      <!-- <keep-alive :include="cachedViews"> -->
         <router-view :key="key" />
-      </keep-alive>
+      <!-- </keep-alive> -->
     </transition>
   </section>
 </template>

+ 1 - 3
src/main.js

@@ -32,9 +32,7 @@ Vue.component('ExportButton', ExportButton);
 import ImportButton from '@/components/Common/import-button.vue'
 Vue.component('ImportButton', ImportButton);
 
-
-Vue.prototype.$fileUrl = process.env.VUE_APP_BASE_API + 'common/file/get?key=';
-Vue.prototype.$imageUrl = process.env.VUE_APP_BASE_API + 'common/img/get?key=';
+Vue.prototype.$imageUrl = process.env.VUE_APP_BASE_API + 'img/get?key=';
 
 /**
  * If you don't want to use mock-server

+ 11 - 1
src/mixin/index.js

@@ -9,6 +9,8 @@ export default {
       dataList: [], // 表格数据
       ids: [], // 多选数据id
       dialogVisible: false, // 弹框
+      conditionList: [],
+      dataList:[]
     }
   },
   created() {
@@ -26,6 +28,12 @@ export default {
       this.currentPage = 1;
       this.getList();
     },
+    hanlePagination(val){
+    // 更改每页数量
+    this.handleSizeChange(val)
+    // 更改当前页
+    this.handleCurrentChange(val)
+    },
     // 更改每页数量
     handleSizeChange(val) {
       this.pageSize = val;
@@ -37,13 +45,15 @@ export default {
       this.currentPage = val;
       this.getList();
     },
+
     // Windows全局打印
     hanlePrint() {
       window.print()
     },
 
     // 筛选全部数据
-    hanleSelectAll(selection) {
+    hanleSelectAll(selection,index) {
+
       this.ids = selection.map((k) => {
         return k.id;
       });

+ 2 - 1
src/store/getters.js

@@ -7,6 +7,7 @@ const getters = {
   userid: state => state.user.userid,
   phone: state => state.user.phone,
   name: state => state.user.name,
-  menus: state => state.user.menus
+  menus: state => state.user.menus,
+  customerId: state => state.user.customerId
 }
 export default getters

+ 3 - 1
src/store/index.js

@@ -6,6 +6,7 @@ import settings from './modules/settings'
 import permission from './modules/permission'
 import tagsView from './modules/tagsView'
 import user from './modules/user'
+import sales from './modules/sales'
 
 Vue.use(Vuex)
 
@@ -15,7 +16,8 @@ const store = new Vuex.Store({
     settings,
     permission,
     tagsView,
-    user
+    user,
+    sales
   },
   getters
 })

+ 45 - 0
src/store/modules/sales.js

@@ -0,0 +1,45 @@
+import {
+  getId
+} from "@/api/supply/sales";
+
+const state = {
+  code: '',
+  searchForm: {
+    code: "",
+    endTime: "",
+    imgSrc: "",
+    remark: "",
+    startTime: "",
+    title: "",
+    type: "",
+  },
+  fileList:[]
+}
+
+const mutations = {
+  setId(state,id){
+       state.code = id
+       console.log('setId',id);
+  }
+
+}
+
+const actions = {
+  hanlenewInfo({
+    commit
+  }) {
+    return new Promise((resolve, reject) => {
+      getId().then(res=>{
+          commit('setId',res.data)
+          resolve()
+      })
+    })
+  }
+}
+
+export default {
+  namespaced: true,
+  state,
+  mutations,
+  actions
+}

+ 6 - 2
src/store/modules/user.js

@@ -9,6 +9,7 @@ const getDefaultState = () => {
     name: '', // 用户名称
     phone: '', // 用户手机
     menus: "", // 菜单
+    customerId:''//经销商ID
   }
 }
 
@@ -32,6 +33,9 @@ const mutations = {
   },
   SET_MENUS: (state, menus) => {
     state.menus = menus
+  },
+  SET_CUSTOMERID: (state, customerId) => {
+    state.customerId = customerId
   }
 }
 
@@ -65,7 +69,7 @@ const actions = {
           return reject('Verification failed, please Login again.')
         }
         console.log(data);
-        const { nickName, userName } = data
+        const { nickName, userName ,customerId} = data
         
         // 模拟请求数据
         // const menus = [
@@ -92,7 +96,7 @@ const actions = {
           // },
         // ]
         // menus.push({ path: '*', redirect: '/404', hidden: true })
-
+        commit('SET_CUSTOMERID',customerId)
         commit('SET_NAME', nickName)
         commit('SET_PHONE', userName)
         // commit("SET_MENUS", menus) // 触发vuex SET_MENUS 保存路由表到vuex

+ 1 - 0
src/utils/index.js

@@ -4,6 +4,7 @@
 
 /**
  * Parse the time to string
+ *
  * @param {(Object|string|number)} time
  * @param {string} cFormat
  * @returns {string | null}

+ 22 - 19
src/views/basic_data/dealer/dealer_stock.vue

@@ -377,26 +377,29 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-::v-deep .el-popover__reference {
-  margin-left: 10px;
-}
-::v-deep .selectStyle .el-input--suffix {
-  width: 200%;
-}
+// ::v-deep .el-popover__reference {
+//   margin-left: 10px;
+// }
+// ::v-deep .selectStyle .el-input--suffix {
+//   width: 200%;
+// }
 
-::v-deep .el-input--suffix {
-  width: 300px;
-}
-::v-deep .el-dialog__header {
-  background-color: #dddddd;
-}
-::v-deep .dialog-footer {
-  display: flex;
-  justify-content: center;
-}
+// ::v-deep .el-input--suffix {
+//   width: 300px;
+// }
+// ::v-deep .el-dialog__header {
+//   background-color: #dddddd;
+// }
+// ::v-deep .dialog-footer {
+//   display: flex;
+//   justify-content: center;
+// }
 
-.formWidth {
-  width: 70%;
-  margin-right: 20px;
+// .formWidth {
+//   width: 70%;
+//   margin-right: 20px;
+// }
+.selectStyle {
+  width: 100%;
 }
 </style>

+ 443 - 0
src/views/basic_data/material/classify_list.vue

@@ -0,0 +1,443 @@
+<template>
+  <div class="app-container">
+    <div class="main-content">
+      <div class="main-left">
+        <el-button
+          icon="el-icon-plus"
+          type="primary"
+          plain
+          style="width: 100%"
+          @click="openAddGroupForm('add')"
+          >新建分组</el-button
+        >
+        <div class="list">
+          <div
+            class="item"
+            :class="activeGroup === '' ? 'active' : ''"
+            @click="changeGroup('')"
+          >
+            <div class="title">所有分组</div>
+          </div>
+          <div
+            class="item"
+            :class="activeGroup === v.productCategoryId ? 'active' : ''"
+            v-for="v in categoryList"
+            :key="v.productCategoryId"
+            @click="changeGroup(v.productCategoryId, v)"
+          >
+            <div class="title">{{ v.productCategoryName }}</div>
+            <el-dropdown trigger="click" @command="handleCommand">
+              <span class="el-dropdown-link">
+                <i class="el-icon-more icon-more"></i>
+              </span>
+              <el-dropdown-menu slot="dropdown">
+                <el-dropdown-item :command="['edit', v]"
+                  >修改名称</el-dropdown-item
+                >
+                <el-dropdown-item :command="['del', v]"
+                  >删除分组</el-dropdown-item
+                >
+              </el-dropdown-menu>
+            </el-dropdown>
+          </div>
+        </div>
+      </div>
+      <div class="main-right">
+        <!-- 筛选条件 -->
+        <div>
+          <el-form
+            ref="screenForm"
+            label-width="70px"
+            size="small"
+            label-position="left"
+          >
+            <el-row :gutter="20">
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="编码" prop="volume">
+                  <el-input placeholder="请输入"></el-input>
+                </el-form-item>
+              </el-col>
+              <el-col :xs="24" :sm="12" :lg="6">
+                <el-form-item label="名称" prop="outsideName">
+                  <el-input placeholder="请输入"></el-input>
+                </el-form-item>
+              </el-col>
+
+              <el-col :xs="24" :sm="24" :lg="12" class="tr">
+                <el-form-item label="">
+                  <el-button size="small">清空</el-button>
+                  <el-button size="small" type="primary">搜索</el-button>
+                </el-form-item>
+              </el-col>
+            </el-row>
+          </el-form>
+        </div>
+        <!-- 按钮 -->
+        <div class="btn-group clearfix">
+          <div class="fl">
+            <el-button type="primary" size="small" @click="addCategoryFn"
+              >添加类别</el-button
+            >
+          </div>
+        </div>
+        <div class="mymain-container">
+          <!-- 列表 -->
+          <div class="table">
+            <el-table
+              v-loading="listLoading"
+              :data="dataList"
+              element-loading-text="Loading"
+              border
+              fit
+              highlight-current-row
+              stripe
+            >
+              <el-table-column
+                align="center"
+                label="编码"
+                prop="kingDeeCategoryNumber"
+                min-width="160"
+                show-overflow-tooltip
+              ></el-table-column>
+              <el-table-column
+                align="center"
+                label="品类"
+                prop="kingDeeCategoryName"
+                min-width="160"
+                show-overflow-tooltip
+              ></el-table-column>
+              <el-table-column
+                align="center"
+                label="操作"
+                min-width="160"
+                show-overflow-tooltip
+              >
+                <template slot-scope="scope">
+                  <el-popconfirm
+                    confirm-button-text="好的"
+                    cancel-button-text="不用了"
+                    icon="el-icon-info"
+                    icon-color="red"
+                    title="内容确定删除吗?"
+                    @onConfirm="hanleDelete(scope.row.id)"
+                  >
+                    <el-button
+                      slot="reference"
+                      type="text"
+                      class="textColor el-popover-left"
+                      >删除</el-button
+                    >
+                  </el-popconfirm>
+                </template>
+              </el-table-column>
+            </el-table>
+          </div>
+          <!-- 分页 -->
+          <div class="fr">
+            <el-pagination
+              :current-page="currentPage"
+              :page-sizes="[10, 20, 30, 50]"
+              :page-size="10"
+              layout="total, sizes, prev, pager, next, jumper"
+              :total="listTotal"
+            >
+            </el-pagination>
+          </div>
+        </div>
+      </div>
+    </div>
+    <!-- 新增编辑分组 -->
+    <el-dialog
+      :title="addGroupFormType == 'add' ? '新建分组' : '编辑分组'"
+      :visible.sync="addGroupFormVisible"
+      :show-close="false"
+      width="40%"
+      :close-on-click-modal="false"
+    >
+      <el-form
+        ref="addGroupForm"
+        :model="addGroupForm"
+        label-position="left"
+        label-width="80px"
+      >
+        <el-form-item label="分组名称" prop="">
+          <el-input
+            autocomplete="off"
+            v-model="addGroupForm.productCategoryName"
+            placeholder="请输入分组名称"
+          ></el-input>
+        </el-form-item>
+        <el-form-item label="编码" prop="">
+          <el-input
+            autocomplete="off"
+            v-model="addGroupForm.productCategoryNumber"
+            placeholder="请输入"
+          ></el-input>
+        </el-form-item>
+      </el-form>
+      <div slot="footer" class="dialog-footer">
+        <el-button @click="cancelFn">取 消</el-button>
+        <el-button type="primary" @click="btnOK">确 定</el-button>
+      </div>
+    </el-dialog>
+    <!-- 添加类别弹窗 -->
+    <ClassifyListSmall
+      :dataCategory="dataCategory"
+      :showAddSelect.sync="showAddSelect"
+      :data="dataList"
+      @updateList="updateListFn"
+    />
+  </div>
+</template>
+
+<script>
+import ClassifyListSmall from "./components/classify_list-small";
+import {
+  getProductCategoryList,
+  getProductCategorySubList,
+  getProductCategoryAdd,
+  getProductCategoryEdit,
+} from "@/api/basic_data/material";
+export default {
+  data() {
+    return {
+      addGroupFormVisible: false,
+      activeGroup: "",
+      dataList: null, // 列表数据
+      listLoading: false, // 列表加载loading
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      categoryList: [], //品类列表
+      addGroupForm: {
+        productCategoryName: "",
+        productCategoryNumber: "",
+      },
+      addGroupFormType: "add",
+      showAddSelect: false, //添加分类弹窗
+      dataCategory: null, //当前选中的品类
+    };
+  },
+  components: {
+    ClassifyListSmall,
+  },
+  created() {
+    this.getDataList();
+  },
+  methods: {
+    //更新列表
+    async updateListFn(id) {
+      const res = await getProductCategorySubList({ id });
+      this.dataList = res.data;
+    },
+    //添加类别
+    async addCategoryFn() {
+      this.showAddSelect = true;
+    },
+    //取消
+    cancelFn() {
+      this.addGroupForm = {
+        productCategoryName: "",
+        productCategoryNumber: "",
+      };
+      this.addGroupFormVisible = false;
+    },
+    //确定
+    async btnOK() {
+      if (this.addGroupFormType == "edit") {
+        await getProductCategoryEdit({ ...this.addGroupForm });
+        this.$message.success("编辑成功");
+      } else {
+        await getProductCategoryAdd({ ...this.addGroupForm });
+        this.$message.success("新建成功");
+      }
+      this.addGroupForm = {
+        productCategoryName: "",
+        productCategoryNumber: "",
+      };
+      this.getDataList();
+      this.addGroupFormVisible = false;
+    },
+    //切换分组
+    async changeGroup(id, v) {
+      console.log(v);
+      this.dataCategory = v;
+      this.activeGroup = id;
+      const res = await getProductCategorySubList({ id });
+
+      this.dataList = res.data;
+    },
+    //获取产品品类列表
+    async getDataList(data) {
+      const res = await getProductCategoryList(data);
+
+      this.categoryList = res.data;
+    },
+    //新建分组弹窗
+    openAddGroupForm(type, item) {
+      this.addGroupFormType = type;
+      if (type == "edit") {
+        this.addGroupForm.productCategoryNumber = item.productCategoryNumber;
+        this.addGroupForm.productCategoryName = item.productCategoryName;
+        this.addGroupForm.productCategoryId = item.productCategoryId;
+      }
+      this.addGroupFormVisible = true;
+    },
+    // 操作分组
+    handleCommand(command) {
+      let type = command[0],
+        v = command[1];
+      if (type == "del") {
+        this.$confirm("此操作将删除该分组, 是否继续?", "删除分组", {
+          confirmButtonText: "确定",
+          cancelButtonText: "取消",
+          type: "warning",
+        })
+          .then(() => {
+            // deleteGroup({ groupId: item.marketingGroupId }).then((res) => {
+            //   this.$successMsg("删除成功");
+            //   this.getGroupList();
+            // });
+          })
+          .catch(() => {});
+      }
+      if (type == "edit") {
+        //修改
+        console.log(1111);
+        this.openAddGroupForm("edit", v);
+      }
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.main-content {
+  display: flex;
+  height: auto;
+  .main-left {
+    margin-right: 20px;
+    padding: 10px;
+    width: 210px;
+    overflow-y: auto;
+    // border: 1px solid #eaeaea;
+    border-radius: 5px;
+    .list {
+      margin-top: 10px;
+      .item {
+        display: flex;
+        padding: 10px;
+        cursor: pointer;
+        color: #333;
+        &.active {
+          color: #377cfd;
+          font-weight: 600;
+          background-color: #f5f7fa;
+        }
+        .title {
+          flex: 1;
+          min-width: 0;
+          padding-right: 10px;
+          font-size: 14px;
+        }
+        .icon-more {
+          transform: rotate(90deg);
+        }
+      }
+    }
+  }
+  .main-right {
+    flex: 1;
+    height: auto;
+    ::v-deep .el-divider--horizontal {
+      margin: 10px 0;
+    }
+    .btn-group {
+      display: flex;
+      justify-content: space-between;
+      .left {
+        display: flex;
+        align-items: center;
+        .tips {
+          font-size: 14px;
+          margin-left: 10px;
+        }
+      }
+    }
+    .list-container {
+      margin-top: 20px;
+      .box-card {
+        ::v-deep .el-card__header {
+          padding: 10px 10px 10px 20px;
+        }
+        .header {
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
+        }
+        .body {
+          .info {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+            font-size: 14px;
+            color: #666;
+            margin: 10px 0;
+          }
+          .content {
+            max-width: 100%;
+            height: 168px;
+            overflow-y: hidden;
+            background-color: #fafafa;
+            word-break: break-all;
+            border-radius: 2px;
+            padding: 8px;
+            font-size: 14px;
+            line-height: 19px;
+            .text {
+              overflow: hidden;
+              text-overflow: ellipsis;
+              display: -webkit-box;
+              -webkit-line-clamp: 8;
+              -webkit-box-orient: vertical;
+            }
+          }
+          .img {
+            width: 100%;
+            height: 168px;
+            display: block;
+          }
+          .video {
+            width: 100%;
+            height: 168px;
+            display: block;
+          }
+          .file {
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+            img {
+              width: 40px;
+              height: 40px;
+              display: block;
+            }
+          }
+        }
+      }
+    }
+    .empty {
+      display: flex;
+      flex-direction: column;
+      align-items: center;
+      justify-content: center;
+      padding: 20px 0;
+      img {
+        width: 280px;
+      }
+      div {
+        font-size: 14px;
+        color: #666;
+      }
+    }
+  }
+}
+</style>

+ 118 - 0
src/views/basic_data/material/components/classify_list-small.vue

@@ -0,0 +1,118 @@
+<template>
+  <!-- 添加类别弹窗 -->
+  <el-dialog
+    title="添加分类"
+    :visible.sync="showAddSelect"
+    :show-close="false"
+    width="40%"
+    :close-on-click-modal="false"
+  >
+    <!-- 列表 -->
+    <div class="table">
+      <el-table
+        v-loading="listLoading"
+        :data="dataList"
+        element-loading-text="Loading"
+        border
+        fit
+        highlight-current-row
+        stripe
+        @selection-change="selectionChangeFn"
+      >
+        <el-table-column type="selection" width="55" align="center">
+        </el-table-column>
+        <el-table-column
+          align="center"
+          label="编码"
+          prop="number"
+          min-width="160"
+          show-overflow-tooltip
+        ></el-table-column>
+        <el-table-column
+          align="center"
+          label="类别名称"
+          prop="name"
+          min-width="160"
+          show-overflow-tooltip
+        ></el-table-column>
+      </el-table>
+    </div>
+
+    <div slot="footer" class="dialog-footer">
+      <el-button @click="cancelFn">取 消</el-button>
+      <el-button type="primary" @click="btnOK">确 定</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import {
+  getProductCategoryKingDeeCategoryList,
+  getProductCategoryAddSub,
+} from "@/api/basic_data/material";
+export default {
+  props: {
+    showAddSelect: {
+      type: Boolean,
+      required: true,
+    },
+    dataCategory: {
+      type: Object,
+      default: {},
+    },
+    data: {
+      type: Array,
+      default: [],
+    },
+  },
+  data() {
+    return {
+      dataList: null, // 列表数据
+      listLoading: false, // 列表加载loading
+      arr: [],
+    };
+  },
+  created() {
+    this.getDataList();
+  },
+  methods: {
+    //获取选择的数据
+    selectionChangeFn(v) {
+      console.log(v);
+      this.arr = v.map((item) => {
+        return { kingDeeCategoryId: item.id };
+      });
+    },
+    //获取列表数据
+    async getDataList() {
+      const res = await getProductCategoryKingDeeCategoryList();
+      this.dataList = res.data;
+    },
+    //取消
+    cancelFn() {
+      this.$emit("update:showAddSelect", false);
+    },
+    //确定
+    async btnOK() {
+      console.log(this.data);
+      let res = this.data.map((v) => {
+        return { kingDeeCategoryId: v.kingDeeCategoryId };
+      });
+
+      let data = {
+        productCategoryId: this.dataCategory.productCategoryId,
+        productCategoryName: this.dataCategory.productCategoryName,
+        productCategoryNumber: this.dataCategory.productCategoryNumber,
+        items: [...this.arr, ...res],
+      };
+      await getProductCategoryAddSub(data);
+      this.$message.success("新增成功");
+      this.$emit("updateList", this.dataCategory.productCategoryId);
+      this.$emit("update:showAddSelect", false);
+    },
+  },
+};
+</script>
+
+<style>
+</style>

+ 5 - 3
src/views/basic_data/material/relation_list.vue

@@ -17,6 +17,7 @@
                   v-for="item in materialLis"
                   :label="item.name"
                   :value="item.id"
+                  :key="item.id"
                 ></el-option>
               </el-select>
             </el-form-item>
@@ -311,6 +312,7 @@
                   v-for="item in materialLis"
                   :label="item.name"
                   :value="item.id"
+                  :key="item.id"
                 ></el-option>
               </el-select>
             </el-form-item>
@@ -349,7 +351,7 @@
               >
             </el-row>
 
-            <template v-for="(item, index) in diaLogForm.items">
+            <div v-for="(item, index) in diaLogForm.items" :key="index">
               <el-form-item label="编码">
                 <el-select
                   v-model="item.number"
@@ -365,7 +367,7 @@
                   </el-option>
                 </el-select>
               </el-form-item>
-              <el-form-item label="名称">
+              <el-form-item label="名称" prop="">
                 <el-input v-model="item.name" placeholder=""></el-input>
               </el-form-item>
               <el-form-item label="型号">
@@ -374,7 +376,7 @@
               <el-form-item label="体积">
                 <el-input v-model="item.volume" placeholder=""></el-input>
               </el-form-item>
-            </template>
+            </div>
           </el-col>
         </el-row>
       </el-form>

+ 101 - 85
src/views/basic_data/warehouse/warehouse_site.vue

@@ -41,9 +41,7 @@
     <!-- 按钮 -->
     <div class="btn-group clearfix">
       <div class="fl">
-        <el-button type="primary" size="small" @click="newData"
-          >新增</el-button
-        >
+        <el-button type="primary" size="small" @click="newData">新增</el-button>
         <!-- <el-button type="primary" size="small" @click="showDialogForm = true,type=2">编辑</el-button> -->
         <el-button type="primary" size="small">删除</el-button>
       </div>
@@ -82,13 +80,13 @@
             :formatter="formDatas"
             show-overflow-tooltip
           >
-          <template slot-scope="scope">
-            <template v-if="scope.row.kingDeeStocks.length>1">
-            <el-tag type="danger" v-for="item in scope.row.kingDeeStocks">
-             {{item.name}}
-            </el-tag>
+            <template slot-scope="scope">
+              <template v-if="scope.row.kingDeeStocks.length > 1">
+                <el-tag type="danger" v-for="item in scope.row.kingDeeStocks">
+                  {{ item.name }}
+                </el-tag>
+              </template>
             </template>
-          </template>
           </el-table-column>
           <el-table-column
             align="center"
@@ -97,7 +95,7 @@
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
-          <el-table-column
+          <!-- <el-table-column
             align="center"
             label="库存充足"
             prop="status"
@@ -105,10 +103,10 @@
             show-overflow-tooltip
           >
             <template slot-scope="scope">
-                <el-tag type="success" v-if="scope.row.status===1">充足</el-tag>
-                <el-tag type="danger" v-else>不充足</el-tag>
+              <el-tag type="success" v-if="scope.row.status === 1">充足</el-tag>
+              <el-tag type="danger" v-else>不充足</el-tag>
             </template>
-          </el-table-column>
+          </el-table-column> -->
           <el-table-column
             align="center"
             label="创建人"
@@ -145,13 +143,13 @@
             min-width="160"
             show-overflow-tooltip
           >
-        <template slot-scope="scope">
-              <el-button
+            <template slot-scope="scope">
+              <!-- <el-button
                 type="text"
                 class="textColor"
                 @click="hanleDetail(scope.row)"
                 >详情</el-button
-              >
+              > -->
               <el-button
                 type="text"
                 class="textColor"
@@ -169,7 +167,6 @@
                 <el-button
                   slot="reference"
                   type="text"
-
                   class="textColor el-popover-left"
                   >删除</el-button
                 >
@@ -181,7 +178,7 @@
       <!-- 分页 -->
       <div class="fr">
         <el-pagination
-        @size-change="handleSizeChange"
+          @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
           :current-page="currentPage"
           :page-sizes="[10, 20, 30, 50]"
@@ -212,7 +209,12 @@
           <el-input v-model="diaLogForm.name"></el-input>
         </el-form-item>
         <el-form-item label="仓位名称">
-          <el-select v-model="diaLogForm.stockIds" @change="onChange"  multiple placeholder="请选择">
+          <el-select
+            v-model="diaLogForm.stockIds"
+            multiple
+             filterable
+            placeholder="请选择"
+          >
             <el-option
               v-for="item in cList"
               :key="item.id"
@@ -234,10 +236,8 @@
         </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <elshowDialogForm @click="showDialogForm = false">取 消</elshowDialogForm = false-button>
-        <el-button type="primary" @click="hanleInfo"
-          >确 定</el-button
-        >
+        <el-button @click="showDialogForm = false">取 消</el-button>
+        <el-button type="primary" @click="hanleInfo">确 定</el-button>
       </div>
     </el-dialog>
   </div>
@@ -245,7 +245,13 @@
 
 <script>
 import Mixin from "@/mixin/index";
-import { getListStock,addStock,updateStock,deleteStock,getList } from "@/api/basic_data/warehouse";
+import {
+  getListStock,
+  addStock,
+  updateStock,
+  deleteStock,
+  getList,
+} from "@/api/basic_data/warehouse";
 export default {
   mixins: [Mixin],
   data() {
@@ -276,66 +282,78 @@ export default {
         },
       ],
       diaLogForm: {
-      id:null,
-      name: "",
-      remark: "",
-    	status: 1,
-    	stockCordon: 0,
-      stockIds: [],
-      updateBy: "",
-    	updateTime: ""
+        id: null,
+        name: "",
+        remark: "",
+        status: 1,
+        stockCordon: 0,
+        stockIds: [],
+        updateBy: "",
+        updateTime: "",
       },
       showDialogForm: false,
       screenForm: {
         name: "",
         storeName: "",
       },
-       screenForm2: {
+      screenForm2: {
         // 筛选表单数据
         name: "", // 名称
       },
-      type:null,
-      cList:{},
-
+      type: null,
+      cList: {},
     };
   },
   methods: {
     addFn() {
       this.showDialogForm = true;
     },
-    newData(){
-      this.showDialogForm = true
-      this.type=1
-        const params = {
-        pageNum: this.currentPage,
-        pageSize: this.pageSize,
-        name:''
-      }
-      getList(params).then(res=>{
+    newData() {
+      this.showDialogForm = true;
+      this.type = 1;
+      const params = {
+        pageNum: 1,
+        pageSize: -1,
+        name: "",
+      };
+      getList(params).then((res) => {
         this.cList = res.data.records;
         this.listTotal = res.data.total;
-      })
+      });
     },
-     //显示编辑,编辑数据初始化
+    //显示编辑,编辑数据初始化
     editFn(id, row) {
+      console.log(row);
       this.type = 2;
-      this.diaLogForm = {
-      id,
-      name: row.name,
-      remark: row.remark,
-    	status: row.status,
-    	stockCordon: row.stockCordon,
-      stockIds: row.stockIds === undefined? [] : row.stockIds,
+      const arr = []
+
+       if (row.kingDeeStocks.length>1) {
+         row.kingDeeStocks.forEach(el => {
+           arr.push(el.id)
+      });
+      }
+        this.newData()
+       this.diaLogForm = {
+        id,
+        name: row.name,
+        remark: row.remark,
+        status: row.status,
+        stockCordon: row.stockCordon,
+        stockIds: row.stockIds === undefined ? arr: row.stockIds,
       };
+
+
+
+
       this.showDialogForm = true;
     },
-    formDatas(row){
+    formDatas(row) {
       console.log(row.kingDeeStocks);
-      let str = ''
-//       row.kingDeeStocks.forEach(item => {
-//           str+= item.name
-//       });
-// return str
+      let str = "";
+      //       row.kingDeeStocks.forEach(item => {
+      //           str+= item.name
+      //       });
+      // return str
       // let a = (row && row.kingDeeStocks) || []
       // let arr = []
       // console.log(a);
@@ -346,33 +364,32 @@ export default {
       //   return arr.join(',')
     },
     hanleInfo() {
-      if (this.type===1) {
-
-          addStock(this.diaLogForm).then((res) => {
+      if (this.type === 1) {
+        addStock(this.diaLogForm).then((res) => {
           this.$successMsg("保存成功");
           this.showDialogForm = false;
           this.getList();
         });
-      }else{
+      } else {
         const params = {
-              ...this.diaLogForm
-        }
-        console.log(params,123);
-         updateStock(params).then(res=>{
-           this.$successMsg("保存成功");
+          ...this.diaLogForm,
+        };
+        console.log(params, 123);
+        updateStock(params).then((res) => {
+          this.$successMsg("保存成功");
           this.showDialogForm = false;
           this.getList();
-         })
+        });
       }
-        this.diaLogForm = {
-              name: "",
-              remark: "",
-              status: 0,
-              stockCordon: 0,
-              stockIds: [],
-              updateBy: "",
-              updateTime: ""
-        }
+      this.diaLogForm = {
+        name: "",
+        remark: "",
+        status: 0,
+        stockCordon: 0,
+        stockIds: [],
+        updateBy: "",
+        updateTime: "",
+      };
     },
     getList() {
       this.listLoading = true;
@@ -389,14 +406,13 @@ export default {
         console.log(this.dataList, 1233);
       });
     },
-     // 删除数据
+    // 删除数据
     hanleDelete(id) {
-        deleteStock({id}).then(res=>{
-            this.$successMsg("删除成功");
-                  this.getList();
-        })
+      deleteStock({ id }).then((res) => {
+        this.$successMsg("删除成功");
+        this.getList();
+      });
     },
-
   },
 };
 </script>

+ 221 - 0
src/views/engin_deposit/components/deposit-apply-deduction.vue

@@ -0,0 +1,221 @@
+<template>
+  <div>
+    <div class="sty">
+      <el-page-header @back="goBack" content="免扣申请"> </el-page-header>
+    </div>
+    <el-divider></el-divider>
+    <h3>工程项目信息</h3>
+    <el-divider></el-divider>
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :xs="12" :sm="8" :lg="8" class="item">
+          <div class="label">工程登录编码</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="12" :sm="8" :lg="8" class="item">
+          <div class="label">工程名称(项目名称)</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="12" :sm="8" :lg="8" class="item">
+          <div class="label">工程编号</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">经销商名称</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">经销商编码</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">工程登录类型</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">厂工程编码</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">使用单位</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">安装地址</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">扣款总额</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">押金比例</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">安装时间</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">押金总额</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">退款总额</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">寄厂日期</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+      </el-row>
+    </div>
+    <h3>货品信息</h3>
+    <el-divider></el-divider>
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            align="center"
+            label="产品编码"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="产品名称"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="规格型号"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="单价"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="数量"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="押金金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <h3>上传资料</h3>
+    <el-divider></el-divider>
+    <!-- 筛选条件 -->
+    <div>
+      <el-form
+        ref="searchForm"
+        :model="searchForm"
+        label-width="100px"
+        size="small"
+        label-position="left"
+      >
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="24">
+            <el-form-item label="工程验收资料" prop="">
+              <fileUpload :fileList="fileList" />
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="申请人" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="申请日期" prop="">
+              <el-date-picker
+                class="dateStyle"
+                type="date"
+                placeholder="选择日期"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="18">
+            <el-form-item label="申请退押" prop="">
+              <el-input
+                type="textarea"
+                placeholder="请输入"
+                class="textareaStyle"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="24" :lg="24">
+            <el-form-item label="">
+              <el-button size="small">清空</el-button>
+              <el-button size="small" type="primary">提交</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+  </div>
+</template>
+
+<script>
+import fileUpload from "@/components/Common/file-upload.vue";
+export default {
+  components: {
+    fileUpload,
+  },
+  data() {
+    return {
+      fileList: [],
+    };
+  },
+  methods: {
+    goBack() {
+      this.$parent.showPage = 1;
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+::v-deep .textareaStyle {
+  .el-textarea__inner {
+    resize: none;
+    height: 100px;
+  }
+}
+.dateStyle {
+  width: 100%;
+}
+</style>

+ 221 - 0
src/views/engin_deposit/components/deposit-apply-surrender.vue

@@ -0,0 +1,221 @@
+<template>
+  <div>
+    <div class="sty">
+      <el-page-header @back="goBack" content="申请退押"> </el-page-header>
+    </div>
+    <el-divider></el-divider>
+    <h3>工程项目信息</h3>
+    <el-divider></el-divider>
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :xs="12" :sm="8" :lg="8" class="item">
+          <div class="label">工程登录编码</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="12" :sm="8" :lg="8" class="item">
+          <div class="label">工程名称(项目名称)</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="12" :sm="8" :lg="8" class="item">
+          <div class="label">工程编号</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">经销商名称</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">经销商编码</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">工程登录类型</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">厂工程编码</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">使用单位</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">安装地址</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">扣款总额</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">押金比例</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">安装时间</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">押金总额</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">退款总额</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">寄厂日期</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+      </el-row>
+    </div>
+    <h3>货品信息</h3>
+    <el-divider></el-divider>
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            align="center"
+            label="产品编码"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="产品名称"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="规格型号"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="单价"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="数量"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="押金金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <h3>上传资料</h3>
+    <el-divider></el-divider>
+    <!-- 筛选条件 -->
+    <div>
+      <el-form
+        ref="searchForm"
+        :model="searchForm"
+        label-width="100px"
+        size="small"
+        label-position="left"
+      >
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="24">
+            <el-form-item label="工程验收资料" prop="">
+              <fileUpload :fileList="fileList" />
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="申请人" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="申请日期" prop="">
+              <el-date-picker
+                class="dateStyle"
+                type="date"
+                placeholder="选择日期"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="18">
+            <el-form-item label="申请退押" prop="">
+              <el-input
+                type="textarea"
+                placeholder="请输入"
+                class="textareaStyle"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="24" :lg="24">
+            <el-form-item label="">
+              <el-button size="small">清空</el-button>
+              <el-button size="small" type="primary">提交</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+  </div>
+</template>
+
+<script>
+import fileUpload from "@/components/Common/file-upload.vue";
+export default {
+  components: {
+    fileUpload,
+  },
+  data() {
+    return {
+      fileList: [],
+    };
+  },
+  methods: {
+    goBack() {
+      this.$parent.showPage = 1;
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+::v-deep .textareaStyle {
+  .el-textarea__inner {
+    resize: none;
+    height: 100px;
+  }
+}
+.dateStyle {
+  width: 100%;
+}
+</style>

+ 307 - 0
src/views/engin_deposit/components/deposit_list-detail.vue

@@ -0,0 +1,307 @@
+<template>
+  <div>
+    <div class="sty">
+      <el-page-header @back="goBack" content="审批"> </el-page-header>
+    </div>
+    <el-divider></el-divider>
+    <el-radio-group v-model="engineering" size="">
+      <el-radio-button label="工程押金信息"></el-radio-button>
+      <el-radio-button label="工程订单信息"></el-radio-button>
+      <el-radio-button label="工程发货信息"></el-radio-button>
+    </el-radio-group>
+    <br /><br />
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :xs="12" :sm="8" :lg="8" class="item">
+          <div class="label">工程登录编码</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="12" :sm="8" :lg="8" class="item">
+          <div class="label">工程名称(项目名称)</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="12" :sm="8" :lg="8" class="item">
+          <div class="label">工程编号</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">经销商名称</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">经销商编码</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">工程登录类型</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">厂工程编码</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">使用单位</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">安装地址</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">扣款总额</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">押金比例</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">安装时间</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">押金总额</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">退款总额</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">寄厂日期</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+      </el-row>
+    </div>
+    <div v-show="engineering == '工程押金信息'">
+      <h3>货品信息</h3>
+      <el-divider></el-divider>
+      <!-- 列表 -->
+      <div class="mymain-container">
+        <div class="table">
+          <el-table
+            v-loading="listLoading"
+            :data="dataList"
+            element-loading-text="Loading"
+            border
+            fit
+            highlight-current-row
+            stripe
+          >
+            <el-table-column
+              align="center"
+              label="产品编码"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="产品名称"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="规格型号"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="单价"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="数量"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="金额"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-columnk
+              align="center"
+              label="押金金额"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-columnk>
+            <el-table-column
+              align="center"
+              label="上交资料"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+          </el-table>
+        </div>
+      </div>
+    </div>
+    <div v-show="engineering == '工程订单信息'">
+      <h3>订单信息</h3>
+      <el-divider></el-divider>
+      <!-- 列表 -->
+      <div class="mymain-container">
+        <div class="table">
+          <el-table
+            v-loading="listLoading"
+            :data="dataList"
+            element-loading-text="Loading"
+            border
+            fit
+            highlight-current-row
+            stripe
+          >
+            <el-table-column
+              align="center"
+              label="工程订单号"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="订单日期"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="产品名称"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="规格型号"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="单价"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="数量"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="押金金额"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+          </el-table>
+        </div>
+      </div>
+    </div>
+    <div v-show="engineering == '工程发货信息'">
+      <h3>发货单信息</h3>
+      <el-divider></el-divider>
+      <!-- 列表 -->
+      <div class="mymain-container">
+        <div class="table">
+          <el-table
+            v-loading="listLoading"
+            :data="dataList"
+            element-loading-text="Loading"
+            border
+            fit
+            highlight-current-row
+            stripe
+          >
+            <el-table-column
+              align="center"
+              label="发货单"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="发货申请日期"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="产品名称"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="规格型号"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="单价"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="数量"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="押金金额"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+          </el-table>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  data() {
+    return {
+      engineering: "工程押金信息",
+    };
+  },
+  methods: {
+    goBack() {
+      this.$parent.showPage = 1;
+    },
+  },
+};
+</script>
+
+<style>
+</style>

+ 286 - 0
src/views/engin_deposit/components/nodeduct_list-detail.vue

@@ -0,0 +1,286 @@
+<template>
+  <div>
+    <div class="sty">
+      <el-page-header @back="goBack" content="审批"> </el-page-header>
+    </div>
+    <el-divider></el-divider>
+
+    <h3>工程项目信息</h3>
+    <el-divider></el-divider>
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :xs="12" :sm="8" :lg="8" class="item">
+          <div class="label">工程登录编码</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="12" :sm="8" :lg="8" class="item">
+          <div class="label">工程名称(项目名称)</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="12" :sm="8" :lg="8" class="item">
+          <div class="label">工程编号</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">经销商名称</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">经销商编码</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">工程登录类型</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">厂工程编码</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">使用单位</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">安装地址</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">扣款总额</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">押金比例</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">安装时间</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">押金总额</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">退款总额</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">寄厂日期</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+      </el-row>
+    </div>
+    <h3>货品信息</h3>
+    <el-divider></el-divider>
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            align="center"
+            label="产品编码"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="产品名称"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="规格型号"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="单价"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="数量"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="押金金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="上交资料"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <h3>工程资料</h3>
+    <el-divider></el-divider>
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            align="center"
+            label="资料描述"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="原文件名"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="缩略图"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="下载文件名称"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="操作"
+            min-width="160"
+            show-overflow-tooltip
+          >
+            <template slot-scope="">
+              <el-button type="text" class="textColor" slot="reference"
+                >下载</el-button
+              >
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <el-divider></el-divider>
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :xs="12" :sm="12" :lg="12" class="item">
+          <div class="label">申请人</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="12" :sm="12" :lg="12" class="item">
+          <div class="label">申请日期</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="12" :sm="24" :lg="24" class="item">
+          <div class="label">申请免扣押金</div>
+          <div class="value">************</div>
+        </el-col>
+      </el-row>
+    </div>
+    <h3>审批</h3>
+    <el-divider></el-divider>
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :xs="12" :sm="12" :lg="12" class="item">
+          <div class="label">验收人</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="12" :sm="12" :lg="12" class="item">
+          <div class="label">验收日期</div>
+          <div class="value">
+            <el-date-picker type="date" placeholder=""> </el-date-picker>
+          </div>
+        </el-col>
+        <el-col :xs="12" :sm="12" :lg="12" class="item">
+          <div class="label">是否免押金</div>
+          <div class="value">
+            <el-radio-group>
+              <el-radio :label="true">是</el-radio>
+              <el-radio :label="false">否</el-radio>
+            </el-radio-group>
+          </div>
+        </el-col>
+        <el-col :xs="12" :sm="12" :lg="12" class="item">
+          <div class="label">审批结果</div>
+          <div class="value">
+            <el-radio-group>
+              <el-radio :label="true">同意</el-radio>
+              <el-radio :label="false">驳回</el-radio>
+            </el-radio-group>
+          </div>
+        </el-col>
+        <el-col :xs="12" :sm="24" :lg="24" class="item">
+          <div class="label">审批说明</div>
+          <div class="value">
+            <el-input placeholder="请输入内容"></el-input>
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+    <br />
+    <!-- 按钮 -->
+    <div class="btn-group clearfix">
+      <div class="fl">
+        <el-button type="primary" size="small">提交审批</el-button>
+        <el-button type="primary" size="small">重置</el-button>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  methods: {
+    goBack() {
+      this.$parent.showExamine = true;
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.dateStyle {
+  width: 100%;
+}
+</style>

+ 286 - 0
src/views/engin_deposit/components/refund_list-detail.vue

@@ -0,0 +1,286 @@
+<template>
+  <div>
+    <div class="sty">
+      <el-page-header @back="goBack" content="审批"> </el-page-header>
+    </div>
+    <el-divider></el-divider>
+
+    <h3>工程项目信息</h3>
+    <el-divider></el-divider>
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :xs="12" :sm="8" :lg="8" class="item">
+          <div class="label">工程登录编码</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="12" :sm="8" :lg="8" class="item">
+          <div class="label">工程名称(项目名称)</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="12" :sm="8" :lg="8" class="item">
+          <div class="label">工程编号</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">经销商名称</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">经销商编码</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">工程登录类型</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">厂工程编码</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">使用单位</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">安装地址</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">扣款总额</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">押金比例</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">安装时间</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">押金总额</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">退款总额</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="8" class="item">
+          <div class="label">寄厂日期</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+      </el-row>
+    </div>
+    <h3>货品信息</h3>
+    <el-divider></el-divider>
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            align="center"
+            label="产品编码"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="产品名称"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="规格型号"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="单价"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="数量"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="押金金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="上交资料"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <h3>工程资料</h3>
+    <el-divider></el-divider>
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            align="center"
+            label="资料描述"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="原文件名"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="缩略图"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="下载文件名称"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="操作"
+            min-width="160"
+            show-overflow-tooltip
+          >
+            <template slot-scope="">
+              <el-button type="text" class="textColor" slot="reference"
+                >下载</el-button
+              >
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <el-divider></el-divider>
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :xs="12" :sm="12" :lg="12" class="item">
+          <div class="label">申请人</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="12" :sm="12" :lg="12" class="item">
+          <div class="label">申请日期</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="12" :sm="24" :lg="24" class="item">
+          <div class="label">申请免扣押金</div>
+          <div class="value">************</div>
+        </el-col>
+      </el-row>
+    </div>
+    <h3>审批</h3>
+    <el-divider></el-divider>
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :xs="12" :sm="12" :lg="12" class="item">
+          <div class="label">验收人</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :xs="12" :sm="12" :lg="12" class="item">
+          <div class="label">验收日期</div>
+          <div class="value">
+            <el-date-picker type="date" placeholder=""> </el-date-picker>
+          </div>
+        </el-col>
+        <el-col :xs="12" :sm="12" :lg="12" class="item">
+          <div class="label">是否免押金</div>
+          <div class="value">
+            <el-radio-group>
+              <el-radio :label="true">是</el-radio>
+              <el-radio :label="false">否</el-radio>
+            </el-radio-group>
+          </div>
+        </el-col>
+        <el-col :xs="12" :sm="12" :lg="12" class="item">
+          <div class="label">审批结果</div>
+          <div class="value">
+            <el-radio-group>
+              <el-radio :label="true">同意</el-radio>
+              <el-radio :label="false">驳回</el-radio>
+            </el-radio-group>
+          </div>
+        </el-col>
+        <el-col :xs="12" :sm="24" :lg="24" class="item">
+          <div class="label">审批说明</div>
+          <div class="value">
+            <el-input placeholder="请输入内容"></el-input>
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+    <br />
+    <!-- 按钮 -->
+    <div class="btn-group clearfix">
+      <div class="fl">
+        <el-button type="primary" size="small">提交审批</el-button>
+        <el-button type="primary" size="small">重置</el-button>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  methods: {
+    goBack() {
+      this.$parent.showSurrender = true;
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.dateStyle {
+  width: 100%;
+}
+</style>

+ 259 - 0
src/views/engin_deposit/deposit_list.vue

@@ -0,0 +1,259 @@
+<template>
+  <div class="app-container">
+    <div v-if="showPage == 1">
+      <el-radio-group v-model="deduction" size="">
+        <el-radio-button label="全部"></el-radio-button>
+        <el-radio-button label="待确认"></el-radio-button>
+        <el-radio-button label="已退款"></el-radio-button>
+        <el-radio-button label="全部扣款"></el-radio-button>
+        <el-radio-button label="部分扣款"></el-radio-button>
+      </el-radio-group>
+      <br /><br />
+      <!-- 筛选条件 -->
+      <div>
+        <el-form
+          ref="searchForm"
+          :model="searchForm"
+          label-width="100px"
+          size="small"
+          label-position="left"
+        >
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="工程订单编号" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="经销商编码" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="经销商名称" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="工程名称" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="发货申请日期" prop="">
+                <el-date-picker
+                  class="dateStyle"
+                  type="date"
+                  placeholder="选择日期"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="产品名称" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="规格型号" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :xs="24" :sm="24" :lg="6">
+              <el-form-item label="" class="fr">
+                <el-button size="small">清空</el-button>
+                <el-button size="small" type="primary">搜索</el-button>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <!-- 按钮 -->
+      <div class="btn-group clearfix">
+        <div class="fl">
+          <el-button type="primary" size="small" @click="detailFn"
+            >详情</el-button
+          >
+          <el-button type="primary" size="small" @click="surrenderFn"
+            >申请退押</el-button
+          >
+          <el-button type="primary" size="small" @click="deductionFn"
+            >免扣申请</el-button
+          >
+        </div>
+        <div class="fr">
+          <el-button type="primary" size="small">导出</el-button>
+        </div>
+      </div>
+      <!-- 列表 -->
+      <div class="mymain-container">
+        <div class="table">
+          <el-table
+            v-loading="listLoading"
+            :data="dataList"
+            element-loading-text="Loading"
+            border
+            fit
+            highlight-current-row
+            stripe
+          >
+            <el-table-column
+              align="center"
+              label="工程登录编码"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="工程名称"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="经销商编码"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="经销商名称"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="是否免扣"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="是否退押"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="押金比例"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="押金金额"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="状态"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="订单数量"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="是否已发货"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="操作"
+              min-width="160"
+              show-overflow-tooltip
+            >
+              <template slot-scope="">
+                <el-button type="text" class="textColor" slot="reference"
+                  >详情</el-button
+                >
+                <el-button type="text" class="textColor" slot="reference"
+                  >申请退押</el-button
+                >
+                <el-button type="text" class="textColor" slot="reference"
+                  >免扣退押</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <!-- 分页 -->
+        <div class="fr">
+          <el-pagination
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal"
+          >
+          </el-pagination>
+        </div>
+      </div>
+    </div>
+    <DepositListDetail v-else-if="showPage == 2" />
+    <DepositApplyDeduction v-else-if="showPage == 3" />
+    <DepositApplySurrender v-else-if="showPage == 4" />
+  </div>
+</template>
+
+<script>
+import DepositListDetail from "./components/deposit_list-detail";
+import DepositApplyDeduction from "./components/deposit-apply-deduction.vue";
+import DepositApplySurrender from "./components/deposit-apply-surrender.vue";
+export default {
+  components: {
+    DepositListDetail,
+    DepositApplyDeduction,
+    DepositApplySurrender,
+  },
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: [], // 列表数据
+      searchForm: {}, //搜索表单
+      listLoading: false, // 列表加载loading
+      deduction: "全部",
+      showPage: 1,
+    };
+  },
+  methods: {
+    //免扣申请
+    deductionFn() {
+      this.showPage = 3;
+    },
+    //申请退押
+    surrenderFn() {
+      this.showPage = 4;
+    },
+    detailFn() {
+      this.showPage = 2;
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.dateStyle {
+  width: 100%;
+}
+</style>

+ 219 - 0
src/views/engin_deposit/nodeduct_list.vue

@@ -0,0 +1,219 @@
+<template>
+  <div class="app-container">
+    <div v-if="showExamine">
+      <el-radio-group v-model="examine" size="">
+        <el-radio-button label="全部"></el-radio-button>
+        <el-radio-button label="待审核"></el-radio-button>
+        <el-radio-button label="审核驳回"></el-radio-button>
+        <el-radio-button label="审核通过"></el-radio-button>
+      </el-radio-group>
+      <br /><br />
+      <!-- 筛选条件 -->
+      <div>
+        <el-form
+          ref="searchForm"
+          :model="searchForm"
+          label-width="100px"
+          size="small"
+          label-position="left"
+        >
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="工程订单编号" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="经销商编码" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="经销商名称" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="工程名称" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="发货申请日期" prop="">
+                <el-date-picker
+                  class="dateStyle"
+                  type="date"
+                  placeholder="选择日期"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="产品名称" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="规格型号" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :xs="24" :sm="24" :lg="6">
+              <el-form-item label="" class="fr">
+                <el-button size="small">清空</el-button>
+                <el-button size="small" type="primary">搜索</el-button>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <!-- 按钮 -->
+      <div class="btn-group clearfix">
+        <div class="fl">
+          <el-button type="primary" size="small" @click="examineFn"
+            >审批</el-button
+          >
+          <el-button type="primary" size="small">编辑</el-button>
+          <el-button type="primary" size="small">详情</el-button>
+        </div>
+        <div class="fr">
+          <el-button type="primary" size="small">导出</el-button>
+        </div>
+      </div>
+      <!-- 列表 -->
+      <div class="mymain-container">
+        <div class="table">
+          <el-table
+            v-loading="listLoading"
+            :data="dataList"
+            element-loading-text="Loading"
+            border
+            fit
+            highlight-current-row
+            stripe
+          >
+            <el-table-column
+              align="center"
+              label="工程登录编码"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="工程名称"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="经销商编码"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="经销商名称"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="是否免扣"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="押金比例"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="押金金额"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="状态"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="操作"
+              min-width="160"
+              show-overflow-tooltip
+            >
+              <template slot-scope="">
+                <el-button type="text" class="textColor" slot="reference"
+                  >审批</el-button
+                >
+                <el-button type="text" class="textColor" slot="reference"
+                  >编辑</el-button
+                >
+                <el-button type="text" class="textColor" slot="reference"
+                  >详情</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <!-- 分页 -->
+        <div class="fr">
+          <el-pagination
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal"
+          >
+          </el-pagination>
+        </div>
+      </div>
+    </div>
+    <NodeductListDetail v-else />
+  </div>
+</template>
+
+<script>
+import NodeductListDetail from "./components/nodeduct_list-detail";
+export default {
+  components: {
+    NodeductListDetail,
+  },
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: [], // 列表数据
+      searchForm: {}, //搜索表单
+      listLoading: false, // 列表加载loading
+      examine: "全部",
+      showExamine: true,
+    };
+  },
+  methods: {
+    examineFn() {
+      this.showExamine = false;
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.dateStyle {
+  width: 100%;
+}
+</style>

+ 47 - 58
src/views/finance/special_list.vue → src/views/engin_deposit/refund_list.vue

@@ -1,6 +1,14 @@
 <template>
   <div class="app-container">
-    <div v-if="isShowType == 1">
+    <div v-if="showSurrender">
+      <el-radio-group v-model="examine" size="">
+        <el-radio-button label="全部"></el-radio-button>
+        <el-radio-button label="待审核"></el-radio-button>
+        <el-radio-button label="审核驳回"></el-radio-button>
+        <el-radio-button label="审核通过"></el-radio-button>
+        <el-radio-button label="已退押金"></el-radio-button>
+      </el-radio-group>
+      <br /><br />
       <!-- 筛选条件 -->
       <div>
         <el-form
@@ -12,6 +20,11 @@
         >
           <el-row :gutter="20">
             <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="工程订单编号" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
               <el-form-item label="经销商编码" prop="">
                 <el-input placeholder="请输入"></el-input>
               </el-form-item>
@@ -22,29 +35,32 @@
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="订单类型" prop="">
+              <el-form-item label="工程名称" prop="">
                 <el-input placeholder="请输入"></el-input>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="单据日期" prop="">
-                <el-input placeholder="请输入"></el-input>
+              <el-form-item label="发货申请日期" prop="">
+                <el-date-picker
+                  class="dateStyle"
+                  type="date"
+                  placeholder="选择日期"
+                >
+                </el-date-picker>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="单据号" prop="">
+              <el-form-item label="产品名称" prop="">
                 <el-input placeholder="请输入"></el-input>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="状态" prop="">
-                <el-select class="selectStyle" placeholder="请选择">
-                  <el-option> </el-option>
-                </el-select>
+              <el-form-item label="规格型号" prop="">
+                <el-input placeholder="请输入"></el-input>
               </el-form-item>
             </el-col>
 
-            <el-col :xs="24" :sm="24" :lg="12">
+            <el-col :xs="24" :sm="24" :lg="6">
               <el-form-item label="" class="fr">
                 <el-button size="small">清空</el-button>
                 <el-button size="small" type="primary">搜索</el-button>
@@ -53,23 +69,19 @@
           </el-row>
         </el-form>
       </div>
-
       <!-- 按钮 -->
       <div class="btn-group clearfix">
         <div class="fl">
-          <el-button type="primary" size="small" @click="showAddFn"
-            >新建</el-button
-          >
-          <el-button type="primary" size="small" @click="showInfoFn"
-            >详情</el-button
+          <el-button type="primary" size="small" @click="examineFn"
+            >审批</el-button
           >
+
+          <el-button type="primary" size="small">详情</el-button>
         </div>
         <div class="fr">
           <el-button type="primary" size="small">导出</el-button>
-          <el-button type="primary" size="small">打印</el-button>
         </div>
       </div>
-
       <!-- 列表 -->
       <div class="mymain-container">
         <div class="table">
@@ -83,21 +95,15 @@
             stripe
           >
             <el-table-column
-              label="序号"
-              align="center"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
               align="center"
-              label="单据号"
+              label="工程登录编码"
               prop=""
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
-              label="单据日期"
+              label="工程名称"
               prop=""
               min-width="160"
               show-overflow-tooltip
@@ -118,35 +124,21 @@
             ></el-table-column>
             <el-table-column
               align="center"
-              label="科目"
+              label="是否免扣"
               prop=""
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
-              label="订单类型"
+              label="押金比例"
               prop=""
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
-              label="厂工程编码"
-              prop=""
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="单据来源"
-              prop=""
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="金额"
+              label="押金金额"
               prop=""
               min-width="160"
               show-overflow-tooltip
@@ -166,6 +158,10 @@
             >
               <template slot-scope="">
                 <el-button type="text" class="textColor" slot="reference"
+                  >审批</el-button
+                >
+
+                <el-button type="text" class="textColor" slot="reference"
                   >详情</el-button
                 >
               </template>
@@ -185,20 +181,15 @@
         </div>
       </div>
     </div>
-    <!-- 新增 -->
-    <SpecialListAdd v-else-if="isShowType == 2" />
-    <!-- 详情 -->
-    <SpecialListDetail v-else-if="isShowType == 3" />
+    <RefundListDetail v-else />
   </div>
 </template>
 
 <script>
-import SpecialListAdd from "./components/special_list-add";
-import SpecialListDetail from "./components/special_list-detail.vue";
+import RefundListDetail from "./components/refund_list-detail.vue";
 export default {
   components: {
-    SpecialListAdd,
-    SpecialListDetail,
+    RefundListDetail,
   },
   data() {
     return {
@@ -208,22 +199,20 @@ export default {
       dataList: [], // 列表数据
       searchForm: {}, //搜索表单
       listLoading: false, // 列表加载loading
-      isShowType: 1,
+      examine: "全部",
+      showSurrender: true,
     };
   },
   methods: {
-    showInfoFn() {
-      this.isShowType = 3;
-    },
-    showAddFn() {
-      this.isShowType = 2;
+    examineFn() {
+      this.showSurrender = false;
     },
   },
 };
 </script>
 
 <style lang="scss" scoped>
-.selectStyle {
+.dateStyle {
   width: 100%;
 }
 </style>

+ 1 - 1
src/views/finance/account_list.vue

@@ -135,7 +135,7 @@
             ></el-table-column>
             <el-table-column
               align="center"
-              label="付款金额"
+              label="付款金额"
               prop=""
               min-width="160"
               show-overflow-tooltip

+ 114 - 134
src/views/finance/balance_sum.vue

@@ -1,148 +1,125 @@
 <template>
   <div class="app-container">
-    <div v-if="showDetail">
-      <!-- 筛选条件 -->
-      <div>
-        <el-form
-          ref="searchForm"
-          :model="searchForm"
-          label-width="100px"
-          size="small"
-          label-position="left"
+    <!-- 筛选条件 -->
+    <div>
+      <el-form
+        ref="searchForm"
+        :model="searchForm"
+        label-width="100px"
+        size="small"
+        label-position="left"
+      >
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="经销商名称" prop="">
+              <el-input placeholder="请输入经销商名称"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="经销商编码" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="24" :lg="24">
+            <el-form-item label="" class="fr">
+              <el-button size="small">清空</el-button>
+              <el-button size="small" type="primary">搜索</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+    <!-- 按钮 -->
+    <div class="btn-group clearfix">
+      <div class="fr">
+        <el-button type="primary" size="small">导出</el-button>
+        <el-button type="primary" size="small" @click="seeFN">明细</el-button>
+        <el-button type="primary" size="small" @click="walletFn"
+          >余额</el-button
         >
-          <el-row :gutter="20">
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="经销商名称" prop="">
-                <el-input placeholder="请输入经销商名称"></el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="经销商编码" prop="">
-                <el-input placeholder="请输入"></el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="24" :lg="24">
-              <el-form-item label="" class="fr">
-                <el-button size="small">清空</el-button>
-                <el-button size="small" type="primary">搜索</el-button>
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </el-form>
       </div>
-      <!-- 按钮 -->
-      <div class="btn-group clearfix">
-        <div class="fr">
-          <el-button type="primary" size="small">导出</el-button>
-          <el-button type="primary" size="small" @click="seeFN"
-            >查看明细</el-button
+    </div>
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            align="center"
+            label="经销商编码"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="经销商名称"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="起初金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="总金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="更新时间"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+
+          <el-table-column
+            align="center"
+            label="操作"
+            min-width="160"
+            show-overflow-tooltip
           >
-        </div>
+            <template slot-scope=""> </template>
+            <el-button type="text" class="textColor" slot="reference">
+              余额
+            </el-button>
+            <el-button type="text" class="textColor" slot="reference">
+              明细
+            </el-button>
+          </el-table-column>
+        </el-table>
       </div>
-      <!-- 列表 -->
-      <div class="mymain-container">
-        <div class="table">
-          <el-table
-            v-loading="listLoading"
-            :data="dataList"
-            element-loading-text="Loading"
-            border
-            fit
-            highlight-current-row
-            stripe
-          >
-            <el-table-column
-              align="center"
-              label="经销商编码"
-              prop=""
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="经销商名称"
-              prop=""
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="起初金额"
-              prop=""
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="总金额"
-              prop=""
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="普通钱包"
-              prop=""
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="特殊钱包"
-              prop=""
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="返利钱包"
-              prop=""
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="更新时间"
-              prop=""
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="操作"
-              min-width="160"
-              show-overflow-tooltip
-            >
-              <template slot-scope=""> </template>
-              <el-button type="text" class="textColor" slot="reference">
-                查看明细
-              </el-button>
-            </el-table-column>
-          </el-table>
-        </div>
-        <!-- 分页 -->
-        <div class="fr">
-          <el-pagination
-            :current-page="currentPage"
-            :page-sizes="[10, 20, 30, 50]"
-            :page-size="10"
-            layout="total, sizes, prev, pager, next, jumper"
-            :total="listTotal"
-          >
-          </el-pagination>
-        </div>
+      <!-- 分页 -->
+      <div class="fr">
+        <el-pagination
+          :current-page="currentPage"
+          :page-sizes="[10, 20, 30, 50]"
+          :page-size="10"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="listTotal"
+        >
+        </el-pagination>
       </div>
     </div>
-    <BalanceSumDetail v-else />
   </div>
 </template>
 
 <script>
-import BalanceSumDetail from "./components/balance_sum-detail";
 export default {
-  components: {
-    BalanceSumDetail,
-  },
   data() {
     return {
       currentPage: 1, // 当前页码
@@ -151,12 +128,15 @@ export default {
       dataList: [], // 列表数据
       searchForm: {}, //搜索表单
       listLoading: false, // 列表加载loading
-      showDetail: true,
     };
   },
   methods: {
+    //余额
+    walletFn() {
+      this.$router.push("/finance/wallet");
+    },
     seeFN() {
-      this.showDetail = false;
+      this.$router.push("/finance/standbook_list");
     },
   },
 };

+ 222 - 0
src/views/finance/change_apply.vue

@@ -0,0 +1,222 @@
+<template>
+  <div class="app-container">
+    <span>返利互转单</span>
+    <el-divider></el-divider>
+    <!-- 筛选条件 -->
+    <div>
+      <el-form
+        ref="searchForm"
+        :model="searchForm"
+        label-width="100px"
+        size="small"
+        label-position="left"
+      >
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="返利互转单号" prop="">
+              <el-input placeholder="请输入" disabled></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="单据日期" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="制单人" prop="">
+              <el-input placeholder="请输入" disabled></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="经销商编号" prop="">
+              <el-input
+                placeholder="请输入"
+                v-model="searchForm.customerId"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="经销商名称" prop="">
+              <el-input
+                placeholder="请输入"
+                v-model="searchForm.customerName"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="备注信息" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            label="序号"
+            type="index"
+            align="center"
+            width="100"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="返利类型"
+            prop="name"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="返利金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.money"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            label="备注"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.bz"></el-input>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <!-- 按钮 -->
+    <div class="btn-group clearfix">
+      <div class="fl">
+        <el-button type="primary" size="small" @click="preservationFn"
+          >保存</el-button
+        >
+
+        <el-button type="primary" size="small" @click="resetFn">重置</el-button>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from "vuex";
+import {
+  getUserInfo,
+  getWalletCustomerList,
+  getTransferAdd,
+  getTransferSubmit,
+} from "@/api/finance/change_apply";
+export default {
+  data() {
+    return {
+      listLoading: false, // 列表加载loading
+      dataList: [],
+      searchForm: {
+        customerId: "",
+        customerName: "",
+      },
+    };
+  },
+  computed: {
+    ...mapGetters(["userid"]),
+  },
+  created() {
+    this.getUserInfoFn();
+  },
+  methods: {
+    func(arr, target) {
+      var obj = {};
+      for (var i = 0; i < arr.length; i++) {
+        var item = arr[i].money;
+        if (obj[item] === undefined) {
+          var x = target - item;
+          obj[x] = i;
+        } else {
+          return [obj[item], i];
+        }
+      }
+      return null;
+    },
+
+    resetFn() {
+      this.dataList.forEach((v) => {
+        v.money = "";
+        v.bz = "";
+      });
+    },
+
+    //保存
+    async preservationFn() {
+      let receiverWalletRebateId;
+      let initiatorWalletRebateId;
+      let initiatorRemark;
+      let receiverRemark;
+      let amount;
+      let res = this.func(this.dataList, 0);
+      console.log(res);
+
+      if (this.dataList[res[0]].money > 0) {
+        receiverWalletRebateId = this.dataList[res[0]].customerWalletId;
+        initiatorWalletRebateId = this.dataList[res[1]].customerWalletId;
+        receiverRemark = this.dataList[res[0]].bz;
+        initiatorRemark = this.dataList[res[1]].bz;
+        amount = this.dataList[res[0]].money;
+      } else {
+        receiverWalletRebateId = this.dataList[res[1]].customerWalletId;
+        initiatorWalletRebateId = this.dataList[res[0]].customerWalletId;
+        receiverRemark = this.dataList[res[1]].bz;
+        initiatorRemark = this.dataList[res[0]].bz;
+        amount = this.dataList[res[1]].money;
+      }
+
+      await getTransferAdd({
+        receiverWalletRebateId,
+        initiatorWalletRebateId,
+        receiverRemark,
+        initiatorRemark,
+        amount: amount * 1,
+      });
+      this.$message.success("申请成功");
+    },
+    async getUserInfoFn() {
+      const res = await getUserInfo({ adminUserId: this.userid });
+      console.log(res);
+      this.searchForm.customerId = res.data.customerId;
+      this.searchForm.customerName = res.data.customerName;
+
+      const res2 = await getWalletCustomerList({
+        customerId: res.data.customerId,
+        type: "REBATE",
+      });
+      console.log(res2);
+
+      res2.data.forEach((v) => {
+        v.money = "";
+        v.bz = "";
+      });
+      this.dataList = res2.data;
+      console.log(this.dataList);
+    },
+  },
+};
+</script>
+
+<style>
+</style>

+ 393 - 0
src/views/finance/change_list.vue

@@ -0,0 +1,393 @@
+<template>
+  <div class="app-container">
+    <div v-if="showPage == 1">
+      <el-radio-group v-model="category" size="">
+        <el-radio-button label="全部"></el-radio-button>
+        <el-radio-button label="待审核"></el-radio-button>
+        <el-radio-button label="审核通过"></el-radio-button>
+        <el-radio-button label="审核驳回"></el-radio-button>
+        <el-radio-button label="复核通过"></el-radio-button>
+        <el-radio-button label="待复核"></el-radio-button>
+        <el-radio-button label="复核驳回"></el-radio-button>
+      </el-radio-group>
+      <br /><br />
+      <!-- 筛选条件 -->
+      <div>
+        <el-form
+          ref="searchForm"
+          :model="searchForm"
+          label-width="100px"
+          size="small"
+          label-position="left"
+        >
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="返利互转单号" prop="id">
+                <el-input
+                  v-model="searchForm.id"
+                  placeholder="请输入"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="返利类型" prop="walletName">
+                <el-input
+                  v-model="searchForm.walletName"
+                  placeholder="请输入"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="申请日期" prop="startTime">
+                <el-date-picker
+                  class="dateStyle"
+                  v-model="searchForm.startTime"
+                  placeholder="选择日期"
+                  type="datetime"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="" class="fr">
+                <el-button size="small" @click="clearFn">清空</el-button>
+                <el-button size="small" type="primary" @click="searchFn"
+                  >搜索</el-button
+                >
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+
+      <br />
+
+      <strong>返利互转单列表</strong>
+      <el-divider></el-divider>
+      <!-- 列表 -->
+      <div class="mymain-container">
+        <div class="table">
+          <el-table
+            v-loading="listLoading"
+            :data="dataList"
+            element-loading-text="Loading"
+            border
+            fit
+            highlight-current-row
+            stripe
+          >
+            <el-table-column
+              label="序号"
+              align="center"
+              width="100"
+              type="index"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="返利转账单号"
+              prop="id"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="申请日期"
+              prop="applyTime"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="经销商编号"
+              prop="customerNumber"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="经销商名称"
+              prop="customerName"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="表体备注"
+              prop="initiatorRemark"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="返利类型"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="返利金额"
+              prop="amount"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="备注"
+              prop="remark"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="制单人"
+              prop="createBy"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="审核人"
+              prop="examineBy"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="审核日期"
+              prop="examineTime"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="复核人"
+              prop="secondExamineBy"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="复核日期"
+              prop="secondExamineTime"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="状态"
+              prop="examineStatus"
+              min-width="160"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                <el-tag v-show="scope.row.examineStatus == 'SAVE'">保存</el-tag>
+                <el-tag v-show="scope.row.examineStatus == 'WAIT'"
+                  >待审核</el-tag
+                >
+                <el-tag v-show="scope.row.examineStatus == 'OK_ONE'"
+                  >初审通过</el-tag
+                >
+                <el-tag v-show="scope.row.examineStatus == 'FAIL_ONE'"
+                  >初审不通过</el-tag
+                >
+                <el-tag v-show="scope.row.examineStatus == 'OK'"
+                  >复核通过</el-tag
+                >
+                <el-tag v-show="scope.row.examineStatus == 'FALL'"
+                  >不通过</el-tag
+                >
+                <el-tag v-show="scope.row.examineStatus == 'CLOSE'"
+                  >已关闭</el-tag
+                >
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              label="操作"
+              min-width="200"
+              show-overflow-tooltip
+              fixed="right"
+            >
+              <template slot-scope="scope">
+                <el-button
+                  @click="submitFn(scope.row.id)"
+                  type="text"
+                  class="textColor"
+                  slot="reference"
+                  >提审</el-button
+                >
+                <el-button
+                  v-if="
+                    scope.row.examineStatus == 'WAIT' ||
+                    scope.row.examineStatus == 'OK_ONE'
+                  "
+                  @click="examineFn(scope.row.id)"
+                  type="text"
+                  class="textColor"
+                  slot="reference"
+                  >审核</el-button
+                >
+                <el-button
+                  v-if="
+                    scope.row.examineStatus == 'WAIT' ||
+                    scope.row.examineStatus == 'SAVE'
+                  "
+                  type="text"
+                  class="textColor"
+                  slot="reference"
+                  @click="editFn(scope.row.id)"
+                  >修改</el-button
+                >
+                <el-button
+                  @click="detailFn(scope.row.id)"
+                  type="text"
+                  class="textColor"
+                  slot="reference"
+                  >详情</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <!-- 分页 -->
+        <div class="fr">
+          <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal"
+          >
+          </el-pagination>
+        </div>
+      </div>
+    </div>
+    <ChangeListDetail :detailList="detailList" v-else-if="showPage == 2" />
+    <ChangeListExamine
+      @refresh="refreshFn"
+      :detailList="detailList"
+      v-else-if="showPage == 3"
+    />
+    <ChangeListReview
+      @refresh="refreshFn"
+      :detailList="detailList"
+      v-else-if="showPage == 4"
+    />
+  </div>
+</template>
+
+<script>
+import {
+  getChangeList,
+  getChangeListDetail,
+  getTransferSubmit,
+} from "@/api/finance/change_list";
+import ChangeListDetail from "./components/change_list-detail";
+import ChangeListExamine from "./components/change_list-examine";
+import ChangeListReview from "./components/change_list-review";
+export default {
+  components: {
+    ChangeListDetail,
+    ChangeListExamine,
+    ChangeListReview,
+  },
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: [], // 列表数据
+      searchForm: {
+        startTime: "",
+        walletName: "",
+        id: "",
+      }, //搜索表单
+      listLoading: false, // 列表加载loading
+      category: "全部",
+      showPage: 1,
+      detailList: {},
+    };
+  },
+  created() {
+    this.getDataList({ pageSize: this.pageSize, pageNum: this.currentPage });
+  },
+  methods: {
+    //刷新
+    refreshFn() {
+      this.getDataList({ pageSize: this.pageSize, pageNum: this.currentPage });
+    },
+    //提审
+    async submitFn(id) {
+      await getTransferSubmit({ id });
+      this.$message.success("提审成功");
+      this.getDataList({ pageSize: this.pageSize, pageNum: this.currentPage });
+    },
+    //清空
+    clearFn() {
+      console.log(this.$refs.searchForm);
+      this.$refs.searchForm.resetFields();
+    },
+    //搜索
+    searchFn() {
+      this.getDataList({
+        ...this.searchForm,
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+      });
+    },
+
+    //获取列表数据
+    async getDataList(data) {
+      const res = await getChangeList(data);
+      console.log(res);
+      this.dataList = res.data.records;
+      this.listTotal = res.data.total;
+    },
+    //详情
+    async detailFn(id) {
+      const res = await getChangeListDetail({ id });
+      console.log(res);
+      this.detailList = res.data;
+      this.showPage = 2;
+    },
+    //修改
+    async editFn(id) {
+      const res = await getChangeListDetail({ id });
+
+      this.detailList = res.data;
+      this.showPage = 4;
+    },
+    //审核
+    async examineFn(id) {
+      const res = await getChangeListDetail({ id });
+
+      this.detailList = res.data;
+      this.showPage = 3;
+    },
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getDataList({ pageNum: 1, pageSize: this.pageSize });
+    },
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getDataList({ pageNum: val, pageSize: 10 });
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.dateStyle {
+  width: 100%;
+}
+</style>

+ 1 - 1
src/views/finance/components/account_list-detail.vue

@@ -137,7 +137,7 @@
           ></el-table-column>
           <el-table-column
             align="center"
-            label="付款金额"
+            label="付款金额"
             prop=""
             min-width="160"
             show-overflow-tooltip

+ 14 - 38
src/views/finance/components/balance_sum-detail.vue

@@ -4,6 +4,18 @@
       <el-page-header @back="goBack" content="明细"> </el-page-header>
     </div>
     <el-divider></el-divider>
+
+    <el-radio-group v-model="category" size="">
+      <el-radio-button label="家用空调"></el-radio-button>
+      <el-radio-button label="商用空调"></el-radio-button>
+      <el-radio-button label="生活电器"></el-radio-button>
+    </el-radio-group>
+    <br /><br />
+    <el-radio-group v-model="bill" size="">
+      <el-radio-button label="贷款台账"></el-radio-button>
+      <el-radio-button label="返利台账"></el-radio-button>
+    </el-radio-group>
+    <h1></h1>
     <!-- 筛选条件 -->
     <div>
       <el-form
@@ -26,7 +38,7 @@
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
-          <el-col :xs="24" :sm="12" :lg="12">
+          <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="日期时间" prop="">
               <el-date-picker
                 type="datetimerange"
@@ -38,7 +50,7 @@
             </el-form-item>
           </el-col>
 
-          <el-col :xs="24" :sm="24" :lg="24">
+          <el-col :xs="24" :sm="24" :lg="6">
             <el-form-item label="" class="fr">
               <el-button size="small">清空</el-button>
               <el-button size="small" type="primary">搜索</el-button>
@@ -47,42 +59,6 @@
         </el-row>
       </el-form>
     </div>
-    <el-radio-group v-model="category" size="">
-      <el-radio-button label="家用空调"></el-radio-button>
-      <el-radio-button label="商用空调"></el-radio-button>
-      <el-radio-button label="生活电器"></el-radio-button>
-    </el-radio-group>
-    <h1></h1>
-    <div>
-      <el-row type="flex" class="row-bg" justify="space-around">
-        <el-col :xs="24" :sm="12" :lg="4"
-          ><div class="moneyStyle color1">
-            <span>普通钱包</span>
-            <strong>¥12.367万</strong>
-          </div>
-        </el-col>
-        <el-col :xs="24" :sm="12" :lg="4"
-          ><div class="moneyStyle color2">
-            <span>特殊钱包</span> <strong>¥12.367万</strong>
-          </div></el-col
-        >
-        <el-col :xs="24" :sm="12" :lg="4">
-          <div class="moneyStyle color3">
-            <span>折扣钱包</span> <strong>¥12.367万</strong>
-          </div></el-col
-        >
-        <el-col :xs="24" :sm="12" :lg="4">
-          <div class="moneyStyle color4">
-            <span>返利钱包</span> <strong>¥12.367万</strong>
-          </div></el-col
-        >
-      </el-row>
-    </div>
-    <el-divider></el-divider>
-    <el-radio-group v-model="bill" size="">
-      <el-radio-button label="贷款台账"></el-radio-button>
-      <el-radio-button label="返利台账"></el-radio-button>
-    </el-radio-group>
     <div v-show="bill == '贷款台账'">
       <!-- 列表 -->
       <div class="mymain-container">

+ 179 - 0
src/views/finance/components/change_list-detail.vue

@@ -0,0 +1,179 @@
+<template>
+  <div>
+    <div class="sty">
+      <el-page-header @back="goBack" content="详情"> </el-page-header>
+    </div>
+    <br />
+    <br />
+    <span>返利互转单</span>
+    <el-divider></el-divider>
+    <!-- 筛选条件 -->
+    <div>
+      <el-form label-width="100px" size="small" label-position="left">
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="返利互转单号" prop="">
+              <el-input
+                disabled
+                v-model="detailList.id"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="单据日期" prop="">
+              <el-input
+                disabled
+                v-model="detailList.theTime"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="制单人" prop="">
+              <el-input disabled placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="经销商编号" prop="">
+              <el-input
+                disabled
+                v-model="detailList.customerNumber"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="经销商名称" prop="">
+              <el-input
+                disabled
+                v-model="detailList.customerName"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="备注信息" prop="">
+              <el-input
+                disabled
+                v-model="detailList.remark"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="审核人" prop="">
+              <el-input
+                disabled
+                v-model="detailList.examineBy"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="审核日期" prop="">
+              <el-input
+                disabled
+                v-model="detailList.examineTime"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="关闭人" prop="">
+              <el-input disabled placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="关闭日期" prop="">
+              <el-input disabled placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            label="序号"
+            align="center"
+            width="100"
+            type="index"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="返利类型"
+            prop="customerWalletName"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="返利金额"
+            prop="amount"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="备注"
+            prop="remark"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+        </el-table>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  props: {
+    detailList: {
+      type: Object,
+      required: true,
+    },
+  },
+  data() {
+    return {
+      dataList: [], // 列表数据
+      searchForm: {}, //搜索表单
+      listLoading: false, // 列表加载loading
+    };
+  },
+  created() {
+    this.dataList = [
+      {
+        customerWalletName: this.detailList.initiatorCustomerWalletName,
+        remark: this.detailList.initiatorRemark,
+        amount: -this.detailList.amount,
+      },
+      {
+        customerWalletName: this.detailList.receiverCustomerWalletName,
+        remark: this.detailList.receiverRemark,
+        amount: this.detailList.amount,
+      },
+    ];
+  },
+  methods: {
+    goBack() {
+      this.$parent.showPage = 1;
+    },
+  },
+};
+</script>
+
+<style>
+</style>

+ 210 - 0
src/views/finance/components/change_list-examine.vue

@@ -0,0 +1,210 @@
+<template>
+  <div>
+    <div class="sty">
+      <el-page-header @back="goBack" content="审核"> </el-page-header>
+    </div>
+    <br />
+    <br />
+    <span>返利互转单</span>
+    <el-divider></el-divider>
+    <!-- 筛选条件 -->
+    <div>
+      <el-form label-width="100px" size="small" label-position="left">
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="返利互转单号" prop="">
+              <el-input v-model="detailList.id" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="单据日期" prop="">
+              <el-input
+                v-model="detailList.theTime"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="制单人" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="经销商编号" prop="">
+              <el-input
+                v-model="detailList.customerNumber"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="经销商名称" prop="">
+              <el-input
+                v-model="detailList.customerName"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="备注信息" prop="">
+              <el-input
+                v-model="detailList.remark"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="审核人" prop="">
+              <el-input
+                v-model="detailList.examineBy"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="审核日期" prop="">
+              <el-input
+                v-model="detailList.examineTime"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            label="序号"
+            align="center"
+            width="100"
+            type="index"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="返利类型"
+            prop="customerWalletName"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="返利金额"
+            prop="amount"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="备注"
+            prop="remark"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :span="12" class="item">
+          <div class="label">审批人</div>
+          <div class="value">{{ this.name }}</div>
+        </el-col>
+        <el-col :span="12" class="item">
+          <div class="label">审批结果</div>
+          <div class="value">
+            <el-radio v-model="examineStatus" label="OK">通过</el-radio>
+            <el-radio v-model="examineStatus" label="FALL">驳回</el-radio>
+          </div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">审批说明</div>
+          <div class="value">
+            <el-input v-model="remark" placeholder="请输入内容"></el-input>
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+    <br />
+    <!-- 按钮 -->
+    <div class="btn-group clearfix">
+      <div class="fl">
+        <el-button type="primary" size="small" @click="btnFn">确定</el-button>
+        <el-button type="primary" size="small" @click="resetFn">重置</el-button>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { getChangeListExamine } from "@/api/finance/change_list";
+import { mapGetters } from "vuex";
+export default {
+  props: {
+    detailList: {
+      type: Object,
+      required: true,
+    },
+  },
+  data() {
+    return {
+      remark: "",
+      examineStatus: "",
+      dataList: [], // 列表数据
+      // searchForm: {}, //搜索表单
+      listLoading: false, // 列表加载loading
+    };
+  },
+  computed: { ...mapGetters(["name"]) },
+  created() {
+    this.dataList = [
+      {
+        customerWalletName: this.detailList.initiatorCustomerWalletName,
+        remark: this.detailList.initiatorRemark,
+        amount: -this.detailList.amount,
+      },
+      {
+        customerWalletName: this.detailList.receiverCustomerWalletName,
+        remark: this.detailList.receiverRemark,
+        amount: this.detailList.amount,
+      },
+    ];
+  },
+  methods: {
+    //重置
+    resetFn() {
+      this.remark = "";
+      this.examineStatus = "";
+    },
+    //确定
+    async btnFn() {
+      // console.log(this.detailList);
+      await getChangeListExamine({
+        id: this.detailList.id,
+        remark: this.remark,
+        examineStatus: this.examineStatus,
+      });
+      this.$message.success("已审核");
+    },
+    goBack() {
+      this.$emit("refresh");
+
+      this.$parent.showPage = 1;
+    },
+  },
+};
+</script>
+
+<style>
+</style>

+ 251 - 0
src/views/finance/components/change_list-review.vue

@@ -0,0 +1,251 @@
+<template>
+  <div>
+    <div class="sty">
+      <el-page-header @back="goBack" content="修改"> </el-page-header>
+    </div>
+    <br />
+    <br />
+    <span>返利互转单</span>
+    <el-divider></el-divider>
+    <!-- 筛选条件 -->
+    <div>
+      <el-form
+        ref="searchForm"
+        :model="searchForm"
+        label-width="100px"
+        size="small"
+        label-position="left"
+      >
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="返利互转单号" prop="">
+              <el-input v-model="detailList.id" placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="单据日期" prop="">
+              <el-input
+                v-model="detailList.theTime"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="制单人" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="经销商编号" prop="">
+              <el-input
+                v-model="detailList.customerNumber"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="经销商名称" prop="">
+              <el-input
+                v-model="detailList.customerName"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="备注信息" prop="">
+              <el-input
+                v-model="detailList.remark"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="审核人" prop="">
+              <el-input
+                v-model="detailList.examineBy"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="审核日期" prop="">
+              <el-input
+                v-model="detailList.examineTime"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="复核人" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="复核日期" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            label="序号"
+            align="center"
+            width="100"
+            type="index"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="返利类型"
+            prop="customerWalletName"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="返利金额"
+            prop="amount"
+            min-width="160"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.amount"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column
+            align="center"
+            label="备注"
+            prop="remark"
+            min-width="160"
+            show-overflow-tooltip
+          >
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.remark"></el-input>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <!-- <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :span="12" class="item">
+          <div class="label">复核人</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :span="12" class="item">
+          <div class="label">复核结果</div>
+          <div class="value">
+            <el-radio-group>
+              <el-radio :label="true">通过</el-radio>
+              <el-radio :label="false">驳回</el-radio>
+            </el-radio-group>
+          </div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">审批说明</div>
+          <div class="value">
+            <el-input placeholder="请输入内容"></el-input>
+          </div>
+        </el-col>
+      </el-row>
+    </div> -->
+    <br />
+    <!-- 按钮 -->
+    <div class="btn-group clearfix">
+      <div class="fl">
+        <el-button type="primary" size="small" @click="btnFn">确定</el-button>
+        <el-button type="primary" size="small" @click="resetFn">重置</el-button>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { getTransferEdit } from "@/api/finance/change_list";
+export default {
+  props: {
+    detailList: {
+      type: Object,
+      required: true,
+    },
+  },
+  data() {
+    return {
+      dataList: [], // 列表数据
+      searchForm: {}, //搜索表单
+      listLoading: false, // 列表加载loading
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    //重置
+    resetFn() {
+      this.getList();
+    },
+
+    //数据初始化
+    getList() {
+      this.dataList = [
+        {
+          initiatorWalletRebateId: this.detailList.initiatorCustomerWalletId,
+          customerWalletName: this.detailList.initiatorCustomerWalletName,
+          remark: this.detailList.initiatorRemark,
+          amount: -this.detailList.amount,
+        },
+        {
+          receiverWalletRebateId: this.detailList.receiverCustomerWalletId,
+          customerWalletName: this.detailList.receiverCustomerWalletName,
+          remark: this.detailList.receiverRemark,
+          amount: this.detailList.amount,
+        },
+      ];
+    },
+    //确定
+    async btnFn() {
+      console.log(this.detailList);
+      let receiverWalletRebateId;
+      let initiatorWalletRebateId;
+      let initiatorRemark;
+      let receiverRemark;
+      let amount;
+
+      initiatorWalletRebateId = this.dataList[0].initiatorWalletRebateId;
+      receiverWalletRebateId = this.dataList[1].receiverWalletRebateId;
+      initiatorRemark = this.dataList[0].remark;
+      receiverRemark = this.dataList[1].remark;
+      amount = this.dataList[1].amount;
+      await getTransferEdit({
+        id: this.detailList.id,
+        receiverWalletRebateId,
+        initiatorWalletRebateId,
+        receiverRemark,
+        initiatorRemark,
+        amount: amount * 1,
+      });
+      this.$message.success("修改成功");
+    },
+    goBack() {
+      this.$emit("refresh");
+      this.$parent.showPage = 1;
+    },
+  },
+};
+</script>
+
+<style>
+</style>

+ 116 - 22
src/views/finance/components/credit_list-detail.vue

@@ -16,22 +16,38 @@
       >
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="日期" prop="">
+            <el-form-item label="开始时间" prop="startTime">
               <el-date-picker
-                v-model="value1"
-                type="daterange"
-                range-separator="至"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
+                class="selectStyle"
+                v-model="searchForm.startTime"
+                type="datetime"
+                placeholder="选择日期时间"
+                default-time="00:00:00"
+                value-format="yyyy-MM-dd HH:mm:ss"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="结束时间" prop="endTime">
+              <el-date-picker
+                class="selectStyle"
+                v-model="searchForm.endTime"
+                type="datetime"
+                placeholder="选择日期时间"
+                default-time="00:00:00"
+                value-format="yyyy-MM-dd HH:mm:ss"
               >
               </el-date-picker>
             </el-form-item>
           </el-col>
 
-          <el-col :xs="24" :sm="24" :lg="18">
+          <el-col :xs="24" :sm="24" :lg="12">
             <el-form-item label="" class="fr">
-              <el-button size="small">清空</el-button>
-              <el-button size="small" type="primary">搜索</el-button>
+              <el-button size="small" @click="clearFn">清空</el-button>
+              <el-button size="small" type="primary" @click="searchFn"
+                >搜索</el-button
+              >
             </el-form-item>
           </el-col>
         </el-row>
@@ -40,8 +56,9 @@
     <!-- 按钮 -->
     <div class="btn-group clearfix">
       <div class="fr">
-        <el-button type="primary" size="small">导出</el-button>
-        <el-button type="primary" size="small">打印</el-button>
+        <el-button type="primary" size="small" @click="exportList"
+          >导出</el-button
+        >
       </div>
     </div>
     <!-- 列表 -->
@@ -59,55 +76,70 @@
           <el-table-column
             label="序号"
             align="center"
-            min-width="100"
+            width="100"
+            type="index"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="经销商编码"
-            prop=""
+            prop="customerNumber"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="经销商名称"
-            prop=""
+            prop="customerName"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="关联钱包"
-            prop=""
+            prop="customerWalletName"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="变更金额"
+            prop="amount"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="使用金额"
+            prop="useAmount"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
-            label="变更额度"
-            prop=""
+            label="开始日期"
+            prop="startTime"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
-            label="总信用额度"
-            prop=""
+            label="结束日期"
+            prop="endTime"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="变更时间"
-            prop=""
+            prop="updateTime"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
             label="变更人"
-            prop=""
+            prop="updateBy"
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
@@ -116,6 +148,8 @@
       <!-- 分页 -->
       <div class="fr">
         <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
           :current-page="currentPage"
           :page-sizes="[10, 20, 30, 50]"
           :page-size="10"
@@ -129,18 +163,78 @@
 </template>
 
 <script>
+import { getCredit } from "@/api/finance/credit_list";
+import { downloadFiles } from "@/utils/util";
 export default {
+  props: {
+    recordsList: {
+      type: Object,
+      required: true,
+    },
+  },
   data() {
     return {
       currentPage: 1, // 当前页码
       pageSize: 10, // 每页数量
       listTotal: 0, // 列表总数
       dataList: [], // 列表数据
-      searchForm: {}, //搜索表单
+      searchForm: {
+        startTime: "",
+        endTime: "",
+      }, //搜索表单
       listLoading: false, // 列表加载loading
     };
   },
+  created() {
+    this.getDataList({
+      customerWalletCreditId: this.recordsList.id,
+
+      pageNum: this.currentPage,
+      pageSize: this.pageSize,
+    });
+  },
   methods: {
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getDataList({ pageNum: 1, pageSize: this.pageSize });
+    },
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getDataList({ pageNum: val, pageSize: 10 });
+    },
+    //导出
+    exportList() {
+      let screenData = {
+        customerWalletCreditId: this.recordsList.id,
+        startTime: this.searchForm.startTime,
+        endTime: this.searchForm.endTime,
+      };
+      downloadFiles("/credit/record/export", screenData);
+    },
+    //清除
+    clearFn() {
+      this.$refs.searchForm.resetFields();
+    },
+    //搜索
+    searchFn() {
+      console.log(this.searchForm);
+      this.getDataList({
+        ...this.searchForm,
+        customerWalletCreditId: this.recordsList.id,
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+      });
+    },
+    //获取信用额度变更记录数据
+    async getDataList(data) {
+      const res = await getCredit(data);
+      console.log(res);
+      this.dataList = res.data.records;
+      this.listTotal = res.data.total;
+    },
     goBack() {
       this.$parent.showRecord = true;
     },

+ 285 - 0
src/views/finance/components/rebate_list-apply.vue

@@ -0,0 +1,285 @@
+<template>
+  <div class="sty">
+    <el-page-header @back="goBack" content="销售返利单"> </el-page-header>
+    <el-divider></el-divider>
+    <!-- 表头 -->
+    <div>
+      <el-form
+        ref="searchForm"
+        :model="searchForm"
+        label-width="100px"
+        size="small"
+        label-position="left"
+      >
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="返利单号" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="返利日期" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="备注" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="制单人" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="制单日期" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="审批人" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="审批日期" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="关闭人" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="关闭日期" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            label="序号"
+            align="center"
+            min-width="100"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="经销商编码"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="经销商名称"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="经销商简称"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="返利类型"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="返利金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="暂扣返利"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="备注"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <span>返利单复核及办理折让</span>
+    <el-divider></el-divider>
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            align="center"
+            type="selection"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="返利单号"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="经销商编码"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="经销商名称"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="返利类型"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="总返利金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="返利金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="折让金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="暂扣返利"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="折让编号"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="折让账号"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="已办理折让金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="折让对应收款单号"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="确认人"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="确认日期"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="复核人"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="复核日期"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <el-button type="primary" size="small">确定</el-button>
+    <el-button type="primary" size="small">重置</el-button>
+  </div>
+</template>
+
+<script>
+export default {
+  methods: {
+    goBack() {
+      this.$parent.showPage = 1;
+    },
+  },
+};
+</script>
+
+<style>
+</style>

+ 41 - 24
src/views/finance/components/rebate_list-detail.vue

@@ -25,6 +25,11 @@
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="备注" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="制单人" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
@@ -35,17 +40,22 @@
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="审人" prop="">
+            <el-form-item label="审人" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="审日期" prop="">
+            <el-form-item label="审日期" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="备注" prop="">
+            <el-form-item label="关闭人" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="关闭日期" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
@@ -86,21 +96,14 @@
           ></el-table-column>
           <el-table-column
             align="center"
-            label="返利类型"
-            prop=""
-            min-width="160"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="返利钱包ID"
+            label="经销商简称"
             prop=""
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
-            label="返利钱包"
+            label="返利类型"
             prop=""
             min-width="160"
             show-overflow-tooltip
@@ -128,17 +131,31 @@
           ></el-table-column>
         </el-table>
       </div>
-      <!-- 分页 -->
-      <div class="fr">
-        <el-pagination
-          :current-page="currentPage"
-          :page-sizes="[10, 20, 30, 50]"
-          :page-size="10"
-          layout="total, sizes, prev, pager, next, jumper"
-          :total="listTotal"
-        >
-        </el-pagination>
-      </div>
+    </div>
+    <span>审批记录</span>
+    <el-divider></el-divider>
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :span="12" class="item">
+          <div class="label">审批人</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :span="12" class="item">
+          <div class="label">审批结果</div>
+          <div class="value">
+            <el-radio-group>
+              <el-radio :label="true">通过</el-radio>
+              <el-radio :label="false">弃审</el-radio>
+            </el-radio-group>
+          </div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">审批说明</div>
+          <div class="value">
+            <el-input placeholder="请输入内容"></el-input>
+          </div>
+        </el-col>
+      </el-row>
     </div>
   </div>
 </template>
@@ -157,7 +174,7 @@ export default {
   },
   methods: {
     goBack() {
-      this.$parent.showInfo = true;
+      this.$parent.showPage = 1;
     },
   },
 };

+ 175 - 0
src/views/finance/components/rebate_list-examine.vue

@@ -0,0 +1,175 @@
+<template>
+  <div>
+    <div class="sty">
+      <el-page-header @back="goBack" content="返利单"> </el-page-header>
+    </div>
+    <el-divider></el-divider>
+    <!-- 表头 -->
+    <div>
+      <el-form
+        ref="searchForm"
+        :model="searchForm"
+        label-width="100px"
+        size="small"
+        label-position="left"
+      >
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="返利单号" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="返利日期" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="备注" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="制单人" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="制单日期" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="审批人" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="审批日期" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="关闭人" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="关闭日期" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            label="序号"
+            align="center"
+            min-width="100"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="经销商编码"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="经销商名称"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="经销商简称"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="返利类型"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="返利总金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="暂扣返利"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="备注"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :span="12" class="item">
+          <div class="label">审批人</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :span="12" class="item">
+          <div class="label">审批结果</div>
+          <div class="value">
+            <el-radio-group>
+              <el-radio :label="true">通过</el-radio>
+              <el-radio :label="false">弃审</el-radio>
+            </el-radio-group>
+          </div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">审批说明</div>
+          <div class="value">
+            <el-input placeholder="请输入内容"></el-input>
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+    <br />
+    <el-button type="primary" size="small">确定</el-button>
+    <el-button type="primary" size="small">重置</el-button>
+  </div>
+</template>
+
+<script>
+export default {
+  methods: {
+    goBack() {
+      this.$parent.showPage = 1;
+    },
+  },
+};
+</script>
+
+<style>
+</style>

+ 287 - 0
src/views/finance/components/rebate_list-review.vue

@@ -0,0 +1,287 @@
+<template>
+  <div>
+    <div class="sty">
+      <el-page-header @back="goBack" content="销售返利单"> </el-page-header>
+    </div>
+    <el-divider></el-divider>
+    <!-- 表头 -->
+    <div>
+      <el-form
+        ref="searchForm"
+        :model="searchForm"
+        label-width="100px"
+        size="small"
+        label-position="left"
+      >
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="返利单号" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="返利日期" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="备注" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="制单人" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="制单日期" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="审批人" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="审批日期" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="关闭人" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="关闭日期" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            label="序号"
+            align="center"
+            min-width="100"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="经销商编码"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="经销商名称"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="经销商简称"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="返利类型"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="返利金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="暂扣返利"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="备注"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <span>返利单复核及办理折让</span>
+    <el-divider></el-divider>
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            align="center"
+            type="selection"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="返利单号"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="经销商编码"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="经销商名称"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="返利类型"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="总返利金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="返利金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="折让金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="暂扣返利"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="折让编号"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="折让账号"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="已办理折让金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="折让对应收款单号"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="确认人"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="确认日期"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="复核人"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="复核日期"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <el-button type="primary" size="small">确定</el-button>
+    <el-button type="primary" size="small">重置</el-button>
+  </div>
+</template>
+
+<script>
+export default {
+  methods: {
+    goBack() {
+      this.$parent.showPage = 1;
+    },
+  },
+};
+</script>
+
+<style>
+</style>

+ 200 - 0
src/views/finance/components/receipt_list-detail.vue

@@ -0,0 +1,200 @@
+<template>
+  <div>
+    <div class="sty">
+      <el-page-header @back="goBack"> </el-page-header>
+      <br />
+      <strong>基本信息</strong>
+      <el-divider></el-divider>
+      <!-- 筛选条件 -->
+      <div>
+        <el-form
+          ref="searchForm"
+          :model="searchForm"
+          label-width="100px"
+          size="small"
+          label-position="left"
+        >
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="单据类型" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="付款单位类型" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="收款组织" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="单据编号" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="付款单位" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="结算组织" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="币别" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="销售组织" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="业务日期" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="往来单位类型" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="应收金额" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="销售部门" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="销售组" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="往来单位" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="实收金额" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="钱包" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="销售员" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="备注" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <br />
+      <strong>明细</strong>
+      <el-divider></el-divider>
+      <!-- 列表 -->
+      <div class="mymain-container">
+        <div class="table">
+          <el-table
+            v-loading="listLoading"
+            :data="dataList"
+            element-loading-text="Loading"
+            border
+            fit
+            highlight-current-row
+            stripe
+          >
+            <el-table-column
+              align="center"
+              label="序号"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="结算方式"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="收款用途"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="实收金额"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="应收金额"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="现金折扣"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="折后金额"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="我方银行账号"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+          </el-table>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+export default {
+  methods: {
+    goBack() {
+      this.$parent.showDetail = true;
+    },
+  },
+};
+</script>
+
+<style>
+</style>

+ 61 - 86
src/views/finance/components/special_list-detail.vue → src/views/finance/components/receivable_list-add.vue

@@ -1,8 +1,10 @@
 <template>
   <div>
     <div class="sty">
-      <el-page-header @back="goBack" content="特殊费"> </el-page-header>
+      <el-page-header @back="goBack"> </el-page-header>
     </div>
+    <br />
+    <span>基本信息</span>
     <el-divider></el-divider>
     <!-- 表头 -->
     <div>
@@ -15,49 +17,67 @@
       >
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="单据类型" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="往来单位类型" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="结算组织" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="单据来源" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="单据编号" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="单据日期" prop="">
+            <el-form-item label="往来单位" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="经销商" prop="">
-              <el-select class="selectStyle" placeholder="请选择">
-                <el-option> </el-option>
-              </el-select>
+            <el-form-item label="收款组织" prop="">
+              <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="科目" prop="">
+            <el-form-item label="备注" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="币种" prop="">
+            <el-form-item label="业务日期" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="汇率" prop="">
+            <el-form-item label="币别" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="金额" prop="">
+            <el-form-item label="销售组织" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="本币金额" prop="">
+            <el-form-item label="到期日" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="数量" prop="">
+            <el-form-item label="总金额" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
@@ -67,43 +87,45 @@
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="业务员" prop="">
+            <el-form-item label="单据状态" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="项目" prop="">
+            <el-form-item label="申请部门" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="付款条件" prop="">
+            <el-form-item label="" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="摘要" prop="">
+            <el-form-item label="制单日期" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="厂工程编码" prop="">
+            <el-form-item label="制单人" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="订单类型" prop="">
+            <el-form-item label="钱包" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="单据来源" prop="">
+            <el-form-item label="业务员" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
         </el-row>
       </el-form>
     </div>
+    <span>明细</span>
+    <el-divider></el-divider>
     <!-- 列表 -->
     <div class="mymain-container">
       <div class="table">
@@ -115,7 +137,6 @@
           fit
           highlight-current-row
           stripe
-          show-summary
         >
           <el-table-column
             label="序号"
@@ -125,70 +146,56 @@
           ></el-table-column>
           <el-table-column
             align="center"
-            label="方向"
-            prop=""
-            min-width="160"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="科目"
+            label="*费用项目编码"
             prop=""
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
-            label="币种"
+            label="项目费用名称"
             prop=""
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
-            label="汇率"
+            label="*费用承担部门"
             prop=""
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
-            label="金额"
+            label="*发票类型"
             prop=""
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
-            label="本币金额"
+            label="不含税金额"
             prop=""
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
-            label="部门"
+            label="税额"
             prop=""
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
-            label="业务员"
+            label="总金额"
             prop=""
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
-            label="项目"
-            prop=""
-            min-width="160"
-            show-overflow-tooltip
-          ></el-table-column>
-          <el-table-column
-            align="center"
-            label="摘要"
+            label="备注"
             prop=""
             min-width="160"
             show-overflow-tooltip
@@ -196,61 +203,29 @@
         </el-table>
       </div>
     </div>
-    <!-- 表头 -->
-    <div>
-      <el-form
-        ref="searchForm"
-        :model="searchForm"
-        label-width="100px"
-        size="small"
-        label-position="left"
-      >
-        <el-row :gutter="20">
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="录入人" prop="">
-              <el-input placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="录单时间" prop="">
-              <el-input placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="审核人" prop="">
-              <el-input placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="审核时间" prop="">
-              <el-input placeholder="请输入"></el-input>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
+    <!-- 按钮 -->
+    <div class="btn-group clearfix">
+      <div class="fl">
+        <el-button type="primary" size="small">提交审核</el-button>
+        <el-button type="primary" size="small">重置</el-button>
+      </div>
+      <div class="fr">
+        <el-button type="primary" size="small">添加行</el-button>
+        <el-button type="primary" size="small">删除行</el-button>
+      </div>
     </div>
   </div>
 </template>
 
 <script>
 export default {
-  data() {
-    return {
-      dataList: [], // 列表数据
-      searchForm: {}, //搜索表单
-      listLoading: false, // 列表加载loading
-    };
-  },
   methods: {
     goBack() {
-      this.$parent.isShowType = 1;
+      this.$parent.showPage = 1;
     },
   },
 };
 </script>
 
-<style lang="scss" scoped>
-.selectStyle {
-  width: 100%;
-}
+<style>
 </style>

+ 88 - 104
src/views/finance/components/special_list-add.vue → src/views/finance/components/receivable_list-approval.vue

@@ -1,8 +1,10 @@
 <template>
   <div>
     <div class="sty">
-      <el-page-header @back="goBack" content="开单"> </el-page-header>
+      <el-page-header @back="goBack"> </el-page-header>
     </div>
+    <br />
+    <span>基本信息</span>
     <el-divider></el-divider>
     <!-- 表头 -->
     <div>
@@ -15,51 +17,67 @@
       >
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="单据类型" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="往来单位类型" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="结算组织" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="单据来源" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="单据编号" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="单据日期" prop="">
+            <el-form-item label="往来单位" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="经销商" prop="">
-              <el-select class="selectStyle" placeholder="请选择">
-                <el-option> </el-option>
-              </el-select>
+            <el-form-item label="收款组织" prop="">
+              <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="单据内容" prop="">
+            <el-form-item label="备注" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="币种" prop="">
+            <el-form-item label="业务日期" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="税率" prop="">
-              <el-select class="selectStyle" placeholder="请选择">
-                <el-option> </el-option>
-              </el-select>
+            <el-form-item label="币别" prop="">
+              <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="金额" prop="">
+            <el-form-item label="销售组织" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="本币金额" prop="">
+            <el-form-item label="到期日" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="数量" prop="">
+            <el-form-item label="总金额" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
@@ -69,43 +87,45 @@
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="业务员" prop="">
+            <el-form-item label="单据状态" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="项目" prop="">
+            <el-form-item label="申请部门" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="付款条件" prop="">
+            <el-form-item label="" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="摘要" prop="">
+            <el-form-item label="制单日期" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="厂工程编码" prop="">
+            <el-form-item label="制单人" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="订单类型" prop="">
+            <el-form-item label="钱包" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="单据来源" prop="">
+            <el-form-item label="业务员" prop="">
               <el-input placeholder="请输入"></el-input>
             </el-form-item>
           </el-col>
         </el-row>
       </el-form>
     </div>
+    <span>明细</span>
+    <el-divider></el-divider>
     <!-- 列表 -->
     <div class="mymain-container">
       <div class="table">
@@ -117,7 +137,6 @@
           fit
           highlight-current-row
           stripe
-          show-summary
         >
           <el-table-column
             label="序号"
@@ -127,119 +146,94 @@
           ></el-table-column>
           <el-table-column
             align="center"
-            label="方向"
-            prop="aaa"
-            min-width="160"
-            show-overflow-tooltip
-          >
-            <template slot-scope="scope">
-              <el-input v-model="scope.row.aaa"></el-input>
-            </template>
-          </el-table-column>
-          <el-table-column
-            align="center"
-            label="科目"
+            label="*费用项目编码"
             prop=""
             min-width="160"
             show-overflow-tooltip
-          >
-            <template slot-scope="">
-              <el-input></el-input>
-            </template>
-          </el-table-column>
+          ></el-table-column>
           <el-table-column
             align="center"
-            label="币种"
+            label="项目费用名称"
             prop=""
             min-width="160"
             show-overflow-tooltip
-          >
-            <template slot-scope="">
-              <el-input></el-input>
-            </template>
-          </el-table-column>
+          ></el-table-column>
           <el-table-column
             align="center"
-            label="汇率"
+            label="*费用承担部门"
             prop=""
             min-width="160"
             show-overflow-tooltip
-          >
-            <template slot-scope="">
-              <el-input></el-input>
-            </template>
-          </el-table-column>
+          ></el-table-column>
           <el-table-column
             align="center"
-            label="金额"
+            label="*发票类型"
             prop=""
             min-width="160"
             show-overflow-tooltip
-          >
-            <template slot-scope="">
-              <el-input></el-input>
-            </template>
-          </el-table-column>
+          ></el-table-column>
           <el-table-column
             align="center"
-            label="本币金额"
+            label="不含税金额"
             prop=""
             min-width="160"
             show-overflow-tooltip
-          >
-            <template slot-scope="">
-              <el-input></el-input>
-            </template>
-          </el-table-column>
+          ></el-table-column>
           <el-table-column
             align="center"
-            label="部门"
+            label="税额"
             prop=""
             min-width="160"
             show-overflow-tooltip
-          >
-            <template slot-scope="">
-              <el-input></el-input>
-            </template>
-          </el-table-column>
+          ></el-table-column>
           <el-table-column
             align="center"
-            label="业务员"
+            label="总金额"
             prop=""
             min-width="160"
             show-overflow-tooltip
-          >
-            <template slot-scope="">
-              <el-input></el-input>
-            </template>
-          </el-table-column>
+          ></el-table-column>
           <el-table-column
             align="center"
-            label="摘要"
+            label="备注"
             prop=""
             min-width="160"
             show-overflow-tooltip
-          >
-            <template slot-scope="">
-              <el-input></el-input>
-            </template>
-          </el-table-column>
-          <el-table-column
-            align="center"
-            label="操作"
-            min-width="160"
-            show-overflow-tooltip
-          >
-            <el-button type="text" class="textColor">删除</el-button>
-          </el-table-column>
+          ></el-table-column>
         </el-table>
       </div>
     </div>
+
+    <span>审批信息</span>
+    <el-divider></el-divider>
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :span="12" class="item">
+          <div class="label">审批人</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :span="12" class="item">
+          <div class="label">审批结果</div>
+          <div class="value">
+            <el-radio-group>
+              <el-radio :label="true">通过</el-radio>
+              <el-radio :label="false">驳回</el-radio>
+            </el-radio-group>
+          </div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">审批说明</div>
+          <div class="value">
+            <el-input placeholder="请输入内容"></el-input>
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+    <br />
     <!-- 按钮 -->
     <div class="btn-group clearfix">
       <div class="fl">
-        <el-button type="primary" size="small">保存</el-button>
-        <el-button type="primary" size="small">提交审核</el-button>
+        <el-button type="primary" size="small">提交审批</el-button>
         <el-button type="primary" size="small">重置</el-button>
       </div>
     </div>
@@ -248,23 +242,13 @@
 
 <script>
 export default {
-  data() {
-    return {
-      dataList: [{ aaa: "" }], // 列表数据
-      searchForm: {}, //搜索表单
-      listLoading: false, // 列表加载loading
-    };
-  },
   methods: {
     goBack() {
-      this.$parent.isShowType = 1;
+      this.$parent.showPage = 1;
     },
   },
 };
 </script>
 
-<style lang="scss" scoped>
-.selectStyle {
-  width: 100%;
-}
+<style>
 </style>

+ 251 - 0
src/views/finance/components/receivable_list-detail.vue

@@ -0,0 +1,251 @@
+<template>
+  <div>
+    <div class="sty">
+      <el-page-header @back="goBack"> </el-page-header>
+    </div>
+    <br />
+    <span>基本信息</span>
+    <el-divider></el-divider>
+    <!-- 表头 -->
+    <div>
+      <el-form
+        ref="searchForm"
+        :model="searchForm"
+        label-width="100px"
+        size="small"
+        label-position="left"
+      >
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="单据类型" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="往来单位类型" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="结算组织" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="单据来源" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="单据编号" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="往来单位" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="收款组织" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="备注" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="业务日期" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="币别" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="销售组织" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="到期日" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="总金额" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="部门" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="单据状态" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="申请部门" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="组" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="制单日期" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="制单人" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="钱包" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="业务员" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+    <span>明细</span>
+    <el-divider></el-divider>
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            label="序号"
+            align="center"
+            min-width="100"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="*费用项目编码"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="项目费用名称"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="*费用承担部门"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="*发票类型"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="不含税金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="税额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="总金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="备注"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+        </el-table>
+      </div>
+    </div>
+
+    <span>审批记录</span>
+    <el-divider></el-divider>
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :span="8" class="item">
+          <div class="label">审批人</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">审批结果</div>
+          <div class="value">
+            <el-radio-group>
+              <el-radio :label="true">通过</el-radio>
+              <el-radio :label="false">驳回</el-radio>
+            </el-radio-group>
+          </div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">审批时间</div>
+          <div class="value">2022-09-12012:23</div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">审批说明</div>
+          <div class="value">
+            <el-input placeholder="请输入内容"></el-input>
+          </div>
+        </el-col>
+      </el-row>
+    </div>
+    <br />
+  </div>
+</template>
+
+<script>
+export default {
+  methods: {
+    goBack() {
+      this.$parent.showPage = 1;
+    },
+  },
+};
+</script>
+
+<style>
+</style>

+ 280 - 50
src/views/finance/credit_list.vue

@@ -12,31 +12,44 @@
         >
           <el-row :gutter="20">
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="经销商编码" prop="">
-                <el-input placeholder="请输入"></el-input>
+              <el-form-item label="经销商编码" prop="customerNumber">
+                <el-input
+                  v-model="searchForm.customerNumber"
+                  placeholder="请输入"
+                ></el-input>
               </el-form-item>
             </el-col>
             <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="经销商名称" prop="">
-                <el-input placeholder="请输入"></el-input>
+              <el-form-item label="经销商名称" prop="customerName">
+                <el-input
+                  v-model="searchForm.customerName"
+                  placeholder="请输入"
+                ></el-input>
               </el-form-item>
             </el-col>
-            <el-col :xs="24" :sm="12" :lg="12">
-              <el-form-item label="日期时间" prop="">
-                <el-date-picker
-                  type="datetimerange"
-                  range-separator="至"
-                  start-placeholder="开始日期"
-                  end-placeholder="结束日期"
-                >
-                </el-date-picker>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="关联钱包" prop="walletName">
+                <el-input
+                  v-model="searchForm.walletName"
+                  placeholder="请输入"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="总信用额度" prop="amount">
+                <el-input
+                  v-model="searchForm.amount"
+                  placeholder="请输入"
+                ></el-input>
               </el-form-item>
             </el-col>
 
             <el-col :xs="24" :sm="24" :lg="24">
               <el-form-item label="" class="fr">
-                <el-button size="small">清空</el-button>
-                <el-button size="small" type="primary">搜索</el-button>
+                <el-button size="small" @click="clearFn">清空</el-button>
+                <el-button size="small" type="primary" @click="searchFn"
+                  >搜索</el-button
+                >
               </el-form-item>
             </el-col>
           </el-row>
@@ -48,12 +61,11 @@
           <el-button type="primary" size="small" @click="showAddFn"
             >新建</el-button
           >
-          <el-button type="primary" size="small" @click="recordFn"
-            >详情</el-button
-          >
         </div>
         <div class="fr">
-          <el-button type="primary" size="small">导出</el-button>
+          <el-button type="primary" size="small" @click="exportList"
+            >导出</el-button
+          >
           <el-button type="primary" size="small">打印</el-button>
         </div>
       </div>
@@ -72,41 +84,35 @@
             <el-table-column
               label="序号"
               align="center"
-              min-width="100"
+              type="index"
+              width="100"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="经销商编码"
-              prop=""
+              prop="customerNumber"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="经销商名称"
-              prop=""
+              prop="customerName"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="总信用额度"
-              prop=""
-              min-width="160"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
-              align="center"
-              label="上次额度"
-              prop=""
+              prop="amount"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
             <el-table-column
               align="center"
               label="关联钱包"
-              prop=""
+              prop="customerWalletName"
               min-width="160"
               show-overflow-tooltip
             ></el-table-column>
@@ -115,12 +121,18 @@
               label="操作"
               min-width="160"
               show-overflow-tooltip
-            >    
-              <template slot-scope="">
-                <el-button type="text" class="textColor" slot="reference"
-                  >编辑</el-button
+            >
+              <template slot-scope="scope">
+                <el-button
+                  type="text"
+                  class="textColor"
+                  @click="editFn(scope.row)"
+                  >设置额度</el-button
                 >
-                <el-button type="text" class="textColor" slot="reference"
+                <el-button
+                  type="text"
+                  class="textColor"
+                  @click="recordFn(scope.row)"
                   >记录</el-button
                 >
               </template>
@@ -130,6 +142,8 @@
         <!-- 分页 -->
         <div class="fr">
           <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
             :current-page="currentPage"
             :page-sizes="[10, 20, 30, 50]"
             :page-size="10"
@@ -140,31 +154,81 @@
         </div>
       </div>
     </div>
-    <CreditListDetail v-else />
+    <CreditListDetail :recordsList="recordsList" v-else />
     <!-- 新增弹窗 -->
     <el-dialog
-      title="提货人档案"
+      title="新增"
       :visible.sync="dialogForm"
       width="30%"
       :show-close="false"
       :close-on-click-modal="false"
     >
-      <el-form label-width="120px">
+      <el-form
+        ref="addForm"
+        :rules="rules"
+        :model="addForm"
+        label-width="120px"
+      >
         <el-form-item label="经销商名称" prop="customerId" label-width="120px">
-          <el-select class="selectStyle" placeholder="请选择">
-            <el-option> </el-option>
+          <el-select
+            v-model="addForm.customerId"
+            class="selectStyle"
+            placeholder="请选择"
+            filterable
+            @change="customerChangeFn"
+          >
+            <el-option
+              v-for="v in customerList"
+              :key="v.id"
+              :label="v.name"
+              :value="v.id"
+            >
+            </el-option>
           </el-select>
         </el-form-item>
 
-        <el-form-item label="信用变更额度" prop="">
-          <el-input></el-input>
+        <el-form-item label="信用变更额度" prop="amount">
+          <el-input v-model.number="addForm.amount"></el-input>
         </el-form-item>
 
-        <el-form-item label="关联钱包" prop="customerId">
-          <el-select class="selectStyle" placeholder="请选择">
-            <el-option> </el-option>
+        <el-form-item label="关联钱包" prop="customerWalletId">
+          <el-select
+            v-model="addForm.customerWalletId"
+            class="selectStyle"
+            placeholder="请选择"
+            filterable
+          >
+            <el-option
+              v-for="v in customerWalletList"
+              :key="v.customerWalletId"
+              :label="v.mainName"
+              :value="v.customerWalletId"
+            >
+            </el-option>
           </el-select>
         </el-form-item>
+        <el-form-item label="开始时间" prop="startTime">
+          <el-date-picker
+            class="selectStyle"
+            v-model="addForm.startTime"
+            type="datetime"
+            placeholder="选择日期时间"
+            default-time="00:00:00"
+            value-format="yyyy-MM-dd HH:mm:ss"
+          >
+          </el-date-picker>
+        </el-form-item>
+        <el-form-item label="结束时间" prop="endTime">
+          <el-date-picker
+            class="selectStyle"
+            v-model="addForm.endTime"
+            type="datetime"
+            placeholder="选择日期时间"
+            default-time="00:00:00"
+            value-format="yyyy-MM-dd HH:mm:ss"
+          >
+          </el-date-picker>
+        </el-form-item>
       </el-form>
       <div slot="footer" class="dialog-footer">
         <el-button @click="cancelFn">取 消</el-button>
@@ -175,7 +239,15 @@
 </template>
 
 <script>
+import { getWalletCustomerList } from "@/api/finance/change_apply";
+import { getDealerList } from "@/api/basic_data/dealer";
+import {
+  getCreditListAdd,
+  getCreditList,
+  getCreditListEdit,
+} from "@/api/finance/credit_list";
 import CreditListDetail from "./components/credit_list-detail";
+import { downloadFiles } from "@/utils/util";
 export default {
   components: {
     CreditListDetail,
@@ -186,24 +258,182 @@ export default {
       pageSize: 10, // 每页数量
       listTotal: 0, // 列表总数
       dataList: [], // 列表数据
-      searchForm: {}, //搜索表单
+      searchForm: {
+        customerNumber: "",
+        customerName: "",
+        amount: "",
+        walletName: "",
+      }, //搜索表单
       listLoading: false, // 列表加载loading
       showRecord: true,
       dialogForm: false, //弹窗表单
+      addForm: {
+        startTime: "",
+        endTime: "",
+        amount: null,
+        customerId: "",
+        customerWalletId: "",
+      },
+      customerList: [], //经销商列表数据
+      customerWalletList: [], //经销商钱包列表
+      recordsList: {}, //记录数据
+      customerWalletCreditId: null, //设置额度ID
+      rules: {
+        startTime: [
+          { required: true, message: "请选择开始时间", trigger: "blur" },
+        ],
+        endTime: [
+          { required: true, message: "请选择结束时间", trigger: "blur" },
+        ],
+        amount: [
+          {
+            required: true,
+            message: "请输入数字",
+            type: "number",
+            trigger: "blur",
+          },
+        ],
+        customerId: [
+          { required: true, message: "请选择经销商", trigger: "blur" },
+        ],
+        customerWalletId: [
+          { required: true, message: "请选择钱包", trigger: "blur" },
+        ],
+      },
     };
   },
+  created() {
+    this.getDataList({ pageSize: this.pageSize, pageNum: this.currentPage });
+    this.getDealerData({ pageSize: -1, pageNum: 1 });
+  },
   methods: {
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getDataList({ pageNum: 1, pageSize: this.pageSize });
+    },
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getDataList({ pageNum: val, pageSize: 10 });
+    },
+    //设置额度
+    editFn(value) {
+      this.customerWalletCreditId = value.id;
+
+      this.addForm = {
+        startTime: "",
+        endTime: "",
+        amount: value.amount,
+        customerId: value.customerId,
+        customerWalletId: value.customerWalletId,
+      };
+      this.getWalletData({ type: "COMMONLY", customerId: value.customerId });
+
+      this.dialogForm = true;
+    },
+    //导出
+    exportList() {
+      let screenData = {
+        amount: this.searchForm.amount,
+        customerNumber: this.searchForm.customerNumber,
+        customerName: this.searchForm.customerName,
+        walletName: this.searchForm.walletName,
+      };
+      downloadFiles("/credit/exportData", screenData);
+    },
+    //清空
+    clearFn() {
+      this.$refs.searchForm.resetFields();
+    },
+    //搜索
+    searchFn() {
+      this.getDataList({
+        ...this.searchForm,
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+      });
+    },
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getDataList({ pageNum: 1, pageSize: this.pageSize });
+    },
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getDataList({ pageNum: val, pageSize: 10 });
+    },
+    //列表数据
+    async getDataList(data) {
+      const res = await getCreditList(data);
+      console.log(res);
+      this.dataList = res.data.records;
+      this.listTotal = res.data.total;
+    },
+    //下拉框数据
+    customerChangeFn(value) {
+      this.getWalletData({ type: "COMMONLY", customerId: value });
+    },
+    //获取经销商钱包列表
+    async getWalletData(data) {
+      const res = await getWalletCustomerList(data);
+
+      this.customerWalletList = res.data;
+    },
+    //获取经销商列表
+    async getDealerData(data) {
+      const res = await getDealerList(data);
+
+      this.customerList = res.data.records;
+    },
     //新建
     showAddFn() {
       this.dialogForm = true;
     },
     //确定
-    addDataFn() {},
+    async addDataFn() {
+      await this.$refs.addForm.validate();
+
+      if (this.customerWalletCreditId) {
+        await getCreditListEdit({
+          ...this.addForm,
+          customerWalletCreditId: this.customerWalletCreditId,
+        });
+        this.$message.success("设置成功");
+      } else {
+        await getCreditListAdd({ ...this.addForm });
+        this.$message.success("新增成功");
+      }
+      this.getDataList({ pageSize: this.pageSize, pageNum: this.currentPage });
+      this.addForm = {
+        startTime: "",
+        endTime: "",
+        amount: null,
+        customerId: "",
+        customerWalletId: "",
+      };
+      this.customerWalletCreditId = null;
+      this.dialogForm = false;
+    },
     //取消
-    cancelFn() {
+    async cancelFn() {
+      // this.addForm = {
+      //   startTime: "",
+      //   endTime: "",
+      //   amount: null,
+      //   customerId: "",
+      //   customerWalletId: "",
+      // };
+      await this.$refs.addForm.resetFields();
+      this.customerWalletCreditId = null;
       this.dialogForm = false;
     },
-    recordFn() {
+    //记录
+    recordFn(v) {
+      this.recordsList = v;
       this.showRecord = false;
     },
   },

+ 9 - 2
src/views/finance/finance_sum.vue

@@ -41,14 +41,21 @@
         >
           <el-table-column
             align="center"
-            label="钱包类型"
+            label="品类"
             prop=""
             min-width="160"
             show-overflow-tooltip
           ></el-table-column>
           <el-table-column
             align="center"
-            label="经销商名称"
+            label="钱包名称"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="余额"
             prop=""
             min-width="160"
             show-overflow-tooltip

+ 132 - 0
src/views/finance/rebate_form.vue

@@ -0,0 +1,132 @@
+<template>
+  <div class="app-container">
+    <span>返利单</span>
+    <el-divider></el-divider>
+    <!-- 表头 -->
+    <div>
+      <el-form
+        ref="searchForm"
+        :model="searchForm"
+        label-width="100px"
+        size="small"
+        label-position="left"
+      >
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="返利单号" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="返利日期" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="备注" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="制单人" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="制单日期" prop="">
+              <el-input placeholder="请输入"></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+    <!-- 按钮 -->
+    <div class="btn-group clearfix">
+      <div class="fr">
+        <el-button type="primary" size="small">批量导入</el-button>
+      </div>
+    </div>
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            align="center"
+            label="序号"
+            type="index"
+            width="100"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="经销商编码"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="经销商名称"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="经销商简称"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="返利类型"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="返利总金额"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="暂扣返利"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="备注"
+            prop=""
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+        </el-table>
+      </div>
+    </div>
+    <br />
+    <el-button type="primary" size="small">保存</el-button>
+    <el-button type="primary" size="small">提交审批</el-button>
+    <el-button type="primary" size="small">重置</el-button>
+  </div>
+</template>
+
+<script>
+export default {};
+</script>
+
+<style>
+</style>

+ 155 - 17
src/views/finance/rebate_list.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <div v-if="showInfo">
+    <div v-if="showPage == 1">
       <!-- 筛选条件 -->
       <div>
         <el-form
@@ -47,15 +47,22 @@
       <!-- 按钮 -->
       <div class="btn-group clearfix">
         <div class="fl">
+          <el-button type="primary" size="small" @click="applyFn"
+            >申请</el-button
+          >
+
+          <el-button type="primary" size="small" @click="examineFn"
+            >审核</el-button
+          >
+
+          <el-button type="primary" size="small" @click="reviewFn"
+            >复核</el-button
+          >
+
           <el-button type="primary" size="small" @click="infoFn"
             >详情</el-button
           >
         </div>
-        <div class="fr">
-          <el-button type="primary" size="small">导入</el-button>
-          <el-button type="primary" size="small">导出</el-button>
-          <el-button type="primary" size="small">打印</el-button>
-        </div>
       </div>
 
       <!-- 列表 -->
@@ -71,12 +78,6 @@
             stripe
           >
             <el-table-column
-              label="序号"
-              align="center"
-              min-width="100"
-              show-overflow-tooltip
-            ></el-table-column>
-            <el-table-column
               align="center"
               label="返利单号"
               prop=""
@@ -106,6 +107,20 @@
             ></el-table-column>
             <el-table-column
               align="center"
+              label="主表备注"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="总金额"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
               label="返利类型"
               prop=""
               min-width="160"
@@ -127,7 +142,98 @@
             ></el-table-column>
             <el-table-column
               align="center"
-              label="备注"
+              label="折让金额"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="折让编号"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="折让账号"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="已办理折让金额"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="折让对应收款单号"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="制单人"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="制单时间"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="审核人"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="审核时间"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="确认人"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="确认时间"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="复核人"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="复核时间"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="状态"
               prop=""
               min-width="160"
               show-overflow-tooltip
@@ -137,9 +243,19 @@
               label="操作"
               min-width="160"
               show-overflow-tooltip
+              fixed="right"
             >
               <template slot-scope="">
                 <el-button type="text" class="textColor" slot="reference"
+                  >申请</el-button
+                >
+                <el-button type="text" class="textColor" slot="reference"
+                  >审核</el-button
+                >
+                <el-button type="text" class="textColor" slot="reference"
+                  >复核</el-button
+                >
+                <el-button type="text" class="textColor" slot="reference"
                   >详情</el-button
                 >
               </template>
@@ -159,17 +275,25 @@
         </div>
       </div>
     </div>
-
+    <RebateListApply v-else-if="showPage == 2" />
+    <RebateListExamine v-else-if="showPage == 3" />
+    <RebateListReview v-else-if="showPage == 4" />
     <!-- 详情 -->
-    <RebateListDetail v-else />
+    <RebateListDetail v-else-if="showPage == 5" />
   </div>
 </template>
 
 <script>
+import RebateListApply from "./components/rebate_list-apply.vue";
+import RebateListExamine from "./components/rebate_list-examine.vue";
+import RebateListReview from "./components/rebate_list-review.vue";
 import RebateListDetail from "./components/rebate_list-detail";
 export default {
   components: {
     RebateListDetail,
+    RebateListApply,
+    RebateListExamine,
+    RebateListReview,
   },
   data() {
     return {
@@ -179,12 +303,26 @@ export default {
       dataList: [], // 列表数据
       searchForm: {}, //搜索表单
       listLoading: false, // 列表加载loading
-      showInfo: true,
+      showPage: 1,
     };
   },
   methods: {
+    //复核
+    reviewFn() {
+      this.showPage = 4;
+    },
+    //审核
+    examineFn() {
+      this.showPage = 3;
+    },
+    //申请
+    applyFn() {
+      this.showPage = 2;
+    },
+
+    //详情
     infoFn() {
-      this.showInfo = false;
+      this.showPage = 5;
     },
   },
 };

+ 240 - 0
src/views/finance/receipt_list.vue

@@ -0,0 +1,240 @@
+<template>
+  <div class="app-container">
+    <div v-if="showDetail">
+      <!-- 筛选条件 -->
+      <div>
+        <el-form
+          ref="searchForm"
+          :model="searchForm"
+          label-width="100px"
+          size="small"
+          label-position="left"
+        >
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="单据类型" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="单据编号" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="往来单位" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="付款单位" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="结算方式" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="收款用途" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="业务日期" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="" class="fr">
+                <el-button size="small">清空</el-button>
+                <el-button size="small" type="primary">搜索</el-button>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <!-- 按钮 -->
+      <div class="btn-group clearfix">
+        <div class="fr">
+          <el-button type="primary" size="small" @click="seeFn">查看</el-button>
+          <el-button type="primary" size="small">导出</el-button>
+        </div>
+      </div>
+      <!-- 列表 -->
+      <div class="mymain-container">
+        <div class="table">
+          <el-table
+            v-loading="listLoading"
+            :data="dataList"
+            element-loading-text="Loading"
+            border
+            fit
+            highlight-current-row
+            stripe
+          >
+            <el-table-column
+              align="center"
+              label="单据类型"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="单据编码"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="业务日期"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="币别"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="表头·应收金额"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="往来单位"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="表头·实收金额"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="收款金额"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="结算方式"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="收款用途"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="付款单位"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="表体·实收金额"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="勾对"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="单据状态"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="备注"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="操作"
+              min-width="160"
+              show-overflow-tooltip
+            >
+              <template slot-scope="">
+                <el-button type="text" class="textColor" slot="reference"
+                  >查看</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <!-- 分页 -->
+        <div class="fr">
+          <el-pagination
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal"
+          >
+          </el-pagination>
+        </div>
+      </div>
+    </div>
+    <ReceiptListDetail v-else />
+  </div>
+</template>
+
+<script>
+import ReceiptListDetail from "./components/receipt_list-detail";
+export default {
+  components: {
+    ReceiptListDetail,
+  },
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: [], // 列表数据
+      searchForm: {}, //搜索表单
+      listLoading: false, // 列表加载loading
+      showDetail: true,
+    };
+  },
+  methods: {
+    seeFn() {
+      this.showDetail = false;
+    },
+  },
+};
+</script>
+
+<style>
+</style>

+ 231 - 0
src/views/finance/receivable_list.vue

@@ -0,0 +1,231 @@
+<template>
+  <div class="app-container">
+    <div v-if="showPage == 1">
+      <el-radio-group v-model="examine" size="">
+        <el-radio-button label="全部"></el-radio-button>
+        <el-radio-button label="待审核"></el-radio-button>
+        <el-radio-button label="审核通过"></el-radio-button>
+        <el-radio-button label="审核驳回"></el-radio-button>
+      </el-radio-group>
+      <br /><br />
+      <!-- 筛选条件 -->
+      <div>
+        <el-form
+          ref="searchForm"
+          :model="searchForm"
+          label-width="100px"
+          size="small"
+          label-position="left"
+        >
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="工程押金" prop="">
+                <el-select class="selectStyle" placeholder="请选择">
+                  <el-option> </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="单据编号" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="往来单位" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="申请部门" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="业务日期" prop="">
+                <el-input placeholder="请输入"></el-input>
+              </el-form-item>
+            </el-col>
+
+            <el-col :xs="24" :sm="24" :lg="18">
+              <el-form-item label="" class="fr">
+                <el-button size="small">清空</el-button>
+                <el-button size="small" type="primary">搜索</el-button>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <!-- 按钮 -->
+      <div class="btn-group clearfix">
+        <div class="fl">
+          <el-button type="primary" size="small" @click="addFn">新建</el-button>
+          <el-button type="primary" size="small">删除</el-button>
+          <el-button type="primary" size="small" @click="approvalFn"
+            >审批</el-button
+          >
+          <el-button type="primary" size="small" @click="detailFn"
+            >详情</el-button
+          >
+        </div>
+        <div class="fr">
+          <el-button type="primary" size="small">导出</el-button>
+        </div>
+      </div>
+      <!-- 列表 -->
+      <div class="mymain-container">
+        <div class="table">
+          <el-table
+            v-loading="listLoading"
+            :data="dataList"
+            element-loading-text="Loading"
+            border
+            fit
+            highlight-current-row
+            stripe
+          >
+            <el-table-column align="center" type="selection" width="100">
+            </el-table-column>
+            <el-table-column
+              align="center"
+              label="单据类型"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="单据来源"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="单据编码"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="业务日期"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="往来单位类型"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="往来单位"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="币别"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="总金额"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="单据状态"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+
+            <el-table-column
+              align="center"
+              label="操作"
+              min-width="160"
+              show-overflow-tooltip
+              fixed="right"
+            >
+              <template slot-scope="">
+                <el-button type="text" class="textColor" slot="reference"
+                  >审批</el-button
+                >
+                <el-button type="text" class="textColor" slot="reference"
+                  >详情</el-button
+                >
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+        <!-- 分页 -->
+        <div class="fr">
+          <el-pagination
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal"
+          >
+          </el-pagination>
+        </div>
+      </div>
+    </div>
+    <ReceivableListAdd v-else-if="showPage == 2" />
+    <ReceivableListApproval v-else-if="showPage == 3" />
+    <ReceivableListDetail v-else-if="showPage == 4" />
+  </div>
+</template>
+
+<script>
+import ReceivableListAdd from "./components/receivable_list-add";
+import ReceivableListApproval from "./components/receivable_list-approval";
+import ReceivableListDetail from "./components/receivable_list-detail";
+export default {
+  components: {
+    ReceivableListAdd,
+    ReceivableListApproval,
+    ReceivableListDetail,
+  },
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: [], // 列表数据
+      searchForm: {}, //搜索表单
+      listLoading: false, // 列表加载loading
+      examine: "全部",
+      showPage: 1,
+    };
+  },
+  methods: {
+    //详情
+    detailFn() {
+      this.showPage = 4;
+    },
+    //审批
+    approvalFn() {
+      this.showPage = 3;
+    },
+    //新建
+    addFn() {
+      this.showPage = 2;
+    },
+  },
+};
+</script>
+<style lang="scss" scoped>
+.selectStyle {
+  width: 100%;
+}
+</style>

+ 512 - 0
src/views/finance/standbook_list.vue

@@ -0,0 +1,512 @@
+<template>
+  <div class="app-container">
+    <span>台账</span>
+    <el-divider></el-divider>
+    <el-radio-group v-model="mainId" size="">
+      <el-radio-button
+        v-for="v in dictList"
+        :key="v.sysDictId"
+        :label="v.dictCode"
+        >{{ v.dictValue }}</el-radio-button
+      >
+    </el-radio-group>
+    <br /><br />
+    <el-radio-group v-model="bill" @change="checkFn" size="">
+      <el-radio-button label="COMMONLY">贷款台账</el-radio-button>
+      <el-radio-button label="REBATE">返利台账</el-radio-button>
+    </el-radio-group>
+    <h1></h1>
+    <!-- 筛选条件 -->
+    <div>
+      <el-form
+        ref="searchForm"
+        :model="searchForm"
+        label-width="100px"
+        size="small"
+        label-position="left"
+      >
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="钱包" prop="walletRebateId">
+              <el-select
+                class="selectStyle"
+                v-model="searchForm.walletRebateId"
+                placeholder="请选择"
+              >
+                <el-option
+                  v-for="v in selectList"
+                  :key="v.walletRebateId"
+                  :label="v.name"
+                  :value="v.walletRebateId"
+                >
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="单据号" prop="billNo">
+              <el-input
+                v-model="searchForm.billNo"
+                placeholder="请输入"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="开始时间" prop="startTime">
+              <el-date-picker
+                class="selectStyle"
+                v-model="searchForm.startTime"
+                type="datetime"
+                placeholder="选择日期时间"
+                default-time="00:00:00"
+                value-format="yyyy-MM-dd HH:mm:ss"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="结束时间" prop="endTime">
+              <el-date-picker
+                class="selectStyle"
+                v-model="searchForm.endTime"
+                type="datetime"
+                placeholder="选择日期时间"
+                default-time="00:00:00"
+                value-format="yyyy-MM-dd HH:mm:ss"
+              >
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+
+          <el-col :xs="24" :sm="24" :lg="24">
+            <el-form-item label="" class="fr">
+              <el-button size="small" @click="resetFn">清空</el-button>
+              <el-button size="small" type="primary" @click="searchFn"
+                >搜索</el-button
+              >
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+    <div v-show="bill == 'COMMONLY'">
+      <!-- 列表 -->
+      <div class="mymain-container">
+        <div class="table">
+          <el-table
+            v-loading="listLoading"
+            :data="dataList"
+            element-loading-text="Loading"
+            border
+            fit
+            highlight-current-row
+            stripe
+          >
+            <el-table-column
+              label="序号"
+              align="center"
+              width="100"
+              type="index"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="单据日期"
+              prop="theTime"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="单据类型"
+              prop="billType"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="单据号"
+              prop="billNo"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="钱包"
+              prop="walletName"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="摘要"
+              prop="remark"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="预付货款"
+              prop="flag"
+              min-width="160"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                {{ scope.row.flag == 1 ? scope.row.amount : "-" }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              label="订单占款"
+              prop="flag"
+              min-width="160"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                {{ scope.row.flag == 2 ? scope.row.amount : "-" }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              label="支付货款"
+              prop="flag"
+              min-width="160"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                {{ scope.row.flag == 3 ? scope.row.amount : "-" }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              label="押金"
+              prop="flag"
+              min-width="160"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                {{ scope.row.flag == 4 ? scope.row.amount : "-" }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              label="工程保证金"
+              prop="flag"
+              min-width="160"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                {{ scope.row.flag == 5 ? scope.row.amount : "-" }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              label="其他暂扣款"
+              prop="flag"
+              min-width="160"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                {{ scope.row.flag == 6 ? scope.row.amount : "-" }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              label="账户余额"
+              prop="balanceAmount"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+          </el-table>
+        </div>
+        <!-- 分页 -->
+        <div class="fr">
+          <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal"
+          >
+          </el-pagination>
+        </div>
+      </div>
+    </div>
+    <div v-show="bill == 'REBATE'">
+      <!-- 列表 -->
+      <div class="mymain-container">
+        <div class="table">
+          <el-table
+            v-loading="listLoading"
+            :data="dataList"
+            element-loading-text="Loading"
+            border
+            fit
+            highlight-current-row
+            stripe
+          >
+            <el-table-column
+              label="序号"
+              align="center"
+              width="100"
+              type="index"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="客户编码"
+              prop="customerCode"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="客户名称"
+              prop="customerName"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="单据日期"
+              prop="theTime"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="审核日期"
+              prop="examineTime"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="单据类型"
+              prop="billType"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="单据号"
+              prop="billNo"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="返利品类"
+              prop="mainName"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="摘要"
+              prop="remark"
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="收入"
+              prop="amountType"
+              min-width="160"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                {{ scope.row.amountType == "IN" ? scope.row.amount : "-" }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              label="支出"
+              prop="amountType"
+              min-width="160"
+              show-overflow-tooltip
+            >
+              <template slot-scope="scope">
+                {{ scope.row.amountType == "OUT" ? scope.row.amount : "-" }}
+              </template>
+            </el-table-column>
+            <el-table-column
+              align="center"
+              label="暂扣返利"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+            <el-table-column
+              align="center"
+              label="结存"
+              prop=""
+              min-width="160"
+              show-overflow-tooltip
+            ></el-table-column>
+          </el-table>
+        </div>
+        <!-- 分页 -->
+        <div class="fr">
+          <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal"
+          >
+          </el-pagination>
+        </div>
+      </div>
+    </div>
+  </div>
+</template>
+
+<script>
+import { mapGetters } from "vuex";
+import { getWalletCustomerList } from "@/api/finance/change_apply";
+import { getStandbookList, getDictList } from "@/api/finance/standbook_list";
+export default {
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      // dataListRebate: [], // 列表数据
+      // dataListLoan: [], // 列表数据
+      dataList: [],
+      selectList: [],
+      dictList: [],
+
+      searchForm: {
+        startTime: "",
+        endTime: "",
+        billNo: "",
+        walletRebateId: "",
+      }, //搜索表单
+      listLoading: false, // 列表加载loading
+      mainId: "",
+      bill: "COMMONLY",
+    };
+  },
+  computed: {
+    ...mapGetters(["customerId"]),
+  },
+  created() {
+    this.getDataList({
+      pageSize: this.pageSize,
+      pageNum: this.currentPage,
+      type: this.bill,
+    });
+    this.getWalletList();
+    this.getDataDict();
+  },
+  methods: {
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getDataList({ pageNum: 1, pageSize: this.pageSize });
+    },
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getDataList({ pageNum: val, pageSize: 10 });
+    },
+    //获取品类
+    async getDataDict() {
+      const res = await getDictList({ sysDictEnum: "PRODUCT_TYPE" });
+      console.log(res);
+      this.dictList = res.data;
+    },
+    //重置
+    resetFn() {
+      this.mainId = "";
+      this.$refs.searchForm.resetFields();
+    },
+    //查询
+    searchFn() {
+      // console.log(this.searchForm);
+      // const res = this.selectList.filter(
+      //   (v) => v.walletRebateId == this.searchForm.walletRebateId
+      // );
+      // console.log(res);
+      this.getDataList({
+        ...this.searchForm,
+        mainId: this.mainId,
+        type: this.bill,
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+      });
+    },
+
+    //钱包数据
+    async getWalletList() {
+      let res = await getWalletCustomerList({
+        customerId: this.customerId,
+        type: this.bill,
+      });
+      this.selectList = res.data;
+    },
+    //切换列表
+    checkFn(v) {
+      console.log(v);
+      this.getDataList({
+        pageSize: this.pageSize,
+        pageNum: this.currentPage,
+        type: v,
+      });
+      this.getWalletList();
+    },
+    //
+    async getDataList(data) {
+      let res;
+      if (this.bill == "COMMONLY") {
+        res = await getStandbookList(data);
+      } else {
+        res = await getStandbookList(data);
+      }
+
+      this.dataList = res.data.records;
+      this.listTotal = res.data.total;
+    },
+  },
+};
+</script>
+
+<style lang="scss" scoped>
+.moneyStyle {
+  height: 130px;
+  border-radius: 20px;
+  padding: 20px 0 0 20px;
+  color: #fff;
+  span {
+    display: block;
+    font-size: 20px;
+  }
+  strong {
+    margin-top: 16px;
+    display: block;
+    font-size: 36px;
+  }
+}
+.selectStyle {
+  width: 100%;
+}
+.color1 {
+  background-color: #6c83d0;
+}
+.color2 {
+  background-color: #dfc062;
+}
+.color3 {
+  background-color: #dfc062;
+}
+.color4 {
+  background-color: #6bcfd7;
+}
+</style>

+ 123 - 360
src/views/finance/wallet.vue

@@ -1,385 +1,148 @@
-<template>
+<template >
   <div class="app-container">
-    <div v-if="showRebate">
-      <!-- 筛选条件 -->
-      <div>
-        <el-form
-          ref="searchForm"
-          :model="searchForm"
-          label-width="100px"
-          size="small"
-          label-position="left"
-        >
-          <el-row :gutter="20">
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="钱包" prop="">
-                <el-select class="selectStyle" placeholder="请选择">
-                  <el-option> </el-option>
-                </el-select>
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="6">
-              <el-form-item label="单据号" prop="">
-                <el-input placeholder="请输入"></el-input>
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="12" :lg="12">
-              <el-form-item label="日期时间" prop="">
-                <el-date-picker
-                  type="datetimerange"
-                  range-separator="至"
-                  start-placeholder="开始日期"
-                  end-placeholder="结束日期"
-                >
-                </el-date-picker>
-              </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="24" :lg="24">
-              <el-form-item label="" class="fr">
-                <el-button size="small">清空</el-button>
-                <el-button size="small" type="primary">搜索</el-button>
-              </el-form-item>
-            </el-col>
-          </el-row>
-        </el-form>
-      </div>
-
-      <el-radio-group v-model="category" size="">
-        <el-radio-button label="家用空调"></el-radio-button>
-        <el-radio-button label="商用空调"></el-radio-button>
-        <el-radio-button label="生活电器"></el-radio-button>
-      </el-radio-group>
-      <h1></h1>
-      <div>
-        <el-row type="flex" class="row-bg" justify="space-around">
-          <el-col :xs="24" :sm="12" :lg="4"
-            ><div class="moneyStyle color1">
-              <span>普通钱包</span>
-              <strong>¥12.367万</strong>
-            </div>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="4"
-            ><div class="moneyStyle color2">
-              <span>特殊钱包</span> <strong>¥12.367万</strong>
-            </div></el-col
-          >
-          <el-col :xs="24" :sm="12" :lg="4">
-            <div class="moneyStyle color3">
-              <span>折扣钱包</span> <strong>¥12.367万</strong>
-            </div></el-col
-          >
-          <el-col :xs="24" :sm="12" :lg="4">
-            <div @click="rebateFn" class="moneyStyle color4">
-              <span>返利钱包</span> <strong>¥12.367万</strong>
-            </div></el-col
+    <el-row>
+      <el-col :xs="24" :sm="12" :lg="12">
+        <div class="styl">现金钱包</div>
+      </el-col>
+      <el-col :xs="24" :sm="12" :lg="12">
+        <div class="fr">
+          <el-button size="small" type="primary" @click="generateFn"
+            >一键生成钱包</el-button
           >
-        </el-row>
-      </div>
-      <el-divider></el-divider>
-      <el-radio-group v-model="bill" size="">
-        <el-radio-button label="贷款台账"></el-radio-button>
-        <el-radio-button label="返利台账"></el-radio-button>
-      </el-radio-group>
-      <div v-show="bill == '贷款台账'">
-        <!-- 列表 -->
-        <div class="mymain-container">
-          <div class="table">
-            <el-table
-              v-loading="listLoading"
-              :data="dataList"
-              element-loading-text="Loading"
-              border
-              fit
-              highlight-current-row
-              stripe
-            >
-              <el-table-column
-                label="序号"
-                align="center"
-                min-width="100"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="单据日期"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="单据类型"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="单据号"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="钱包"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="摘要"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="预付货款"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="订单占款"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="支付货款"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="押金"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="工程保证金"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="其他暂扣款"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="账户余额"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-            </el-table>
-          </div>
-          <!-- 分页 -->
-          <div class="fr">
-            <el-pagination
-              :current-page="currentPage"
-              :page-sizes="[10, 20, 30, 50]"
-              :page-size="10"
-              layout="total, sizes, prev, pager, next, jumper"
-              :total="listTotal"
-            >
-            </el-pagination>
-          </div>
         </div>
+      </el-col>
+    </el-row>
+    <el-divider></el-divider>
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="walletList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            align="center"
+            label="钱包类型"
+            prop="type"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="钱包"
+            prop="name"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="余额"
+            prop="amount"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="更新时间"
+            prop="updateTime"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+        </el-table>
       </div>
-      <div v-show="bill == '返利台账'">
-        <!-- 列表 -->
-        <div class="mymain-container">
-          <div class="table">
-            <el-table
-              v-loading="listLoading"
-              :data="dataList"
-              element-loading-text="Loading"
-              border
-              fit
-              highlight-current-row
-              stripe
-            >
-              <el-table-column
-                label="序号"
-                align="center"
-                min-width="100"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="客户编码"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="客户名称"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="单据日期"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="审核日期"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="单据类型"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="单据号"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="返利品类"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="摘要"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="收入"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="支出"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="暂扣返利"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-              <el-table-column
-                align="center"
-                label="结存"
-                prop=""
-                min-width="160"
-                show-overflow-tooltip
-              ></el-table-column>
-            </el-table>
-          </div>
-          <!-- 分页 -->
-          <div class="fr">
-            <el-pagination
-              :current-page="currentPage"
-              :page-sizes="[10, 20, 30, 50]"
-              :page-size="10"
-              layout="total, sizes, prev, pager, next, jumper"
-              :total="listTotal"
-            >
-            </el-pagination>
-          </div>
-        </div>
+    </div>
+    <span>返利钱包</span>
+    <el-divider></el-divider>
+    <!-- 列表 -->
+    <div class="mymain-container">
+      <div class="table">
+        <el-table
+          v-loading="listLoading"
+          :data="rebateList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            align="center"
+            label="返利钱包"
+            prop="name"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="钱包余额"
+            prop="amount"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+          <el-table-column
+            align="center"
+            label="更新时间"
+            prop="updateTime"
+            min-width="160"
+            show-overflow-tooltip
+          ></el-table-column>
+        </el-table>
       </div>
     </div>
-    <WalletDetail v-else />
   </div>
 </template>
 
 <script>
-import WalletDetail from "./components/wallet-detail.vue";
+import { mapGetters } from "vuex";
+import { getfinanceInit } from "@/api/finance/wallet";
+import { getWalletCustomerList } from "@/api/finance/change_apply";
 export default {
-  components: {
-    WalletDetail,
-  },
   data() {
     return {
-      currentPage: 1, // 当前页码
-      pageSize: 10, // 每页数量
-      listTotal: 0, // 列表总数
-      dataList: [], // 列表数据
-      searchForm: {}, //搜索表单
-      showRebate: true,
-      category: "家用空调",
-      bill: "贷款台账",
+      listLoading: false, // 列表加载loading
+      walletList: [],
+      rebateList: [],
     };
   },
+  created() {
+    this.getDataWallet();
+    this.getDataRebate();
+  },
+  computed: {
+    ...mapGetters(["customerId"]),
+  },
   methods: {
-    //返利钱包
-    rebateFn() {
-      this.showRebate = false;
+    //一键生成
+    async generateFn() {
+      await getfinanceInit({ customerId: this.customerId });
+      this.$message.success("已生成");
     },
-    goBack() {
-      this.$parent.showDetail = true;
+    //
+    async getDataRebate() {
+      let res = await getWalletCustomerList({
+        customerId: this.customerId,
+        type: "REBATE",
+      });
+      this.rebateList = res.data;
+    },
+    async getDataWallet() {
+      let res = await getWalletCustomerList({
+        customerId: this.customerId,
+        type: "COMMONLY",
+      });
+      this.walletList = res.data;
     },
   },
 };
 </script>
 
 <style lang="scss" scoped>
-.moneyStyle {
-  height: 130px;
-  border-radius: 20px;
-  padding: 20px 0 0 20px;
-  color: #fff;
-  span {
-    display: block;
-    font-size: 20px;
-  }
-  strong {
-    margin-top: 16px;
-    display: block;
-    font-size: 36px;
-  }
-}
-.selectStyle {
-  width: 100%;
-}
-.color1 {
-  background-color: #6c83d0;
-}
-.color2 {
-  background-color: #dfc062;
-}
-.color3 {
-  background-color: #dfc062;
-}
-.color4 {
-  background-color: #6bcfd7;
+.styl {
+  padding-top: 14px;
 }
 </style>

+ 108 - 91
src/views/sales_policy/codealer_list.vue

@@ -1,64 +1,77 @@
 <template>
   <el-container v-if="isShow">
     <el-header height="100%" class="mg">
-      <el-row>
-        <el-col :span="6">
-          <el-input
-            v-model="input"
-            placeholder="销售政策编号"
-            size="normal"
-            clearable
-            @change=""
-          ></el-input>
-        </el-col>
-        <el-col :span="6" :push="1">
-          <el-input
-            v-model="input"
-            placeholder="销售政策说明"
-            size="normal"
-            clearable
-            @change=""
-          ></el-input>
-        </el-col>
-        <el-col :span="6" :push="2">
-          <el-input
-            v-model="input"
-            placeholder="表头备注"
-            size="normal"
-            clearable
-            @change=""
-          ></el-input>
-        </el-col>
-        <!-- <el-col :span="6" class="btn">
+      <el-form
+        size="small"
+        :model="searchForm"
+        ref="searchForm"
+        :inline="false"
+      >
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="8" :lg="8">
+            <el-form-item prop="code">
+              <el-input
+                size="small"
+                v-model="searchForm.code"
+                placeholder="销售政策编号"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="8" :lg="8">
+            <el-form-item prop="remark">
+              <el-input
+                size="small"
+                v-model="searchForm.remark"
+                placeholder="销售政策说明"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="8" :lg="8">
+            <el-form-item prop="title">
+              <el-input
+                size="small"
+                v-model="searchForm.title"
+                placeholder="表头备注"
+              ></el-input>
+            </el-form-item>
+          </el-col>
+        </el-row>
 
-        </el-col> -->
-      </el-row>
-      <el-row class="mg">
-        <el-button type="primary" size="default" @click="">查询</el-button>
-        <el-button type="primary" size="default" @click="">重置</el-button>
-        <el-button type="primary" size="default" @click="">导出</el-button>
-      </el-row>
+        <el-row class="mg">
+          <el-button type="primary" size="small" @click="submitScreenForm"
+            >查询</el-button
+          >
+          <el-button type="primary" size="small" @click="resetScreenForm"
+            >重置</el-button
+          >
+          <el-button type="primary" size="small" @click="">导出</el-button>
+        </el-row>
+      </el-form>
     </el-header>
     <el-main>
-      <el-table :data="tableData" border style="width: 100%">
+      <el-table :data="dataList" border style="width: 100%">
         <el-table-column prop="name" label="操作" width="120" align="center">
+          <template slot-scope>
+            <el-button type="text" size="small" @click="">详情</el-button>
+          </template>
         </el-table-column>
-        <el-table-column
-          prop="province"
-          label="状态"
-          width="120"
-          align="center"
-        >
+        <el-table-column prop="status" label="状态" width="120" align="center">
+          <template slot-scope="scope">
+            <el-tag type="success" size="small" v-if="scope.row.status == 1"
+              >已生效</el-tag
+            >
+            <el-tag type="danger" size="small" v-else>未生效</el-tag>
+          </template>
         </el-table-column>
         <el-table-column
-          prop="city"
+          prop="code"
           label="销售政策编号"
           width="150"
           align="center"
         >
         </el-table-column>
         <el-table-column
-          prop="address"
+          prop="title"
           label="销售政策说明"
           width="400"
           align="center"
@@ -67,74 +80,77 @@
         <el-table-column prop="zip" label="表头备注" width="200" align="center">
         </el-table-column>
         <el-table-column
-          prop="zip"
+          prop="customerCount"
           label="关联经销商"
           width="150"
           align="center"
         >
         </el-table-column>
-        <el-table-column prop="zip" label="生效日期" align="center">
+        <el-table-column prop="startTime" label="生效日期" align="center">
         </el-table-column>
-        <el-table-column prop="zip" label="结束日期" align="center">
+        <el-table-column prop="endTime" label="结束日期" align="center">
         </el-table-column>
-        <el-table-column prop="zip" label="制表人" align="center">
+        <el-table-column prop="createBy " label="制表人" align="center">
         </el-table-column>
-        <el-table-column prop="zip" label="制表日期" align="center">
+        <el-table-column prop="createTime" label="制表日期" align="center">
         </el-table-column>
       </el-table>
     </el-main>
-    <Pagination />
+    <!-- 分页 -->
+    <div class="fr">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-sizes="[10, 20, 30, 50]"
+        :page-size="10"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="listTotal"
+      >
+      </el-pagination>
+    </div>
   </el-container>
-  <Distributor v-else/>
+  <Distributor v-else />
 </template>
 
 <script>
-import Pagination from "./components/Pagination";
-import Distributor from './components/Distributor'
+import { getCustomerlist } from "@/api/supply/sales";
+import Minxin from "@/mixin";
+import Distributor from "./components/Distributor";
 export default {
+  mixins: [Minxin],
   data() {
     return {
-      isShow:false,
+      isShow: false,
       input: "",
-      tableData: [
-        {
-          date: "2016-05-02",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1518 弄",
-          zip: 200333,
-        },
-        {
-          date: "2016-05-04",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1517 弄",
-          zip: 200333,
-        },
-        {
-          date: "2016-05-01",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1519 弄",
-          zip: 200333,
-        },
-        {
-          date: "2016-05-03",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1516 弄",
-          zip: 200333,
-        },
-      ],
+      dataList: [],
+      searchForm: {
+        code: "",
+        remark: "",
+        title: "",
+      },
     };
   },
+  methods: {
+    getList() {
+      this.listLoading = true;
+      const params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        code: this.searchForm.code,
+        remark: this.searchForm.remark,
+        title: this.searchForm.title,
+      };
+      getCustomerlist(params).then((res) => {
+        console.log(res);
+        this.dataList = res.data.records;
+        this.listLoading = false;
+      });
+    },
+  },
   components: {
-    Pagination,
-    Distributor
+
+    Distributor,
   },
 };
 </script>
@@ -143,6 +159,7 @@ export default {
 .mg {
   margin: 20px 0;
 }
+
 .btn {
   text-align: right;
 }

+ 550 - 70
src/views/sales_policy/components/AddCondition.vue

@@ -1,81 +1,142 @@
 <template>
   <el-container>
-    <el-header class="header">
+    <el-header height="50px" class="header">
+
+      <el-page-header @back="handleBack" content="详情页面">
+
+      </el-page-header>
+    </el-header>
+    <div class="line">
       <el-divider></el-divider>
       <h4>限定条件</h4>
       <el-divider></el-divider>
-    </el-header>
-    <el-main>
+    </div>
+    <el-main v-if="!id">
       <el-row>
         <el-row :gutter="50">
-          <el-col :xs="24" :sm="12" :lg="12" class="mgb">
+          <el-col
+            :xs="24"
+            :sm="24"
+            :lg="24"
+            class="mgb"
+            v-for="(item, index) in conditionBox"
+            :key="index"
+          >
+
             <el-row>
+
               <el-row class="pdt">
                 <el-button
                   type="primary"
                   size="small"
-                  @click="centerDialogVisible = true"
+
+                  @click="(VisibleModle = true), getMaterialLists(index)"
+
                   >添加机型</el-button
                 >
 
-                <el-button type="primary" size="small" @click=""
+                <el-button
+                  type="primary"
+                  size="small"
+                  @click="handleDeleteRow(index)"
                   >删除机型</el-button
                 >
               </el-row>
               <el-row>
-                <el-table style="width: 100%" :data="tableData" border>
+                <el-table
+                  style="width: 100%"
+                  :data="item"
+                  border
+                  @select="hanleSelectAll($event, index)"
+                  @select-all="hanleSelectAll($event, index)"
+                >
                   <el-table-column type="selection" width="55" align="center">
                   </el-table-column>
-                  <el-table-column label="日期" width="120" align="center">
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
+                  <el-table-column
+                    label="货品名称"
+                    width="300"
+                    align="center"
+                    prop="materialName"
+                  >
                   </el-table-column>
-                  <el-table-column prop="name" label="姓名" align="center">
+                  <el-table-column
+                    prop="specification"
+                    label="规格型号"
+                    align="center"
+                  >
                   </el-table-column>
                 </el-table>
               </el-row>
             </el-row>
           </el-col>
-          <el-col :xs="24" :sm="12" :lg="12" class="mgb">
+        </el-row>
+        <el-row >
+          <el-form label-width="120px" :inline="false" size="small">
             <el-row>
-              <el-row class="pdt">
-                <el-button type="primary" size="small" @click=""
-                  >添加机型</el-button
-                >
-                <el-button type="primary" size="small" @click=""
-                  >删除机型</el-button
-                >
-              </el-row>
+              <el-form-item label="配置比例设置"> </el-form-item>
+            </el-row>
+
+            <el-col
+              :xs="24"
+              :sm="8"
+              :lg="8"
+              v-for="(len, index) in conditionBox"
+            >
+              <el-form-item :label="'配提' + (index + 1) + '比例'">
+                <el-input
+                  size="small"
+                  v-model="popArr['line_' + index]"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+          </el-form>
+        </el-row>
+        <el-divider></el-divider>
+      </el-row>
+    </el-main>
+    <el-main v-else>
+      <el-row>
+        <el-row :gutter="50">
+          <el-col
+            :xs="24"
+            :sm="24"
+            :lg="24"
+            class="mgb"
+            v-for="(item, index) in conditionBoxs"
+            :key="index"
+          >
+            <el-row >
+
               <el-row>
-                <el-table style="width: 100%" :data="tableData" border>
+                <el-table style="width: 100%" :data="item" border>
                   <el-table-column type="selection" width="55" align="center">
                   </el-table-column>
-                  <el-table-column label="日期" width="120" align="center">
+                  <el-table-column label="货品名称" width="300" align="center" prop="materialName" >
                     <template slot-scope="scope">{{ scope.row.date }}</template>
                   </el-table-column>
-                  <el-table-column prop="name" label="姓名" align="center">
+                  <el-table-column prop="specification" label="规格型号" align="center">
                   </el-table-column>
                 </el-table>
               </el-row>
             </el-row>
           </el-col>
         </el-row>
-        <el-row>
+        <el-row v-if="conditionBoxs.length">
           <el-form label-width="120px" :inline="false" size="small">
-            <el-col :xs="24" :sm="2" :lg="2">
+            <el-row>
               <el-form-item label="配置比例设置"> </el-form-item>
-            </el-col>
-            <el-col :xs="24" :sm="9" :lg="9">
+            </el-row>
+            <el-col :xs="24" :sm="8" :lg="8">
               <el-form-item label="限定机型">
                 <el-input size="small"></el-input>
               </el-form-item>
             </el-col>
-            <el-col :xs="24" :sm="9" :lg="9">
+            <el-col :xs="24" :sm="8" :lg="8" v-for="len in conditionBoxs">
               <el-form-item label="配提比例">
                 <el-input size="small"></el-input>
               </el-form-item>
             </el-col>
           </el-form>
-
           <el-col class="text_rihgt" v-if="false">
             <el-button type="primary" size="small" @click=""
               >添加限定条件</el-button
@@ -85,61 +146,311 @@
         <el-divider></el-divider>
       </el-row>
     </el-main>
-    <el-footer height="100px">
-      <el-button type="primary" size="small" @click="">保存</el-button>
-      <el-button type="primary" size="small" @click="">重置</el-button>
+    <el-footer height="100px" v-if="!id">
+      <el-row :gutter="20">
+        <el-col :xs="24" :sm="12" :lg="12" :offset="0">
+          <el-button type="primary" size="small" @click="handleSubmit"
+            >保存</el-button
+          >
+          <el-button type="primary" size="small" @click="">重置</el-button>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="12" :offset="0" class="tr">
+          <el-button type="primary" size="small" @click="hanleAddModel"
+            >添加</el-button
+          >
+        </el-col>
+      </el-row>
     </el-footer>
-    <AddModel :centerDialogVisible="centerDialogVisible" />
+    <el-dialog :visible.sync="VisibleModle" width="70%" center>
+      <div>
+        <el-container>
+          <el-header height="">
+            <el-form label-width="0" :inline="false" size="small">
+              <el-col :xs="24" :sm="8" :lg="8" :offset="0">
+                <el-form-item label="">
+                  <el-input
+                    v-model="saleTypeCode"
+                    placeholder="类型编号"
+                  ></el-input>
+                </el-form-item>
+              </el-col>
+            </el-form>
+          </el-header>
+          <el-main height="">
+            <el-row>
+              <el-row :gutter="50">
+                <el-col :xs="10" :ms="10" :lg="10">
+                  <el-row>
+                    <el-row> </el-row>
+                    <el-row>
+                      <el-row class="title"> 可选产品列表 </el-row>
+                      <el-table
+                        style="width: 100%"
+                        :data="conditList"
+                        border
+                        height="400"
+                        @select-all="handleSelectionAllChange"
+                        @selection-change="handleSelectionChange"
+                      >
+                        <el-table-column
+                          type="selection"
+                          width="55"
+                          align="center"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                          label="产品编码"
+                          prop="materialNumber"
+                          width="120"
+                          align="center"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                          prop="materialName"
+                          label="产品名称"
+                          align="center"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                          prop="specification"
+                          label="产品型号"
+                          align="center"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                          prop="price"
+                          label="产品价格"
+                          align="center"
+                        >
+                        </el-table-column>
+                      </el-table>
+                      <el-row class="mg">
+                        <div>
+                          <el-pagination
+                            @size-change="handleSizeChange"
+                            @current-change="handleCurrentChange"
+                            :current-page="currentPage"
+                            :page-sizes="[10, 20, 30, 50]"
+                            :page-size="10"
+                            layout="total, sizes, prev, pager, next, jumper"
+                            :total="listTotal"
+                          >
+                          </el-pagination>
+                        </div>
+                      </el-row>
+                    </el-row>
+                  </el-row>
+                </el-col>
+                <el-col :xs="4" :ms="4" :lg="4" class="middle">
+                  <el-row :gutter="20" justify="center" align="middle">
+                    <el-row class="btn">
+                      <el-button
+                        type="primary"
+                        size="small "
+                        @click="handleAllAdd"
+                        :disabled="type == 2"
+                        >全部添加</el-button
+                      >
+                    </el-row>
+                    <el-row class="btn">
+                      <el-button
+                        type="primary"
+                        size="small "
+                        @click="handleAdd"
+                        :disabled="type == 2"
+                        >增加</el-button
+                      >
+                    </el-row>
+                    <el-row class="btn">
+                      <el-button
+                        type="primary"
+                        size="small "
+                        @click="handleDelete"
+                        :disabled="type == 1"
+                        >删除</el-button
+                      ></el-row
+                    >
+                    <el-row class="btn"
+                      ><el-button
+                        :disabled="type == 1"
+                        type="primary"
+                        size="small  "
+                        @click="handleAllDelete"
+                        >全部删除</el-button
+                      ></el-row
+                    >
+                  </el-row>
+                </el-col>
+                <el-col :xs="10" :ms="10" :lg="10">
+                  <el-row>
+                    <el-row> </el-row>
+                    <el-row>
+                      <el-row class="title"> 已选产品列表 </el-row>
+                      <el-table
+                        style="width: 100%"
+                        :data="conditList2"
+                        @select-all="handleSelectionAllChange2"
+                        @selection-change="handleSelectionChange2"
+                        border
+                        height="400"
+                      >
+                        <el-table-column
+                          type="selection"
+                          width="55"
+                          align="center"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                          label="产品编码"
+                          prop="materialNumber"
+                          width="120"
+                          align="center"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                          prop="materialName"
+                          label="产品名称"
+                          align="center"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                          prop="specification"
+                          label="产品型号"
+                          align="center"
+                        >
+                        </el-table-column>
+                        <el-table-column
+                          prop="price"
+                          label="产品价格"
+                          align="center"
+                        >
+                        </el-table-column>
+                      </el-table>
+                      <el-row class="mg">
+                        <!-- <Pagination /> -->
+                      </el-row>
+                    </el-row>
+                  </el-row>
+                </el-col>
+              </el-row>
+            </el-row>
+          </el-main>
+        </el-container>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="VisibleModle = false">取 消</el-button>
+        <el-button type="primary" @click="handleDiaSubmit">确 定</el-button>
+      </span>
+    </el-dialog>
   </el-container>
 </template>
 
 <script>
+import {
+  getId,
+  addPoliyCondition,
+  getConditionMaterialList,
+  getMaterialList,
+  getConditionMaterialDetail,
+} from "@/api/supply/sales";
+import TabelTransfer from "./TabelTransfer.vue";
+
+import { mapState} from "vuex";
 import AddModel from "./AddModel";
+import Minxin from "@/mixin";
+
+
 export default {
+  mixins: [Minxin],
+  props: {
+    id: {
+      type: String,
+      default: "",
+    },
+  },
   data() {
     return {
-      centerDialogVisible: false,
-      tableData: [
-        {
-          date: "2016-05-03",
-          name: "王小虎",
-          address: "上海市普陀区金沙江路 1518 弄",
-        },
-        {
-          date: "2016-05-02",
-          name: "王小虎",
-          address: "上海市普陀区金沙江路 1518 弄",
-        },
-        {
-          date: "2016-05-04",
-          name: "王小虎",
-          address: "上海市普陀区金沙江路 1518 弄",
-        },
-        {
-          date: "2016-05-01",
-          name: "王小虎",
-          address: "上海市普陀区金沙江路 1518 弄",
-        },
-        {
-          date: "2016-05-08",
-          name: "王小虎",
-          address: "上海市普陀区金沙江路 1518 弄",
-        },
-        {
-          date: "2016-05-06",
-          name: "王小虎",
-          address: "上海市普陀区金沙江路 1518 弄",
-        },
-        {
-          date: "2016-05-07",
-          name: "王小虎",
-          address: "上海市普陀区金沙江路 1518 弄",
-        },
-      ],
+      base: {
+        id: null,
+        policyConditionMaterials: [
+          {
+            id: null,
+            materialId: "",
+            materialName: "",
+            materialNumber: "",
+            policyConditionId: "",
+            policyId: "",
+            policyMaterialId: "",
+            popType: 0,
+            specification: "",
+            walletType: "",
+          },
+        ],
+        policyId: "",
+        policyName: "",
+        pop: "",
+      },
+      limit: "",
+      VisibleModle: false,
+      conditionBox: [[], []],
+      conditionBoxs: [],
       multipleSelection: [],
+      searchForm: {
+        code: "",
+      },
+      pop: "",
+      conditList: [],
+      leftData: [],
+      rightData: [],
+      conditList2: [],
+      type: "",
+      saleTypeCode: "",
+      arrIndex: 0,
+
+      popArr: {},
+
     };
   },
+  created() {
+    this.getCommonApi();
+
+    console.log(this.$parent.codeId, "codeid");
+
+  },
+   computed: mapState({
+    comCode: (state) => state.sales.code,
+  }),
+    updated() {
+
+    },
   methods: {
+    getList() {
+
+    },
+    handleBack(){
+      if (this.$parent.isShow==10) {
+          this.$parent.isShow = 8
+      }else{
+        this.$parent.isShow =2
+      }
+
+    },
+    getCommonApi() {
+      if (this.id) {
+        var i = 1;
+        getConditionMaterialDetail({ id: this.id }).then((res) => {
+          this.pop = res.data;
+          while (i <= 2) {
+            getConditionMaterialList({pageNum:1,pageSize:10,policyConditionId:this.id,popType:i}).then((res) => {
+                this.conditionBoxs = res.data.records
+              i++;
+            });
+
+            i++;
+          }
+        });
+      }
+    },
     toggleSelection(rows) {
       if (rows) {
         rows.forEach((row) => {
@@ -149,17 +460,156 @@ export default {
         this.$refs.multipleTable.clearSelection();
       }
     },
+    hanleAddModel() {
+      this.conditionBox.push([{}]);
+    },
+    handleSubmit() {
+
+      console.log(this.comCode);
+      var tableData = [];
+      for (let i = 0; i < this.conditionBox.length; i++) {
+        for (let j = 0; j < this.conditionBox[i].length; j++) {
+          this.conditionBox[i][j].popType = i + 1;
+               this.conditionBox[i][j].policyId = this.comCode
+               this.conditionBox[i][j].id = ''
+                  //  this.conditionBox[i][j].policyMaterialId =this.conditionBox[i][j].materialId
+        }
+        tableData = [...tableData, ...this.conditionBox[i]];
+      }
+      if (!tableData.length) {
+        this.$errorMsg("请选择机型");
+        return;
+      }
+      var pop = [];
+      for (const key in this.popArr) {
+
+        pop.push(this.popArr[key]);
+      }
+      const params = {
+        id: "",
+        policyConditionMaterials: tableData,
+        policyId: this.comCode,
+        policyName: "",
+        pop: pop.join(":"),
+      };
+      addPoliyCondition(params).then((res) => {
+        this.$successMsg("添加成功");
+        this.$parent.isShow = 2
+        this.$parent.isFlag = 1
+        this.$emit('handleSubmitCon',this.comCode)
+      });
+
+    },
     handleSelectionChange(val) {
       this.multipleSelection = val;
     },
+    // 筛选全部数据
+    hanleSelectAll(selection, index) {
+      this.arrIndex = index;
+      this.ids = selection.map((k) => {
+        return k.id;
+      });
+      console.log(this.ids);
+    },
+    handleDeleteRow(index) {
+      if (this.arrIndex == index && this.ids.length) {
+        for (let i = 0; i < this.conditionBox[index].length; i++) {
+          for (let j = 0; j < this.ids.length; j++) {
+            if (this.conditionBox[index][i].id == this.ids[j]) {
+              this.conditionBox[index].splice(i, 1);
+            }
+          }
+        }
+      }
+      console.log(index, this.arrIndex);
+    },
+    getMaterialLists(index) {
+      this.arrIndex = index;
+      getMaterialList({
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        saleTypeCode: this.saleTypeCode,
+        policyId: this.comCode,
+      }).then((res) => {
+        this.conditList = res.data.records;
+
+        console.log(4545, this.conditList);
+
+        this.listTotal = res.data.total;
+      });
+    },
+    handleSelectionAllChange(e) {
+      this.leftData = e;
+      this.type = 1;
+    },
+    handleSelectionChange(e) {
+      this.leftData = e;
+      this.type = 1;
+    },
+    handleSelectionAllChange2(e) {
+      this.rightData = e;
+      this.type = 2;
+    },
+    handleSelectionChange2(e) {
+      this.rightData = e;
+      this.type = 2;
+    },
+    handleAllAdd() {
+      this.conditList2 = this.leftData;
+
+      this.leftData = [];
+
+    },
+    handleAllDelete() {
+      this.conditList2 = [];
+    },
+    handleAdd() {
+      this.conditList2 = this.leftData;
+    },
+    handleDelete() {
+      if (this.type == 2) {
+        for (let k = 0; k < this.conditList2.length; k++) {
+          for (let i = 0; i < this.rightData.length; i++) {
+            if (this.rightData[i].id == this.rightData[k].id) {
+              this.conditList2.splice(i, 1);
+            }
+          }
+        }
+      }
+    },
+    handleDiaSubmit() {
+      if (this.conditList2.length) {
+        for (let i = 0; i < this.conditionBox.length; i++) {
+          console.log(this.conditionBox[i]);
+          if (i == this.arrIndex) {
+            this.$set(this.conditionBox, i, [
+              ...this.conditList2,
+
+              ...this.conditionBox[i],
+
+            ]);
+            console.log(this.conditionBox);
+          }
+        }
+        this.VisibleModle = false;
+        this.conditList2 = [];
+
+      } else {
+        this.$errorMsg("请选择内容");
+      }
+    },
   },
   components: {
     AddModel,
+    TabelTransfer,
   },
 };
 </script>
 
 <style lang="scss" scoped>
+.line {
+  margin: 0 20px;
+}
 .mgb {
   margin-bottom: 20px;
 }
@@ -175,4 +625,34 @@ export default {
 .el-main {
   overflow: hidden;
 }
+.btn {
+  margin: 20px 0;
+  text-align: center;
+}
+.query_btn {
+  margin-left: 0;
+}
+.mg {
+  margin: 20px;
+}
+.pdt {
+  margin: 20px 0;
+}
+.el-main {
+  overflow: hidden;
+}
+.middle {
+  height: 430px;
+  display: flex;
+  align-content: center;
+  justify-content: center;
+  align-items: center;
+}
+.title {
+  padding: 10px 0;
+  text-align: center;
+  border-left: 1px solid #ebeef5;
+  border-right: 1px solid #ebeef5;
+  border-top: 1px solid #ebeef5;
+}
 </style>

+ 2 - 16
src/views/sales_policy/components/AddModel.vue

@@ -1,19 +1,5 @@
 <template>
-  <el-dialog
-    :visible.sync="centerDialogVisible"
-    width="70%"
-    center
-  >
-    <div>
-      <TabelTransfer />
-    </div>
-    <span slot="footer" class="dialog-footer">
-      <el-button @click="centerDialogVisible = false">取 消</el-button>
-      <el-button type="primary" @click="centerDialogVisible = false"
-        >确 定</el-button
-      >
-    </span>
-  </el-dialog>
+
 </template>
 
 <script>
@@ -23,7 +9,7 @@ export default {
     return {};
   },
   props: {
-    centerDialogVisible: {
+    VisibleModle: {
       type: Boolean,
       default: false,
     },

+ 472 - 279
src/views/sales_policy/components/AddPolicy.vue

@@ -1,243 +1,301 @@
 <template>
-  <div class="app-container">
-    <div class="screen-container">
-      <h4>销售政策信息</h4>
-      <el-divider></el-divider>
-      <el-form
-        :model="ruleForm"
-        :rules="rules"
-        ref="ruleForm"
-        label-width="120px"
-        size="small"
-        class="demo-ruleForm"
+  <div>
+    <el-header height="50px" class="header">
+      <el-page-header
+        @back="($parent.isShow = 1), ($parent.isFlag = '')"
+        content="详情页面"
       >
-        <el-row>
-          <el-col :xs="24" :ms="12" :lg="12">
-            <el-form-item label="销售政策编号" prop="name">
-              <el-input
-                v-model="ruleForm.name"
-                placeholder="如未填写,则系统自动生成"
-              ></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :ms="12" :lg="12">
-            <el-form-item label="销售政策说明" prop="name">
-              <el-input
-                v-model="ruleForm.name"
-                placeholder="销售政策说明"
-              ></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :ms="12" :lg="12">
-            <el-form-item label="销售政策类型" prop="name">
-              <el-select v-model="value" placeholder="请选择">
-                <el-option
-                  v-for="item in options"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
+      </el-page-header>
+    </el-header>
+    <div class="app-container">
+      <div class="screen-container">
+        <h4>销售政策信息</h4>
+        <el-divider></el-divider>
+        <el-form
+          :model="searchForm"
+          :rules="rules"
+          ref="searchForm"
+          label-width="120px"
+          size="small"
+          class="demo-searchForm"
+        >
+          <el-row>
+            <el-col :xs="24" :ms="12" :lg="12">
+              <el-form-item label="销售政策编号" prop="code">
+                <el-input
+                  disabled
+                  v-model="searchForm.code"
+                  placeholder="如未填写,则系统自动生成"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :ms="12" :lg="12">
+              <el-form-item label="销售政策说明" prop="title">
+                <el-input
+                  v-model="searchForm.title"
+                  placeholder="销售政策说明"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :ms="12" :lg="12">
+              <el-form-item label="销售政策类型" prop="type">
+                <el-select
+                  size="small"
+                  v-model="searchForm.type"
+                  placeholder="销售政策类型"
+                  class="select_height"
                 >
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :ms="12" :lg="12">
-            <el-form-item label="支付钱包类型" prop="name">
-              <el-select v-model="value" placeholder="请选择">
-                <el-option
-                  v-for="item in options"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
+                  <el-option
+                    v-for="(item, index) in typeOptions"
+                    :key="index"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :ms="12" :lg="12">
+              <el-form-item label="支付钱包类型" prop="name">
+                <el-select v-model="value" placeholder="请选择">
+                  <el-option
+                    v-for="(item, index) in walletList"
+                    :key="index"
+                    :label="item.mainName"
+                    :value="item.mainId"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :ms="12" :lg="12">
+              <el-form-item label="生效日期" prop="startTime">
+                <el-date-picker
+                  v-model="searchForm.startTime"
+                  type="datetime"
+                  placeholder="生效日期"
+                  default-time="00:00:00"
+                  value-format="yyyy-MM-dd HH:mm:ss"
                 >
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :ms="12" :lg="12">
-            <el-form-item label="制单人" prop="name">
-              <el-input
-                v-model="ruleForm.name"
-                placeholder=""
-              ></el-input> </el-form-item
-          ></el-col>
-          <el-col :xs="24" :ms="12" :lg="12">
-            <el-form-item label="制单日期" prop="name">
-              <el-input
-                v-model="ruleForm.name"
-                placeholder="如未填写,则系统自动生成"
-              ></el-input> </el-form-item
-          ></el-col>
-
-          <el-col :xs="24" :ms="12" :lg="12">
-            <el-form-item label="生效日期" prop="name">
-              <el-input
-                v-model="ruleForm.name"
-                placeholder=""
-              ></el-input> </el-form-item
-          ></el-col>
-          <el-col :xs="24" :ms="12" :lg="12">
-            <el-form-item label="失效日期" prop="name">
-              <el-input
-                v-model="ruleForm.name"
-                placeholder=""
-              ></el-input> </el-form-item
-          ></el-col>
-          <el-col :xs="24" :ms="24" :lg="24">
-            <el-form-item label="表头备注" prop="name">
-              <el-input
-                v-model="ruleForm.name"
-                placeholder="新风机变频挂机。按提货数量1:3开单"
-              ></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :ms="24" :lg="24">
-            <el-form-item label="政策封面图">
+                </el-date-picker> </el-form-item
+            ></el-col>
+            <el-col :xs="24" :ms="12" :lg="12">
+              <el-form-item label="失效日期" prop="endTime">
+                <el-date-picker
+                  v-model="searchForm.endTime"
+                  type="datetime"
+                  placeholder="失效日期"
+                  default-time="00:00:00"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                >
+                </el-date-picker> </el-form-item
+            ></el-col>
+            <el-col :xs="24" :ms="24" :lg="24">
+              <el-form-item label="表头备注" prop="remark">
+                <el-input
+                  v-model="searchForm.remark"
+                  placeholder="新风机变频挂机。按提货数量1:3开单"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :ms="24" :lg="24">
+              <el-form-item label="政策封面图" prop="imgSrc">
+                <ImageUpload :fileList="fileList" :multiple="false" />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+      <div class="mymian-container">
+        <el-row>
+          <el-divider></el-divider>
+          <el-row type="flex">
+            <el-col :span="12">
+              <h4 style="display: inline-block; margin-right: 20px">
+                货品信息
+              </h4>
               <el-upload
-                class="avatar-uploader"
-                action="https://jsonplaceholder.typicode.com/posts/"
-                :show-file-list="false"
-                :on-success="handleAvatarSuccess"
-                :before-upload="beforeAvatarUpload"
+                class="import-btn"
+                :action="baseURL + 'student/import'"
+                :http-request="handleImport"
+                :file-list="importFileList"
               >
-                <img v-if="imageUrl" :src="imageUrl" class="avatar" />
-                <i v-else class="el-icon-plus avatar-uploader-icon"></i>
+                <el-button size="small">导入货品价格表</el-button>
               </el-upload>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-    </div>
-    <div class="mymian-container">
-      <el-row>
-        <el-divider></el-divider>
-        <el-row type="flex">
-          <el-col :span="12">
-            <h4 style="display: inline-block; margin-right: 20px">货品信息</h4>
-            <el-button size="small"> 导入货品价格表</el-button></el-col
-          >
-          <el-col :span="12" class="tr">
-            <el-button size="small">管理条件</el-button>
-          </el-col>
+              <el-button size="small" @click="hanleDownloadFiles"
+                >下载模板</el-button
+              >
+            </el-col>
+          </el-row>
+          <el-divider></el-divider>
         </el-row>
-        <el-divider></el-divider>
-      </el-row>
-      <el-table
-        v-loading="listLoading"
-        :data="dataList"
-        element-loading-text="Loading"
-        border
-        fit
-        highlight-current-row
-        stripe
-      >
-        <el-table-column
-          fixed
-          prop="num"
-          label="序号"
-          width="50"
-          align="center"
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
         >
-        </el-table-column>
-        <el-table-column prop="name" label="货品编码" align="center">
-        </el-table-column>
-        <el-table-column prop="province" label="货品名称" align="center">
-        </el-table-column>
-        <el-table-column prop="city" label="规格型号" align="center">
-        </el-table-column>
-        <el-table-column
-          prop="address"
-          label="销售类型编码"
-          width="500"
-          align="center"
-        >
-        </el-table-column>
-        <el-table-column prop="zip" label="销售类型" align="center">
-        </el-table-column>
-        <el-table-column prop="zip" label="单价" align="center">
-        </el-table-column>
-        <el-table-column prop="zip" label="支付钱包" align="center">
-        </el-table-column>
-        <el-table-column fixed="right" label="操作" align="center">
-          <template slot-scope="scope">
-            <el-button type="text" size="small">删除</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-      <Pagination />
-      <el-row>
-        <el-divider></el-divider>
-        <el-row type="flex">
-          <el-col :span="12">
-            <h4 style="display: inline-block; margin-right: 20px">条件信息</h4>
-            <el-button size="small">添加</el-button></el-col
+          <el-table-column
+            fixed
+            prop="num"
+            label="序号"
+            width="50"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="materialNumber"
+            label="货品编码"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column prop="materialName" label="货品名称" align="center">
+          </el-table-column>
+          <el-table-column prop="specification" label="规格型号" align="center">
+          </el-table-column>
+          <el-table-column
+            prop="saleTypeCode"
+            label="销售类型编码"
+            width="500"
+            align="center"
           >
+          </el-table-column>
+          <el-table-column prop="saleTypeName" label="销售类型" align="center">
+          </el-table-column>
+          <el-table-column prop="price" label="单价" align="center">
+          </el-table-column>
+          <el-table-column label="支付钱包" align="center">
+            <template slot-scope="scope">
+                <el-tag type="success" size="small" v-for=" item  in  scope.row.walletRelaList">{{item.walletName}}</el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column fixed="right" label="操作" align="center">
+            <template slot-scope="scope">
+              <el-popconfirm
+                confirm-button-text="好的"
+                cancel-button-text="不用了"
+                icon="el-icon-info"
+                icon-color="red"
+                title="内容确定删除吗?"
+                @onConfirm="hanleDelete(scope.row.id)"
+              >
+                <el-button
+                  slot="reference"
+                  type="text"
+                  class="textColor el-popover-left"
+                  >删除</el-button
+                >
+              </el-popconfirm>
+            </template>
+          </el-table-column>
+        </el-table>
+        <!-- 分页 -->
+        <div style="margin: 20px">
+          <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal"
+          >
+          </el-pagination>
+        </div>
+        <el-row>
+          <el-divider></el-divider>
+          <el-row type="flex">
+            <el-col :span="12">
+              <h4 style="display: inline-block; margin-right: 20px">
+                条件信息
+              </h4>
+              <el-button size="small" @click="$parent.isShow = 3"
+                >管理条件</el-button
+              ></el-col
+            >
+          </el-row>
+          <el-divider></el-divider>
         </el-row>
-        <el-divider></el-divider>
-      </el-row>
-      <el-table
-        v-loading="listLoading"
-        :data="dataList"
-        element-loading-text="Loading"
-        border
-        fit
-        highlight-current-row
-        stripe
-      >
-        <el-table-column
-          fixed
-          prop="num"
-          label="序号"
-          width="50"
-          align="center"
+        <el-table
+          v-loading="listLoading"
+          :data="conditionList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
         >
-        </el-table-column>
-        <el-table-column prop="name" label="限定条件" align="center">
-        </el-table-column>
-        <el-table-column prop="province" label="限定机型" align="center">
-        </el-table-column>
-        <el-table-column prop="city" label="配体机型" align="center">
-        </el-table-column>
-        <el-table-column fixed="right" label="操作" align="center">
-          <template slot-scope="scope">
-            <el-button type="text" size="small">编辑</el-button>
-            <el-button type="text" size="small">删除</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-    </div>
-
-    <div>
-      <el-row>
-        <el-divider></el-divider>
-        <el-row type="flex" align="middle">
-          <el-col :span="2">
-            <h4>货品信息</h4>
-          </el-col>
+          <el-table-column
+            fixed
+            type="index"
+            label="序号"
+            width="50"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column prop="name" label="限定条件" align="center">
+          </el-table-column>
+          <el-table-column
+            fixed="right"
+            width="150"
+            label="操作"
+            align="center"
+          >
+            <template slot-scope="scope">
+              <el-button type="text" size="small">删除</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+      </div>
+      <div>
+        <el-row>
+          <el-divider></el-divider>
+          <el-row type="flex" align="middle">
+            <el-col :span="2">
+              <h4>经销商信息</h4>
+            </el-col>
+          </el-row>
+          <el-divider></el-divider>
         </el-row>
-        <el-divider></el-divider>
-      </el-row>
-      <el-row class="radio">
-        <el-radio v-model="radio" label="1">全部经销商</el-radio>
-        <el-radio v-model="radio" label="2">品类</el-radio>
-        <el-radio v-model="radio" label="1">地区</el-radio>
-        <el-radio v-model="radio" label="2">指定</el-radio>
-      </el-row>
-      <Transfer />
+        <Transfer @handleAddPolicy="handleAddPolicy" />
+      </div>
     </div>
   </div>
 </template>
 
 <script>
-import Pagination from "@/components/Pagination";
+import { mapState,mapMutations } from "vuex";
+import Minxin from "@/mixin";
+import {
+  addPoliy,
+  getTypeList,
+  getWalletList,
+  getMaterialList,
+  getConditionList,
+  deleteMaterialPolicy,
+} from "@/api/supply/sales";
+import { downloadFiles, handleImport } from "@/utils/util";
 import Transfer from "./Transfer";
+import Pagination from "@/components/Pagination";
+import ImageUpload from "@/components/Common/image-upload.vue";
+
 export default {
+  mixins: [Minxin],
   data() {
     return {
       input: "",
-
-      ruleForm: {
-        name: "",
+      baseURL: "",
+      searchForm: {
+        code: "",
+        endTime: "",
+        imgSrc: "",
+        remark: "",
+        startTime: "",
+        title: "",
+        type: "",
       },
       listLoading: false,
       rules: {
@@ -246,81 +304,213 @@ export default {
           { min: 3, max: 5, message: "", trigger: "click" },
         ],
       },
-      imageUrl: "",
-      dataList: [
-        {
-          num: "2",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1518 弄",
-          zip: 200333,
-        },
-        {
-          num: "2",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1518 弄",
-          zip: 200333,
-        },
-        {
-          num: "2",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1518 弄",
-          zip: 200333,
-        },
-        {
-          num: "2",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1518 弄",
-          zip: 200333,
-        },
-        {
-          num: "2",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1518 弄",
-          zip: 200333,
-        },
+      importFileList: [],
+      fileList: [],
+      options: {},
+      value: "",
+      typeList: [],
+      walletList: [],
+      typeOptions: [
         {
-          num: "2",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1518 弄",
-          zip: 200333,
+          value: "PROVISION",
+          label: "配提",
         },
         {
-          num: "2",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1518 弄",
-          zip: 200333,
+          value: "LIMIT",
+          label: "限量",
         },
       ],
-      radio: "",
-      options: {},
-      value: "",
+      conditionList: [],
     };
   },
+  computed: mapState({
+    comCode: (state) => {
+      return state.sales.code;
+    },
+    newForm:(state) => {
+      return state.sales.searchForm;
+    },
+    imgFile:(state) => {
+      return state.sales.fileList;
+    },
+  }),
+  created() {
 
+    this.getCommonApi();
+    if (this.$parent.isFlag) {
+      const params = {
+        policyId: this.comCode,
+      };
+      // 获取条件政策
+      getConditionList(params).then((res) => {
+        this.conditionList = res.data;
+        console.log(res.data, "jsfdkljslkj");
+      });
+      // this.handletwoList()
+    }
+  },
+  updated() {
+    this.searchForm = this.newForm
+    this.searchForm.code = this.comCode;
+    this.fileList = this.imgFile
+  },
   methods: {
-    handelLeftCheck(e) {
-      console.log(e);
+    ...mapMutations('sales',['initData']),
+    //下载excel模板
+    hanleDownloadFiles() {
+      downloadFiles("/policy/download");
+    },
+    getCommonApi() {
+      // this.handletwoList()
+      const params = {
+        pageNum: 1,
+        pageSize: 10,
+        saleCode: "",
+        saleName: "",
+        status: "",
+      };
+      const walletParams = {
+        pageNum: 1,
+        pageSize: 10,
+        mainName: "",
+        saleTypeCode: "",
+        saleTypeName: "",
+        status: "",
+      };
+      // 获取销售类型列表
+      getTypeList(params).then((res) => {
+        this.typeList = res.data.records;
+        console.log(this.typeList, "type");
+      });
+      // 获取钱包列表
+      getWalletList(walletParams).then((res) => {
+        this.walletList = res.data.records;
+      });
+    },
+    // 导入
+    async handleImport(param) {
+      this.importLoading = true;
+      const file = param.file;
+      console.log(file, 123);
+      const formData = new FormData();
+      formData.append("file", file);
+      formData.append("policyId", this.searchForm.code);
+      let result = await handleImport("/policy/material/import", formData);
+      this.importLoading = false;
+      this.importFileList = [];
+      if (result.code == 200) {
+        this.$alert(result.message, "导入成功", {
+          confirmButtonText: "确定",
+        });
+
+        this.handletwoList();
+      } else {
+        this.$alert(result.message, "导入失败", {
+          confirmButtonText: "确定",
+        });
+      }
+    },
+    getList() {
+      if (this.$parent.isFlag) {
+        this.handletwoList();
+      }
+    },
+    // 获取货品信息
+    handletwoList() {
+      // this.searchForm.type
+
+      const paramss = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        policyId: this.comCode,
+        saleTypeCode: "",
+      };
+      console.log(45454);
+      getMaterialList(paramss)
+        .then((result) => {
+          this.dataList = result.data.records;
+
+          this.listTotal = result.data.total;
+        })
+        .catch((err) => {
+          console.error(err);
+        });
+    },
+    // 提交审核
+    handleAddPolicy(policyCustomers) {
+      //     console.log(this.fileList,'上传图片');
+      // return
+      console.log(policyCustomers, "选择的经销商");
+      if (policyCustomers.length) {
+        var arr = [];
+        var arr = [
+          {
+            customerId: "",
+            customerName: "",
+            customerNumber: "",
+            id: "",
+            lastOrderTime: "",
+            limitTakeNum: 0,
+            policyId: "",
+            policyTitle: "",
+            remark: "",
+          },
+        ];
+        policyCustomers.forEach((el) => {
+          arr.push({
+            customerId: "",
+            customerName: el.name,
+            customerNumber: el.number,
+            lastOrderTime: "",
+            limitTakeNum: 0,
+
+            policyId: this.comCode,
+            policyTitle: "",
+            remark: "",
+          });
+        });
+        const params = {
+          adminCompanyId: "",
+          code: "",
+          customerCount: 0,
+
+          examineBy: "",
+          examineRemark: "",
+          examineStatus: "",
+
+          id: "",
+          imgSrc: this.fileList.length?this.fileList[0].url:'',
+          policyCustomers: arr,
+          remark: "",
+          status: true,
+          title: "",
+          type: "",
+          ...this.searchForm,
+        };
+        addPoliy(params).then((res) => {
+          console.log(res);
+          this.$successMsg("新增成功");
+          this.fileList = [];
+          this.$parent.getList()
+          this.$parent.isShow = 1;
+        });
+        return;
+      }
+      this.$errorMsg("选择经销商 ");
+    },
+    //删除
+    hanleDelete(id) {
+      const params = { policyMaterialId: id };
+      deleteMaterialPolicy(params).then((res) => {
+        this.$successMsg("删除成功");
+        this.handletwoList();
+      });
     },
-    beforeAvatarUpload() {},
-    handleAvatarSuccess() {},
   },
   components: {
     Transfer,
     Pagination,
+    ImageUpload,
   },
 };
 </script>
@@ -332,7 +522,10 @@ h4 {
 .pdt {
   padding-top: 20px;
 }
-
+.import-btn {
+  margin-right: 10px;
+  display: inline-block;
+}
 .radio {
   padding: 20px 0;
 }

+ 173 - 163
src/views/sales_policy/components/Distributor.vue

@@ -1,39 +1,38 @@
 <template>
-  <el-container :direction="vertical">
+  <el-container>
     <el-header height="" class="pdt">
       <el-form
         :model="ruleForm"
-        :rules="rules"
         ref="ruleForm"
         label-width="120px"
         size="small"
         label-position="left"
         class="demo-ruleForm"
       >
-        <el-row type="flex">
-          <el-col :span="9">
-            <el-form-item label="销售政策编号" prop="name">
+        <el-row :gutter="20">
+          <el-col :xs="24" :ms="12" :lg="12">
+            <el-form-item label="销售政策编号" prop="code">
               <el-input
                 v-model="ruleForm.name"
                 placeholder="如未填写,则系统自动生成"
               ></el-input>
             </el-form-item>
           </el-col>
-          <el-col :span="15">
-            <el-form-item label="销售政策说明" prop="name">
+          <el-col :xs="24" :ms="12" :lg="12">
+            <el-form-item label="销售政策说明" prop="title">
               <el-input
-                v-model="ruleForm.name"
+                v-model="ruleForm.title"
                 placeholder="销售政策说明"
               ></el-input>
             </el-form-item>
           </el-col>
         </el-row>
-        <el-row type="flex">
-          <el-col :span="9">
-            <el-form-item label="销售政策类型" prop="name">
-              <el-select v-model="value" placeholder="请选择">
+        <el-row :gutter="20">
+          <el-col :xs="24" :ms="12" :lg="12">
+            <el-form-item label="销售政策类型" prop="type">
+              <el-select v-model="ruleForm.type" placeholder="请选择">
                 <el-option
-                  v-for="item in options"
+                  v-for="item in typeOptions"
                   :key="item.value"
                   :label="item.label"
                   :value="item.value"
@@ -42,8 +41,8 @@
               </el-select>
             </el-form-item>
           </el-col>
-          <el-col :span="9">
-            <el-form-item label="部门" prop="name">
+          <el-col :xs="24" :ms="12" :lg="12">
+            <!-- <el-form-item label="部门" prop="name">
               <el-select v-model="value" placeholder="请选择">
                 <el-option
                   v-for="item in options"
@@ -53,227 +52,192 @@
                 >
                 </el-option>
               </el-select>
-            </el-form-item>
+            </el-form-item> -->
           </el-col>
         </el-row>
-        <el-row>
-          <el-form-item label="表头备注" prop="name">
-            <el-input
-              v-model="ruleForm.name"
-              placeholder="新风机变频挂机。按提货数量1:3开单"
-            ></el-input>
-          </el-form-item>
-        </el-row>
-        <el-row>
-          <el-col :span="9">
+        <el-row :gutter="20">
+          <el-col :xs="24" :ms="12" :lg="12">
             <el-form-item label="制单人" prop="name">
-              <el-input
-                v-model="ruleForm.name"
-                placeholder="新风机变频挂机。按提货数量1:3开单"
-              ></el-input>
+              <el-input v-model="ruleForm.name" placeholder=""></el-input>
             </el-form-item>
           </el-col>
-          <el-col :span="9">
+          <el-col :xs="24" :ms="12" :lg="12">
             <el-form-item label="制单日期" prop="name">
-              <el-input
-                v-model="ruleForm.name"
-                placeholder="2020-01-23"
-              ></el-input>
+              <el-input v-model="ruleForm.name" placeholder=""></el-input>
             </el-form-item>
           </el-col>
         </el-row>
+        <el-row>
+          <el-form-item label="表头备注" prop="remark">
+            <el-input
+              v-model="ruleForm.remark"
+              placeholder="新风机变频挂机。按提货数量1:3开单"
+            ></el-input>
+          </el-form-item>
+        </el-row>
       </el-form>
     </el-header>
+    <!-- 按钮 -->
+    <div class="btn-group clearfix">
+      <div class="fl">
+        <el-button
+          type="primary"
+          size="small"
+          slot="reference"
+          class="el-popover-left"
+          @click="handleEdit"
+          >批量编辑</el-button
+        >
+      </div>
+    </div>
     <el-main>
       <el-table
         v-loading="listLoading"
         :data="dataList"
         element-loading-text="Loading"
         border
+        @select="hanleSelectAll"
+        @select-all="hanleSelectAll"
         fit
         highlight-current-row
         stripe
       >
+        <el-table-column type="selection" width="55"> </el-table-column>
         <el-table-column
-          fixed
-          prop="num"
-          label="序号"
-          width="50"
-          align="center"
-        >
-        </el-table-column>
-        <el-table-column
-          prop="name"
+          prop="customerNumber"
           label="经销商编码"
           width="300"
           align="center"
         >
-          <template slot-scope="scope">
-            <el-input
-              v-model="input"
-              placeholder=""
-              size="normal"
-              clearable
-              @change=""
-            ></el-input>
-          </template>
         </el-table-column>
         <el-table-column
-          prop="province"
+          prop="customerName"
           label="经销商名称"
           width="300"
           align="center"
         >
-          <template slot-scope="scope">
-            <el-input
-              v-model="input"
-              placeholder=""
-              size="normal"
-              clearable
-              @change=""
-            ></el-input>
-          </template>
         </el-table-column>
         <el-table-column
-          prop="city"
+          prop="limitTakeNum"
           label="最多提货套数"
           width="300"
           align="center"
         >
-          <template slot-scope="scope">
-            <el-input
-              v-model="input"
-              placeholder=""
-              size="normal"
-              clearable
-              @change=""
-            ></el-input>
-          </template>
         </el-table-column>
         <el-table-column
-          prop="address"
+          prop="remark"
           label="表体备注"
           width="300"
           align="center"
         >
-          <template slot-scope="scope">
-            <el-input
-              v-model="input"
-              placeholder=""
-              size="normal"
-              clearable
-              @change=""
-            ></el-input>
-          </template>
         </el-table-column>
         <el-table-column
-          prop="zip"
+          prop="lastOrderTime"
           label="最近订货时间"
           width="300"
           align="center"
         >
         </el-table-column>
-        <el-table-column fixed="right" label="操作" align="center">
+        <el-table-column fixed="right" label="操作" align="center" width="200">
           <template slot-scope="scope">
-            <el-button type="text" size="small">删除</el-button>
+            <el-button
+              type="text"
+              size="small"
+              @click="(type = 2), (dialogVisible = true), (id = scope.row.id)"
+              >设置</el-button
+            >
+            <el-button
+              type="text"
+              size="small"
+              @click="(type = 1), (dialogVisible = true), (id = scope.row.id)"
+            >
+              备注</el-button
+            >
+            <!-- <el-button type="text" size="small">删除</el-button> -->
           </template>
         </el-table-column>
       </el-table>
+      <!-- 分页 -->
+      <div class="fr" style="margin-top: 20px">
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="currentPage"
+          :page-sizes="[10, 20, 30, 50]"
+          :page-size="10"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="listTotal"
+        >
+        </el-pagination>
+      </div>
     </el-main>
-    <el-footer>
-      <el-row>
-        <el-col :span="12">
-          <el-button type="primary" size="default" @click="">保存</el-button>
-          <el-button type="primary" size="default" @click="">重置</el-button>
-        </el-col>
-        <el-col :span="12" class="text_right">
-          <el-button type="primary" size="default" @click="">添加</el-button>
-          <el-button type="primary" size="default" @click="">删除</el-button>
-        </el-col>
-      </el-row>
-      <!-- <Pagination /> -->
-    </el-footer>
+
+    <el-dialog
+      :visible.sync="dialogVisible"
+      width="30%"
+      :before-close="handleClose"
+    >
+      <el-input
+        v-if="type == 1"
+        v-model="remark"
+        placeholder="备注"
+        size="small"
+      ></el-input>
+      <el-input
+        v-else
+        v-model="limitTakeNum"
+        placeholder="最大提货数量
+"
+        size="small"
+      ></el-input>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="dialogVisible = false">取 消</el-button>
+        <el-button type="primary" @click="handleInfo">确 定</el-button>
+      </span>
+    </el-dialog>
   </el-container>
 </template>
 
 <script>
 import Pagination from "./Pagination";
 import Transfer from "./Transfer";
+import {
+  getPolicyDetail,
+  getCustomerList,
+  eidtBatch,
+} from "@/api/supply/sales";
+import Minxin from "@/mixin";
+
 export default {
+  mixins: [Minxin],
   data() {
     return {
+      dialogVisible: false,
       input: "",
-
-      ruleForm: {
-        name: "",
-      },
+      ruleForm: {},
       listLoading: false,
-      rules: {
-        name: [
-          { required: true, message: "", trigger: "click" },
-          { min: 3, max: 5, message: "", trigger: "click" },
-        ],
+      remark: "",
+      limitTakeNum: "",
+      searchForm: {
+        code: "",
+        remark: "",
+        title: "",
       },
-
-      dataList: [
-        {
-          num: "2",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1518 弄",
-          zip: 200333,
-        },
-        {
-          num: "2",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1518 弄",
-          zip: 200333,
-        },
-        {
-          num: "2",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1518 弄",
-          zip: 200333,
-        },
-        {
-          num: "2",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1518 弄",
-          zip: 200333,
-        },
-        {
-          num: "2",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1518 弄",
-          zip: 200333,
-        },
+      id: "",
+      dataList: [],
+      detail: {},
+      radio: "",
+      type:'',
+      typeOptions: [
         {
-          num: "2",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1518 弄",
-          zip: 200333,
+          vlaue: "PROVISION",
+          label: "配提",
         },
         {
-          num: "2",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1518 弄",
-          zip: 200333,
+          value: "LIMIT",
+          label: "限量",
         },
       ],
-      radio: "",
     };
   },
 
@@ -281,6 +245,49 @@ export default {
     handelLeftCheck(e) {
       console.log(e);
     },
+    getList() {
+      this.listLoading = true;
+      const params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        policyId: "",
+      };
+      getCustomerList(params).then((res) => {
+        this.dataList = res.data.records;
+        this.listLoading = false;
+      });
+      // getPolicyDetail({ policyId: this.$route.query.id||'' }).then((res) => {
+      //   this.ruleForm = res.data;
+      // });
+      // this.listLoading = false;
+    },
+    handleEdit() {
+      if (this.ids.length) {
+        this.type = 2;
+        this.dialogVisible = true;
+        return;
+      }
+      this.$errorMsg("请选编辑项");
+    },
+    handleClose(done) {
+      done();
+    },
+    hanleDelete() {},
+    handleInfo() {
+      let ids = this.id ? [this.id] : this.ids;
+      eidtBatch({
+        policyCustomerIds: ids.join(","),
+        limitTakeNum: this.limitTakeNum,
+        remark: this.remark,
+      }).then((res) => {
+        this.$successMsg("编辑成功");
+        this.dialogVisible = false;
+        this.remark = ''
+        this.limitTakeNum = ''
+        this.getList();
+      });
+    },
+
   },
   components: {
     Transfer,
@@ -297,4 +304,7 @@ export default {
 .text_right {
   text-align: right;
 }
+.el-select {
+  width: 100%;
+}
 </style>

+ 380 - 228
src/views/sales_policy/components/Examine.vue

@@ -1,259 +1,408 @@
 <template>
-  <div class="app-container">
-    <div class="descriptions">
-      <el-row>
-        <el-col :span="4">销售政策编号</el-col>
-        <el-col :span="4">1</el-col>
-        <el-col :span="4">销售政策说明</el-col>
-        <el-col :span="4">1</el-col>
-        <el-col :span="4">状态</el-col>
-        <el-col :span="4">1</el-col>
-      </el-row>
-      <el-row>
-        <el-col :span="4">销售政策类型</el-col>
-        <el-col :span="4">1</el-col>
-        <el-col :span="4">支付钱包</el-col>
-        <el-col :span="4">1</el-col>
-        <el-col :span="4">家用空调</el-col>
-        <el-col :span="4">1</el-col>
-      </el-row>
-      <el-row>
-        <el-col :span="4">备注</el-col>
-        <el-col :span="20">1</el-col>
-      </el-row>
-      <el-row>
-        <el-col :span="3">制单人</el-col>
-        <el-col :span="3">1</el-col>
-        <el-col :span="3">制单日期</el-col>
-        <el-col :span="3">1</el-col>
-        <el-col :span="3">生效日期</el-col>
-        <el-col :span="3">1</el-col>
-        <el-col :span="3">失败日期</el-col>
-        <el-col :span="3">1</el-col>
-      </el-row>
-      <el-row>
-        <el-col :span="3">审核人</el-col>
-        <el-col :span="3">1</el-col>
-        <el-col :span="3">审核日期</el-col>
-        <el-col :span="3">1</el-col>
-        <el-col :span="3">关闭人</el-col>
-        <el-col :span="3">1</el-col>
-        <el-col :span="3">关闭日期</el-col>
-        <el-col :span="3">1</el-col>
-      </el-row>
-    </div>
-    <div class="mymain-container">
-      <el-row>
-        <el-divider></el-divider>
-        <el-row type="flex">
-          <el-col :span="12">
-            <h4 style="display: inline-block; margin-right: 20px">货品信息</h4>
-            <el-button size="small">查看</el-button></el-col
-          >
+
+  <div>
+    <el-header height="50px" class="header">
+      <el-page-header @back="$parent.isShow = 1,$parent.id=''" content="详情页面">
+      </el-page-header>
+    </el-header>
+    <div class="app-container">
+      <div class="descriptions">
+
+        <el-row>
+          <el-col :span="4">销售政策编号</el-col>
+          <el-col :span="4">{{ detail.code }}</el-col>
+          <el-col :span="4">销售政策说明</el-col>
+          <el-col :span="4">{{ detail.title }}</el-col>
+          <el-col :span="4">状态</el-col>
+          <el-col :span="4">{{
+            detail.status == 1 ? "已生效" : "未生效"
+          }}</el-col>
         </el-row>
-        <el-divider></el-divider>
-      </el-row>
-      <el-table
-        v-loading="listLoading"
-        :data="dataList"
-        element-loading-text="Loading"
-        border
-        fit
-        highlight-current-row
-        stripe
-      >
-        <el-table-column
-          fixed
-          prop="num"
-          label="序号"
-          width="50"
-          align="center"
-        >
-        </el-table-column>
-        <el-table-column prop="name" label="货品编码" align="center">
-        </el-table-column>
-        <el-table-column prop="province" label="货品名称" align="center">
-        </el-table-column>
-        <el-table-column prop="city" label="规格型号" align="center">
-        </el-table-column>
-        <el-table-column
-          prop="address"
-          label="销售类型编码"
-          width="500"
-          align="center"
-        >
-        </el-table-column>
-        <el-table-column prop="zip" label="销售类型" align="center">
-        </el-table-column>
-        <el-table-column prop="zip" label="单价" align="center">
-        </el-table-column>
-        <el-table-column prop="zip" label="支付钱包" align="center">
-        </el-table-column>
-        <el-table-column prop="zip" label="备注" align="center">
-        </el-table-column>
-      </el-table>
-      <el-row>
-        <el-divider></el-divider>
-        <el-row type="flex">
-          <el-col :span="12">
-            <h4 style="display: inline-block; margin-right: 20px">条件信息</h4>
-          </el-col>
+        <el-row>
+          <el-col :span="4">销售政策类型</el-col>
+          <el-col :span="4">{{
+            detail.type == "PROVISION" ? "配提" : "限量"
+          }}</el-col>
+          <el-col :span="4">现金钱包</el-col>
+          <el-col :span="4"></el-col>
+          <el-col :span="4"></el-col>
+          <el-col :span="4"></el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="4">备注</el-col>
+          <el-col :span="20">{{ detail.remark }}</el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="3">制单人</el-col>
+          <el-col :span="3">{{ detail.createBy }}</el-col>
+          <el-col :span="3">制单日期</el-col>
+          <el-col :span="3">{{ detail.createTime }}</el-col>
+          <el-col :span="3">生效日期</el-col>
+          <el-col :span="3">{{ detail.startTime }}</el-col>
+          <el-col :span="3">失败日期</el-col>
+          <el-col :span="3">{{ detail.endTime }}</el-col>
         </el-row>
-        <el-divider></el-divider>
-      </el-row>
-      <el-table
-        v-loading="listLoading"
-        :data="dataList"
-        element-loading-text="Loading"
-        border
-        fit
-        highlight-current-row
-        stripe
-      >
-        <el-table-column
-          fixed
-          prop="num"
-          label="序号"
-          width="50"
-          align="center"
+        <el-row v-if="this.$parent.isShow == 4">
+          <el-col :span="3">审核人</el-col>
+          <el-col :span="3">{{ detail.examineBy }}</el-col>
+          <el-col :span="3">审核日期</el-col>
+          <el-col :span="3">{{ detail.examineTime }}</el-col>
+          <el-col :span="3">关闭人</el-col>
+          <el-col :span="3"></el-col>
+          <el-col :span="3">关闭日期</el-col>
+          <el-col :span="3"></el-col>
+        </el-row>
+      </div>
+      <div class="mymain-container">
+        <el-row>
+          <el-divider></el-divider>
+          <el-row type="flex">
+            <el-col :span="12">
+              <h4 style="display: inline-block; margin-right: 20px">
+                货品信息
+              </h4>
+              <!-- <el-button size="small">查看</el-button> -->
+            </el-col>
+            <el-col :span="12" class="tr">
+              <el-button size="small" @click="$parent.isShow = 10"
+                >查看条件</el-button
+              >
+            </el-col>
+          </el-row>
+          <el-divider></el-divider>
+        </el-row>
+        <el-table
+          v-loading="listLoading"
+          :data="dataList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
         >
-        </el-table-column>
-        <el-table-column prop="name" label="限定条件" align="center">
-        </el-table-column>
-        <el-table-column prop="province" label="限定机型" align="center">
-        </el-table-column>
-        <el-table-column prop="city" label="配体机型" align="center">
-        </el-table-column>
-        <el-table-column fixed="right" label="操作" align="center">
-          <template slot-scope="scope">
-            <el-button type="text" size="small">查看</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
-      <el-row>
-        <el-divider></el-divider>
-        <el-row type="flex">
-          <el-col :span="12">
-            <h4 style="display: inline-block; margin-right: 20px">
-              经销商使用范围
-            </h4>
-            <el-button size="small">添加</el-button></el-col
+          <el-table-column
+            fixed
+            prop="num"
+            label="序号"
+            width="50"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="materialNumber"
+            label="货品编码"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column prop="materialName" label="货品名称" align="center">
+          </el-table-column>
+          <el-table-column prop="specification" label="规格型号" align="center">
+          </el-table-column>
+          <el-table-column
+            prop="saleTypeCode"
+            label="销售类型编码"
+            width="500"
+            align="center"
           >
+          </el-table-column>
+          <el-table-column prop="saleTypeName" label="销售类型" align="center">
+          </el-table-column>
+          <el-table-column prop="price" label="单价" align="center">
+          </el-table-column>
+          <el-table-column label="支付钱包" align="center">
+            <template slot-scope="scope">
+              <el-tag
+                type="danger"
+                size="small"
+                v-if="scope.row.walletCommonly == 1"
+              >
+                允许普通钱包
+              </el-tag>
+              <el-tag type="danger" size="small" v-else
+                >不允许使用普通钱包</el-tag
+              >
+              <el-tag
+                type="danger"
+                size="small"
+                v-if="scope.row.walletDeduct == 1"
+              >
+                允许抵扣钱包</el-tag
+              >
+              <el-tag type="danger" size="small" v-else>不允许抵扣钱包</el-tag>
+              <el-tag
+                type="danger"
+                size="small"
+                v-if="scope.row.walletRebate == 1"
+              >
+                允许返利钱包
+              </el-tag>
+              <el-tag type="danger" size="small" v-else>不允许返利钱包</el-tag>
+              <el-tag
+                type="danger"
+                size="small"
+                v-if="scope.row.walletSpecial == 1"
+                >允许特殊钱包</el-tag
+              >
+              <el-tag type="danger" size="small" v-else>
+                不允许特殊钱包
+              </el-tag>
+            </template>
+          </el-table-column>
+        </el-table>
+        <!-- 分页 -->
+        <div style="margin: 20px 0">
+          <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal"
+          >
+          </el-pagination>
+        </div>
+        <el-row>
+          <el-divider></el-divider>
+          <el-row type="flex">
+            <el-col :span="12">
+              <h4 style="display: inline-block; margin-right: 20px">
+                条件信息
+              </h4>
+            </el-col>
+          </el-row>
+          <el-divider></el-divider>
         </el-row>
-        <el-divider></el-divider>
-      </el-row>
-      <el-table
-        v-loading="listLoading"
-        :data="dataList"
-        element-loading-text="Loading"
-        border
-        fit
-        highlight-current-row
-        stripe
-      >
-        <el-table-column
-          fixed
-          prop="num"
-          label="序号"
-          width="50"
-          align="center"
+        <el-table
+          :data="conditionList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
         >
-        </el-table-column>
-        <el-table-column prop="name" label="经销商编码" align="center">
-        </el-table-column>
-        <el-table-column prop="province" label="经销商名称" align="center">
-        </el-table-column>
+          <el-table-column
+            fixed
+            type="index"
+            label="序号"
+            width="50"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column prop="name" label="限定条件" align="center">
+          </el-table-column>
 
-      </el-table>
+        </el-table>
+        <el-row>
+          <el-divider></el-divider>
+          <el-row type="flex">
+            <el-col :span="12">
+              <h4 style="display: inline-block; margin-right: 20px">
+                经销商使用范围
+              </h4>
+            </el-col>
+          </el-row>
+          <el-divider></el-divider>
+        </el-row>
+        <el-table
+          v-loading="listLoading"
+          :data="custoList"
+          element-loading-text="Loading"
+          border
+          fit
+          highlight-current-row
+          stripe
+        >
+          <el-table-column
+            fixed
+            type="index"
+            label="序号"
+            width="50"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="customerNumber"
+            label="经销商编码"
+            align="center"
+          >
+          </el-table-column>
+          <el-table-column
+            prop="customerName"
+            label="经销商名称"
+            align="center"
+          >
+          </el-table-column>
+        </el-table>
+        <!-- 分页 -->
+        <div style="margin: 20px 0">
+          <el-pagination
+            @size-change="handleSizeChanges"
+            @current-change="handleCurrentChanges"
+            :current-page="currentPages"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="clistTotal"
+          >
+          </el-pagination>
+        </div>
+        <div class="descriptions" v-if="$parent.isShow == 8 ">
+          <el-row>
+            <el-col :span="6">审核人</el-col>
+            <el-col :span="6">{{ detail.code }}</el-col>
+            <el-col :span="6">审核结果</el-col>
+            <el-col :span="6">
+              <template>
+                <el-radio-group v-model="examineStatus">
+                  <el-radio :label="'OK'">通过</el-radio>
+                  <el-radio :label="'FAIL'">驳回</el-radio>
+                </el-radio-group>
+              </template>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-col :span="4">审批说明</el-col>
+            <el-col :span="20" class="col" style="padding: 0">
+              <el-input
+                type="textarea"
+                style="height: 100%"
+                autosize
+                placeholder="请输入内容"
+                v-model="remark"
+              >
+              </el-input>
+            </el-col>
+          </el-row>
+          <el-row>
+            <el-button type="primary" size="small" @click="handleSubmit"
+              >审核</el-button
+            >
+          </el-row>
+        </div>
+      </div>
     </div>
   </div>
 </template>
 
 <script>
+import {
+  getPolicyDetail,
+  getMaterialList,
+  getCustomerList,
+  getConditionList,
+  toExamine,
+} from "@/api/supply/sales";
+import Minxin from "@/mixin";
+import { ok } from "assert";
+
 export default {
+  mixins: [Minxin],
   name: "examine",
   data() {
     return {
+      currentPages: 1, // 当前页码
+      pageSizes: 10, // 每页数量
+      clistTotal: 0,
       input: "",
-
-      ruleForm: {
-        name: "",
-      },
+      remark: "",
+      fileList: [],
       listLoading: false,
-      rules: {
-        name: [
-          { required: true, message: "", trigger: "click" },
-          { min: 3, max: 5, message: "", trigger: "click" },
-        ],
-      },
       imageUrl: "",
-      dataList: [
-        {
-          num: "2",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1518 弄",
-          zip: 200333,
-        },
-        {
-          num: "2",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1518 弄",
-          zip: 200333,
-        },
-        {
-          num: "2",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1518 弄",
-          zip: 200333,
-        },
-        {
-          num: "2",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1518 弄",
-          zip: 200333,
-        },
-        {
-          num: "2",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1518 弄",
-          zip: 200333,
-        },
-        {
-          num: "2",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1518 弄",
-          zip: 200333,
-        },
-        {
-          num: "2",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1518 弄",
-          zip: 200333,
-        },
-      ],
-      radio: "",
+      dataList: [],
+      examineStatus: "OK",
       options: {},
       value: "",
+      detail: {},
+      screenForm: {
+        code: "",
+        createBy: "",
+        endCreateTime: "",
+        endTime1: "",
+        endTime2: "",
+        examineBy: "",
+        remark: "",
+        startCreateTime: "",
+        startTime1: "",
+        startTime2: "",
+        status: "",
+        title: "",
+        type: "",
+      },
+      conditionList: [],
+      custoList: [],
     };
   },
+  created() {},
+  methods: {
+    getList() {
+      this.listLoading = true;
+      getPolicyDetail({ policyId: this.$parent.id }).then((res) => {
+        this.detail = res.data;
+        const condParams = {
+          policyId: this.detail.code,
+        };
+        // 获取条件政策
+        getConditionList(condParams).then((res) => {
+          this.conditionList = res.data;
+        });
+        const paramss = {
+          pageNum: this.currentPage,
+          pageSize: this.pageSize,
+          policyId: this.detail.code,
+          saleTypeCode: "",
+        };
+        getMaterialList(paramss).then((res) => {
+          this.dataList = res.data.records;
+          this.listTotal = res.data.total;
+          this.listLoading = false;
+        });
+
+        this.getCond();
+      });
+    },
+    // 更改每页数量
+    handleSizeChanges(val) {
+      this.pageSizes = val;
+      this.currentPages = 1;
+      this.getCond();
+    },
+    // 更改当前页
+    handleCurrentChanges(val) {
+      this.currentPages = val;
+      this.getCond();
+    },
+    getCond() {
+      this.listLoading = true;
+      const custoParams = {
+        pageNum: this.currentPages,
+        pageSize: this.pageSizes,
+        policyId: this.detail.code,
+      };
+      getCustomerList(custoParams).then((res) => {
+        this.custoList = res.data.records;
+        this.clistTotal = res.data.total;
+        this.listLoading = false;
+      });
+    },
+    handleSubmit() {
+      toExamine({
+        examineStatus: this.examineStatus,
+        policyId: this.$parent.id ,
+        examineRemark: this.remark,
+      }).then((res) => {
+        this.$successMsg("已提交审核");
+        this.isShow = 1;
+      });
+    },
+  },
 };
 </script>
 
 <style lang="scss" scoped>
+.el-col {
+  overflow: hidden;
+}
 .descriptions {
   // border: #EBEEF5;
   border: 1px solid #ebeef5;
@@ -274,4 +423,7 @@ export default {
 .el-divider--horizontal {
   margin: 20px 0;
 }
+.col {
+  height: 100px;
+}
 </style>

+ 16 - 297
src/views/sales_policy/components/TabelTransfer.vue

@@ -1,137 +1,23 @@
 <template>
-  <el-container>
-    <el-header height="">
-      <el-form label-width="0" :inline="false" size="small">
-        <el-row :gutter="20">
-          <el-col :xs="24" :sm="8" :lg="8" :offset="0">
-            <el-form-item label="" >
-              <el-input
-                v-model="input"
-                placeholder="产品编码"
-              ></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="8" :lg="8" :offset="0">
-            <el-form-item label="" >
-              <el-input
-                v-model="input"
-                placeholder="产品名称"
 
-              ></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="8" :lg="8" :offset="0">
-            <el-form-item label="" >
-              <el-input
-                v-model="input"
-                placeholder="产品型号"
-
-              ></el-input>
-            </el-form-item>
-          </el-col>
-
-          <el-col :xs="24" :sm="8" :lg="8" :offset="0">
-            <el-form-item label="" >
-              <el-date-picker
-                v-model="value1"
-                type="datetimerange"
-                range-separator="至"
-                start-placeholder="开始日期"
-                end-placeholder="结束日期"
-              >
-              </el-date-picker>
-            </el-form-item>
-          </el-col>
-          <el-form-item label="" >
-            <el-button type="primary"  size="small " @click=""
-              >查询</el-button
-            >
-          </el-form-item>
-        </el-row>
-      </el-form>
-    </el-header>
-    <el-main height="">
-      <el-row>
-        <el-row :gutter="50">
-          <el-col :xs="10" :ms="10" :lg="10">
-            <el-row>
-              <el-row> </el-row>
-              <el-row>
-                <el-row class="title"> 可选产品列表 </el-row>
-
-                <el-table style="width: 100%" :data="tableData" border>
-                  <el-table-column type="selection" width="55" align="center">
-                  </el-table-column>
-                  <el-table-column label="日期" width="120" align="center">
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
-                  </el-table-column>
-                  <el-table-column prop="name" label="姓名" align="center">
-                  </el-table-column>
-                </el-table>
-                <el-row class="mg">
-                  <Pagination />
-                </el-row>
-              </el-row>
-            </el-row>
-          </el-col>
-          <el-col :xs="4" :ms="4" :lg="4" class="middle">
-            <el-row :gutter="20" justify="center" align="middle">
-              <el-row class="btn">
-                <el-button type="primary" size="small " @click=""
-                  >全部添加</el-button
-                >
-              </el-row>
-              <el-row class="btn">
-                <el-button type="primary" size="small " @click=""
-                  >增加</el-button
-                >
-              </el-row>
-              <el-row class="btn">
-                <el-button type="primary" size="small " @click=""
-                  >删除</el-button
-                ></el-row
-              >
-              <el-row class="btn"
-                ><el-button type="primary" size="small  " @click=""
-                  >全部删除</el-button
-                ></el-row
-              >
-            </el-row>
-          </el-col>
-          <el-col :xs="10" :ms="10" :lg="10">
-            <el-row>
-              <el-row> </el-row>
-              <el-row>
-                <el-row class="title"> 已选产品列表 </el-row>
-                <el-table style="width: 100%" :data="tableData" border>
-                  <el-table-column type="selection" width="55" align="center">
-                  </el-table-column>
-                  <el-table-column label="日期" width="120" align="center">
-                    <template slot-scope="scope">{{ scope.row.date }}</template>
-                  </el-table-column>
-                  <el-table-column prop="name" label="姓名" align="center">
-                  </el-table-column>
-                </el-table>
-                <el-row class="mg">
-                  <Pagination />
-                </el-row>
-              </el-row>
-            </el-row>
-          </el-col>
-        </el-row>
-      </el-row>
-    </el-main>
-  </el-container>
 </template>
 
 <script>
+import Minxin from "@/mixin";
+import { getId, getMaterialList } from "@/api/supply/sales";
 import Pagination from "./Pagination";
 export default {
+  mixins: [Minxin],
+  props: {
+    conditList: {
+      type: Array,
+      default: [],
+    },
+  },
   data() {
     return {
       input: "",
-      leftData: [],
-      rightData: [],
+
       centerDialogVisible: false,
       value1: [new Date(2000, 10, 10, 10, 10), new Date(2000, 10, 11, 10, 10)],
       tableData: [
@@ -140,154 +26,16 @@ export default {
           name: "王小虎",
           address: "上海市普陀区金沙江路 1518 弄",
         },
-        {
-          date: "2016-05-02",
-          name: "王小虎",
-          address: "上海市普陀区金沙江路 1518 弄",
-        },
-        {
-          date: "2016-05-04",
-          name: "王小虎",
-          address: "上海市普陀区金沙江路 1518 弄",
-        },
-        {
-          date: "2016-05-01",
-          name: "王小虎",
-          address: "上海市普陀区金沙江路 1518 弄",
-        },
-        {
-          date: "2016-05-08",
-          name: "王小虎",
-          address: "上海市普陀区金沙江路 1518 弄",
-        },
-        {
-          date: "2016-05-06",
-          name: "王小虎",
-          address: "上海市普陀区金沙江路 1518 弄",
-        },
-        {
-          date: "2016-05-07",
-          name: "王小虎",
-          address: "上海市普陀区金沙江路 1518 弄",
-        },
       ],
-      leftData: [],
-      dataL: [1, 3, 2],
-      dataR: [],
-      rightData: [],
-      multipleSelection: [],
+      type:''
     };
   },
+
   methods: {
-    handelLeftCheck(e) {
-      console.log(e);
-    },
-    handelLeftCheck(direction) {},
-    //添加全部数据
-    handleAllData(direction) {
-      if (direction === "left") {
-        if (!this.dataL.length) return;
-        this.dataR = [...this.dataR, ...this.dataL];
-        this.dataL = [];
-        this.leftData = [];
-      } else {
-        if (!this.dataR.length) return;
-        this.dataL = [...this.dataL, ...this.dataR];
-        this.dataR = [];
-        this.rightData = [];
-      }
-    },
-    //添加部分或单个数据
-    handlePartData(direction) {
-      if (direction === "left") {
-        if (!this.dataL.length) return;
-        this.dataR = [...this.dataR, ...this.leftData];
-        this.dataL.forEach((k, d) => {
-          this.leftData.forEach((e) => {
-            if (e == k) {
-              this.dataL.splice(d, 1);
-              this.leftData = [];
-              return;
-            }
-          });
-        });
-      } else {
-        if (!this.dataL.length) return;
-        this.dataL = [...this.dataL, ...this.rightData];
-        this.dataR.forEach((k, d) => {
-          this.rightData.forEach((e) => {
-            if (e == k) {
-              this.dataR.splice(d, 1);
-              this.rightData = [];
-              return;
-            }
-          });
-        });
-      }
-    },
-    //删除全部数据
-    handleAllDelete(direction) {
-      if (direction === "left") {
-        if (!this.dataL.length) return;
-        this.dataL = [];
-        this.leftData = [];
-      } else {
-        if (!this.dataR.length) return;
-        this.dataR = [];
-        this.rightData = [];
-      }
-    },
-    //删除部分或单个数据
-    handlePartDelete(direction) {
-      if (direction === "left") {
-        this.dataL.forEach((k, d) => {
-          this.leftData.forEach((e) => {
-            if (e == k) {
-              this.dataL.splice(d, 1);
-              this.leftData = [];
-              return;
-            }
-          });
-        });
-      } else {
-        this.dataR.forEach((k, d) => {
-          this.rightData.forEach((e) => {
-            if (e == k) {
-              this.dataR.splice(d, 1);
-              this.rightData = [];
-              return;
-            }
-          });
-        });
-      }
-    },
-    // 判断能操作那边框
-    handleJudge(type) {
-      if (this.leftDisabled) {
-        // 左边框功能操作
-        this.hanleType(type, "left");
-      } else {
-        // 右边框功能操作
-        this.hanleType(type, "right");
-      }
-    },
-    // 获取事件类型
-    hanleType(type, direction) {
-      switch (type) {
-        case "AddAll":
-          this.handleAllData(direction);
-          break;
-        case "AddPart":
-          this.handlePartData(direction);
-          break;
-        case "DeleteAll":
-          this.handleAllDelete(direction);
-          break;
-        case "DeletePart":
-          this.handlePartDelete(direction);
-          break;
-      }
+    getList() {
+      // this.getMaterialList();
     },
+
   },
   components: {
     Pagination,
@@ -296,34 +44,5 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-.btn {
-  margin: 20px 0;
-  text-align: center;
-}
-.query_btn {
-  margin-left: 0;
-}
-.mg {
-  margin: 20px;
-}
-.pdt {
-  margin: 20px 0;
-}
-.el-main {
-  overflow: hidden;
-}
-.middle {
-  height: 430px;
-  display: flex;
-  align-content: center;
-  justify-content: center;
-  align-items: center;
-}
-.title {
-  padding: 10px 0;
-  text-align: center;
-  border-left: 1px solid #ebeef5;
-  border-right: 1px solid #ebeef5;
-  border-top: 1px solid #ebeef5;
-}
+
 </style>

+ 129 - 173
src/views/sales_policy/components/Transfer.vue

@@ -1,63 +1,90 @@
 <template>
   <div>
     <slot name="header">
+      <el-row class="radio">
+        <el-radio-group v-model="region">
+          <el-radio label="0">全部经销商</el-radio>
+          <el-radio label="1">地区</el-radio>
+          <el-radio label="2">指定</el-radio>
+        </el-radio-group>
+      </el-row>
       <el-row type="flex">
         <el-col>
-          <el-select size="small" v-model="value" class="select_height" placeholder="请选择">
-            <el-option
-              v-for="item in options"
-              :key="item.value"
-              :label="item.label"
-              :value="item.value"
-            >
-            </el-option>
-          </el-select>
+          <el-input
+            v-model="keyword"
+            placeholder="查找经销商"
+            size="small"
+          ></el-input>
         </el-col>
-        <el-col><el-button size="small">确定</el-button></el-col>
+        <el-col
+          ><el-button size="small" @click="getcList">确定</el-button></el-col
+        >
       </el-row>
     </slot>
     <div>
       <el-row type="flex" align="moddle" class="transfer">
         <el-col class="left_box" :span="9">
-          <h4 class="transfer_title">可选经销商</h4>
-          <el-checkbox-group
-            v-model="leftData"
-            class="left_box_flex"
-            @change="handelLeftCheck"
-          >
-            <el-checkbox
-              v-for="(item, index) in dataL"
-              :key="index"
-              :label="item"
-              :disabled="rightDisabled"
-            ></el-checkbox>
-          </el-checkbox-group>
+          <div>
+            <h4 class="transfer_title">可选经销商</h4>
+            <el-checkbox-group
+              v-model="leftData"
+              class="left_box_flex"
+              @change="handleLeft"
+            >
+              <el-checkbox
+                v-for="(item, index) in dataL"
+                :key="index"
+                :label="item.id"
+              >
+                {{ item.name }}</el-checkbox
+              >
+            </el-checkbox-group>
+          </div>
+          <!-- 分页 -->
+          <div>
+            <el-pagination
+              @size-change="handleSizeChange"
+              @current-change="handleCurrentChange"
+              :current-page="currentPage"
+              :page-sizes="[10]"
+              :page-size="10"
+              layout="total, sizes, prev, pager, next, jumper"
+              :total="listTotal"
+            >
+            </el-pagination>
+          </div>
         </el-col>
         <el-col class="middle_box" :span="6">
           <el-row>
             <el-col>
-              <el-button :disabled="isDisabled" size="small" @click="handleJudge('AddAll')"
+              <el-button
+                size="small"
+                @click="handleAllAdd"
+                :disabled="type == 2 || !dataL.length"
                 >全部添加</el-button
               ></el-col
             >
             <el-col>
-              <el-button :disabled="isDisabled" size="small" @click="handleJudge('AddPart')"
+              <el-button
+                size="small"
+                @click="handleAdd"
+                :disabled="type == 2 || !dataL.length"
                 >增加</el-button
               ></el-col
             >
             <el-col>
               <el-button
-                :disabled="isDisabled"
                 size="small"
-                @click="handleJudge('DeletePart')"
+                :disabled="type == 1 || !dataR.length"
+                @click="handleDelete"
                 >删除</el-button
               ></el-col
             >
             <el-col>
               <el-button
-                :disabled="isDisabled"
                 size="small"
-                @click="handleJudge('DeleteAll')"
+                :disabled="type == 1 || !dataR.length"
+                @click="handleAllDelete"
                 >全部删除</el-button
               ></el-col
             >
@@ -65,22 +92,27 @@
         </el-col>
         <el-col class="right_box" :span="9">
           <h4 class="transfer_title">已选经销商</h4>
-          <el-checkbox-group v-model="rightData" class="right_box_flex">
+          <el-checkbox-group
+            v-model="rightData"
+            class="right_box_flex"
+            @change="handleRight"
+          >
             <el-checkbox
               v-for="(item, index) in dataR"
               :key="index"
-              :label="item"
-              :disabled="leftDisabled"
-            ></el-checkbox>
+              :label="item.id"
+            >
+              {{ item.name }}</el-checkbox
+            >
           </el-checkbox-group>
         </el-col>
       </el-row>
     </div>
-
     <slot name="footer">
       <el-row>
-        <el-button type="primary" size="small" @click="">保存</el-button>
-        <el-button type="primary" size="small" @click="">提交审核</el-button>
+        <el-button type="primary" size="small" @click="handleSubmit"
+          >提交审核</el-button
+        >
         <el-button type="primary" size="small" @click="">重置</el-button>
       </el-row>
     </slot>
@@ -88,11 +120,16 @@
 </template>
 
 <script>
+import Minxin from "@/mixin";
+import { getCrList } from "@/api/supply/sales";
 export default {
+  mixins: [Minxin],
   data() {
     return {
+      type: "",
+      radio: "0",
       leftData: [],
-      dataL: [1, 3, 2],
+      dataL: [],
       dataR: [],
       rightData: [],
       options: [
@@ -100,155 +137,71 @@ export default {
           value: "选项1",
           label: "黄金糕",
         },
-        {
-          value: "选项2",
-          label: "双皮奶",
-        },
-        {
-          value: "选项3",
-          label: "蚵仔煎",
-        },
-        {
-          value: "选项4",
-          label: "龙须面",
-        },
-        {
-          value: "选项5",
-          label: "北京烤鸭",
-        },
       ],
       value: "",
+     region: "",
+
+      keyword: "",
     };
   },
-  computed: {
-    /**
-     * @return(bool)  isDisabled
-     *  禁用功能按钮
-     */
-    isDisabled() {
-      return !(this.leftData.length || this.rightData.length);
+  methods: {
+    getList() {
+      this.getcList();
     },
-    /**
-     * @return(bool)  leftDisabled
-     *  禁用左边框选择
-     */
-    leftDisabled() {
-      return this.leftData.some((i) => i !== "");
+    getcList() {
+      const customerParams = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        keyword: this.keyword,
+        region: this.region,
+      };
+
+
+      // 获取经销商列表
+      getCrList(customerParams).then((res) => {
+        this.dataL = res.data.records;
+        console.log(res,'获取经销商列表');
+
+        this.listTotal = res.data.total;
+      });
     },
-    /**
-     * @return(bool)  rightDisabled
-     *  禁用右边框选择
-     */
-    rightDisabled() {
-      return this.rightData.some((i) => i !== "");
+    handleLeft(e) {
+      this.type = 1;
     },
-  },
-  methods: {
-    handelLeftCheck(direction) {},
-    //添加全部数据
-    handleAllData(direction) {
-      if (direction === "left") {
-        if (!this.dataL.length) return;
-        this.dataR = [...this.dataR, ...this.dataL];
-        this.dataL = [];
-        this.leftData = [];
-      } else {
-        if (!this.dataR.length) return;
-        this.dataL = [...this.dataL, ...this.dataR];
-        this.dataR = [];
-        this.rightData = [];
-      }
+    handleRight(e) {
+      this.type = 2;
     },
-    //添加部分或单个数据
-    handlePartData(direction) {
-      if (direction === "left") {
-        if (!this.dataL.length) return;
-        this.dataR = [...this.dataR, ...this.leftData];
-        this.dataL.forEach((k, d) => {
-          this.leftData.forEach((e) => {
-            if (e == k) {
-              this.dataL.splice(d, 1);
-              this.leftData = [];
-              return;
-            }
-          });
-        });
-      } else {
-        if (!this.dataL.length) return;
-        this.dataL = [...this.dataL, ...this.rightData];
-        this.dataR.forEach((k, d) => {
-          this.rightData.forEach((e) => {
-            if (e == k) {
-              this.dataR.splice(d, 1);
-              this.rightData = [];
-              return;
-            }
-          });
-        });
-      }
+    handleAllAdd() {
+      this.dataR = this.dataL;
     },
-    //删除全部数据
-    handleAllDelete(direction) {
-      if (direction === "left") {
-        if (!this.dataL.length) return;
-        this.dataL = [];
-        this.leftData = [];
-      } else {
-        if (!this.dataR.length) return;
-        this.dataR = [];
-        this.rightData = [];
-      }
+    handleAllDelete() {
+      this.dataR = [];
     },
-    //删除部分或单个数据
-    handlePartDelete(direction) {
-      if (direction === "left") {
-        this.dataL.forEach((k, d) => {
-          this.leftData.forEach((e) => {
-            if (e == k) {
-              this.dataL.splice(d, 1);
-              this.leftData = [];
-              return;
-            }
-          });
-        });
-      } else {
-        this.dataR.forEach((k, d) => {
-          this.rightData.forEach((e) => {
-            if (e == k) {
-              this.dataR.splice(d, 1);
-              this.rightData = [];
-              return;
+    handleAdd() {
+      if (this.type == 1) {
+        for (let i = 0; i < this.dataL.length; i++) {
+          for (let k = 0; k < this.leftData.length; k++) {
+            if (this.dataL[i].id == this.leftData[k]) {
+              this.dataR = [...new Set([this.dataL[i], ...this.dataR])];
             }
-          });
-        });
+          }
+        }
+        this.leftData = [];
       }
     },
-    // 判断能操作那边框
-    handleJudge(type) {
-      if (this.leftDisabled) {
-        // 左边框功能操作
-        this.hanleType(type, "left");
-      } else {
-        // 右边框功能操作
-        this.hanleType(type, "right");
+    handleDelete() {
+      if (this.type == 2) {
+        for (let i = 0; i < this.dataR.length; i++) {
+          for (let k = 0; k < this.rightData.length; k++) {
+            if (this.dataR[i].id == this.rightData[k]) {
+              this.dataR.splice(i, 1);
+            }
+          }
+        }
       }
     },
-    // 获取事件类型
-    hanleType(type, direction) {
-      switch (type) {
-        case "AddAll":
-          this.handleAllData(direction);
-          break;
-        case "AddPart":
-          this.handlePartData(direction);
-          break;
-        case "DeleteAll":
-          this.handleAllDelete(direction);
-          break;
-        case "DeletePart":
-          this.handlePartDelete(direction);
-          break;
-      }
+    handleSubmit() {
+      this.$emit("handleAddPolicy", this.dataR);
     },
   },
 };
@@ -262,7 +215,10 @@ export default {
     margin: 20px 20px 0 20px;
   }
   .left_box {
-    width: 430px;
+    display: flex;
+    flex-direction: column;
+    justify-content: space-between;
+    width: 440px;
     height: 450px;
     border: 1px solid #eee;
     &_flex {
@@ -275,7 +231,7 @@ export default {
     }
   }
   .right_box {
-    width: 430px;
+    width: 440px;
     height: 450px;
     border: 1px solid #eee;
     &_flex {

+ 413 - 190
src/views/sales_policy/policy_list.vue

@@ -1,263 +1,475 @@
 <template>
   <div class="app-container" v-if="isShow == 1">
     <div class="screen-container">
-      <el-form :model="form" ref="form" :inline="false">
-        <el-row :gutter="20">
-          <el-col :xs="24" :ms="6" :lg="6">
-            <el-form-item label="">
-              <el-input
-                v-model="input"
-                placeholder="销售政策编号"
-                size="small"
-              ></el-input>
-            </el-form-item>
-          </el-col>
+      <el-form :model="screenForm" ref="screenForm" :inline="false">
+        <el-row>
+          <el-row :gutter="20">
+            <el-col :xs="24" :ms="6" :lg="6">
+              <el-form-item label="" prop="code">
+                <el-input
+                  v-model="screenForm.code"
+                  placeholder="销售政策编号"
+                  size="small"
+                ></el-input>
+              </el-form-item>
+            </el-col>
 
-          <el-col :xs="24" :ms="6" :lg="6">
-            <el-form-item label="">
-              <el-input
-                v-model="input"
-                placeholder="销售政策说明"
-                size="small"
-              ></el-input>
-            </el-form-item>
-          </el-col>
+            <el-col :xs="24" :ms="6" :lg="6">
+              <el-form-item label="" prop="remark">
+                <el-input
+                  v-model="screenForm.remark"
+                  placeholder="销售政策说明"
+                  size="small"
+                ></el-input>
+              </el-form-item>
+            </el-col>
 
-          <el-col :xs="24" :ms="6" :lg="6">
-            <el-form-item label="">
-              <el-input
-                v-model="input"
-                placeholder="表头备注"
-                size="small"
-              ></el-input>
-            </el-form-item>
-          </el-col>
+            <el-col :xs="24" :ms="6" :lg="6">
+              <el-form-item label="" prop="title">
+                <el-input
+                  v-model="screenForm.title"
+                  placeholder="表头备注"
+                  size="small"
+                ></el-input>
+              </el-form-item>
+            </el-col>
 
-          <el-col :xs="24" :ms="6" :lg="6">
-            <el-form-item label="">
-              <el-input
-                v-model="input"
-                placeholder="生效日期"
-                size="small"
-              ></el-input>
-            </el-form-item>
-          </el-col>
-
-          <el-col :xs="24" :ms="6" :lg="6">
-            <el-form-item label="">
-              <el-input
-                v-model="input"
-                placeholder="结束日期"
-                size="small"
-              ></el-input>
-            </el-form-item>
-          </el-col>
-
-          <el-col :xs="24" :ms="6" :lg="6">
-            <el-form-item label="">
-              <el-input
-                v-model="input"
-                placeholder="制表日期"
-                size="small"
-              ></el-input>
-            </el-form-item>
-          </el-col>
+            <el-col :xs="24" :ms="6" :lg="6">
+              <el-form-item label="" prop="startTime1">
+                <el-date-picker
+                  v-model="screenForm.startTime1"
+                  type="date"
+                  size="small"
+                  placeholder="生效日期"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20">
+            <el-col :xs="24" :ms="6" :lg="6">
+              <el-form-item label="" prop="startTime2">
+                <el-date-picker
+                  v-model="screenForm.startTime2"
+                  type="date"
+                  size="small"
+                  placeholder="结束日期"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
 
-          <el-col :xs="24" :ms="6" :lg="6">
-            <el-form-item label="">
-              <el-input
-                v-model="input"
-                placeholder="制表人"
-                size="small"
-              ></el-input>
-            </el-form-item>
-          </el-col>
+            <el-col :xs="24" :ms="6" :lg="6">
+              <el-form-item label="" prop="startCreateTime">
+                <el-date-picker
+                  v-model="screenForm.startCreateTime"
+                  type="date"
+                  size="small"
+                  placeholder="制表日期"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
 
-          <el-col :xs="24" :ms="6" :lg="6">
-            <el-form-item label="">
-              <el-input
-                v-model="input"
-                placeholder="审核人"
-                size="small"
-              ></el-input>
-            </el-form-item>
-          </el-col>
+            <el-col :xs="24" :ms="6" :lg="6">
+              <el-form-item label="" prop="createBy">
+                <el-input
+                  v-model="screenForm.createBy"
+                  placeholder="制表人"
+                  size="small"
+                ></el-input>
+              </el-form-item>
+            </el-col>
 
-          <el-col :xs="24" :ms="6" :lg="6">
-            <el-form-item label="">
-              <el-input
-                v-model="input"
-                placeholder="关闭人"
-                size="small"
-              ></el-input>
-            </el-form-item>
-          </el-col>
+            <el-col :xs="24" :ms="6" :lg="6">
+              <el-form-item label="" prop="examineBy">
+                <el-input
+                  v-model="screenForm.examineBy"
+                  placeholder="审核人"
+                  size="small"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row :gutter="20">
+            <el-col :xs="24" :ms="6" :lg="6">
+              <el-form-item label="" prop="inpu">
+                <el-input
+                  v-model="screenForm.input"
+                  placeholder="关闭人"
+                  size="small"
+                ></el-input>
+              </el-form-item>
+            </el-col>
 
-          <el-col :xs="24" :ms="6" :lg="6">
-            <el-form-item label="">
-              <el-select
-                size="small"
-                v-model="value"
-                disabled
-                placeholder="状态"
-                class="select_height"
-              >
-                <el-option
-                  v-for="item in options"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
+            <el-col :xs="24" :ms="6" :lg="6">
+              <el-form-item label="" prop="status">
+                <el-select
+                  size="small"
+                  v-model="screenForm.status"
+                  placeholder="状态"
+                  class="select_height"
                 >
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
+                  <el-option
+                    v-for="(item, index) in statusOptions"
+                    :key="index"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
 
-          <el-col :xs="24" :ms="6" :lg="6">
-            <el-form-item label="">
-              <el-select
-                size="small"
-                v-model="value"
-                disabled
-                placeholder="销售政策类型"
-                class="select_height"
-              >
-                <el-option
-                  v-for="item in options"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
+            <el-col :xs="24" :ms="6" :lg="6">
+              <el-form-item label="" prop="type">
+                <el-select
+                  size="small"
+                  v-model="screenForm.type"
+                  placeholder="销售政策类型"
+                  class="select_height"
                 >
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :ms="6" :lg="6" class="tr">
-            <el-form-item>
-              <el-button type="primary" size="small">查询</el-button>
-              <el-button size="small">重置</el-button>
-            </el-form-item>
-          </el-col>
+                  <el-option
+                    v-for="item in typeOptions"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value"
+                  >
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :ms="6" :lg="6" class="tr">
+              <el-form-item>
+                <el-button type="primary" size="small" @click="submitScreenForm"
+                  >查询</el-button
+                >
+                <el-button size="small" @click="resetScreenForm"
+                  >重置</el-button
+                >
+              </el-form-item>
+            </el-col>
+          </el-row>
         </el-row>
       </el-form>
     </div>
     <div class="btn-group">
       <el-row type="flex">
-        <el-button type="primary" class="btn" size="small">新增</el-button>
-        <el-button type="primary" class="btn" size="small">导出</el-button>
-        <el-button type="primary" class="btn" size="small">查询</el-button>
-        <el-button type="primary" class="btn" icon="" size="small"
-          ><i class="el-icon-delete"></i>
-        </el-button>
+        <el-button type="primary" class="btn" size="small" @click="hanlenewInfo"
+          >新增</el-button
+        >
       </el-row>
     </div>
     <div class="mymain-container">
-      <el-table :data="tableData" border style="width: 100%" height="600">
-        <el-table-column fixed="left" label="操作" width="200" align="center">
+      <el-table :data="dataList" border style="width: 100%">
+        <el-table-column fixed="left" label="操作" width="250" align="center">
           <template slot-scope="scope">
-            <el-button type="text" size="small">申请</el-button>
-            <el-button type="text" size="small">编辑</el-button>
-            <el-button type="text" size="small">详情</el-button>
-            <el-button type="text" size="small">删除</el-button>
+            <!-- <el-button
+              type="text"
+              size="small"
+              @click="(isShow = 5), (id = scope.row.id)"
+              >编辑</el-button
+
+            > -->
+            <el-button
+              type="text"
+              size="small"
+              @click="
+                (isShow = 4), (id = scope.row.id), (code = scope.row.code)
+              "
+              >详情</el-button
+            >
+            <el-button
+              type="text"
+              @click="
+                (isShow = 8), (id = scope.row.id), (code = scope.row.code)
+              "
+              size="small"
+              >审核</el-button
+            >
+            <!-- </el-popconfirm> -->
+            <el-popconfirm
+              style="margin-left: 10px"
+              title="提审?"
+              @onConfirm="handlesubmit(scope.row)"
+            >
+              <el-button type="text" size="small" slot="reference"
+                >提审</el-button
+              >
+            </el-popconfirm>
+
+            <el-popconfirm
+              style="margin-left: 10px"
+              title="删除吗?"
+              @onConfirm="hanleDelete(scope.row.id)"
+            >
+              <el-button type="text" slot="reference" size="small"
+                >删除</el-button
+              >
+            </el-popconfirm>
           </template>
         </el-table-column>
-        <el-table-column prop="name" label="状态" width="120" align="center">
+        <el-table-column label="状态" width="120" align="center">
+          <template slot-scope="scope">
+            <el-tag v-if="scope.row.examineStatus == 'WAIT'">待审核</el-tag>
+            <el-tag v-else-if="scope.row.examineStatus == 'OK'">通过 </el-tag>
+            <el-tag v-else>失败</el-tag>
+          </template>
         </el-table-column>
         <el-table-column
-          prop="province"
+          prop="code"
           label="销售政策编号"
           width="120"
           align="center"
         >
         </el-table-column>
         <el-table-column
-          prop="city"
+          prop="title"
           label="销售政策说明"
           width="120"
           align="center"
         >
         </el-table-column>
-        <el-table-column prop="address" label="部门" width="300" align="center">
-        </el-table-column>
-        <el-table-column prop="zip" label="表头备注" width="120" align="center">
+        <el-table-column prop="address" label="部门"  align="center">
         </el-table-column>
-        <el-table-column prop="zip" label="生效日期" width="120" align="center">
-        </el-table-column>
-        <el-table-column prop="zip" label="结束日期" width="120" align="center">
-        </el-table-column>
-        <el-table-column prop="zip" label="制表人" width="120" align="center">
+        <el-table-column
+          prop="remark"
+          label="表头备注"
+          width="120"
+          align="center"
+        >
         </el-table-column>
-        <el-table-column prop="zip" label="制表日期" width="120" align="center">
+        <el-table-column
+          prop="startTime"
+          label="生效日期"
+
+          align="center"
+        >
         </el-table-column>
-        <el-table-column prop="zip" label="审核人" width="120" align="center">
+        <el-table-column
+          prop="endTime"
+          label="结束日期"
+
+          align="center"
+        >
         </el-table-column>
-        <el-table-column prop="zip" label="审核日期" width="120" align="center">
+        <el-table-column
+          prop="examineBy"
+          label="制表人"
+          width="120"
+          align="center"
+        >
         </el-table-column>
-        <el-table-column prop="zip" label="关闭人" width="120" align="center">
+        <el-table-column
+          prop="examineBy"
+          label="制表日期"
+          width="120"
+          align="center"
+        >
         </el-table-column>
-        <el-table-column prop="zip" label="关闭日期" width="120" align="center">
+        <el-table-column
+          prop="examineBy"
+          label="审核人"
+          width="120"
+          align="center"
+        >
         </el-table-column>
       </el-table>
     </div>
-    <Pagination />
+    <!-- 分页 -->
+    <div class="fr">
+      <el-pagination
+        @size-change="handleSizeChange"
+        @current-change="handleCurrentChange"
+        :current-page="currentPage"
+        :page-sizes="[10, 20, 30, 50]"
+        :page-size="10"
+        layout="total, sizes, prev, pager, next, jumper"
+        :total="listTotal"
+      >
+      </el-pagination>
+    </div>
   </div>
   <AddPolicy v-else-if="isShow == 2" />
-  <AddCondition v-else-if="isShow == 3" />
-  <Examine v-else-if="isShow == 4"/>
-  <AddModel v-else />
+  <AddCondition v-else-if="isShow == 3 || isShow == 6" :id="id" />
+  <Examine v-else />
 </template>
 
 <script>
+import {
+  getList,
+  getTypeList,
+  deletePolicy,
+  getpolicySubmit,
+  toExamine,
+  getConditionList,
+} from "@/api/supply/sales";
+import Minxin from "@/mixin";
+import { downloadFiles, handleImport } from "@/utils/util";
 import AddPolicy from "./components/AddPolicy";
 import AddModel from "./components/AddModel";
 import Pagination from "./components/Pagination";
 import AddCondition from "./components/AddCondition";
-import Examine from './components/Examine'
+import Examine from "./components/Examine";
+import { mapState } from "vuex";
+
 export default {
+  mixins: [Minxin],
   data() {
     return {
-      input: "",
-      isShow: 4,
-      tableData: [
+      id: "",
+      code: "",
+      codeId: "",
+      isShow: 1,
+      dataList: [],
+      screenForm: {
+        code: "",
+        createBy: "",
+        endCreateTime: "",
+        endTime1: "",
+        endTime2: "",
+        examineBy: "",
+        remark: "",
+        startCreateTime: "",
+        startTime1: "",
+        startTime2: "",
+        status: "",
+        title: "",
+        type: "",
+      },
+      fileList: [],
+      statusOptions: [
         {
-          date: "2016-05-02",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1518 弄",
-          zip: 200333,
+          value: 1,
+          label: "已生效",
         },
         {
-          date: "2016-05-04",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1517 弄",
-          zip: 200333,
+          value: 0,
+          label: "未生效",
         },
+      ],
+      typeOptions: [
         {
-          date: "2016-05-01",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1519 弄",
-          zip: 200333,
+          vlaue: "PROVISION",
+          label: "配提",
         },
         {
-          date: "2016-05-03",
-          name: "王小虎",
-          province: "上海",
-          city: "普陀区",
-          address: "上海市普陀区金沙江路 1516 弄",
-          zip: 200333,
+          value: "LIMIT",
+          label: "限量",
         },
       ],
-      form: {},
-      options: {},
+      typeList: [],
       value: "",
-      imageUrl:''
+      imageUrl: "",
+      baseURL: "",
+      isFlag: "",
     };
   },
+  computed: mapState({
+    comCode: (state) => state.sales.code,
+  }),
+  created() {},
+  methods: {
+    // ...mapActions("sales", ["hanlenewInfo"]),
+    hanlenewInfo() {
+      this.isShow = 2;
+      this.$store.dispatch("sales/hanlenewInfo");
+    },
+    getList() {
+      const params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        code: this.screenForm.code,
+        createBy: this.screenForm.createBy,
+        endCreateTime: this.screenForm.endCreateTime,
+        endTime1: this.screenForm.endTime1,
+        endTime2: this.screenForm.endTime2,
+        examineBy: this.screenForm.examineBy,
+        remark: this.screenForm.remark,
+        startCreateTime: this.screenForm.startCreateTime,
+        startTime1: this.screenForm.startTime1,
+        startTime2: this.screenForm.startTime2,
+        status: this.screenForm.status,
+        title: this.screenForm.title,
+        type: this.screenForm.type,
+      };
+      getList(params).then((res) => {
+        this.dataList = res.data.records;
+      });
+      const paramsType = {
+        pageNum: 1,
+        pageSize: 10,
+        saleCdoe: "",
+        saleName: "",
+        stauts: "",
+      };
+      getTypeList(paramsType).then((res) => {
+        this.typeList = res.data.records;
+      });
+    },
+    hanleDelete(id) {
+      this.hanleDeleteAllPromise(id).then((ids) => {
+        deletePolicy({
+          id: ids[0],
+        }).then((res) => {
+          this.$successMsg("删除成功");
+          this.getList();
+        });
+      });
+    },
+    // 导出文档
+    handleExport() {
+      let screenData = {
+        customerTel: this.diaLogForm.customerTel,
+        logisticsCompany: this.diaLogForm.logisticsCompany,
+      };
+      downloadFiles("/policy/export", screenData);
+    },
+    importFileList() {},
+    // 导入
+    async handleImport(param) {
+      this.importLoading = true;
+      const file = param.file;
+      console.log(file, 123);
+      const formData = new FormData();
+      formData.append("file", file);
+      let result = await handleImport("/policy/material/import", formData);
+      this.importLoading = false;
+      this.importFileList = [];
+      if (result.code == 200) {
+        this.$alert(result.message, "导入成功", {
+          confirmButtonText: "确定",
+        });
+        this.getList();
+      } else {
+        this.$alert(result.message, "导入失败", {
+          confirmButtonText: "确定",
+        });
+      }
+    },
+    handlesubmit(e) {
+      if (e.examineStatus == "SAVE") {
+        getpolicySubmit({ policyId: e.id }).then((res) => {
+          this.$successMsg("已提交");
+        });
+      } else {
+        this.$errorMsg("未满足条件");
+      }
+    },
+    hanleExamine(e) {
+      if (e.examineStatus == "WAIT") {
+        toExamine({
+          examineRemark: e.id,
+          examineStatus: "WAIT",
+          policyId: e.id,
+        }).then((res) => {
+          this.$successMsg("已提交");
+        });
+      } else {
+        this.$errorMsg("未满足条件");
+      }
+    },
+  },
   components: {
     Examine,
     AddModel,
@@ -280,4 +492,15 @@ export default {
 .select_height {
   width: 100%;
 }
+.import-btn {
+  margin: 0 10px;
+}
+</style>
+
+<style>
+.header {
+  display: flex;
+  height: 50px;
+  align-items: center;
+}
 </style>

+ 278 - 82
src/views/sales_rebate/rebate_list.vue

@@ -2,51 +2,46 @@
   <div class="app-container">
     <div class="screen-container">
       <el-form
-        :model="screenForm"
         ref="screenForm"
-        :inline="false"
-        size="normal"
+        :model="screenForm"
+        size="small"
+        label-position="left"
       >
         <el-row :gutter="20">
           <el-col :xs="24" :ms="6" :lg="6">
-            <el-form-item label="">
+            <el-form-item label="" prop="mainName">
               <el-input
-                v-model="input"
-                placeholder="返利品类名称"
-                size="small"
-              ></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :ms="6" :lg="6">
-            <el-form-item label="">
-              <el-input
-                v-model="input"
+                v-model="screenForm.mainName"
                 placeholder="返利品类"
                 size="small"
               ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :ms="6" :lg="6">
-            <el-form-item label="">
+            <el-form-item label="" prop="saleTypeCode">
               <el-input
-                v-model="input"
+                v-model="screenForm.saleTypeCode"
                 placeholder="销售类型编码"
                 size="small"
               ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :ms="6" :lg="6">
-            <el-form-item label="">
+            <el-form-item label="" prop="saleTypeName">
               <el-input
-                v-model="input"
+                v-model="screenForm.saleTypeName"
                 placeholder="销售类型名称"
                 size="small"
               ></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :ms="6" :lg="6">
-            <el-form-item label="">
-              <!-- <el-select v-model="select" placeholder="请选择" size="small">
+            <el-form-item prop="status">
+              <el-select
+                v-model="screenForm.status"
+                placeholder="请选择"
+                size="small"
+              >
                 <el-option
                   v-for="item in options"
                   :key="item.value"
@@ -54,11 +49,18 @@
                   :value="item.value"
                 >
                 </el-option>
-              </el-select> -->
+              </el-select>
             </el-form-item>
           </el-col>
-          <el-col :xs="24" :ms="18" :lg="18" class="tr">
+          <el-col :xs="24" :ms="18" :lg="18">
             <el-form-item>
+              <el-button
+                type="primary"
+                size="small"
+                @click="(dialogVisible = true), (type = 1), getDictList()"
+                >新增</el-button
+              >
+
               <el-button type="primary" size="small" @click="submitScreenForm"
                 >查询</el-button
               >
@@ -70,17 +72,7 @@
         </el-row>
       </el-form>
     </div>
-    <div class="btn-group">
-      <el-button type="primary" size="small" @click="dialogVisible = true"
-        >新增</el-button
-      >
-      <el-button type="primary" size="small" @click="dialogVisible = true"
-        >编辑</el-button
-      >
-      <el-button type="primary" size="small" @click="">删除</el-button>
-      <el-button type="primary" size="small" @click="">导入</el-button>
-      <el-button type="primary" size="small" @click="">导出</el-button>
-    </div>
+
     <div class="mymain-container">
       <el-table
         v-loading="listLoading"
@@ -104,9 +96,11 @@
           >
             <template slot-scope="scope">
               <el-switch
-                v-model="isSwitch"
+                v-model="scope.row.status"
                 disabled
-                :active-text="isSwitch ? '已啓用' : '已禁用'"
+                :active-value="true"
+                :inactive-value="false"
+                :active-text="scope.row.status ? '已启用' : '已禁用'"
               >
               </el-switch>
             </template>
@@ -129,16 +123,20 @@
           min-width="160"
         >
           <template slot-scope="scope">
-            <el-button type="text" size="small">查看</el-button>
-            <el-button type="text" size="small">编辑</el-button>
-            <el-button type="text" size="small">编辑</el-button>
+            <el-button type="text" size="small" @click="hanleDateil(scope.row)"
+              >查看</el-button
+            >
+            <el-button type="text" size="small" @click="hanleEdit(scope.row)"
+              >编辑</el-button
+            >
+            <!-- <el-button type="text" size="small">编辑</el-button> -->
           </template>
         </el-table-column>
       </el-table>
-      <Pagination @pagination="pagination" />
+      <Pagination />
     </div>
     <div>
-      <el-dialog :visible.sync="dialogVisible" width="50%">
+      <el-dialog :visible.sync="dialogVisible" width="50%" @close="hanelclose">
         <el-form
           :model="dialogForm"
           ref="dialogForm"
@@ -146,29 +144,74 @@
           :inline="false"
           size="normal"
         >
-          <el-form-item label="返利使用钱包">
-            <el-input v-model="dialogForm.name"></el-input>
+          <el-form-item label="返利使用钱包" prop="name">
+            <el-input
+              v-model="dialogForm.name"
+              :disabled="type == 3"
+            ></el-input>
           </el-form-item>
-          <el-form-item label="产品使用品类">
-            <el-input v-model="dialogForm.name"></el-input>
+          <el-form-item label="产品使用品类" prop="mainName">
+            <el-select
+              v-model="dialogForm.mainName"
+              :disabled="type == 3"
+              placeholder="请选择品类"
+              size="small"
+            >
+              <el-option
+                v-for="item in dictListData"
+                :key="item.dictCode"
+                :label="item.dictValue"
+                :value="item.dictCode"
+              >
+              </el-option>
+            </el-select>
           </el-form-item>
-          <el-form-item label="销售类型编码">
-            <el-input v-model="dialogForm.name"></el-input>
+          <el-form-item label="销售类型编码" prop="saleTypeCode">
+            <el-select
+              v-model="dialogForm.saleTypeCode"
+              :disabled="type == 3"
+              placeholder="请选择类型编码"
+              size="small"
+            >
+              <el-option
+                v-for="item in typeList"
+                :key="item.sysDictId"
+                :label="item.dictValue"
+                :value="item.saleCode"
+              >
+              </el-option>
+            </el-select>
           </el-form-item>
-          <el-form-item label="销售类型名称">
-            <el-input v-model="dialogForm.name"></el-input>
+          <el-form-item label="销售类型名称" prop="saleTypeName">
+            <el-input
+              v-model="dialogForm.saleTypeName"
+              :disabled="type == 3"
+            ></el-input>
           </el-form-item>
-          <el-form-item label="返利折扣比例">
-            <el-input v-model="dialogForm.name"></el-input>
+          <el-form-item label="返利折扣比例" prop="rabateRate">
+            <el-input
+              placeholder="例如:0.1=1折"
+              :disabled="type == 3"
+              v-model="dialogForm.rabateRate"
+            ></el-input>
           </el-form-item>
-          <el-form-item label="状态">
-            <el-switch :active-text="true ? '启用' : ''"> </el-switch>
+          <el-form-item label="状态" prop="status">
+            <el-switch
+              v-model="dialogForm.status"
+              :disabled="type == 3"
+              :active-value="true"
+              :inactive-value="false"
+              :active-text="dialogForm.status ? '启用' : ''"
+            >
+            </el-switch>
           </el-form-item>
         </el-form>
-        <span slot="footer" class="dialog-footer">
-          <el-button @click="hanleCancel">取 消</el-button>
-          <el-button type="primary" @click="handelInfo">确 定</el-button>
-        </span>
+        <template v-if="type !== 3">
+          <span slot="footer" class="dialog-footer">
+            <el-button @click="hanleCancel">取 消</el-button>
+            <el-button type="primary" @click="handelInfo">确 定</el-button>
+          </span>
+        </template>
       </el-dialog>
     </div>
   </div>
@@ -177,50 +220,203 @@
 <script>
 import Mixin from "@/mixin/index";
 import Pagination from "@/components/Pagination";
+import {
+  addWallet,
+  getDictList,
+  getTypeList,
+  updateWallet,
+  getWalletList,
+  getWalletDetail,
+} from "@/api/supply/sales";
+
 export default {
   mixins: [Mixin],
   data() {
     return {
-      input: "",
-      select: "",
-      isSwitch: true,
-      screenForm: {},
-      dialogForm: { name: "" },
-
-      dataList: [
+      type: 0, // 0 1
+      screenForm: {
+        mainName: "",
+        saleTypeCode: "",
+        saleTypeName: "",
+        status: true,
+      },
+      dialogForm: {
+        name: "",
+        mainName: "",
+        mainId: "",
+        saleTypeCode: "",
+        saleTypeName: "",
+        rabateRate: "",
+        status: true,
+      },
+      dataList: [],
+      columns: [
+        {
+          prop: "saleTypeCode",
+          lable: "销售类型编码",
+          widht: 160,
+        },
         {
-          date: "2016-05-02",
-          name: "王小虎",
-          label: "姓名",
-          address: "上海市普陀区金沙江路 1518 弄",
+          prop: "saleTypeName",
+          lable: "销售类型名称",
+          widht: 160,
+        },
+        {
+          prop: "name",
+          lable: "返利使用钱包",
+          widht: 160,
+        },
+        {
+          prop: "rabateRate",
+          lable: "返利折扣比例",
+          widht: 160,
+        },
+        {
+          prop: "status",
+          lable: "状态",
+          widht: 160,
+        },
+        {
+          prop: "createBy",
+          lable: "创建人",
+          widht: 160,
+        },
+        {
+          prop: "createTime",
+          lable: "创建时间",
+          widht: 160,
+        },
+        {
+          prop: "updateBy",
+          lable: "更新人",
+          widht: 160,
+        },
+        {
+          prop: "updateTime",
+          lable: "更新时间",
+          widht: 160,
         },
       ],
-      columns: [
-        { prop: "name", lable: "销售类型编码", widht: 160 },
-        { prop: "date", lable: "销售类型名称", widht: 160 },
-        { prop: "date", lable: "返利使用钱包", widht: 160 },
-        { prop: "date", lable: "返利折扣比例", widht: 160 },
-        { prop: "status", lable: "状态", widht: 160 },
-        { prop: "date", lable: "创建人", widht: 160 },
-        { prop: "date", lable: "创建时间", widht: 160 },
-        { prop: "date", lable: "更新人", widht: 160 },
-        { prop: "date", lable: "更新时间", widht: 160 },
+      options: [
+        {
+          value: true,
+          label: "已启用",
+        },
+        {
+          value: false,
+          label: "已停用",
+        },
       ],
+      dictListData: [],
+      typeList: [],
     };
   },
   methods: {
-    getList() {},
-    pagination(val) {
-      console.log(val, 123);
-      // this.handleCurrentChange(val)
-      // this.handleSizeChange()
+    getList() {
+      this.listLoading = true;
+      const params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        mainName: this.screenForm.mainName,
+        saleTypeCode: this.screenForm.saleTypeCode,
+        saleTypeName: this.screenForm.saleTypeName,
+        status: this.screenForm.status,
+      };
+      getWalletList(params).then((res) => {
+        this.dataList = res.data.records;
+        this.listLoading = false;
+      });
+    },
+    hanleEdit(item) {
+      this.dialogForm = {
+        id: item.id,
+        name: item.name,
+        mainName: item.mainName,
+        saleTypeCode: item.saleTypeCode,
+        saleTypeName: item.saleTypeName,
+        rabateRate: item.rabateRate,
+        status: item.status,
+      };
+      this.getDictList();
+      this.dialogVisible = true;
+    },
+    getDictList() {
+      getDictList({
+        sysDictEnum: "PRODUCT_TYPE",
+      }).then((res) => {
+        console.log(res);
+        this.dictListData = res.data;
+      });
+      const params = {
+        pageNum: 1,
+        pageSize: 10,
+        saleCode: "",
+        saleName: "",
+        status: "",
+      };
+      getTypeList(params).then((res) => {
+        this.typeList = res.data.records;
+      });
+    },
+    hanleDateil(item) {
+      this.type = 3;
+      this.dialogVisible = true;
+      this.dialogForm = {
+        ...item,
+      };
+    },
+    hanelclose() {
+      this.type = "";
+      this.hanleReset();
     },
     handelInfo() {
+      if (this.type) {
+        this.hanleScreen(this.dialogForm.mainId);
+        const params = {
+          ...this.dialogForm,
+        };
+        addWallet(params).then((res) => {
+          console.log(res);
+          this.$successMsg("添加成功");
+          this.hanleReset();
+        });
+      } else {
+        const upParams = {
+          ...this.dialogForm,
+        };
+        updateType(upParams).then((res) => {
+          this.$successMsg("修改成功");
+          this.hanleReset();
+        });
+      }
+    },
+    hanleReset() {
+      this.dialogForm = {
+        name: "",
+        mainId: "",
+        mainName: "",
+        saleTypeCode: "",
+        saleTypeName: "",
+        rabateRate: "",
+        status: true,
+      };
+      // this.$refs.dialogForm.resetFields()
       this.dialogVisible = false;
+      this.getList();
     },
     hanleCancel() {
+      this.hanleReset();
       this.dialogVisible = false;
     },
+    hanleScreen(code) {
+      this.dictListData.find((k) => {
+        if (k.dictCode == code) {
+          this.dialogForm.mainId = k.dictCode;
+          this.dialogForm.mainName = k.dictValue;
+          return;
+        }
+      });
+    },
   },
   components: {
     Pagination,

+ 206 - 131
src/views/sales_rebate/salestype_list.vue

@@ -1,151 +1,94 @@
 <template>
   <div class="app-container">
     <div class="screen-container">
-      <el-form
-        :model="screenForm"
-        ref="screenForm"
-        :inline="false"
-        size="normal"
-      >
+      <el-form ref="screenForm" :model="screenForm" size="small" label-position="left">
         <el-row :gutter="20">
           <el-col :xs="24" :ms="6" :lg="6">
-            <el-form-item label="">
-              <el-input
-                v-model="input"
-                placeholder="销售类型编码"
-                size="small"
-              ></el-input>
+            <el-form-item prop='saleCode'>
+              <el-input v-model="screenForm.saleCode" placeholder="销售类型编码" size="small"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :ms="6" :lg="6">
-            <el-form-item label="">
-              <el-input
-                v-model="input"
-                placeholder="销售类型名称"
-                size="small"
-              ></el-input>
+            <el-form-item prop='saleName'>
+              <el-input v-model="screenForm.saleName" placeholder="销售类型名称" size="small"></el-input>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :ms="6" :lg="6">
-            <el-form-item label="">
-              <!-- <el-select v-model="select" placeholder="请选择" size="small">
-                <el-option
-                  v-for="item in options"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value"
-                >
+            <el-form-item prop='status'>
+              <el-select v-model="screenForm.status" placeholder="请选择" size="small">
+                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
                 </el-option>
-              </el-select> -->
+              </el-select>
             </el-form-item>
           </el-col>
           <el-col :xs="24" :ms="6" :lg="6" class="tr">
             <el-form-item>
-              <el-button type="primary" size="small" @click="submitScreenForm"
-                >查询</el-button
-              >
-              <el-button type="primary" size="small" @click="resetScreenForm"
-                >重置</el-button
-              >
+              <el-button type="primary" size="small" @click="submitScreenForm">查询</el-button>
+              <el-button type="primary" size="small" @click="resetScreenForm">重置</el-button>
             </el-form-item>
           </el-col>
         </el-row>
       </el-form>
     </div>
     <div class="btn-group">
-      <el-button type="primary" size="small" @click="dialogVisible = true"
-        >新增</el-button
-      >
-      <el-button type="primary" size="small" @click="dialogVisible = true"
+      <el-button type="primary" size="small" @click="dialogVisible = true,type=1">新增</el-button>
+      <!--  <el-button type="primary" size="small" @click="dialogVisible = true"
         >编辑</el-button
       >
       <el-button type="primary" size="small" @click="">删除</el-button>
       <el-button type="primary" size="small" @click="">导入</el-button>
-      <el-button type="primary" size="small" @click="">导出</el-button>
+      <el-button type="primary" size="small" @click="">导出</el-button> -->
     </div>
     <div class="mymain-container">
-      <el-table
-        v-loading="listLoading"
-        :data="dataList"
-        element-loading-text="Loading"
-        border
-        fit
-        highlight-current-row
-        stripe
-      >
+      <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row
+        stripe>
         <el-table-column type="selection" width="55" align="center">
         </el-table-column>
         <template v-for="col in columns">
-          <el-table-column
-            align="center"
-            :label="col.lable"
-            :prop="col.prop"
-            :min-width="col.widht"
-            show-overflow-tooltip
-            v-if="col.prop == 'status'"
-          >
+          <el-table-column align="center" :label="col.lable" :prop="col.prop" :min-width="col.widht"
+            show-overflow-tooltip v-if="col.prop == 'status'">
             <template slot-scope="scope">
-              <el-switch
-                v-model="isSwitch"
-                disabled
-                :active-text="isSwitch ? '已啓用' : '已禁用'"
-              >
+              <el-switch v-model="scope.row.status" disabled :active-text="scope.row.status ? '已启用' : '已禁用'">
               </el-switch>
             </template>
           </el-table-column>
-          <el-table-column
-            v-else
-            align="center"
-            :label="col.lable"
-            :prop="col.prop"
-            :min-width="col.widht"
-            show-overflow-tooltip
-          >
+          <el-table-column v-else align="center" :label="col.lable" :prop="col.prop" :min-width="col.widht"
+            show-overflow-tooltip>
           </el-table-column>
         </template>
 
-        <el-table-column
-          align="center"
-          fixed="right"
-          label="操作"
-          min-width="160"
-        >
+        <el-table-column align="center" fixed="right" label="操作" min-width="160">
           <template slot-scope="scope">
-            <el-button type="text" size="small">查看</el-button>
-            <el-button type="text" size="small">编辑</el-button>
-            <el-button type="text" size="small">编辑</el-button>
+            <el-button type="text" size="small" @click="hanleEdit(scope.row)">编辑</el-button>
+            <el-button type="text" size="small" @click="hanleDateil(scope.row)">详情</el-button>
+            <el-popconfirm title="这是一段内容确定删除吗?" style="margin-left: 10px;">
+              <el-button slot="reference" type="text" size="small" @click="hanleDatele(scope.row.id)">删除</el-button>
+            </el-popconfirm>
           </template>
         </el-table-column>
       </el-table>
-      <Pagination @pagination="pagination" />
+      <Pagination />
     </div>
     <div>
       <el-dialog :visible.sync="dialogVisible" width="50%">
-        <el-form
-          :model="dialogForm"
-          ref="dialogForm"
-          label-width="120px"
-          :inline="false"
-          size="normal"
-        >
+        <el-form ref="dialogForm" :model="dialogForm" label-width="120px" :inline="false" size="normal">
           <el-form-item label="销售类型编码">
-            <el-input v-model="dialogForm.name"></el-input>
+            <el-input v-model="dialogForm.saleCode"></el-input>
           </el-form-item>
           <el-form-item label="销售类型名称">
-            <el-input v-model="dialogForm.name"></el-input>
+            <el-input v-model="dialogForm.saleName"></el-input>
           </el-form-item>
           <el-form-item label="品类">
-            <el-input v-model="dialogForm.name"></el-input>
+            <el-input v-model="dialogForm.mainName"></el-input>
           </el-form-item>
           <el-form-item label="状态">
-            <el-switch :active-text="true ? '启用' : ''"> </el-switch>
+            <el-switch v-model="dialogForm.status" :active-value='true' :inactive-value='false'
+              :active-text="dialogForm.status? '启用' : ''"> </el-switch>
           </el-form-item>
         </el-form>
         <span slot="footer" class="dialog-footer">
           <el-button @click="dialogVisible = false">取 消</el-button>
-          <el-button type="primary" @click="dialogVisible = false"
-            >确 定</el-button
-          >
+          <el-button type="primary" @click="handelInfo">确 定</el-button>
         </span>
       </el-dialog>
     </div>
@@ -153,51 +96,183 @@
 </template>
 
 <script>
-import Mixin from "@/mixin/index";
-import Pagination from "@/components/Pagination";
+  import Mixin from "@/mixin/index";
+  import Pagination from "@/components/Pagination";
+  import {
+    getTypeList,
+    delTypeData,
+    addData,
+    updateType,
+    getDetail
+  } from "@/api/supply/sales"
 
-export default {
-  mixins: [Mixin],
-  data() {
-    return {
-      input: "",
-      select: "",
-      isSwitch: true,
-      screenForm: {},
-      dialogForm: { name: "" },
-      dataList: [
-        {
+  export default {
+    mixins: [Mixin],
+    data() {
+      return {
+        type: 0, // 0,1
+        screenForm: {
+          saleCode: '',
+          saleName: '',
+          status: 1
+        },
+        dialogForm: {
+          id: '',
+          saleCode: '',
+          saleName: '',
+          mainName: '',
+          status: true,
+        },
+        dataList: [{
           date: "2016-05-02",
           name: "王小虎",
           label: "姓名",
           address: "上海市普陀区金沙江路 1518 弄",
-        },
-      ],
-      columns: [
-        { prop: "name", lable: "销售类型编码", widht: 160 },
-        { prop: "date", lable: "销售类型名称", widht: 160 },
-        { prop: "date", lable: "出库类型", widht: 160 },
-        { prop: "date", lable: "品类", widht: 160 },
-        { prop: "status", lable: "状态", widht: 160 },
-        { prop: "date", lable: "创建人", widht: 160 },
-        { prop: "date", lable: "创建时间", widht: 160 },
-        { prop: "date", lable: "更新人", widht: 160 },
-        { prop: "date", lable: "更新时间", widht: 160 },
-      ],
-    };
-  },
-  methods: {
-    getList() {},
-    pagination(val) {
-      console.log(val, 123);
-      // this.handleCurrentChange(val)
-      // this.handleSizeChange()
+        }, ],
+        columns: [{
+            prop: "saleCode",
+            lable: "销售类型编码",
+            widht: 160
+          },
+          {
+            prop: "saleName",
+            lable: "销售类型名称",
+            widht: 160
+          },
+          {
+            prop: "outType",
+            lable: "出库类型",
+            widht: 160
+          },
+          {
+            prop: "mainName",
+            lable: "品类",
+            widht: 160
+          },
+          {
+            prop: "status",
+            lable: "状态",
+            widht: 160
+          },
+          {
+            prop: "createBy",
+            lable: "创建人",
+            widht: 160
+          },
+          {
+            prop: "createTime",
+            lable: "创建时间",
+            widht: 160
+          },
+          {
+            prop: "updateBy",
+            lable: "更新人",
+            widht: 160
+          },
+          {
+            prop: "updateTime",
+            lable: "更新时间",
+            widht: 160
+          },
+        ],
+        options: [{
+            value: 1,
+            label: '已启用'
+          },
+          {
+            value: 0,
+            label: '已停用'
+          }
+        ]
+      };
+    },
+    methods: {
+      getList() {
+        this.listLoading = true
+        const params = {
+          pageNum: this.currentPage,
+          pageSize: this.pageSize,
+          saleCode: this.screenForm.saleCode,
+          saleName: this.screenForm.saleName,
+          status: this.screenForm.status
+        }
+        getTypeList(params).then(res => {
+          this.dataList = res.data.records
+          this.listLoading = false
+        })
+      },
+      hanleDatele(id) {
+        this.hanleDeleteAllPromise(id).then(ids => {
+          delTypeData({
+            id: ids[0]
+          }).then(res => {
+            this.$successMsg("删除成功")
+            this.getList()
+          })
+        })
+      },
+      hanleEdit(item) {
+        this.dialogForm = {
+          id: item.id,
+          saleCode: item.saleCode,
+          saleName: item.saleName,
+          mainName: item.mainName,
+          status: item.status,
+        }
+        this.type =0
+        this.dialogVisible = true
+
+      },
+      hanleDateil(item) {
+        this.dialogVisible = true
+        this.dialogForm = {
+          ...item
+        }
+        this.type =3
+      },
+      handelInfo() {
+        if (this.type==1) {
+          const params = {
+            ...this.dialogForm
+          }
+          addData(params).then(res => {
+            console.log(res);
+            this.$successMsg("添加成功")
+
+            this.hanleReset()
+          })
+        } else if(this.type == 0) {
+          const upParams = {
+            ...this.dialogForm
+          }
+          updateType(upParams).then(res => {
+            this.$successMsg("修改成功")
+
+            this.hanleReset()
+          })
+        }else{
+          this.dialogVisible= false
+        }
+      },
+      hanleReset() {
+        this.dialogForm = {
+          id: '',
+          saleCode: '',
+          saleName: '',
+          mainName: '',
+          status: true,
+        }
+        // this.$refs.dialogForm.resetFields()
+        this.dialogVisible = false
+        this.getList()
+
+      }
+
+    },
+    components: {
+      Pagination,
     },
-  },
-  components: {
-    Pagination,
-  },
-};
+  };
 </script>
 
 <style scoped></style>

+ 30 - 3
src/views/setting/account.vue

@@ -146,6 +146,11 @@
             :props="props">
           </el-tree>
         </el-form-item>
+        <el-form-item label="经销商" prop="dealer" v-show="accountType === 0">
+          <el-select v-model="AccountForm.dealer" placeholder="请选择经销商" style="width: 100%;">
+            <el-option :label="item.name" :value="item.id" v-for="(item, index) in dealerList" :key="index"></el-option>
+          </el-select>
+        </el-form-item>
         <el-form-item label="商户" prop="merchant" v-show="accountType === 1 || accountType === 2">
           <el-select v-model="AccountForm.merchant" placeholder="请选择商户" style="width: 100%;">
             <el-option :label="item.adminCompanyName" :value="item.adminCompanyId" v-for="(item, index) in merchantList" :key="index"></el-option>
@@ -197,7 +202,7 @@
 </template>
 
 <script>
-import { getDepartmentList, getAccountList, addAccount, editAccount, deleteAccount, getAccountDetail, getRoleList, getMerchantList, changeAccountStatus, resetPassword } from '@/api/setting'
+import { getDepartmentList, getAccountList, addAccount, editAccount, deleteAccount, getAccountDetail, getRoleList, getMerchantList, getDealerList, changeAccountStatus, resetPassword } from '@/api/setting'
 import { findElem, downloadFiles, handleImport } from '@/utils/util'
 
 export default {
@@ -264,6 +269,7 @@ export default {
         account: '', // 账号
         nickName: '', // 用户名
         merchant: '', // 商户
+        dealer: '', //经销商
         role: '', // 角色组
         newPassword: '', // 新密码
         confirmPassword: '', // 确认密码
@@ -323,6 +329,7 @@ export default {
       accountType: '',
       roleList: [], // 角色列表
       merchantList: [],
+      dealerList: [],
 
       passwordType1: 'password',
       passwordType2: 'password',
@@ -356,7 +363,7 @@ export default {
     // 获取角色列表
     async getRoleList() {
       const result = await new Promise((resolve, reject) => {
-        getRoleList({pageNum: 1, pageSize: 1000}).then(res => {
+        getRoleList({pageNum: 1, pageSize: -1}).then(res => {
           this.roleList = res.data.records;
           resolve(res.data);
         }).catch(res => {
@@ -371,7 +378,7 @@ export default {
       const result = await new Promise((resolve, reject) => {
         getMerchantList({
           pageNum: 1,
-          pageSize: 1000
+          pageSize: -1
         }).then(res => {
           this.merchantList = res.data.records;
           resolve(res.data.records);
@@ -382,6 +389,23 @@ export default {
       return result;
     },
 
+    // 获取经销商列表
+    async getDealerList() {
+      const result = await new Promise((resolve, reject) => {
+        getDealerList({
+          pageNum: 1,
+          pageSize: -1,
+          bindUser: false
+        }).then(res => {
+          this.dealerList = res.data.records;
+          resolve(res.data.records);
+        }).catch(res => {
+          resolve([]);
+        })
+      })
+      return result;
+    },
+
     // 获取部门列表
     getTree() {
       getDepartmentList().then(res => {
@@ -465,6 +489,7 @@ export default {
       this.AccountFormType = type;
       this.AccountFormVisible = true;
       await this.getMerchantList();
+      await this.getDealerList();
       await this.getRoleList();
       if(type == 'add') {
         if(this.selectDepartment) {
@@ -479,6 +504,7 @@ export default {
           this.AccountForm.role = res.data.roleId;
           this.AccountForm.nickName = res.data.nickName;
           this.AccountForm.merchant = res.data.companyWechatId;
+          this.AccountForm.dealer = res.data.customerId;
           this.$refs.tree.setCheckedKeys(res.data.adminWebsitIds || []);
         })
       }
@@ -504,6 +530,7 @@ export default {
           }
           if(this.accountType === 0) {
             params.adminWebsitIds = this.$refs.tree.getCheckedKeys();
+            params.customerId = this.AccountForm.dealer;
           }else {
             params.adminCompanyId = this.AccountForm.merchant;
           }

+ 166 - 0
src/views/setting/api.vue

@@ -0,0 +1,166 @@
+<template>
+  <div class="app-container">
+    <!-- 筛选条件 -->
+    <div class="screen-container">
+      <el-form ref="screenForm" :model="screenForm" label-width="70px" size="small" label-position="left">
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="接口名称" prop="account">
+              <el-input v-model="screenForm.account" placeholder="请输入接口名称"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="12" :lg="6">
+            <el-form-item label="接口状态" prop="name">
+              <el-input v-model="screenForm.name" placeholder="请输入接口状态"></el-input>
+            </el-form-item>
+          </el-col>
+          
+          <el-col :xs="24" :sm="24" :lg="12" class="tr">
+            <el-form-item label="">
+              <el-button size="small" @click="resetScreenForm">清空</el-button>
+              <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+    </div>
+
+    <div class="mymain-container">
+      <div class="btn-group clearfix">
+        <div class="fl" />
+        <div class="fr">
+          <el-button size="small" type="primary" @click="handleExport">导出</el-button>
+        </div>
+      </div>
+
+      <div class="table">
+        <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+          <el-table-column align="center" label="接口名称" prop="moduleName"></el-table-column>
+          <el-table-column align="center" label="接口描述" prop="moduleName"></el-table-column>
+          <el-table-column align="center" label="接口状态" prop="createTime"></el-table-column>
+          <el-table-column align="center" label="更新时间" prop="ip"></el-table-column>
+        </el-table>
+      </div>
+      
+      <div class="pagination clearfix">
+        <div class="fr">
+          <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal">
+          </el-pagination>
+        </div>
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import { getOplogList } from '@/api/setting'
+import { downloadFiles } from '@/utils/util'
+
+export default {
+  data() {
+    return {
+      dataList: null, // 列表数据
+      listLoading: true, // 列表加载loading
+      screenForm: { // 筛选表单数据
+        account: '',
+        name: '',
+        date: '',
+        region: '',
+      },
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+
+    }
+  },
+
+  created() {
+    this.getList();
+  },
+
+  methods: {
+    // 查询按钮权限
+    checkBtnRole(value) {
+      // let btnRole = this.$route.meta.roles;
+      // if(!btnRole) {return true}
+      // let index = btnRole.indexOf(value);
+      // return index >= 0 ? true : false;
+      return true;
+    },
+
+    getList() {
+      this.listLoading = true;
+
+      let params = {
+        account: this.screenForm.account,
+        name: this.screenForm.name,
+        region: this.screenForm.region,
+        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
+        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
+        pageNo: this.currentPage,
+        pageSize: this.pageSize
+      };
+
+      getOplogList(params).then(res => {
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      })
+    },
+
+    // 筛选后重新获取列表
+    getListByScreen() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 导出
+    handleExport() {
+      let screenData = {
+        orderId: this.screenForm.orderId,
+        status: this.screenForm.status,
+      };
+      downloadFiles('tax/export', screenData);
+    },
+
+  }
+}
+</script>
+
+<style>
+
+</style>

+ 86 - 0
src/views/setting/other.vue

@@ -0,0 +1,86 @@
+<template>
+  <div class="app-container">
+    <el-radio-group v-model="formType" size="small">
+      <el-radio-button label="first">订单日期设置</el-radio-button>
+      <el-radio-button label="second">工程登录二次引用设置</el-radio-button>
+      <el-radio-button label="third">提货单二次打印设置</el-radio-button>
+    </el-radio-group>
+
+    <div v-show="formType === 'first'">
+      <div style="margin: 40px 0 30px;">
+        <span>下单时间超过当天</span>
+        <el-time-picker v-model="firstForm.time" placeholder="选择时间点" size="small" style="width: 150px; margin: 0 10px;"></el-time-picker>
+        <span>的订单,订单日期计为下一天的日期</span>
+      </div>
+      <el-button type="primary" size="small">确 定</el-button>
+    </div>
+
+    <div v-show="formType === 'second'">
+      <div style="margin: 40px 0 30px;">
+        <div>工程登录二次引用密码设置</div>
+        <div><el-input v-model="secondForm.password" placeholder="请输入密码" size="small" style="width: 150px; margin-top: 20px;"></el-input></div>
+      </div>
+      <el-button type="primary" size="small">确 定</el-button>
+    </div>
+
+    <div v-show="formType === 'third'">
+      <div style="margin: 40px 0 30px;">
+        <div>提货单二次打印密码设置</div>
+        <div><el-input v-model="thirdForm.password" placeholder="请输入密码" size="small" style="width: 150px; margin-top: 20px;"></el-input></div>
+      </div>
+      <el-button type="primary" size="small">确 定</el-button>
+    </div>
+  </div>
+</template>
+
+<script>
+
+export default {
+  data() {
+    return {
+      formType: 'first',
+      firstForm: {
+        time: '',
+      },
+      secondForm: {
+        password: '',
+      },
+      thirdForm: {
+        password: '',
+      },
+    }
+  },
+  created() {
+    
+  },
+  methods: {
+    // 查询按钮权限
+    checkBtnRole(value) {
+      // let btnRole = this.$route.meta.roles;
+      // if(!btnRole) {return true}
+      // let index = btnRole.indexOf(value);
+      // return index >= 0 ? true : false;
+      return true;
+    },
+
+  }
+}
+</script>
+
+<style scoped lang="scss">
+
+</style>
+<style>
+  .demo-table-expand {
+    font-size: 0;
+  }
+  .demo-table-expand label {
+    width: 80px;
+    color: #99a9bf;
+  }
+  .demo-table-expand .el-form-item {
+    margin-right: 0;
+    margin-bottom: 0;
+    width: 100%;
+  }
+</style>

+ 43 - 55
src/views/stock/reserved_stock.vue

@@ -2,24 +2,13 @@
   <div class="app-container">
     <!-- 筛选条件 -->
     <div class="screen-container">
-      <div class="top clearfix">
-        <div class="title fl">条件筛选</div>
-      </div>
       <el-form ref="screenForm" :model="screenForm" label-width="70px" size="small" label-position="left">
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="品类" prop="category">
-              <el-select v-model="screenForm.category" placeholder="全部">
-                <el-option label="全部" value=""></el-option>
-                <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="销售类型" prop="saleType">
-              <el-select v-model="screenForm.saleType" placeholder="全部">
+            <el-form-item label="品类" prop="type">
+              <el-select v-model="screenForm.type" placeholder="全部">
                 <el-option label="全部" value=""></el-option>
-                <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
+                <el-option v-for="item in typeList" :key="item.dictCode" :label="item.dictValue" :value="item.dictCode"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
@@ -39,7 +28,7 @@
             </el-form-item>
           </el-col>
           
-          <el-col :xs="24" :sm="12" :lg="18" class="tr">
+          <el-col :xs="24" :sm="24" :lg="24" class="tr">
             <el-form-item label="">
               <el-button size="small" @click="resetScreenForm">清空</el-button>
               <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
@@ -52,23 +41,20 @@
     <div class="mymain-container">
       <div class="btn-group clearfix">
         <div class="fr">
-          <el-button size="small" type="primary" icon="el-icon-download" @click="handleExport">导出数据</el-button>
+          <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
         </div>
       </div>
       <div class="table">
         <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
-          <el-table-column align="center" label="经销商编码" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="经销商名称" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="产品品类" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="销售类型" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="产品编码" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="产品名称" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="规格型号" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="销售类型" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="计量单位" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="单价" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="经销商预留库存" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="经销商暂扣库存" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="经销商编码" prop="customerNumber" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="经销商名称" prop="customerName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品品类" prop="categoryName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品编码" prop="materialNumber" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="计量单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="经销商预留库存" prop="reservedNum" min-width="140" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="经销商暂扣库存" prop="temporaryNum" min-width="140" show-overflow-tooltip></el-table-column>
         </el-table>
       </div>
     </div>
@@ -90,9 +76,8 @@
 </template>
 
 <script>
-import { COMMON_SELECT } from '@/utils/select_data'
-import { getStockList } from "@/api/stock";
-import { downloadFiles } from '@/utils/util'
+import { getReservedList } from "@/api/stock";
+import { getDictList } from '@/api/common'
 
 export default {
   data() {
@@ -103,20 +88,29 @@ export default {
       dataList: null, // 列表数据
       listLoading: false, // 列表加载loading
       screenForm: { // 筛选表单数据
-        warehouse: '',
+        type: '',
         name: '',
         code: '',
         model: '',
-        category: '',
-        saleType: '',
       },
-      select_status: [ // 筛选字段 - 状态
-        { label: '正常', value: true },
-        { label: '冻结', value: false }
-      ],
+      typeList: [],
     }
   },
+
+  computed: {
+    exParams() {
+      return {
+        name: this.screenForm.warehouse,
+        materialName: this.screenForm.name,
+        materialNumber: this.screenForm.code,
+        specification: this.screenForm.model,
+        categoryName: this.screenForm.type,
+      }
+    },
+  },
+
   created() {
+    this.getDictList();
     this.getList();
   },
 
@@ -130,6 +124,12 @@ export default {
       return true
     },
 
+    getDictList() {
+      getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
+        this.typeList = res.data;
+      })
+    },
+
     // 查询列表
     getList() {
       this.listLoading = true;
@@ -137,13 +137,12 @@ export default {
       let params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
-        userName: this.screenForm.account,
-        nickName: this.screenForm.nickName,
-        linkPhone: this.screenForm.phone,
-        email: this.screenForm.email,
-        status: this.screenForm.status,
+        materialName: this.screenForm.name,
+        materialNumber: this.screenForm.code,
+        specification: this.screenForm.model,
+        categoryName: this.screenForm.type,
       };
-      getStockList(params).then((res) => {
+      getReservedList(params).then((res) => {
         this.dataList = res.data.records;
         this.listTotal = res.data.total;
         this.listLoading = false;
@@ -176,17 +175,6 @@ export default {
       this.getList();
     },
 
-    // 导出
-    handleExport() {
-      let screenData = {
-        userName: this.screenForm.account,
-        nickName: this.screenForm.nickName,
-        linkPhone: this.screenForm.phone,
-        email: this.screenForm.email,
-        status: this.screenForm.status,
-      };
-      downloadFiles('admin/user/mch/export', screenData);
-    },
   }
 }
 </script>

+ 56 - 56
src/views/stock/stock_list.vue

@@ -2,16 +2,13 @@
   <div class="app-container">
     <!-- 筛选条件 -->
     <div class="screen-container">
-      <div class="top clearfix">
-        <div class="title fl">条件筛选</div>
-      </div>
       <el-form ref="screenForm" :model="screenForm" label-width="70px" size="small" label-position="left">
         <el-row :gutter="20">
           <el-col :xs="24" :sm="12" :lg="6">
             <el-form-item label="仓库" prop="warehouse">
-              <el-select v-model="screenForm.warehouse" placeholder="全部">
+              <el-select v-model="screenForm.warehouse" placeholder="请选择仓库">
                 <el-option label="全部" value=""></el-option>
-                <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
+                <el-option :label="item.name" :value="item.name" v-for="(item, index) in warehouseList" :key="index"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
@@ -31,23 +28,15 @@
             </el-form-item>
           </el-col>
           <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="品类" prop="category">
-              <el-select v-model="screenForm.category" placeholder="全部">
+            <el-form-item label="品类" prop="type">
+              <el-select v-model="screenForm.type" placeholder="全部">
                 <el-option label="全部" value=""></el-option>
-                <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="12" :lg="6">
-            <el-form-item label="销售类型" prop="saleType">
-              <el-select v-model="screenForm.saleType" placeholder="全部">
-                <el-option label="全部" value=""></el-option>
-                <el-option :label="item.label" :value="item.value" v-for="(item, index) in select_status" :key="index"></el-option>
+                <el-option v-for="item in typeList" :key="item.dictCode" :label="item.dictValue" :value="item.dictCode"></el-option>
               </el-select>
             </el-form-item>
           </el-col>
           
-          <el-col :xs="24" :sm="24" :lg="12" class="tr">
+          <el-col :xs="24" :sm="12" :lg="18" class="tr">
             <el-form-item label="">
               <el-button size="small" @click="resetScreenForm">清空</el-button>
               <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
@@ -60,24 +49,19 @@
     <div class="mymain-container">
       <div class="btn-group clearfix">
         <div class="fr">
-          <el-button size="small" type="primary" icon="el-icon-download" @click="handleExport">导出数据</el-button>
+          <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
         </div>
       </div>
       <div class="table">
         <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
-          <el-table-column align="center" label="产品品类" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="销售类型" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="产品编码" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="产品名称" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="规格型号" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="计量单位" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="总库存数量" prop="aaa" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="单价" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="经销商预留库存" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="经销商暂扣库存" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="中转仓" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="退货仓" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="破损仓" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品品类" prop="categoryName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品编码" prop="materialNumber" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="总库存数量" prop="stockQty" min-width="120" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="经销商预留库存" prop="reservedNum" min-width="140" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="经销商暂扣库存" prop="temporaryNum" min-width="140" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="仓库" prop="name" min-width="160" show-overflow-tooltip></el-table-column>
         </el-table>
       </div>
     </div>
@@ -99,9 +83,8 @@
 </template>
 
 <script>
-import { COMMON_SELECT } from '@/utils/select_data'
-import { getStockList } from "@/api/stock";
-import { downloadFiles } from '@/utils/util'
+import { getStockList, getWarehouseList } from "@/api/stock";
+import { getDictList } from '@/api/common'
 
 export default {
   data() {
@@ -116,16 +99,28 @@ export default {
         name: '',
         code: '',
         model: '',
-        category: '',
-        saleType: '',
+        type: '',
       },
-      select_status: [ // 筛选字段 - 状态
-        { label: '正常', value: true },
-        { label: '冻结', value: false }
-      ],
+      warehouseList: [],
+      typeList: [],
     }
   },
+
+  computed: {
+    exParams() {
+      return {
+        name: this.screenForm.warehouse,
+        materialName: this.screenForm.name,
+        materialNumber: this.screenForm.code,
+        specification: this.screenForm.model,
+        categoryName: this.screenForm.type,
+      }
+    },
+  },
+
   created() {
+    this.getWarehouseList();
+    this.getDictList();
     this.getList();
   },
 
@@ -139,6 +134,22 @@ export default {
       return true
     },
 
+    // 获取仓库列表
+    getWarehouseList() {
+      getWarehouseList({
+        pageNum: 1,
+        pageSize: -1
+      }).then((res) => {
+        this.warehouseList = res.data.records;
+      })
+    },
+
+    getDictList() {
+      getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
+        this.typeList = res.data;
+      })
+    },
+
     // 查询列表
     getList() {
       this.listLoading = true;
@@ -146,11 +157,11 @@ export default {
       let params = {
         pageNum: this.currentPage,
         pageSize: this.pageSize,
-        userName: this.screenForm.account,
-        nickName: this.screenForm.nickName,
-        linkPhone: this.screenForm.phone,
-        email: this.screenForm.email,
-        status: this.screenForm.status,
+        name: this.screenForm.warehouse,
+        materialName: this.screenForm.name,
+        materialNumber: this.screenForm.code,
+        specification: this.screenForm.model,
+        categoryName: this.screenForm.type,
       };
       getStockList(params).then((res) => {
         this.dataList = res.data.records;
@@ -185,17 +196,6 @@ export default {
       this.getList();
     },
 
-    // 导出
-    handleExport() {
-      let screenData = {
-        userName: this.screenForm.account,
-        nickName: this.screenForm.nickName,
-        linkPhone: this.screenForm.phone,
-        email: this.screenForm.email,
-        status: this.screenForm.status,
-      };
-      downloadFiles('admin/user/mch/export', screenData);
-    },
   }
 }
 </script>

+ 5 - 0
src/views/supply/apply.vue

@@ -0,0 +1,5 @@
+<template>
+  <div>
+    <router-view />
+  </div>
+</template>

+ 320 - 0
src/views/supply/apply/apply_list.vue

@@ -0,0 +1,320 @@
+<template>
+  <div class="app-container">
+    <div v-show="!isShowDetail && !isShowExamine && !isShowForm">
+      <!-- 筛选条件 -->
+      <div class="screen-container">
+        <el-form ref="screenForm" :model="screenForm" label-width="100px" size="small" label-position="left">
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="24" :lg="24">
+              <el-form-item prop="status" label-width="0">
+                <el-radio-group v-model="screenForm.status" size="medium" @change="getList()">
+                  <el-radio-button label="">全部</el-radio-button>
+                  <el-radio-button v-for="(item, index) in statusList" :key="index" :label="item.value">{{item.label}}</el-radio-button>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="发货申请单" prop="orderNum">
+                <el-input v-model="screenForm.orderNum" placeholder="请输入发货申请单"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="仓库" prop="warehouse">
+                <el-input v-model="screenForm.warehouse" placeholder="请输入仓库"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="经销商编码" prop="jxsNum">
+                <el-input v-model="screenForm.jxsNum" placeholder="请输入经销商编码"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="经销商名称" prop="jxsName">
+                <el-input v-model="screenForm.jxsName" placeholder="请输入经销商名称"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="发货申请日期" prop="date">
+                <el-date-picker
+                  v-model="screenForm.date"
+                  type="datetimerange"
+                  range-separator="至"
+                  style="width: 100%;"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期">
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="产品名称" prop="chName">
+                <el-input v-model="screenForm.chName" placeholder="请输入产品名称"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="规格型号" prop="model">
+                <el-input v-model="screenForm.model" placeholder="请输入规格型号"></el-input>
+              </el-form-item>
+            </el-col>
+            
+            <el-col :xs="24" :sm="12" :lg="6" class="tr">
+              <el-form-item label="">
+                <el-button size="small" @click="resetScreenForm">清空</el-button>
+                <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+
+      <div class="mymain-container">
+        <div class="btn-group clearfix">
+          <div class="fl">
+            <el-button size="small" type="primary" icon="el-icon-plus" @click="toForm()">发货申请</el-button>
+          </div>
+          <div class="fr">
+            <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
+          </div>
+        </div>
+        <div class="table">
+          <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+            <el-table-column align="center" label="发货申请单" prop="id" min-width="180" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="发货申请日期" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="仓库" prop="correspondName" min-width="120" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="经销商编码" prop="customerNumber" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="经销商名称" prop="customerName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="计量单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="备注信息" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="制单人" prop="createBy" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="制单日期" prop="createTime" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="审核人" prop="approvalName" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="审核日期" prop="approvalTime" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="审核状态" prop="status" min-width="100" show-overflow-tooltip>
+              <template slot-scope="scope">
+                {{scope.row.status | statusFilter}}
+              </template>
+            </el-table-column>
+            <el-table-column align="center" label="操作" width="180" fixed="right">
+              <template slot-scope="scope">
+                <el-popconfirm style="margin-right: 10px;" title="确定申请吗?" @onConfirm="handleSubmit(scope.row.id, 2)" v-if="scope.row.status === 1" >
+                  <el-button slot="reference" type="text">申请</el-button>
+                </el-popconfirm>
+                <el-popconfirm style="margin-right: 10px;" title="确定撤回吗?" @onConfirm="handleSubmit(scope.row.id, 1)" v-if="scope.row.status === 2" >
+                  <el-button slot="reference" type="text">撤回</el-button>
+                </el-popconfirm>
+                <el-button type="text" @click="toForm(scope.row)" v-if="scope.row.status === 1">编辑</el-button>
+                <el-button type="text" @click="toExamine(scope.row)" v-if="scope.row.status === 2">审单</el-button>
+                <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
+                <el-popconfirm style="margin-left: 10px;" title="确定删除吗?" @onConfirm="handleDelete(scope.row.id)" >
+                  <el-button slot="reference" type="text">删除</el-button>
+                </el-popconfirm>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+      <div class="pagination clearfix">
+        <div class="fr">
+          <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal">
+          </el-pagination>
+        </div>
+      </div>
+    </div>
+    
+    <ApplyDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
+    <ApplyExamine :listItem="queryItem" v-if="isShowExamine" @backListFormDetail="backList" />
+    <ApplyForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
+
+  </div>
+</template>
+
+<script>
+import { getApplyList, submitApply, deleteApply } from "@/api/supply/apply";
+import ApplyDetail from "@/views/supply/apply/components/apply_detail";
+import ApplyExamine from "@/views/supply/apply/components/apply_examine";
+import ApplyForm from "@/views/supply/apply/components/apply_form";
+
+let that
+export default {
+  components: {
+    ApplyDetail,
+    ApplyExamine,
+    ApplyForm
+  },
+  filters: {
+    statusFilter(val) {
+      let obj = that.statusList.find(o => o.value == val);
+      return obj ? obj.label : ''
+    }
+  },
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: null, // 列表数据
+      listLoading: false, // 列表加载loading
+      screenForm: { // 筛选表单数据
+        orderNum: '',
+        warehouse: '',
+        jxsNum: '',
+        jxsName: '',
+        date: '',
+        chName: '',
+        model: '',
+        status: '',
+      },
+      statusList: [
+        { label: '已保存', value: 1 },
+        { label: '待审核', value: 2 },
+        { label: '审核通过', value: 3 },
+        { label: '审核驳回', value: 4 },
+      ],
+
+      queryItem: {},
+      isShowDetail: false,
+      isShowExamine: false,
+      isShowForm: false,
+    }
+  },
+
+  computed: {
+    exParams() {
+      return {
+        id: this.screenForm.orderNum,
+        correspondId: this.screenForm.warehouse,
+        customerNumber: this.screenForm.jxsNum,
+        customerName: this.screenForm.jxsName,
+        productName: this.screenForm.chName,
+        specification: this.screenForm.model,
+        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
+        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
+        status: this.screenForm.status,
+      }
+    },
+  },
+
+  beforeCreate() {
+    that = this;
+  },
+
+  created() {
+    this.getList();
+  },
+
+  methods: {
+    // 查询按钮权限
+    checkBtnRole(value) {
+      // let btnRole = this.$route.meta.roles;
+      // if(!btnRole) {return true}
+      // let index = btnRole.indexOf(value);
+      // return index >= 0;
+      return true
+    },
+
+    // 查询列表
+    getList() {
+      this.listLoading = true;
+
+      let params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        id: this.screenForm.orderNum,
+        correspondId: this.screenForm.warehouse,
+        customerNumber: this.screenForm.jxsNum,
+        customerName: this.screenForm.jxsName,
+        productName: this.screenForm.chName,
+        specification: this.screenForm.model,
+        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
+        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
+        status: this.screenForm.status,
+      };
+      getApplyList(params).then((res) => {
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      })
+    },
+
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+
+    // 进入表单
+    toForm(item) {
+      this.queryItem = item;
+      this.isShowForm = true;
+    },
+
+    // 进入审批
+    toExamine(item) {
+      this.queryItem = item;
+      this.isShowExamine = true;
+    },
+
+    // 进入详情
+    toDetail(item) {
+      this.queryItem = item;
+      this.isShowDetail = true;
+    },
+
+    backList() {
+      this.queryItem = {};
+      this.isShowDetail = false;
+      this.isShowExamine = false;
+      this.isShowForm = false;
+    },
+
+    handleDelete(id) {
+      deleteApply({id}).then(res => {
+        this.$successMsg();
+        this.getList();
+      })
+    },
+
+    // 申请/撤回
+    handleSubmit(id, status) {
+      submitApply({id, status}).then(res => {
+        this.$successMsg();
+        this.getList();
+      })
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 296 - 0
src/views/supply/apply/components/apply_detail.vue

@@ -0,0 +1,296 @@
+<template>
+  <div class="detail-container">
+    <el-page-header @back="goBack" content="详情"></el-page-header>
+
+    <div id="printData">
+      <div class="main-title">
+        <div class="title">发货申请单信息</div>
+      </div>
+
+      <div class="diy-table-1">
+        <el-row>
+          <el-col :span="8" class="item">
+            <div class="label">发货申请单号</div>
+            <div class="value">{{detailData.id}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">申请日期</div>
+            <div class="value">{{detailData.createTime}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">单据状态</div>
+            <div class="value">{{detailData.status | statusFilter}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">经销商编号</div>
+            <div class="value">{{detailData.customerNumber}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">经销商名称</div>
+            <div class="value">{{detailData.customerName}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">仓库</div>
+            <div class="value">{{detailData.correspondName}}</div>
+          </el-col>
+          <el-col :span="24" class="item">
+            <div class="label">备注</div>
+            <div class="value">{{detailData.remark}}</div>
+          </el-col>
+          <el-col :span="6" class="item">
+            <div class="label">制单人</div>
+            <div class="value">{{detailData.createBy}}</div>
+          </el-col>
+          <el-col :span="6" class="item">
+            <div class="label">制单日期</div>
+            <div class="value">{{detailData.createTime}}</div>
+          </el-col>
+          <el-col :span="6" class="item">
+            <div class="label">审核人</div>
+            <div class="value">{{detailData.approvalName}}</div>
+          </el-col>
+          <el-col :span="6" class="item">
+            <div class="label">审核日期</div>
+            <div class="value">{{detailData.approvalTime}}</div>
+          </el-col>
+          <el-col :span="24" class="item">
+            <div class="label">审批说明</div>
+            <div class="value">{{detailData.approvalRemark}}</div>
+          </el-col>
+        </el-row>
+      </div>
+
+      <div class="main-title">
+        <div class="title">货品信息</div>
+      </div>
+
+      <div class="table" style="margin-top: 20px">
+        <el-table :data="detailData.orders" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
+          <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+          <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="发货仓库" prop="stockIds" min-width="160" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <el-tag size="mini" style="margin: 0 5px;" v-for="(item, index) in scope.row.stockIds" :key="index">{{item.name}}</el-tag>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="库存数" prop="stockNumber" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="销售订单号" prop="retailOrderId" min-width="180" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品编码" prop="materialCode" min-width="120" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="计量单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="申请数量" prop="invoiceNum" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="审批数量" prop="approvalNumber" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
+        </el-table>
+      </div>
+
+      <div v-if="isExamine">
+        <div class="main-title">
+          <div class="title">审批记录</div>
+        </div>
+        <div class="diy-table-1">
+          <el-row :gutter="0">
+            <el-col :span="12" class="item">
+              <div class="label">审批人</div>
+              <div class="value">{{detailData.approvalName}}</div>
+            </el-col>
+            <el-col :span="12" class="item">
+              <div class="label">审批结果</div>
+              <div class="value">{{detailData.status | statusFilter}}</div>
+            </el-col>
+            <el-col :span="24" class="item">
+              <div class="label">审批说明</div>
+              <div class="value">{{detailData.approvalRemark}}</div>
+            </el-col>
+          </el-row>
+        </div>
+      </div>
+      
+    </div>
+    
+    <div class="page-footer">
+      <div class="footer" :class="classObj">
+        <el-button  type="primary" @click="openDeliverDialog">直调发货</el-button>
+        <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
+          <el-button slot="reference">关 闭</el-button>
+        </el-popconfirm>
+      </div>
+    </div>
+
+    <el-dialog
+      title="直调发货"
+      :visible.sync="isShowDeliverDialog"
+      width="80%">
+      <el-form ref="deliverForm" :model="deliverForm" label-width="70px" size="small" label-position="left">
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="8" :lg="8">
+            <el-form-item label="工程订单" prop="orderNum">
+              <el-input v-model="deliverForm.orderNum" placeholder="请输入工程订单"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="8" :lg="8" style="height: 51px;">
+            <el-form-item label="发货日期" prop="date">
+              <el-date-picker
+                v-model="deliverForm.date"
+                type="date"
+                value-format="yyyy-MM-dd"
+                style="width: 100%;"
+                placeholder="选择日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="8" :lg="8">
+            <el-form-item label="发货仓库" prop="warehouse">
+              <el-select v-model="deliverForm.warehouse" placeholder="请选择发货仓库">
+                <el-option
+                  v-for="item in warehouseList"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+
+      <div class="table" style="margin-top: 20px">
+        <el-table :data="detailData.orders" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
+          <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+          <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="发货仓库" prop="stockIds" min-width="160" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <span v-for="(item, index) in scope.row.stockIds" :key="index">{{item.name}}</span>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="库存数" prop="stockNumber" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="销售订单号" prop="retailOrderId" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品编码" prop="materialCode" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="计量单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="申请数量" prop="invoiceNum" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="审批数量" prop="approvalNumber" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
+        </el-table>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="closeDeliverDialog">取 消</el-button>
+        <el-button type="primary" @click="submitDeliverForm">确 定</el-button>
+      </span>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import print from 'vue-print-nb'
+import { getApplyDetail } from "@/api/supply/apply";
+
+export default {
+  name: 'ApplyDetail',
+  componentName: 'ApplyDetail',
+  props: ['listItem'],
+  directives: {
+    print
+  },
+  filters: {
+    statusFilter(val) {
+      const statusList = [
+        { label: '已保存', value: 1 },
+        { label: '待审核', value: 2 },
+        { label: '审核通过', value: 3 },
+        { label: '审核驳回', value: 4 },
+      ];
+      let obj = statusList.find(o => o.value == val);
+      return obj ? obj.label : ''
+    }
+  },
+  data() {
+    return {
+      printObj: {
+        id: 'printData'
+      },
+      detailData: {},
+
+      isShowDeliverDialog: false,
+      deliverForm: {
+        orderNum: '',
+        date: '',
+      },
+      warehouseList: [],
+    }
+  },
+
+  computed: {
+    sidebar() {
+      return this.$store.state.app.sidebar
+    },
+    classObj() {
+      return {
+        hideSidebar: !this.sidebar.opened,
+        openSidebar: this.sidebar.opened
+      }
+    },
+    isExamine() {
+      return this.detailData.status === 3 || this.detailData.status === 4
+    },
+  },
+
+  created() {
+    this.getDetail();
+  },
+
+  methods: {
+    // 返回列表
+    goBack() {
+      this.$emit('backListFormDetail');
+    },
+
+    // 获取详情
+    getDetail() {
+      getApplyDetail({id: this.listItem.id}).then(res => {
+        this.detailData = res.data;
+      })
+    },
+
+    // 打开 直调发货
+    openDeliverDialog() {
+      this.isShowDeliverDialog = true;
+    },
+
+    // 关闭 直调发货
+    closeDeliverDialog() {
+      this.isShowDeliverDialog = false;
+    },
+
+    // 提交 直调发货
+    submitDeliverForm() {
+
+    },
+
+  }
+}
+</script>
+
+<style scoped lang="scss">
+  .detail-container {
+    width: 100%;
+    height: 100%;
+  }
+  .main-title {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-top: 20px;
+    height: 60px;
+    border-bottom: 1px solid #DCDFE6;
+    margin-bottom: 20px;
+    .title {
+      font-size: 16px;
+      font-weight: 600;
+      padding-left: 10px;
+    }
+  }
+</style>

+ 294 - 0
src/views/supply/apply/components/apply_examine.vue

@@ -0,0 +1,294 @@
+<template>
+  <div class="detail-container">
+    <el-page-header @back="goBack" content="审批"></el-page-header>
+
+    <div class="main-title">
+      <div class="title">发货申请单信息</div>
+    </div>
+
+    <div class="diy-table-1">
+      <el-row>
+        <el-col :span="8" class="item">
+          <div class="label">发货申请单号</div>
+          <div class="value">{{detailData.id}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">申请日期</div>
+          <div class="value">{{detailData.createTime}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">单据状态</div>
+          <div class="value">{{detailData.status | statusFilter}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">经销商编号</div>
+          <div class="value">{{detailData.customerNumber}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">经销商名称</div>
+          <div class="value">{{detailData.customerName}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">仓库</div>
+          <div class="value">{{detailData.correspondName}}</div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">备注</div>
+          <div class="value">{{detailData.remark}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">制单人</div>
+          <div class="value">{{detailData.createBy}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">制单日期</div>
+          <div class="value">{{detailData.createTime}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label"></div>
+          <div class="value"></div>
+        </el-col>
+      </el-row>
+    </div>
+
+    <div class="main-title">
+      <div class="title">货品信息</div>
+    </div>
+
+    <div class="table" style="margin-top: 20px">
+      <el-table :data="goodsList" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
+        <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+        <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="发货仓库" prop="stockIds" min-width="160" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-select v-model="scope.row.stockIds" placeholder="请选择发货仓库" size="small" multiple filterable @change="changeWarehouse(scope.$index)">
+              <el-option :label="item.name" :value="item.id" v-for="(item, index) in positionList" :key="index"></el-option>
+            </el-select>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="库存数" prop="stockNumber" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="销售订单号" prop="retailOrderId" min-width="180" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="产品编码" prop="materialCode" min-width="120" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="计量单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="申请数量" prop="invoiceNum" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="审批数量" prop="approvalNumber" min-width="100" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-input v-model="scope.row.approvalNumber" size="small" type="number"></el-input>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-input v-model="scope.row.remark" size="small"></el-input>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+
+    <div class="main-title">
+      <div class="title">审批信息</div>
+    </div>
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :span="12" class="item">
+          <div class="label">审批人</div>
+          <div class="value">{{userName}}</div>
+        </el-col>
+        <el-col :span="12" class="item">
+          <div class="label">审批结果</div>
+          <div class="value">
+            <el-radio-group v-model="examineForm.status">
+              <el-radio :label="true">通过</el-radio>
+              <el-radio :label="false">驳回</el-radio>
+            </el-radio-group>
+          </div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">审批说明</div>
+          <div class="value"><el-input v-model="examineForm.remark" placeholder="请输入内容"></el-input></div>
+        </el-col>
+      </el-row>
+    </div>
+    
+    <div class="page-footer">
+      <div class="footer" :class="classObj">
+        <el-button type="primary" @click="clickSubmitForm" :loading="formLoading">{{ formLoading ? '提交中 ...' : '提 交' }}</el-button>
+        <el-popconfirm
+          title="确定关闭吗?"
+          @onConfirm="goBack"
+          style="margin-left: 10px;"
+        >
+          <el-button slot="reference">关 闭</el-button>
+        </el-popconfirm>
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import { getApplyDetail, examineApply, getPositionList, checkStock } from "@/api/supply/apply";
+
+export default {
+  name: 'ApplyExamine',
+  componentName: 'ApplyExamine',
+  props: ['listItem'],
+  filters: {
+    statusFilter(val) {
+      const statusList = [
+        { label: '已保存', value: 1 },
+        { label: '待审核', value: 2 },
+        { label: '审核通过', value: 3 },
+        { label: '审核驳回', value: 4 },
+      ];
+      let obj = statusList.find(o => o.value == val);
+      return obj ? obj.label : ''
+    }
+  },
+  data() {
+    return {
+      detailData: {},
+      goodsList: [],
+      userName: JSON.parse(localStorage.getItem("supply_user")).nickName,
+
+      formLoading: false,
+      examineForm: {
+        status: true,
+        remark: '',
+      },
+      positionList: [],
+    }
+  },
+
+  computed: {
+    sidebar() {
+      return this.$store.state.app.sidebar
+    },
+    classObj() {
+      return {
+        hideSidebar: !this.sidebar.opened,
+        openSidebar: this.sidebar.opened
+      }
+    },
+  },
+
+  created() {
+    this.getDetail();
+  },
+
+  methods: {
+    // 返回列表
+    goBack() {
+      this.$emit('backListFormDetail');
+    },
+
+    // 获取详情
+    getDetail() {
+      getApplyDetail({id: this.listItem.id}).then(res => {
+        this.detailData = res.data;
+
+        res.data.orders.forEach((item, index) => {
+          if(item.stockIds && item.stockIds.length > 0) {
+            item.stockIds = item.stockIds.map((it, idx) => {
+              return it.id;
+            });
+          }
+        });
+
+        this.goodsList = res.data.orders;
+        this.getPositionList();
+      })
+    },
+
+    // 获取仓位列表
+    getPositionList() {
+      getPositionList({
+        correspondId: this.detailData.correspondId
+      }).then((res) => {
+        this.positionList = res.data;
+      })
+    },
+
+    // 修改仓位
+    changeWarehouse(index) {
+      if(this.goodsList[index].stockIds && this.goodsList[index].stockIds.length > 0) {
+        checkStock({
+          materialId: this.goodsList[index].materialId,
+          StockIds: this.goodsList[index].stockIds.join(',')
+        }).then(res => {
+          this.goodsList[index].stockNumber = res.data;
+        })
+      }else {
+        this.goodsList[index].stockNumber = 0;
+      }
+    },
+
+    // 提交审批
+    clickSubmitForm() {
+      for(let i=0; i<this.goodsList.length; i++) {
+        if(this.goodsList[i].stockIds && this.goodsList[i].stockIds.length < 1) {
+          this.$errorMsg('请选择发货仓库');
+          return;
+        }
+        if(this.goodsList[i].stockNumber < 1) {
+          this.$errorMsg('库存不足');
+          return;
+        }
+        if(this.goodsList[i].approvalNumber > this.goodsList[i].stockNumber) {
+          this.$errorMsg('审批数量不可大于库存数');
+          return;
+        }
+        if(this.goodsList[i].approvalNumber > this.goodsList[i].invoiceNum) {
+          this.$errorMsg('审批数量不可大于申请数量');
+          return;
+        }
+      }
+
+      this.formLoading = true;
+      examineApply({
+        id: this.listItem.id,
+        status: this.examineForm.status ? 3 : 4,
+        approvalRemark: this.examineForm.remark,
+        orders: this.goodsList
+      }).then(res => {
+        this.$successMsg('审批成功');
+        this.goBack();
+        this.$parent.getList();
+      }).finally(res => {
+        this.formLoading = false;
+      })
+    },
+
+  }
+}
+</script>
+
+<style scoped lang="scss">
+  .detail-container {
+    width: 100%;
+    height: 100%;
+  }
+  .main-title {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-top: 20px;
+    height: 60px;
+    border-bottom: 1px solid #DCDFE6;
+    margin-bottom: 20px;
+    .title {
+      font-size: 16px;
+      font-weight: 600;
+      padding-left: 10px;
+    }
+  }
+
+  ::v-deep input::-webkit-outer-spin-button,
+  ::v-deep input::-webkit-inner-spin-button {
+    -webkit-appearance: none;
+  }
+  ::v-deep input[type='number'] {
+    -moz-appearance: textfield;
+  }
+</style>

+ 541 - 0
src/views/supply/apply/components/apply_form.vue

@@ -0,0 +1,541 @@
+<template>
+  <div class="detail-container">
+    <el-page-header @back="goBack" :content="listItem ? '编辑':'新增'"></el-page-header>
+
+    <div class="main-title">
+      <div class="title">发货申请单信息</div>
+    </div>
+
+    <el-form ref="mainForm" :model="mainForm" :rules="mainFormRules" label-width="90px" size="small" label-position="right">
+      <el-row :gutter="20">
+        <el-col :xs="24" :sm="12" :lg="8" v-if="listItem">
+          <el-form-item label="订单号" prop="id">
+            <el-input v-model="listItem.id" readonly></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8" style="height: 51px;">
+          <el-form-item label="单据日期" prop="date">
+            <el-date-picker
+              v-model="mainForm.date"
+              type="date"
+              value-format="yyyy-MM-dd"
+              style="width: 100%;"
+              placeholder="选择日期">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8" v-if="listItem">
+          <el-form-item label="制单人" prop="serviceName">
+            <el-input v-model="listItem.serviceName" readonly></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8">
+          <el-form-item label="经销商" prop="dealer">
+            <el-select v-model="mainForm.dealer" placeholder="请选择经销商" style="width: 100%;">
+              <el-option :label="item.name" :value="item.id" v-for="(item, index) in dealerList" :key="index"></el-option>
+            </el-select>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="24">
+          <el-form-item label="备注" prop="remark">
+            <el-input v-model="mainForm.remark" placeholder="请输入备注"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="8" :lg="8">
+          <el-form-item label="附件" prop="fileUrl">
+            <fileUpload :fileList="fileList" />
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+
+    <div class="main-title">
+      <div class="title">货品信息</div>
+      <div>
+        <span style="font-size: 14px; margin-right: 10px">仓库</span>
+        <el-select v-model="screenForm.warehouse" placeholder="请选择发货仓库" size="small" filterable clearable :disabled="goodsList.length > 0">
+          <el-option :label="item.name" :value="item.id" v-for="(item, index) in warehouseList" :key="index"></el-option>
+        </el-select>
+        <el-divider direction="vertical"></el-divider>
+        <el-button type="primary" size="small" icon="el-icon-plus" @click="openDialog">添加引用</el-button>
+      </div>
+    </div>
+
+    <div class="table" style="margin-top: 20px">
+      <el-table :data="goodsList" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
+        <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+        <el-table-column align="center" label="引用单号" prop="orderId" min-width="180" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单位" prop="unit" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="数量" prop="qty" min-width="80" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="申请数量" prop="invoiceNum" min-width="110" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-input v-model="scope.row.invoiceNum" size="small"></el-input>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="已申请数量" prop="alreadyInvoiceNum" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="未申请数量" min-width="100" show-overflow-tooltip>
+          <template slot-scope="scope">
+            {{scope.row.qty - scope.row.alreadyInvoiceNum}}
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="备注" prop="remark" min-width="160" show-overflow-tooltip>
+          <template slot-scope="scope">
+            <el-input v-model="scope.row.remark" size="small"></el-input>
+          </template>
+        </el-table-column>
+        <el-table-column align="center" label="操作" width="100" fixed="right">
+          <template slot-scope="scope">
+            <el-button type="text" @click="deleteItem(scope.row.orderId)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </div>
+    
+    <div class="page-footer">
+      <div class="footer" :class="classObj">
+        <el-button type="primary" @click="clickSubmitForm">保 存</el-button>
+        <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
+          <el-button slot="reference">关 闭</el-button>
+        </el-popconfirm>
+      </div>
+    </div>
+
+    <el-dialog title="添加产品" :visible.sync="isShowDialog" width="80%">
+      <el-form ref="screenForm" :model="screenForm" size="small" label-position="left" label-width="70px">
+        <el-row :gutter="20">
+          <el-col :xs="12" :sm="6" :lg="6">
+            <el-form-item prop="warehouse" label="选择仓库">
+              <el-select v-model="screenForm.warehouse" placeholder="请选择仓库" size="small" filterable clearable :disabled="goodsList.length > 0 || tableSelection.length > 0">
+                <el-option :label="item.name" :value="item.id" v-for="(item, index) in warehouseList" :key="index"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="12" :sm="6" :lg="6">
+            <el-form-item prop="type" label="产品大类">
+              <el-select v-model="screenForm.type" placeholder="选择产品大类" style="width: 100%" :disabled="goodsList.length > 0 || tableSelection.length > 0">
+                <el-option v-for="item in typeList" :key="item.dictCode" :label="item.dictValue" :value="item.dictCode"></el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="12" :sm="6" :lg="6">
+            <el-form-item prop="orderNum" label="订单号">
+              <el-input v-model="screenForm.orderNum" placeholder="请输入订单号"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="12" :sm="6" :lg="6" class="tr">
+            <el-form-item label="">
+              <el-button size="small" @click="resetScreenForm">清空</el-button>
+              <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+
+      <div class="table">
+        <el-table :data="tableGoodsList" element-loading-text="Loading" border fit highlight-current-row stripe height="400" @selection-change="tableSelectionChange">
+          <el-table-column align="center" type="selection" width="55" :selectable='checkboxSelect'></el-table-column>
+          <el-table-column align="center" label="订单号" prop="orderId" min-width="180" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="单位" prop="unit" min-width="80" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="数量" prop="qty" min-width="80" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="本次申请数量" prop="invoiceNum" min-width="110" show-overflow-tooltip>
+            <template slot-scope="scope">
+              <el-input v-model="scope.row.invoiceNum" size="small"></el-input>
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="已申请数量" prop="alreadyInvoiceNum" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="未申请数量" min-width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{scope.row.qty - scope.row.alreadyInvoiceNum}}
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="总库存数量" prop="stockAdequate" min-width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{scope.row.stockAdequate | stockFilter}}
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="对应库存数量" prop="stockCorrespond" min-width="110" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{scope.row.stockCorrespond | stockFilter}}
+            </template>
+          </el-table-column>
+        </el-table>
+        <div class="pagination clearfix" style="margin-top: 10px">
+          <div class="fr">
+            <el-pagination
+              @current-change="handleTableCurrentChange"
+              :current-page="currentPage"
+              :page-size="10"
+              background
+              layout="prev, pager, next"
+              :total="listTotal">
+            </el-pagination>
+          </div>
+        </div>
+      </div>
+      
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="closeDialog">取 消</el-button>
+        <el-button type="primary" @click="submitAddGoods">确 定</el-button>
+      </span>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import { getApplyDetail, addApply, editApply, getGoodsList, getWarehouseList, getDealerList } from "@/api/supply/apply";
+import { getDictList } from '@/api/common'
+import { findElem } from '@/utils/util'
+import fileUpload from '@/components/Common/file-upload.vue'
+
+export default {
+  components: {
+    fileUpload
+  },
+  name: 'ApplyForm',
+  componentName: 'ApplyForm',
+  props: ['listItem'],
+  filters: {
+    stockFilter(val) {
+      const MAP = {
+        0: '不充足',
+        1: '充足'
+      }
+      return MAP[val]
+    }
+  },
+  data() {
+    return {
+      mainForm: {
+        date: '',
+        dealer: '',
+        remark: '',
+      },
+      mainFormRules: {
+        date: [
+          { required: true, message: '请选择单据日期', trigger: 'change' }
+        ],
+        dealer: [
+          { required: true, message: '请选择经销商', trigger: 'change' }
+        ],
+      },
+      dealerList: [],
+      fileList: [],
+      goodsList: [],
+
+      warehouseList: [],
+      isShowDialog: false,
+      screenForm: {
+        warehouse: '',
+        type: '',
+        orderNum: '',
+      },
+      currentPage: 1,
+      listTotal: 0,
+      typeList: [],
+      
+      tableGoodsList: [],
+      tableSelection: [],
+    }
+  },
+
+  computed: {
+    sidebar() {
+      return this.$store.state.app.sidebar
+    },
+    classObj() {
+      return {
+        hideSidebar: !this.sidebar.opened,
+        openSidebar: this.sidebar.opened
+      }
+    },
+  },
+
+  created() {
+    this.getDictList();
+    this.getWarehouseList();
+    this.getDealerList();
+    if(this.listItem) {
+      this.getDetail();
+    }
+  },
+
+  methods: {
+    // 返回列表
+    goBack() {
+      this.$emit('backListFormDetail');
+    },
+
+    // 获取详情
+    getDetail() {
+      getApplyDetail({id: this.listItem.id}).then(res => {
+        let data = res.data;
+        this.mainForm.date = data.orderTime;
+        this.mainForm.dealer = data.customerNumber;
+        this.mainForm.remark = data.remark;
+        this.screenForm.warehouse = data.correspondId;
+        this.fileList = data.fileUrl ? [{
+          url: data.fileUrl,
+          name: data.fileName
+        }] : [];
+        data.orders.forEach(item => {
+          item.orderId = item.id;
+        })
+        this.goodsList = data.orders;
+      })
+    },
+
+    // 获取仓库列表
+    getWarehouseList() {
+      getWarehouseList({
+        pageNum: 1,
+        pageSize: -1
+      }).then((res) => {
+        this.warehouseList = res.data.records;
+      })
+    },
+
+    getDictList() {
+      getDictList({sysDictEnum: 'PRODUCT_TYPE'}).then(res => {
+        this.typeList = res.data;
+      })
+    },
+
+    // 获取经销商列表
+    getDealerList() {
+      getDealerList({
+        pageNum: 1,
+        pageSize: -1,
+        bindUser: false
+      }).then(res => {
+        this.dealerList = res.data.records;
+      })
+    },
+
+    // 获取商品列表
+    getGoodsList() {
+      getGoodsList({
+        pageNum: this.currentPage,
+        pageSize: 10,
+        stockId: this.screenForm.warehouse,
+        mainId: this.screenForm.type,
+        id: this.screenForm.orderNum,
+        // examineStatus: 'OK',
+      }).then(res => {
+        let goodsList = [];
+        res.data.records.forEach(item => {
+          goodsList.push({
+            orderId: item.id,
+            retailId: item.retailId,
+            saleTypeName: item.saleTypeName,
+            materialId: item.materialId,
+            materialCode: item.materialCode,
+            materialName: item.materialName,
+            specification: item.specification,
+            unit: item.unit,
+            qty: item.qty,
+            invoiceNum: item.invoiceNum,
+            alreadyInvoiceNum: item.alreadyInvoiceNum,
+            stockAdequate: item.stockAdequate,
+            stockCorrespond: item.stockCorrespond,
+          })
+        });
+
+        let oldGoodsList = this.goodsList;
+        let newGoodsList = goodsList;
+        for(let i = 0; i < oldGoodsList.length; i++) {
+          let oldItem = oldGoodsList[i]
+          for(let j = 0; j < newGoodsList.length; j++) {
+            let newItem = newGoodsList[j]
+            if(newItem.materialId === oldItem.materialId){
+              newGoodsList[j].selected = true;
+              break;
+            }
+          }
+        }
+
+        this.tableGoodsList = newGoodsList;
+        this.listTotal = res.data.total;
+      })
+    },
+
+    // 查询重复值并禁选
+    checkboxSelect(row, rowIndex) {
+      if (row.selected) {
+        return false // 禁用
+      }else{
+        return true // 不禁用
+      }
+    },
+
+    // 点击 选择商品
+    openDialog() {
+      if(!this.screenForm.warehouse) {
+        return this.$errorMsg('请选择仓库');
+      }
+      this.isShowDialog = true;
+      if(this.screenForm.warehouse && this.screenForm.type) {
+        this.getGoodsList();
+      }
+    },
+
+    // 提交筛选表单
+    submitScreenForm() {
+      if(!this.screenForm.warehouse || !this.screenForm.type) {
+        return this.$errorMsg('请选择仓库和产品大类');
+      }
+      this.currentPage = 1;
+      this.getGoodsList();
+    },
+
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.tableGoodsList = [];
+      // this.getGoodsList();
+    },
+
+    // 更改列表当前页
+    handleTableCurrentChange(val) {
+      if(this.tableSelection.length > 0) {
+        return this.$errorMsg('已选择产品不可切换');
+      }
+      this.currentPage = val;
+      this.getGoodsList();
+    },
+
+    // 关闭 弹窗
+    closeDialog() {
+      this.isShowDialog = false;
+    },
+
+    // 列表选择
+    tableSelectionChange(val) {
+      this.tableSelection = val;
+    },
+
+    // 数组去重
+    delRepeat(arr1, arr2) {
+      let allArr = arr1.concat(arr2); // 两个数组对象合并
+      let newArr = []; // 存放去重后数据的新数组
+      for(let i=0; i<allArr.length; i++){  // 循环allArr数组对象的内容
+        let flag = true;  // 建立标记,判断数据是否重复,true为不重复
+        for(let j=0; j<newArr.length; j++){  // 循环新数组的内容
+          if(allArr[i].materialId == newArr[j].materialId){ // 让allArr数组对象的内容与新数组的内容作比较,相同的话,改变标记为false
+            flag = false;
+          }
+        }
+        if(flag){ // 判断是否重复
+          newArr.push(allArr[i]); // 不重复的放入新数组。  新数组的内容会继续进行上边的循环。
+        }
+      }
+      return newArr;
+    },
+
+    // 确定 添加产品
+    submitAddGoods() {
+      let allList = this.tableGoodsList;
+      let selectList = this.tableSelection;
+      let submitList = [];
+
+      for(let i = 0; i < allList.length; i++) {
+        for(let j = 0; j < selectList.length; j++) {
+          if(selectList[j].orderId == allList[i].orderId){
+            submitList.push(allList[i]);
+          }
+        }
+      }
+      // this.goodsList = this.goodsList.concat(submitList);
+
+      this.goodsList = this.delRepeat(submitList, this.goodsList);
+      this.isShowDialog = false;
+      this.tableGoodsList = [];
+    },
+
+    // 删除产品
+    deleteItem(id) {
+      this.goodsList = this.goodsList.filter((item) => {
+        return item.orderId != id
+      })
+    },
+
+    // 保存
+    clickSubmitForm() {
+      this.$refs.mainForm.validate((valid) => {
+        if (valid) {
+          for(let i=0; i<this.goodsList.length; i++) {
+            if(!this.goodsList[i].invoiceNum) {
+              this.$errorMsg('请输入申请数量');
+              return;
+            }
+          }
+          for(let i=0; i<this.goodsList.length; i++) {
+            if(this.goodsList[i].invoiceNum > this.goodsList[i].qty) {
+              this.$errorMsg('申请数量不能大于总数量');
+              return;
+            }
+          }
+
+          let customerName = this.dealerList[findElem(this.dealerList, 'id', this.mainForm.dealer)].name;
+          let correspondName = this.warehouseList[findElem(this.warehouseList, 'id', this.screenForm.warehouse)].name;
+          let params = {
+            orderTime: this.mainForm.date + ' 00:00:00',
+            customerNumber: this.mainForm.dealer,
+            customerName,
+            remark: this.mainForm.remark,
+            fileUrl: this.fileList && this.fileList.length > 0 ? this.fileList[0].url : '',
+            fileName: this.fileList && this.fileList.length > 0 ? this.fileList[0].name : '',
+            orderType: 1, // 1零售单 2家用工程 3商用工程
+            correspondId: this.screenForm.warehouse,
+            correspondName,
+            orders: this.goodsList,
+            status: 1, // 1保存 2待审核 3通过 4驳回
+          }
+          if(this.listItem) {
+            params.id = this.listItem.id;
+            editApply(params).then(res => {
+              this.$successMsg('编辑成功');
+              this.goBack();
+              this.$parent.getList();
+            })
+          }else {
+            addApply(params).then(res => {
+              this.$successMsg('添加成功');
+              this.goBack();
+              this.$parent.getList();
+            })
+          }
+        }
+      })
+    },
+  }
+}
+</script>
+
+<style scoped lang="scss">
+  .detail-container {
+    width: 100%;
+    height: 100%;
+  }
+  .main-title {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-top: 20px;
+    height: 60px;
+    border-bottom: 1px solid #DCDFE6;
+    margin-bottom: 20px;
+    .title {
+      font-size: 16px;
+      font-weight: 600;
+      padding-left: 10px;
+    }
+  }
+</style>

+ 321 - 0
src/views/supply/apply/components/engin_detail.vue

@@ -0,0 +1,321 @@
+<template>
+  <div class="detail-container">
+    <el-page-header @back="goBack" content="详情"></el-page-header>
+
+    <div id="printData">
+      <div class="main-title">
+        <div class="title">工程订单</div>
+      </div>
+
+      <div class="diy-table-1">
+        <el-row>
+          <el-col :span="8" class="item">
+            <div class="label">订单号</div>
+            <div class="value">{{detailData.billNo}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">订单日期</div>
+            <div class="value">{{detailData.fdate}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">单据状态</div>
+            <div class="value">{{detailData.srcStockId}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">工程登录单号</div>
+            <div class="value">{{detailData.destStockId}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">项目名称</div>
+            <div class="value">{{detailData.approveDate}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">单据类型</div>
+            <div class="value">{{detailData.approverId}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">经销商编码</div>
+            <div class="value">{{detailData.approverId}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">使用单位</div>
+            <div class="value">{{detailData.approverId}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">安装地址</div>
+            <div class="value">{{detailData.approverId}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">工程编号</div>
+            <div class="value">{{detailData.approverId}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">厂工厂编码</div>
+            <div class="value">{{detailData.approverId}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">工程登录类型</div>
+            <div class="value">{{detailData.approverId}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">文件编号</div>
+            <div class="value">{{detailData.approverId}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">制单人</div>
+            <div class="value">{{detailData.approverId}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">制单日期</div>
+            <div class="value">{{detailData.approverId}}</div>
+          </el-col>
+          <el-col :span="24" class="item">
+            <div class="label">格力回复</div>
+            <div class="value">{{detailData.approverId}}</div>
+          </el-col>
+          <el-col :span="24" class="item">
+            <div class="label">格力内部备注</div>
+            <div class="value">{{detailData.approverId}}</div>
+          </el-col>
+          <el-col :span="6" class="item">
+            <div class="label">审核人</div>
+            <div class="value">{{detailData.approverId}}</div>
+          </el-col>
+          <el-col :span="6" class="item">
+            <div class="label">审核日期</div>
+            <div class="value">{{detailData.approverId}}</div>
+          </el-col>
+          <el-col :span="6" class="item">
+            <div class="label">关闭人</div>
+            <div class="value">{{detailData.approverId}}</div>
+          </el-col>
+          <el-col :span="6" class="item">
+            <div class="label">关闭日期</div>
+            <div class="value">{{detailData.approverId}}</div>
+          </el-col>
+          <el-col :span="24" class="item">
+            <div class="label">备注</div>
+            <div class="value">{{detailData.approverId}}</div>
+          </el-col>
+        </el-row>
+      </div>
+
+      <div class="main-title">
+        <div class="title">货品信息</div>
+      </div>
+
+      <div class="table" style="margin-top: 20px">
+        <el-table :data="detailData.kingDeeTransferItems" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
+          <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+          <el-table-column align="center" label="引用记录" prop="materialNumber" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="销售类型" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品编码" prop="model" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品名称" prop="baseUnitId" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="规格型号" prop="qty" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="单位" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="总数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="是否使用返利" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="返利使用比例" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="是否直调" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="直调数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="已发货数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="单价" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="金额" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="返利" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="备注" prop="qty" min-width="160" show-overflow-tooltip></el-table-column>
+        </el-table>
+      </div>
+
+      <div class="main-title">
+        <div class="title">审批记录</div>
+      </div>
+      <div class="diy-table-1">
+        <el-row :gutter="0">
+          <el-col :span="12" class="item">
+            <div class="label">审批人</div>
+            <div class="value">2022123233435342</div>
+          </el-col>
+          <el-col :span="12" class="item">
+            <div class="label">审批结果</div>
+            <div class="value">2022123233435342</div>
+          </el-col>
+          <el-col :span="24" class="item">
+            <div class="label">审批说明</div>
+            <div class="value">2022123233435342</div>
+          </el-col>
+        </el-row>
+      </div>
+      
+    </div>
+    
+    <div class="page-footer">
+      <div class="footer" :class="classObj">
+        <el-button  type="primary" @click="openDeliverDialog">直调发货</el-button>
+        <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
+          <el-button slot="reference">关 闭</el-button>
+        </el-popconfirm>
+      </div>
+    </div>
+
+    <el-dialog
+      title="直调发货"
+      :visible.sync="isShowDeliverDialog"
+      width="80%">
+      <el-form ref="deliverForm" :model="deliverForm" label-width="70px" size="small" label-position="left">
+        <el-row :gutter="20">
+          <el-col :xs="24" :sm="8" :lg="8">
+            <el-form-item label="工程订单" prop="orderNum">
+              <el-input v-model="deliverForm.orderNum" placeholder="请输入工程订单"></el-input>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="8" :lg="8" style="height: 51px;">
+            <el-form-item label="发货日期" prop="date">
+              <el-date-picker
+                v-model="deliverForm.date"
+                type="date"
+                value-format="yyyy-MM-dd"
+                style="width: 100%;"
+                placeholder="选择日期">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <el-col :xs="24" :sm="8" :lg="8">
+            <el-form-item label="发货仓库" prop="warehouse">
+              <el-select v-model="deliverForm.warehouse" placeholder="请选择发货仓库">
+                <el-option
+                  v-for="item in warehouseList"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      </el-form>
+
+      <div class="table" style="margin-top: 20px">
+        <el-table :data="detailData.kingDeeTransferItems" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
+          <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+          <el-table-column align="center" label="引用记录" prop="materialNumber" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="销售类型" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品编码" prop="model" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品名称" prop="baseUnitId" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="规格型号" prop="qty" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="单位" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="总数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="是否使用返利" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="返利使用比例" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="是否直调" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="直调数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="已发货数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="单价" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="金额" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="返利" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="备注" prop="qty" min-width="160" show-overflow-tooltip></el-table-column>
+        </el-table>
+      </div>
+      <span slot="footer" class="dialog-footer">
+        <el-button @click="closeDeliverDialog">取 消</el-button>
+        <el-button type="primary" @click="submitDeliverForm">确 定</el-button>
+      </span>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import print from 'vue-print-nb'
+import { getDetail } from "@/api/supply/apply";
+
+export default {
+  name: 'EnginDetail',
+  componentName: 'EnginDetail',
+  props: ['listItem'],
+  directives: {
+    print
+  },
+  data() {
+    return {
+      printObj: {
+        id: 'printData'
+      },
+      detailData: {},
+
+      isShowDeliverDialog: false,
+      deliverForm: {
+        orderNum: '',
+        date: '',
+      },
+      warehouseList: [],
+    }
+  },
+
+  computed: {
+    sidebar() {
+      return this.$store.state.app.sidebar
+    },
+    classObj() {
+      return {
+        hideSidebar: !this.sidebar.opened,
+        openSidebar: this.sidebar.opened
+      }
+    },
+  },
+
+  created() {
+    this.getDetail();
+  },
+
+  methods: {
+    // 返回列表
+    goBack() {
+      this.$emit('backListFormDetail');
+    },
+
+    // 获取详情
+    getDetail() {
+      getDetail({id: this.listItem.id}).then(res => {
+        this.detailData = res.data;
+      })
+    },
+
+    // 打开 直调发货
+    openDeliverDialog() {
+      this.isShowDeliverDialog = true;
+    },
+
+    // 关闭 直调发货
+    closeDeliverDialog() {
+      this.isShowDeliverDialog = false;
+    },
+
+    // 提交 直调发货
+    submitDeliverForm() {
+
+    },
+
+  }
+}
+</script>
+
+<style scoped lang="scss">
+  .detail-container {
+    width: 100%;
+    height: 100%;
+  }
+  .main-title {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-top: 20px;
+    height: 60px;
+    border-bottom: 1px solid #DCDFE6;
+    margin-bottom: 20px;
+    .title {
+      font-size: 16px;
+      font-weight: 600;
+      padding-left: 10px;
+    }
+  }
+</style>

+ 247 - 0
src/views/supply/apply/components/engin_examine.vue

@@ -0,0 +1,247 @@
+<template>
+  <div class="detail-container">
+    <el-page-header @back="goBack" content="审批"></el-page-header>
+
+    <div class="main-title">
+      <div class="title">工程订单</div>
+    </div>
+
+    <div class="diy-table-1">
+      <el-row>
+        <el-col :span="8" class="item">
+          <div class="label">订单号</div>
+          <div class="value">{{detailData.billNo}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">订单日期</div>
+          <div class="value">{{detailData.fdate}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">单据状态</div>
+          <div class="value">{{detailData.srcStockId}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">工程登录单号</div>
+          <div class="value">{{detailData.destStockId}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">项目名称</div>
+          <div class="value">{{detailData.approveDate}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">单据类型</div>
+          <div class="value">{{detailData.approverId}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">经销商编码</div>
+          <div class="value">{{detailData.approverId}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">使用单位</div>
+          <div class="value">{{detailData.approverId}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">安装地址</div>
+          <div class="value">{{detailData.approverId}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">工程编号</div>
+          <div class="value">{{detailData.approverId}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">厂工厂编码</div>
+          <div class="value">{{detailData.approverId}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">工程登录类型</div>
+          <div class="value">{{detailData.approverId}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">文件编号</div>
+          <div class="value">{{detailData.approverId}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">制单人</div>
+          <div class="value">{{detailData.approverId}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">制单日期</div>
+          <div class="value">{{detailData.approverId}}</div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">格力回复</div>
+          <div class="value"><el-input v-model="detailData.remark" placeholder="请输入内容"></el-input></div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">格力内部备注</div>
+          <div class="value"><el-input v-model="detailData.remark" placeholder="请输入内容"></el-input></div>
+        </el-col>
+        <el-col :span="6" class="item">
+          <div class="label">审核人</div>
+          <div class="value">{{detailData.approverId}}</div>
+        </el-col>
+        <el-col :span="6" class="item">
+          <div class="label">审核日期</div>
+          <div class="value">{{detailData.approverId}}</div>
+        </el-col>
+        <el-col :span="6" class="item">
+          <div class="label">关闭人</div>
+          <div class="value">{{detailData.approverId}}</div>
+        </el-col>
+        <el-col :span="6" class="item">
+          <div class="label">关闭日期</div>
+          <div class="value">{{detailData.approverId}}</div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">备注</div>
+          <div class="value">{{detailData.approverId}}</div>
+        </el-col>
+      </el-row>
+    </div>
+
+    <div class="main-title">
+      <div class="title">货品信息</div>
+    </div>
+
+    <div class="table" style="margin-top: 20px">
+      <el-table :data="detailData.kingDeeTransferItems" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
+        <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+        <el-table-column align="center" label="引用记录" prop="materialNumber" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="销售类型" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="产品编码" prop="model" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="产品名称" prop="baseUnitId" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="规格型号" prop="qty" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单位" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="总数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="是否使用返利" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="返利使用比例" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="是否直调" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="直调数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="已发货数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单价" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="金额" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="返利" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="备注" prop="qty" min-width="160" show-overflow-tooltip></el-table-column>
+      </el-table>
+    </div>
+
+    <div class="main-title">
+      <div class="title">审批信息</div>
+    </div>
+    <div class="diy-table-1">
+      <el-row :gutter="0">
+        <el-col :span="12" class="item">
+          <div class="label">审批人</div>
+          <div class="value">2022123233435342</div>
+        </el-col>
+        <el-col :span="12" class="item">
+          <div class="label">审批结果</div>
+          <div class="value">
+            <el-radio-group v-model="examineForm.status">
+              <el-radio :label="true">通过</el-radio>
+              <el-radio :label="false">驳回</el-radio>
+            </el-radio-group>
+          </div>
+        </el-col>
+        <el-col :span="24" class="item">
+          <div class="label">审批说明</div>
+          <div class="value"><el-input v-model="examineForm.remark" placeholder="请输入内容"></el-input></div>
+        </el-col>
+      </el-row>
+    </div>
+    
+    <div class="page-footer">
+      <div class="footer" :class="classObj">
+        <el-button type="primary" @click="clickSubmitForm" :loading="formLoading">{{ formLoading ? '提交中 ...' : '提 交' }}</el-button>
+        <el-popconfirm
+          title="确定关闭吗?"
+          @onConfirm="goBack"
+          style="margin-left: 10px;"
+        >
+          <el-button slot="reference">关 闭</el-button>
+        </el-popconfirm>
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import { getDetail } from "@/api/supply/apply";
+
+export default {
+  name: 'EnginExamine',
+  componentName: 'EnginExamine',
+  props: ['listItem'],
+  data() {
+    return {
+      printObj: {
+        id: 'printData'
+      },
+      detailData: {},
+
+      formLoading: false,
+      examineForm: {
+        status: true,
+        remark: '',
+      }
+    }
+  },
+
+  computed: {
+    sidebar() {
+      return this.$store.state.app.sidebar
+    },
+    classObj() {
+      return {
+        hideSidebar: !this.sidebar.opened,
+        openSidebar: this.sidebar.opened
+      }
+    },
+  },
+
+  created() {
+    this.getDetail();
+  },
+
+  methods: {
+    // 返回列表
+    goBack() {
+      this.$emit('backListFormDetail');
+    },
+
+    // 获取详情
+    getDetail() {
+      getDetail({id: this.listItem.id}).then(res => {
+        this.detailData = res.data;
+      })
+    },
+
+    clickSubmitForm() {
+
+    },
+
+  }
+}
+</script>
+
+<style scoped lang="scss">
+  .detail-container {
+    width: 100%;
+    height: 100%;
+  }
+  .main-title {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-top: 20px;
+    height: 60px;
+    border-bottom: 1px solid #DCDFE6;
+    margin-bottom: 20px;
+    .title {
+      font-size: 16px;
+      font-weight: 600;
+      padding-left: 10px;
+    }
+  }
+</style>

+ 1 - 1
src/views/supply/engin/components/engin_return.vue → src/views/supply/apply/components/engin_return.vue

@@ -162,7 +162,7 @@
 </template>
 
 <script>
-import { getDetail } from "@/api/supply/reserve";
+import { getDetail } from "@/api/supply/apply";
 
 export default {
   name: 'EnginReturn',

+ 25 - 20
src/views/supply/engin/apply_list.vue → src/views/supply/apply/engin_list.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <div v-show="!isShowDetail && !isShowForm">
+    <div v-show="!isShowDetail && !isShowReturn && !isShowExamine">
       <!-- 筛选条件 -->
       <div class="screen-container">
         <el-form ref="screenForm" :model="screenForm" label-width="100px" size="small" label-position="left">
@@ -13,7 +13,7 @@
                   <el-radio-button label="3">待审核</el-radio-button>
                   <el-radio-button label="3">审核通过</el-radio-button>
                   <el-radio-button label="3">审核驳回</el-radio-button>
-                  <el-radio-button label="3">已发货</el-radio-button>
+                  <el-radio-button label="3">已退单</el-radio-button>
                 </el-radio-group>
               </el-form-item>
             </el-col>
@@ -73,9 +73,6 @@
 
       <div class="mymain-container">
         <div class="btn-group clearfix">
-          <div class="fl">
-            <el-button size="small" type="primary" icon="el-icon-plus" @click="toForm()">新增</el-button>
-          </div>
           <div class="fr">
             <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
           </div>
@@ -84,13 +81,13 @@
           <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
             <el-table-column align="center" label="发货申请单" prop="shipOrderNo" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="发货申请日期" prop="shipTime" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="仓库" prop="stockName" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="工程登录单号" prop="projectNumber" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="仓库" prop="shipTime" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="工程登录编码" prop="projectNumber" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="工程名称" prop="projectName" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="使用单位" prop="unit" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="经销商编码" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="经销商名称" prop="unit" min-width="160" show-overflow-tooltip></el-table-column>
-            <el-table-column align="center" label="产品名称" prop="number" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="货品名称" prop="unit" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="规格型号" prop="number" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="计量单位" prop="number" min-width="160" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="数量" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
@@ -102,11 +99,9 @@
             <el-table-column align="center" label="审核状态" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
             <el-table-column align="center" label="操作" width="160" fixed="right">
               <template slot-scope="scope">
-                <el-button type="text" @click="toForm(scope.row)">编辑</el-button>
+                <el-button type="text" @click="toReturn(scope.row)">退货</el-button>
+                <el-button type="text" @click="toExamine(scope.row)">审批</el-button>
                 <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
-                <el-popconfirm v-if="scope.row.status" style="margin-left: 10px;" title="确定删除吗?" @onConfirm="handleDelete(scope.row.id)" >
-                  <el-button slot="reference" type="text">删除</el-button>
-                </el-popconfirm>
               </template>
             </el-table-column>
           </el-table>
@@ -128,20 +123,23 @@
     </div>
     
     <EnginDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
-    <EnginForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
+    <EnginReturn :listItem="queryItem" v-if="isShowReturn" @backListFormDetail="backList" />
+    <EnginExamine :listItem="queryItem" v-if="isShowExamine" @backListFormDetail="backList" />
 
   </div>
 </template>
 
 <script>
-import { getList } from "@/api/supply/engin";
-import EnginDetail from "@/views/supply/engin/components/engin_detail";
-import EnginForm from "@/views/supply/engin/components/engin_form";
+import { getList } from "@/api/supply/apply";
+import EnginDetail from "@/views/supply/apply/components/engin_detail";
+import EnginReturn from "@/views/supply/apply/components/engin_return";
+import EnginExamine from "@/views/supply/apply/components/engin_examine";
 
 export default {
   components: {
     EnginDetail,
-    EnginForm,
+    EnginReturn,
+    EnginExamine,
   },
   data() {
     return {
@@ -162,7 +160,8 @@ export default {
 
       queryItem: {},
       isShowDetail: false,
-      isShowForm: false,
+      isShowReturn: false,
+      isShowExamine: false,
     }
   },
 
@@ -244,10 +243,16 @@ export default {
       this.getList();
     },
 
-    // 进入表单
+    // 进入退单
+    toForm(item) {
+      this.queryItem = item;
+      this.isShowReturn = true;
+    },
+
+    // 进入审批
     toForm(item) {
       this.queryItem = item;
-      this.isShowForm = true;
+      this.isShowExamine = true;
     },
 
     // 进入详情

+ 1 - 1
src/views/supply/deliver/engin_list.vue

@@ -79,7 +79,7 @@
       <div class="mymain-container">
         <div class="btn-group clearfix">
           <div class="fl">
-            <el-button size="small" type="warning" icon="el-icon-close">退货</el-button>
+            <!-- <el-button size="small" type="warning" icon="el-icon-close">退货</el-button> -->
           </div>
           <div class="fr">
             <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />

+ 5 - 0
src/views/supply/displace.vue

@@ -0,0 +1,5 @@
+<template>
+  <div>
+    <router-view />
+  </div>
+</template>

+ 206 - 0
src/views/supply/displace/components/displace_detail.vue

@@ -0,0 +1,206 @@
+<template>
+  <div class="detail-container">
+    <el-page-header @back="goBack" content="详情"></el-page-header>
+
+    <div id="printMe">
+      <div class="main-title">
+        <div class="title">订单信息</div>
+      </div>
+      <div class="diy-table-1">
+        <el-row :gutter="0">
+          <el-col :span="8" class="item">
+            <div class="label">订单号</div>
+            <div class="value">{{detailData.retreatOrderNo}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">订单日期</div>
+            <div class="value">{{detailData.retreatTime}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">单据状态</div>
+            <div class="value">{{detailData.aaa}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">原订单号</div>
+            <div class="value">{{detailData.salesType}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">订单类型</div>
+            <div class="value">{{detailData.orderNo}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">业务员</div>
+            <div class="value">{{detailData.billNumber}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">经销商编号</div>
+            <div class="value">{{detailData.clientName}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">经销商名称</div>
+            <div class="value">{{detailData.salesDep}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label"></div>
+            <div class="value"></div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :lg="24" class="item">
+            <div class="label">备注</div>
+            <div class="value">{{detailData.remark}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">申请人</div>
+            <div class="value">{{detailData.salesDep}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">审核人</div>
+            <div class="value">{{detailData.salesDep}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">关闭人</div>
+            <div class="value">{{detailData.salesDep}}</div>
+          </el-col>
+        </el-row>
+      </div>
+
+      <div class="main-title">
+        <div class="title">货品信息</div>
+      </div>
+      <div class="table">
+        <el-table :data="detailData.retreatDocumentOrder" element-loading-text="Loading" border fit highlight-current-row stripe>
+          <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+          <el-table-column align="center" label="订单号" prop="orderNumber" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="仓库名称" prop="stockName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品编号" prop="productNumber" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="产品名称" prop="productName" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="主计量" prop="unit" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="数量" prop="number" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="含税单价" prop="includedPrice" min-width="160" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="含税金额" prop="includedPrice" min-width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{ scope.row.number * scope.row.includedPrice }}
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="无税单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="无税金额" prop="price" min-width="100" show-overflow-tooltip>
+            <template slot-scope="scope">
+              {{ scope.row.number * scope.row.price }}
+            </template>
+          </el-table-column>
+          <el-table-column align="center" label="价税合计" prop="totalPrice" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="税率(%)" prop="rate" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="退补标记" prop="refund" min-width="100" show-overflow-tooltip></el-table-column>
+          <el-table-column align="center" label="厂产品代码" prop="factoryNumber" min-width="100" show-overflow-tooltip></el-table-column>
+        </el-table>
+      </div>
+    </div>
+
+    <div class="main-title">
+        <div class="title">审批记录</div>
+      </div>
+      <div class="diy-table-1">
+        <el-row :gutter="0">
+          <el-col :span="8" class="item">
+            <div class="label">审批人</div>
+            <div class="value">{{detailData.salesDep}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">审批结果</div>
+            <div class="value">{{detailData.salesDep}}</div>
+          </el-col>
+          <el-col :span="8" class="item">
+            <div class="label">审批时间</div>
+            <div class="value">{{detailData.salesDep}}</div>
+          </el-col>
+          <el-col :xs="24" :sm="24" :lg="24" class="item">
+            <div class="label">审批说明</div>
+            <div class="value">{{detailData.remark}}</div>
+          </el-col>
+        </el-row>
+      </div>
+    
+    <div class="page-footer">
+      <div class="footer" :class="classObj">
+        <el-button  type="primary" icon="el-icon-printer" v-print="printObj">打 印</el-button>
+        <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
+          <el-button slot="reference">关 闭</el-button>
+        </el-popconfirm>
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import print from 'vue-print-nb'
+import { getDetail } from "@/api/supply/displace";
+
+export default {
+  name: 'DisplaceDetail',
+  componentName: 'DisplaceDetail',
+  props: ['listItem'],
+  directives: {
+    print
+  },
+  data() {
+    return {
+      printObj: {
+        id: 'printMe'
+      },
+      detailData: {},
+    }
+  },
+
+  computed: {
+    sidebar() {
+      return this.$store.state.app.sidebar
+    },
+    classObj() {
+      return {
+        hideSidebar: !this.sidebar.opened,
+        openSidebar: this.sidebar.opened
+      }
+    },
+  },
+
+  created() {
+    this.getDetail();
+  },
+
+  methods: {
+    // 返回列表
+    goBack() {
+      this.$emit('backListFormDetail');
+    },
+
+    // 获取详情
+    getDetail() {
+      getDetail({id: this.listItem.id}).then(res => {
+        this.detailData = res.data;
+      })
+    },
+  }
+}
+</script>
+
+<style scoped lang="scss">
+  .detail-container {
+    width: 100%;
+    height: 100%;
+  }
+  .main-title {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-top: 30px;
+    height: 60px;
+    border-bottom: 1px solid #DCDFE6;
+    margin-bottom: 20px;
+    .title {
+      font-size: 16px;
+      font-weight: 600;
+      padding-left: 10px;
+    }
+  }
+</style>

+ 185 - 0
src/views/supply/displace/components/displace_form.vue

@@ -0,0 +1,185 @@
+<template>
+  <div class="detail-container">
+    <el-page-header @back="goBack" :content="listItem ? '编辑':'新增'"></el-page-header>
+
+    <div class="main-title">
+      <div class="title">置换订单信息</div>
+    </div>
+
+    <el-form ref="mainForm" :model="mainForm" label-width="100px" size="small" label-position="left">
+      <el-row :gutter="20">
+        <el-col :xs="24" :sm="12" :lg="8">
+          <el-form-item label="订单号" prop="warehouse">
+            <el-input v-model="mainForm.remark" placeholder="请输入订单号"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8" style="height: 51px;">
+          <el-form-item label="单据日期" prop="date">
+            <el-date-picker
+              v-model="mainForm.date"
+              type="date"
+              value-format="yyyy-MM-dd"
+              style="width: 100%;"
+              placeholder="选择日期">
+            </el-date-picker>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8">
+          <el-form-item label="品类" prop="warehouse">
+            <el-input v-model="mainForm.remark" placeholder="请输入品类"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8">
+          <el-form-item label="销售政策编号" prop="warehouse">
+            <el-input v-model="mainForm.remark" placeholder="请输入销售政策编号"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8">
+          <el-form-item label="销售政策" prop="warehouse">
+            <el-input v-model="mainForm.remark" placeholder="请输入销售政策"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8">
+          <el-form-item label="销售政策说明" prop="warehouse">
+            <el-input v-model="mainForm.remark" placeholder="请输入销售政策说明"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8">
+          <el-form-item label="工程登录编码" prop="warehouse">
+            <el-input v-model="mainForm.remark" placeholder="请输入工程登录编码"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8">
+          <el-form-item label="附件" prop="warehouse">
+            <el-input v-model="mainForm.remark" placeholder="请输入附件"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="12" :lg="8">
+          <el-form-item label="业务员" prop="warehouse">
+            <el-input v-model="mainForm.remark" placeholder="请输入业务员"></el-input>
+          </el-form-item>
+        </el-col>
+        <el-col :xs="24" :sm="24" :lg="24">
+          <el-form-item label="备注" prop="warehouse">
+            <el-input v-model="mainForm.remark" placeholder="请输入备注"></el-input>
+          </el-form-item>
+        </el-col>
+      </el-row>
+    </el-form>
+
+    <div class="main-title">
+      <div class="title">货品信息</div>
+      <div>
+        <el-button type="primary" size="small">检查库存</el-button>
+      </div>
+      
+    </div>
+
+    <div class="table" style="margin-top: 20px">
+      <el-table :data="detailData.kingDeeTransferItems" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
+        <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+        <el-table-column align="center" label="销售类型" prop="materialNumber" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="产品编码" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="产品名称" prop="model" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="规格型号" prop="qty" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单位" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单价" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="订单金额" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="返利使用比例" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="返利金额" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="格力折扣" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="现金钱包" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="实付金额" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="原订单数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="备注" prop="qty" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="总仓库" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="仓库状态" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+      </el-table>
+    </div>
+    
+    <div class="page-footer">
+      <div class="footer" :class="classObj">
+        <el-button type="primary" @click="clickSubmitForm">保 存</el-button>
+        <el-button type="primary" @click="clickSubmitForm">提交审核</el-button>
+        <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
+          <el-button slot="reference">关 闭</el-button>
+        </el-popconfirm>
+      </div>
+    </div>
+
+  </div>
+</template>
+
+<script>
+import { getDetail } from "@/api/supply/displace";
+
+export default {
+  name: 'DisplaceForm',
+  componentName: 'DisplaceForm',
+  props: ['listItem'],
+  data() {
+    return {
+      detailData: {},
+      mainForm: {
+
+      },
+    }
+  },
+
+  computed: {
+    sidebar() {
+      return this.$store.state.app.sidebar
+    },
+    classObj() {
+      return {
+        hideSidebar: !this.sidebar.opened,
+        openSidebar: this.sidebar.opened
+      }
+    },
+  },
+
+  created() {
+    this.getDetail();
+  },
+
+  methods: {
+    // 返回列表
+    goBack() {
+      this.$emit('backListFormDetail');
+    },
+
+    // 获取详情
+    getDetail() {
+      getDetail({id: this.listItem.id}).then(res => {
+        this.detailData = res.data;
+      })
+    },
+
+    clickSubmitForm() {
+
+    },
+  }
+}
+</script>
+
+<style scoped lang="scss">
+  .detail-container {
+    width: 100%;
+    height: 100%;
+  }
+  .main-title {
+    display: flex;
+    justify-content: space-between;
+    align-items: center;
+    margin-top: 20px;
+    height: 60px;
+    border-bottom: 1px solid #DCDFE6;
+    margin-bottom: 20px;
+    .title {
+      font-size: 16px;
+      font-weight: 600;
+      padding-left: 10px;
+    }
+  }
+</style>

+ 263 - 0
src/views/supply/displace/displace_list.vue

@@ -0,0 +1,263 @@
+<template>
+  <div class="app-container">
+    <div v-show="!isShowDetail && !isShowForm">
+      <!-- 筛选条件 -->
+      <div class="screen-container">
+        <el-form ref="screenForm" :model="screenForm" label-width="100px" size="small" label-position="left">
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="订单号" prop="orderNum">
+                <el-input v-model="screenForm.orderNum" placeholder="请输入订单号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="原销售订单号" prop="jxsNum">
+                <el-input v-model="screenForm.jxsNum" placeholder="请输入原销售订单号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="经销商名称" prop="jxsName">
+                <el-input v-model="screenForm.jxsName" placeholder="请输入经销商名称"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="产品名称" prop="chName">
+                <el-input v-model="screenForm.chName" placeholder="请输入产品名称"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="订单日期" prop="date">
+                <el-date-picker
+                  v-model="screenForm.date"
+                  type="datetimerange"
+                  range-separator="至"
+                  style="width: 100%;"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期">
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="申请人" prop="sqMan">
+                <el-input v-model="screenForm.sqMan" placeholder="请输入申请人"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="审核人" prop="shMan">
+                <el-input v-model="screenForm.shMan" placeholder="请输入审核人"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="销售订单类型" prop="shMan">
+                <el-input v-model="screenForm.shMan" placeholder="请输入销售订单类型"></el-input>
+              </el-form-item>
+            </el-col>
+            
+            <el-col :xs="24" :sm="24" :lg="24" class="tr">
+              <el-form-item label="">
+                <el-button size="small" @click="resetScreenForm">清空</el-button>
+                <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+
+      <div class="mymain-container">
+        <div class="btn-group clearfix">
+          <div class="fl">
+            <el-button size="small" type="primary" icon="el-icon-plus" @click="toForm()">新增</el-button>
+          </div>
+          <div class="fr">
+            <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
+          </div>
+        </div>
+        <div class="table">
+          <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+            <el-table-column align="center" label="订单号" prop="retreatOrderNo" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="订单日期" prop="retreatTime" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="原订单号" prop="stockName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="订单类型" prop="customerName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="经销商编号" prop="productName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="经销商名称" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="产品编码" prop="totalPrice" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="产品名称" prop="price" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="规格型号" prop="number" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="业务员" prop="number" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="申请人" prop="number" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="申请日期" prop="number" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="审核人" prop="number" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="审核日期" prop="number" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="审核状态" prop="remark" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="操作" width="160" fixed="right">
+              <template slot-scope="scope">
+                <el-button type="text" @click="toForm(scope.row)">编辑</el-button>
+                <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
+                <el-popconfirm v-if="scope.row.status" style="margin-left: 10px;" title="确定删除吗?" @onConfirm="handleDelete(scope.row.id)" >
+                  <el-button slot="reference" type="text">删除</el-button>
+                </el-popconfirm>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+      <div class="pagination clearfix">
+        <div class="fr">
+          <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal">
+          </el-pagination>
+        </div>
+      </div>
+    </div>
+    
+    <DisplaceDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
+    <DisplaceForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
+
+  </div>
+</template>
+
+<script>
+import { getList } from "@/api/supply/displace";
+import DisplaceDetail from "@/views/supply/displace/components/displace_detail";
+import DisplaceForm from "@/views/supply/displace/components/displace_form";
+
+export default {
+  components: {
+    DisplaceDetail,
+    DisplaceForm,
+  },
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: null, // 列表数据
+      listLoading: false, // 列表加载loading
+      screenForm: { // 筛选表单数据
+        orderNum: '',
+        jxsNum: '',
+        jxsName: '',
+        chName: '',
+        model: '',
+        date: '',
+      },
+
+      queryItem: {},
+      isShowDetail: false,
+      isShowForm: false,
+    }
+  },
+
+  computed: {
+    exParams() {
+      return {
+        retreatOrderNo: this.screenForm.orderNum,
+        customerNumber: this.screenForm.jxsNum,
+        customerName: this.screenForm.jxsName,
+        productName: this.screenForm.chName,
+        specification: this.screenForm.model,
+        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
+        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
+        status: 1, // 1:退货单,2:电商退货单
+      }
+    },
+  },
+
+  created() {
+    this.getList();
+  },
+
+  methods: {
+    // 查询按钮权限
+    checkBtnRole(value) {
+      // let btnRole = this.$route.meta.roles;
+      // if(!btnRole) {return true}
+      // let index = btnRole.indexOf(value);
+      // return index >= 0;
+      return true
+    },
+
+    // 查询列表
+    getList() {
+      this.listLoading = true;
+
+      let params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        retreatOrderNo: this.screenForm.orderNum,
+        customerNumber: this.screenForm.jxsNum,
+        customerName: this.screenForm.jxsName,
+        productName: this.screenForm.chName,
+        specification: this.screenForm.model,
+        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
+        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
+        status: 1, // 1:退货单,2:电商退货单
+      };
+      getList(params).then((res) => {
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      })
+    },
+
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+
+    // 进入表单
+    toForm(item) {
+      this.queryItem = item;
+      this.isShowForm = true;
+    },
+
+    // 进入详情
+    toDetail(item) {
+      this.queryItem = item;
+      this.isShowDetail = true;
+    },
+
+    backList() {
+      this.queryItem = {};
+      this.isShowDetail = false;
+      this.isShowForm = false;
+    },
+
+    handleDelete(id) {
+
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 288 - 0
src/views/supply/engin/commerce_list.vue

@@ -0,0 +1,288 @@
+<template>
+  <div class="app-container">
+    <div v-show="!isShowDetail && !isShowForm">
+      <!-- 筛选条件 -->
+      <div class="screen-container">
+        <el-form ref="screenForm" :model="screenForm" label-width="100px" size="small" label-position="left">
+          <el-row :gutter="20">
+            <el-col :xs="24" :sm="24" :lg="24">
+              <el-form-item prop="orderNum" label-width="0">
+                <el-radio-group v-model="screenForm.status" size="medium">
+                  <el-radio-button label="1">全部</el-radio-button>
+                  <el-radio-button label="2">已保存</el-radio-button>
+                  <el-radio-button label="3">待审核</el-radio-button>
+                  <el-radio-button label="3">审核通过</el-radio-button>
+                  <el-radio-button label="3">审核驳回</el-radio-button>
+                  <el-radio-button label="3">已退单</el-radio-button>
+                </el-radio-group>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="工程订单号" prop="orderNum">
+                <el-input v-model="screenForm.orderNum" placeholder="请输入工程订单号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="工程编码" prop="orderNum">
+                <el-input v-model="screenForm.orderNum" placeholder="请输入工程编码"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="工程登录单号" prop="jxsName">
+                <el-input v-model="screenForm.jxsName" placeholder="请输入工程登录单号"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="工程名称" prop="jxsNum">
+                <el-input v-model="screenForm.jxsNum" placeholder="请输入工程名称"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="单据日期" prop="date">
+                <el-date-picker
+                  v-model="screenForm.date"
+                  type="datetimerange"
+                  range-separator="至"
+                  style="width: 100%;"
+                  value-format="yyyy-MM-dd HH:mm:ss"
+                  start-placeholder="开始日期"
+                  end-placeholder="结束日期">
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="销售类型" prop="chName">
+                <el-input v-model="screenForm.chName" placeholder="请输入销售类型"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="使用单位" prop="model">
+                <el-input v-model="screenForm.model" placeholder="请输入使用单位"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="制表人" prop="model">
+                <el-input v-model="screenForm.model" placeholder="请输入制表人"></el-input>
+              </el-form-item>
+            </el-col>
+            <el-col :xs="24" :sm="12" :lg="6">
+              <el-form-item label="审核人" prop="model">
+                <el-input v-model="screenForm.model" placeholder="请输入审核人"></el-input>
+              </el-form-item>
+            </el-col>
+            
+            <el-col :xs="24" :sm="12" :lg="18" class="tr">
+              <el-form-item label="">
+                <el-button size="small" @click="resetScreenForm">清空</el-button>
+                <el-button size="small" type="primary" @click="submitScreenForm">搜索</el-button>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </div>
+
+      <div class="mymain-container">
+        <div class="btn-group clearfix">
+          <div class="fl">
+            <el-button size="small" type="primary" icon="el-icon-plus" @click="toForm()">新增</el-button>
+          </div>
+          <div class="fr">
+            <ExportButton :exUrl="'admin/user/mch/export'" :exParams="exParams" />
+          </div>
+        </div>
+        <div class="table">
+          <el-table v-loading="listLoading" :data="dataList" element-loading-text="Loading" border fit highlight-current-row stripe>
+            <el-table-column align="center" label="工程订单号" prop="shipOrderNo" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="单据日期" prop="shipTime" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="工程编码" prop="stockName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="工程登录单号" prop="projectNumber" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="工程名称" prop="projectName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="使用单位" prop="unit" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="销售类型" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="货品名称" prop="unit" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="规格型号" prop="number" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="单位" prop="number" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="总数量" prop="remark" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="是否直调" prop="customerNumber" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="直调数量" prop="customerName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="单价" prop="productName" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="金额" prop="createBy" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="返利使用比例" prop="createTime" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="返利" prop="createBy" min-width="160" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="制表人" prop="createTime" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="制表日期" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="审核人" prop="aaa" min-width="200" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="审核日期" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="审核状态" prop="aaa" min-width="100" show-overflow-tooltip></el-table-column>
+            <el-table-column align="center" label="操作" width="160" fixed="right">
+              <template slot-scope="scope">
+                <el-button type="text" @click="toForm(scope.row)">编辑</el-button>
+                <el-button type="text" @click="toDetail(scope.row)">详情</el-button>
+                <el-popconfirm v-if="scope.row.status" style="margin-left: 10px;" title="确定删除吗?" @onConfirm="handleDelete(scope.row.id)" >
+                  <el-button slot="reference" type="text">删除</el-button>
+                </el-popconfirm>
+              </template>
+            </el-table-column>
+          </el-table>
+        </div>
+      </div>
+      <div class="pagination clearfix">
+        <div class="fr">
+          <el-pagination
+            @size-change="handleSizeChange"
+            @current-change="handleCurrentChange"
+            :current-page="currentPage"
+            :page-sizes="[10, 20, 30, 50]"
+            :page-size="10"
+            layout="total, sizes, prev, pager, next, jumper"
+            :total="listTotal">
+          </el-pagination>
+        </div>
+      </div>
+    </div>
+    
+    <CommerceDetail :listItem="queryItem" v-if="isShowDetail" @backListFormDetail="backList" />
+    <CommerceForm :listItem="queryItem" v-if="isShowForm" @backListFormDetail="backList" />
+
+  </div>
+</template>
+
+<script>
+import { getList } from "@/api/supply/engin";
+import CommerceDetail from "@/views/supply/engin/components/commerce_detail";
+import CommerceForm from "@/views/supply/engin/components/commerce_form";
+
+export default {
+  components: {
+    CommerceDetail,
+    CommerceForm,
+  },
+  data() {
+    return {
+      currentPage: 1, // 当前页码
+      pageSize: 10, // 每页数量
+      listTotal: 0, // 列表总数
+      dataList: null, // 列表数据
+      listLoading: false, // 列表加载loading
+      screenForm: { // 筛选表单数据
+        orderNum: '',
+        jxsName: '',
+        chName: '',
+        model: '',
+        date: '',
+        jxsNum: '',
+        status: '',
+      },
+
+      queryItem: {},
+      isShowDetail: false,
+      isShowForm: false,
+    }
+  },
+
+  computed: {
+    exParams() {
+      return {
+        retreatOrderNo: this.screenForm.orderNum,
+        customerNumber: this.screenForm.jxsNum,
+        customerName: this.screenForm.jxsName,
+        productName: this.screenForm.chName,
+        specification: this.screenForm.model,
+        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
+        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
+        status: 2, // 1:发货单,2:工程发货单
+      }
+    },
+  },
+
+  created() {
+    this.getList();
+  },
+
+  methods: {
+    // 查询按钮权限
+    checkBtnRole(value) {
+      // let btnRole = this.$route.meta.roles;
+      // if(!btnRole) {return true}
+      // let index = btnRole.indexOf(value);
+      // return index >= 0;
+      return true
+    },
+
+    // 查询列表
+    getList() {
+      this.listLoading = true;
+
+      let params = {
+        pageNum: this.currentPage,
+        pageSize: this.pageSize,
+        retreatOrderNo: this.screenForm.orderNum,
+        customerNumber: this.screenForm.jxsNum,
+        customerName: this.screenForm.jxsName,
+        productName: this.screenForm.chName,
+        specification: this.screenForm.model,
+        startTime: this.screenForm.date ? this.screenForm.date[0] : '',
+        endTime: this.screenForm.date ? this.screenForm.date[1] : '',
+        status: 2, // 1:发货单,2:工程发货单
+      };
+      getList(params).then((res) => {
+        this.dataList = res.data.records;
+        this.listTotal = res.data.total;
+        this.listLoading = false;
+      })
+    },
+
+    // 提交筛选表单
+    submitScreenForm() {
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 重置筛选表单
+    resetScreenForm() {
+      this.$refs.screenForm.resetFields();
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改每页数量
+    handleSizeChange(val) {
+      this.pageSize = val;
+      this.currentPage = 1;
+      this.getList();
+    },
+
+    // 更改当前页
+    handleCurrentChange(val) {
+      this.currentPage = val;
+      this.getList();
+    },
+
+    // 进入表单
+    toForm(item) {
+      this.queryItem = item;
+      this.isShowForm = true;
+    },
+
+    // 进入详情
+    toDetail(item) {
+      this.queryItem = item;
+      this.isShowDetail = true;
+    },
+
+    backList() {
+      this.queryItem = {};
+      this.isShowDetail = false;
+      this.isShowForm = false;
+    },
+
+    handleDelete(id) {
+
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+
+</style>

+ 2 - 2
src/views/supply/engin/components/apply_detail.vue → src/views/supply/engin/components/commerce_detail.vue

@@ -185,8 +185,8 @@ import print from 'vue-print-nb'
 import { getDetail } from "@/api/supply/reserve";
 
 export default {
-  name: 'EnginDetail',
-  componentName: 'EnginDetail',
+  name: 'CommerceDetail',
+  componentName: 'CommerceDetail',
   props: ['listItem'],
   directives: {
     print

+ 2 - 2
src/views/supply/engin/components/apply_examine.vue → src/views/supply/engin/components/commerce_examine.vue

@@ -126,8 +126,8 @@
 import { getDetail } from "@/api/supply/reserve";
 
 export default {
-  name: 'EnginExamine',
-  componentName: 'EnginExamine',
+  name: 'CommerceExamine',
+  componentName: 'CommerceExamine',
   props: ['listItem'],
   data() {
     return {

+ 2 - 2
src/views/supply/engin/components/apply_form.vue → src/views/supply/engin/components/commerce_form.vue

@@ -88,8 +88,8 @@
 import { getDetail } from "@/api/supply/reserve";
 
 export default {
-  name: 'EnginForm',
-  componentName: 'EnginForm',
+  name: 'CommerceForm',
+  componentName: 'CommerceForm',
   props: ['listItem'],
   data() {
     return {

+ 2 - 2
src/views/supply/engin/components/apply_return.vue → src/views/supply/engin/components/commerce_return.vue

@@ -121,8 +121,8 @@
 import { getDetail } from "@/api/supply/reserve";
 
 export default {
-  name: 'EnginReturn',
-  componentName: 'EnginReturn',
+  name: 'CommerceReturn',
+  componentName: 'CommerceReturn',
   props: ['listItem'],
   data() {
     return {

+ 115 - 222
src/views/supply/engin/components/engin_detail.vue

@@ -2,130 +2,104 @@
   <div class="detail-container">
     <el-page-header @back="goBack" content="详情"></el-page-header>
 
-    <div id="printData">
-      <div class="main-title">
-        <div class="title">工程订单</div>
-      </div>
+    <div class="main-title">
+      <div class="title">工程信息单</div>
+    </div>
 
-      <div class="diy-table-1">
-        <el-row>
-          <el-col :span="8" class="item">
-            <div class="label">订单号</div>
-            <div class="value">{{detailData.billNo}}</div>
-          </el-col>
-          <el-col :span="8" class="item">
-            <div class="label">订单日期</div>
-            <div class="value">{{detailData.fdate}}</div>
-          </el-col>
-          <el-col :span="8" class="item">
-            <div class="label">单据状态</div>
-            <div class="value">{{detailData.srcStockId}}</div>
-          </el-col>
-          <el-col :span="8" class="item">
-            <div class="label">工程登录单号</div>
-            <div class="value">{{detailData.destStockId}}</div>
-          </el-col>
-          <el-col :span="8" class="item">
-            <div class="label">项目名称</div>
-            <div class="value">{{detailData.approveDate}}</div>
-          </el-col>
-          <el-col :span="8" class="item">
-            <div class="label">单据类型</div>
-            <div class="value">{{detailData.approverId}}</div>
-          </el-col>
-          <el-col :span="8" class="item">
-            <div class="label">经销商编码</div>
-            <div class="value">{{detailData.approverId}}</div>
-          </el-col>
-          <el-col :span="8" class="item">
-            <div class="label">使用单位</div>
-            <div class="value">{{detailData.approverId}}</div>
-          </el-col>
-          <el-col :span="8" class="item">
-            <div class="label">安装地址</div>
-            <div class="value">{{detailData.approverId}}</div>
-          </el-col>
-          <el-col :span="8" class="item">
-            <div class="label">工程编号</div>
-            <div class="value">{{detailData.approverId}}</div>
-          </el-col>
-          <el-col :span="8" class="item">
-            <div class="label">厂工厂编码</div>
-            <div class="value">{{detailData.approverId}}</div>
-          </el-col>
-          <el-col :span="8" class="item">
-            <div class="label">工程登录类型</div>
-            <div class="value">{{detailData.approverId}}</div>
-          </el-col>
-          <el-col :span="8" class="item">
-            <div class="label">文件编号</div>
-            <div class="value">{{detailData.approverId}}</div>
-          </el-col>
-          <el-col :span="8" class="item">
-            <div class="label">制单人</div>
-            <div class="value">{{detailData.approverId}}</div>
-          </el-col>
-          <el-col :span="8" class="item">
-            <div class="label">制单日期</div>
-            <div class="value">{{detailData.approverId}}</div>
-          </el-col>
-          <el-col :span="24" class="item">
-            <div class="label">格力回复</div>
-            <div class="value">{{detailData.approverId}}</div>
-          </el-col>
-          <el-col :span="24" class="item">
-            <div class="label">格力内部备注</div>
-            <div class="value">{{detailData.approverId}}</div>
-          </el-col>
-          <el-col :span="6" class="item">
-            <div class="label">审核人</div>
-            <div class="value">{{detailData.approverId}}</div>
-          </el-col>
-          <el-col :span="6" class="item">
-            <div class="label">审核日期</div>
-            <div class="value">{{detailData.approverId}}</div>
-          </el-col>
-          <el-col :span="6" class="item">
-            <div class="label">关闭人</div>
-            <div class="value">{{detailData.approverId}}</div>
-          </el-col>
-          <el-col :span="6" class="item">
-            <div class="label">关闭日期</div>
-            <div class="value">{{detailData.approverId}}</div>
-          </el-col>
-          <el-col :span="24" class="item">
-            <div class="label">备注</div>
-            <div class="value">{{detailData.approverId}}</div>
-          </el-col>
-        </el-row>
-      </div>
+    <div class="diy-table-1">
+      <el-row>
+        <el-col :span="8" class="item">
+          <div class="label">工程订单号</div>
+          <div class="value">{{detailData.enginInfoNo}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">订单日期</div>
+          <div class="value">{{detailData.orderDate}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">单据状态</div>
+          <div class="value">{{detailData.examineStatus | statusFilter}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">经销商编码</div>
+          <div class="value">{{detailData.customerId}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">项目名称</div>
+          <div class="value">{{detailData.projectName}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">单据类型</div>
+          <div class="value">{{detailData.orderType}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">经销商名称</div>
+          <div class="value">{{detailData.customerName}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">使用单位</div>
+          <div class="value">{{detailData.useUnit}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">安装地址</div>
+          <div class="value">{{detailData.installAddress}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">工程编号</div>
+          <div class="value">{{detailData.projectNo}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">厂工程编码</div>
+          <div class="value">{{detailData.enginFactoryNo}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">工程登录类型</div>
+          <div class="value">{{detailData.enginSignType}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">制单人</div>
+          <div class="value">{{detailData.createName}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">制单日期</div>
+          <div class="value">{{detailData.createTime}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">合同有效期</div>
+          <div class="value">{{detailData.contractExpireDate}}</div>
+        </el-col>
+        <el-col :span="16" class="item">
+          <div class="label">备注</div>
+          <div class="value">{{detailData.remark}}</div>
+        </el-col>
+        <el-col :span="8" class="item">
+          <div class="label">业务员</div>
+          <div class="value">{{detailData.serviceId}}</div>
+        </el-col>
+      </el-row>
+    </div>
 
-      <div class="main-title">
-        <div class="title">货品信息</div>
-      </div>
+    <div class="main-title">
+      <div class="title">货品信息</div>
+    </div>
 
-      <div class="table" style="margin-top: 20px">
-        <el-table :data="detailData.kingDeeTransferItems" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
-          <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
-          <el-table-column align="center" label="引用记录" prop="materialNumber" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="销售类型" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="产品编码" prop="model" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="产品名称" prop="baseUnitId" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="规格型号" prop="qty" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="单位" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="总数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="是否使用返利" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="返利使用比例" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="是否直调" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="直调数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="已发货数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="单价" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="金额" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="返利" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="备注" prop="qty" min-width="160" show-overflow-tooltip></el-table-column>
-        </el-table>
-      </div>
+    <div class="table" style="margin-top: 20px">
+      <el-table :data="detailData.items" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
+        <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
+        <el-table-column align="center" label="销售类型" prop="saleTypeName" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="产品编码" prop="materialNumber" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="产品名称" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="规格型号" prop="specification" min-width="160" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单位" prop="baseUnitId" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="单价" prop="price" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="订单金额" prop="totalAmount" min-width="100" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="备注" prop="remark" min-width="200" show-overflow-tooltip></el-table-column>
+        <el-table-column align="center" label="税率" prop="taxRate" min-width="100" show-overflow-tooltip></el-table-column>
+      </el-table>
+    </div>
 
+    <div v-if="isExamine">
       <div class="main-title">
         <div class="title">审批记录</div>
       </div>
@@ -133,121 +107,52 @@
         <el-row :gutter="0">
           <el-col :span="12" class="item">
             <div class="label">审批人</div>
-            <div class="value">2022123233435342</div>
+            <div class="value">{{detailData.confirmName}}</div>
           </el-col>
           <el-col :span="12" class="item">
             <div class="label">审批结果</div>
-            <div class="value">2022123233435342</div>
+            <div class="value">{{detailData.examineStatus | statusFilter}}</div>
           </el-col>
           <el-col :span="24" class="item">
             <div class="label">审批说明</div>
-            <div class="value">2022123233435342</div>
+            <div class="value">{{detailData.examineNote}}</div>
           </el-col>
         </el-row>
       </div>
-      
     </div>
     
     <div class="page-footer">
       <div class="footer" :class="classObj">
-        <el-button  type="primary" @click="openDeliverDialog">直调发货</el-button>
-        <el-popconfirm title="确定关闭吗?" @onConfirm="goBack" style="margin-left: 10px;">
-          <el-button slot="reference">关 闭</el-button>
-        </el-popconfirm>
+        <el-button @click="goBack">关 闭</el-button>
       </div>
     </div>
 
-    <el-dialog
-      title="直调发货"
-      :visible.sync="isShowDeliverDialog"
-      width="80%">
-      <el-form ref="deliverForm" :model="deliverForm" label-width="70px" size="small" label-position="left">
-        <el-row :gutter="20">
-          <el-col :xs="24" :sm="8" :lg="8">
-            <el-form-item label="工程订单" prop="orderNum">
-              <el-input v-model="deliverForm.orderNum" placeholder="请输入工程订单"></el-input>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="8" :lg="8" style="height: 51px;">
-            <el-form-item label="发货日期" prop="date">
-              <el-date-picker
-                v-model="deliverForm.date"
-                type="date"
-                value-format="yyyy-MM-dd"
-                style="width: 100%;"
-                placeholder="选择日期">
-              </el-date-picker>
-            </el-form-item>
-          </el-col>
-          <el-col :xs="24" :sm="8" :lg="8">
-            <el-form-item label="发货仓库" prop="warehouse">
-              <el-select v-model="deliverForm.warehouse" placeholder="请选择发货仓库">
-                <el-option
-                  v-for="item in warehouseList"
-                  :key="item.value"
-                  :label="item.label"
-                  :value="item.value">
-                </el-option>
-              </el-select>
-            </el-form-item>
-          </el-col>
-        </el-row>
-      </el-form>
-
-      <div class="table" style="margin-top: 20px">
-        <el-table :data="detailData.kingDeeTransferItems" element-loading-text="Loading" border fit highlight-current-row stripe max-height="400">
-          <el-table-column align="center" label="序号" type="index" width="50"></el-table-column>
-          <el-table-column align="center" label="引用记录" prop="materialNumber" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="销售类型" prop="materialName" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="产品编码" prop="model" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="产品名称" prop="baseUnitId" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="规格型号" prop="qty" min-width="160" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="单位" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="总数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="是否使用返利" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="返利使用比例" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="是否直调" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="直调数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="已发货数量" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="单价" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="金额" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="返利" prop="qty" min-width="100" show-overflow-tooltip></el-table-column>
-          <el-table-column align="center" label="备注" prop="qty" min-width="160" show-overflow-tooltip></el-table-column>
-        </el-table>
-      </div>
-      <span slot="footer" class="dialog-footer">
-        <el-button @click="closeDeliverDialog">取 消</el-button>
-        <el-button type="primary" @click="submitDeliverForm">确 定</el-button>
-      </span>
-    </el-dialog>
-
   </div>
 </template>
 
 <script>
-import print from 'vue-print-nb'
-import { getDetail } from "@/api/supply/reserve";
+import { getEnginDetail } from "@/api/supply/engin";
 
 export default {
   name: 'EnginDetail',
   componentName: 'EnginDetail',
   props: ['listItem'],
-  directives: {
-    print
+  filters: {
+    statusFilter(val) {
+      const statusList = [
+        { label: '已保存', value: 'SAVE' },
+        { label: '待审核', value: 'WAIT' },
+        { label: '审核通过', value: 'OK' },
+        { label: '审核驳回', value: 'FAIL' },
+        { label: '已关闭', value: 'CLOSE' },
+      ];
+      let obj = statusList.find(o => o.value == val);
+      return obj ? obj.label : ''
+    }
   },
   data() {
     return {
-      printObj: {
-        id: 'printData'
-      },
       detailData: {},
-
-      isShowDeliverDialog: false,
-      deliverForm: {
-        orderNum: '',
-        date: '',
-      },
-      warehouseList: [],
     }
   },
 
@@ -261,6 +166,9 @@ export default {
         openSidebar: this.sidebar.opened
       }
     },
+    isExamine() {
+      return this.detailData.examineStatus === 'OK' || this.detailData.examineStatus === 'FAIL'
+    },
   },
 
   created() {
@@ -275,26 +183,11 @@ export default {
 
     // 获取详情
     getDetail() {
-      getDetail({id: this.listItem.id}).then(res => {
+      getEnginDetail({id: this.listItem.enginInfoId}).then(res => {
         this.detailData = res.data;
       })
     },
 
-    // 打开 直调发货
-    openDeliverDialog() {
-      this.isShowDeliverDialog = true;
-    },
-
-    // 关闭 直调发货
-    closeDeliverDialog() {
-      this.isShowDeliverDialog = false;
-    },
-
-    // 提交 直调发货
-    submitDeliverForm() {
-
-    },
-
   }
 }
 </script>

Bu fark içinde çok fazla dosya değişikliği olduğu için bazı dosyalar gösterilmiyor