Эх сурвалжийг харах

Merge branch 'dev' into 'master'

Dev

See merge request new-business/drp-web!38
黄梓星 2 жил өмнө
parent
commit
be95f946f1
100 өөрчлөгдсөн 17146 нэмэгдсэн , 3275 устгасан
  1. 1 0
      .gitignore
  2. 14 0
      src/api/business/purchase/priceDeclaration.js
  3. 17 0
      src/api/business/purchase/purchase-contract.js
  4. 10 0
      src/api/business/purchase/purchase-task.js
  5. 2 2
      src/api/business/spd/bo/accessory.js
  6. 17 5
      src/api/business/spd/bo/basic.js
  7. 9 0
      src/api/business/spd/bo/boJob.js
  8. 9 0
      src/api/business/spd/bo/boNode.js
  9. 52 0
      src/api/business/spd/bo/filetemplate.js
  10. 9 0
      src/api/business/spd/bo/flow.js
  11. 10 0
      src/api/business/spd/bo/statement.js
  12. 16 0
      src/api/canteen/basic.js
  13. 49 0
      src/api/marketing/dealer-authorization.js
  14. 21 0
      src/api/material/basic.js
  15. 54 0
      src/api/purchase/DemandSummary.js
  16. 48 0
      src/api/purchase/basic.js
  17. 40 0
      src/api/purchase/deliveryAddress.js
  18. 57 0
      src/api/purchase/purchaseDemand.js
  19. 48 0
      src/api/purchase/transferOrder.js
  20. BIN
      src/assets/images/background.png
  21. 123 0
      src/components/MyCollapse/collapse.vue
  22. 30 99
      src/components/PopDialog/index.vue
  23. 43 48
      src/components/PopDialog/innerPackingUnit.vue
  24. 2 0
      src/utils/data-transform.js
  25. 39 0
      src/utils/init-something.js
  26. 141 224
      src/views/business/spd/bo/authority/index.vue
  27. 221 0
      src/views/business/spd/bo/basic/accessoryList.vue
  28. 29 981
      src/views/business/spd/bo/basic/details.vue
  29. 152 0
      src/views/business/spd/bo/basic/filemanager copy.vue
  30. 124 0
      src/views/business/spd/bo/basic/filemanager.vue
  31. 337 172
      src/views/business/spd/bo/basic/index.vue
  32. 1660 0
      src/views/business/spd/bo/basic/process.vue
  33. 0 231
      src/views/business/spd/bo/behavior/AA copy.vue
  34. 0 230
      src/views/business/spd/bo/behavior/AA.vue
  35. 17 63
      src/views/business/spd/bo/behavior/behaviorList.vue
  36. 10 61
      src/views/business/spd/bo/contact/contactList.vue
  37. 97 0
      src/views/business/spd/bo/filetemplate/botabs.vue
  38. 252 0
      src/views/business/spd/bo/filetemplate/index.vue
  39. 36 20
      src/views/business/spd/bo/pojpsn/pojpsnList.vue
  40. 0 2
      src/views/business/spd/bo/refer/contact/index.vue
  41. 0 2
      src/views/business/spd/bo/refer/customer/index.vue
  42. 0 2
      src/views/business/spd/bo/refer/dept/index.vue
  43. 0 2
      src/views/business/spd/bo/refer/org/index.vue
  44. 0 2
      src/views/business/spd/bo/refer/saleaea/index.vue
  45. 0 2
      src/views/business/spd/bo/refer/staff/index.vue
  46. 643 0
      src/views/business/spd/bo/statement/index.vue
  47. 11 14
      src/views/business/spd/bo/task/taskList.vue
  48. 50 3
      src/views/canteen/addFood.vue
  49. 55 3
      src/views/canteen/addMenu.vue
  50. 98 59
      src/views/canteen/foodScreen.vue
  51. 102 65
      src/views/canteen/menuScreen.vue
  52. 17 0
      src/views/common-dialog/api/index.js
  53. 214 0
      src/views/common-dialog/currency.vue
  54. 198 0
      src/views/common-dialog/department.vue
  55. 20 0
      src/views/common-dialog/index.js
  56. 204 0
      src/views/common-dialog/organization.vue
  57. 203 0
      src/views/common-dialog/payment-plan.vue
  58. 198 0
      src/views/common-dialog/supplier.vue
  59. 198 0
      src/views/common-dialog/tax.vue
  60. 226 0
      src/views/common-dialog/user.vue
  61. 3 0
      src/views/common-dialog/utils/init-something.js
  62. 169 0
      src/views/marketing/dealer-authorization/authprivAdd.vue
  63. 88 0
      src/views/marketing/dealer-authorization/authprivSee.vue
  64. 302 0
      src/views/marketing/dealer-authorization/index.vue
  65. 211 120
      src/views/material/basicFile/details.vue
  66. 73 34
      src/views/material/basicFile/index.vue
  67. 79 167
      src/views/material/changeApply/add.vue
  68. 1 1
      src/views/material/config/detailsTabs.js
  69. 5 2
      src/views/material/label/label-auto-bind-dialog.vue
  70. 8 6
      src/views/material/label/label-bind-dialog.vue
  71. 5 2
      src/views/material/label/label-hand-bind-dialog.vue
  72. 436 651
      src/views/material/requisition/add.vue
  73. 161 0
      src/views/purchase/DemandSummary/add.vue
  74. 544 0
      src/views/purchase/DemandSummary/index.vue
  75. 481 0
      src/views/purchase/MaterialClassDivision/add.vue
  76. 397 0
      src/views/purchase/MaterialClassDivision/index.vue
  77. 773 0
      src/views/purchase/PurchaseDemandList/add.vue
  78. 405 0
      src/views/purchase/PurchaseDemandList/index.vue
  79. 170 0
      src/views/purchase/PurchaseDemandList/refers.vue
  80. 98 0
      src/views/purchase/PurchaseDemandList/reserved.vue
  81. 246 0
      src/views/purchase/deliveryAddress/add.vue
  82. 358 0
      src/views/purchase/deliveryAddress/index.vue
  83. 211 0
      src/views/purchase/priceDeclaration/add-price-declaration.vue
  84. 373 0
      src/views/purchase/priceDeclaration/index.vue
  85. 208 0
      src/views/purchase/priceDeclaration/see-price-declaration.vue
  86. 257 0
      src/views/purchase/purchase-content/add-purchase-task.vue
  87. 386 0
      src/views/purchase/purchase-content/direct-sourcing.vue
  88. 404 0
      src/views/purchase/purchase-content/index.vue
  89. 158 0
      src/views/purchase/purchase-content/see-purchase-task.vue
  90. 314 0
      src/views/purchase/purchase-contract/add-purchase-contract.vue
  91. 401 0
      src/views/purchase/purchase-contract/config/add.js
  92. 386 0
      src/views/purchase/purchase-contract/direct-sourcing.vue
  93. 264 0
      src/views/purchase/purchase-contract/index.vue
  94. 404 0
      src/views/purchase/purchase-contract/see-purchase-contract.vue
  95. 249 0
      src/views/purchase/purchase-task/add-purchase-task.vue
  96. 105 0
      src/views/purchase/purchase-task/config/add.js
  97. 386 0
      src/views/purchase/purchase-task/direct-sourcing.vue
  98. 598 0
      src/views/purchase/purchase-task/index.vue
  99. 158 0
      src/views/purchase/purchase-task/see-purchase-task.vue
  100. 638 0
      src/views/purchase/transferOrder/add.vue

+ 1 - 0
.gitignore

@@ -21,3 +21,4 @@ selenium-debug.log
 
 package-lock.json
 yarn.lock
+vue.config.js

+ 14 - 0
src/api/business/purchase/priceDeclaration.js

@@ -0,0 +1,14 @@
+import request from '@/utils/request'
+
+// 采购需求单列表
+const getPriceApplyList = (data) => {
+  return request({
+    url: `/pu/priceApply/list?pageSize=${data.pageSize}&pageNum=${data.pageNum}`,
+    method: 'post',
+    data: data
+  })
+}
+
+export default {
+  getPriceApplyList,
+}

+ 17 - 0
src/api/business/purchase/purchase-contract.js

@@ -0,0 +1,17 @@
+import request from "@/utils/request";
+
+export function list(params) {
+  return request({
+    url: "/pu/contract/list",
+    method: "get",
+    params: params,
+  });
+}
+
+export function add(data) {
+  return request({
+    url: "/pu/contract/add",
+    method: "post",
+    data: data,
+  });
+}

+ 10 - 0
src/api/business/purchase/purchase-task.js

@@ -0,0 +1,10 @@
+import request from "@/utils/request";
+
+// 查询任务列表
+export function taskList(data) {
+  return request({
+    url: "/pu/order/generate/list",
+    method: "POST",
+    data: data,
+  });
+}

+ 2 - 2
src/api/business/spd/bo/accessory.js

@@ -19,9 +19,9 @@ export function addAccessory(data) {
 }
 
 // 删除附件
-export function delAccessory(accessoryId) {
+export function delAccessory(id) {
   return request({
-    url: '/mk/bo/accessory/' + accessoryId,
+    url: '/mk/bo/accessory/' + id,
     method: 'delete'
   })
 }

+ 17 - 5
src/api/business/spd/bo/basic.js

@@ -59,18 +59,30 @@ export function delBasic(id) {
   })
 }
 
+//新增商机附件
+export function insertAccessory(data) {
+  return request({
+    url: '/mk/bo/basic/upload',
+    method: 'post',
+    data: data,
+    headers: {
+      'Content-Type': 'multipart/form-data'
+    }
+  })
+}
+
 // 删除商机附件
-export function delAccessory(boId,f,id) {
+export function delAccessory(boId,f,boType,fileId) {
   return request({
-    url: '/mk/bo/basic/accessory?boId=' + boId + '&flag=' + f + '&id=' + id,
+    url: '/mk/bo/basic/accessory?boId=' + boId + '&flag=' + f + '&id=1&boType=' + boType + '&fileId=' + fileId,
     method: 'delete'
   })
 }
 
 //流程下一步
-export function nextFlow(boId,boStage) {
+export function changeNextStage(boId) {
   return request({
-    url: '/mk/bo/basic/flow?boId=' + boId + '&boStage=' + boStage,
+    url: '/mk/bo/basic/BoStage?boId=' + boId,
     method: 'put'
   })
 }
@@ -90,4 +102,4 @@ export function updateWinningState(data) {
     method: 'put',
     data: data
   })
-}
+}

+ 9 - 0
src/api/business/spd/bo/boJob.js

@@ -0,0 +1,9 @@
+import request from '@/utils/request'
+
+// 查询节点
+export function getBoJobListByType(boType) {
+  return request({
+    url: '/mk/bo/job/list/' + boType,
+    method: 'get'
+  })
+}

+ 9 - 0
src/api/business/spd/bo/boNode.js

@@ -0,0 +1,9 @@
+import request from '@/utils/request'
+
+// 查询节点
+export function getBoNodeListByType(boType) {
+  return request({
+    url: '/mk/bo/node/type/' + boType,
+    method: 'get'
+  })
+}

+ 52 - 0
src/api/business/spd/bo/filetemplate.js

@@ -0,0 +1,52 @@
+import request from '@/utils/request'
+
+// 根据商机类型查询文件模板列表
+export function listFiletemplateByBotype(botype) {
+  return request({
+    url: '/mk/bo/filetemplate/botype' + botype,
+    method: 'get',
+  })
+}
+
+// 查询文件模板列表
+export function listFiletemplate(query) {
+  return request({
+    url: '/mk/bo/filetemplate/list',
+    method: 'get',
+    params: query
+  })
+}
+
+// 查询文件模板详细
+export function getFiletemplate(id) {
+  return request({
+    url: '/mk/bo/filetemplate/' + id,
+    method: 'get'
+  })
+}
+
+// 新增文件模板
+export function addFiletemplate(data) {
+  return request({
+    url: '/mk/bo/filetemplate',
+    method: 'post',
+    data: data
+  })
+}
+
+// 修改文件模板
+export function updateFiletemplate(data) {
+  return request({
+    url: '/mk/bo/filetemplate',
+    method: 'put',
+    data: data
+  })
+}
+
+// 删除文件模板
+export function delFiletemplate(id) {
+  return request({
+    url: '/mk/bo/filetemplate/' + id,
+    method: 'delete'
+  })
+}

+ 9 - 0
src/api/business/spd/bo/flow.js

@@ -0,0 +1,9 @@
+import request from '@/utils/request'
+
+// 查询商机基础信息详细
+export function getFlowNode(type) {
+  return request({
+    url: '/mk/bo/flow/node/' + type,
+    method: 'get'
+  })
+}

+ 10 - 0
src/api/business/spd/bo/statement.js

@@ -0,0 +1,10 @@
+import request from '@/utils/request'
+
+// 查询商机基础信息列表
+export function listBasic(query) {
+  return request({
+    url: '/mk/bo/statement/list',
+    method: 'get',
+    params: query
+  })
+}

+ 16 - 0
src/api/canteen/basic.js

@@ -8,6 +8,14 @@ export function addMenu(data) {
     data: data
   })
 }
+// 餐厅菜单删除
+export function delMenu(ids) {
+  return request({
+    url: `/dh/menu/del/${ids}`,
+    method: 'DELETE',
+    // data: data
+  })
+}
 // 餐厅菜单列表
 export function menuList(params) {
   return request({
@@ -32,3 +40,11 @@ export function foodList(params) {
     params: params
   })
 }
+// 餐厅食材删除(明细删除)
+export function delFood(ids) {
+  return request({
+    url: `/dh/recorditem/${ids}`,
+    method: 'DELETE',
+    // data: data
+  })
+}

+ 49 - 0
src/api/marketing/dealer-authorization.js

@@ -0,0 +1,49 @@
+/* 经销商授权信息管理 */
+
+import request from '@/utils/request';
+
+
+// 经销商授权信息列表
+const dealerList = (params, page) => {
+
+  return request({
+    url: `dealer/list?pageSize=${page.pageSize}&pageNum=${page.pageNum}`,
+    method: 'get',
+    params,
+  })
+}
+
+// 经销商授权信息新增接口
+const dealerInsert = (data) => {
+  return request({
+    url: `dealer/insert`,
+    method: 'post',
+    data,
+  })
+}
+
+// 经销商授权信息列表
+const dealerDelete = (params) => {
+
+  return request({
+    url: `dealer/delete?id=${params.id}`,
+    method: 'get',
+    params,
+  })
+}
+
+// 经销商授权信息新增接口
+const dealerUpdate = (data) => {
+  return request({
+    url: `dealer/update`,
+    method: 'post',
+    data,
+  })
+}
+
+export default {
+  dealerList,
+  dealerInsert,
+  dealerDelete,
+  dealerUpdate,
+}

+ 21 - 0
src/api/material/basic.js

@@ -415,6 +415,24 @@ const delPurchase = (data) => {
 }
 
 
+//  物料维护新版本 /system/material/versions
+const versions = (data) => {
+  return request({
+    url: `/system/material/versions`,
+    method: 'post',
+    data,
+  })
+}
+
+//  物料维护新版本保存 /system/material/versions/save
+const saveVersions = (data) => {
+  return request({
+    url: `/system/material/versions/save`,
+    method: 'post',
+    data,
+  })
+}
+
 export default {
   // 查询
   materialList,
@@ -465,4 +483,7 @@ export default {
   delPlan,
   delFinance,
   delPurchase,
+  // 维护新版本
+  versions,
+  saveVersions
 }

+ 54 - 0
src/api/purchase/DemandSummary.js

@@ -0,0 +1,54 @@
+import request from '@/utils/request'
+
+// 采购需求汇总列表
+export function getSummaryList(data) {
+  return request({
+    url: `/pu/demand/summary/list?pageSize=${data.pageSize}&pageNum=${data.pageNum}`,
+    method: 'post',
+    data: data
+  })
+}
+// 采购需求汇总明细
+export function getSummaryDetail(data) {
+  return request({
+    url: `/pu/demand/summary/detail`,
+    method: 'post',
+    data: data
+  })
+}
+// 采购需求汇总审核
+export function auditSummary(id) {
+  return request({
+    url: `/pu/demand/audit/${id}`,
+    method: 'get',
+  })
+}
+// 采购需求汇总确认
+export function confirmSummary(data) {
+  return request({
+    url: `/pu/demand/item/summary/confirm`,
+    method: 'post',
+    data: data
+  })
+}
+// 采购需求汇总取消
+export function cancelSummary(id) {
+  return request({
+    url: `/pu/demand/item/summary/cancel/${id}`,
+    method: 'get',
+  })
+}
+// 采购需求汇总弃审
+export function cancelAuditSummary(id) {
+  return request({
+    url: `/pu/demand/item/summary/cancel/audit/${id}`,
+    method: 'get',
+  })
+}
+// 采购需求汇总明细行关闭
+export function shutDownSummary(id) {
+  return request({
+    url: `/pu/demand/item/summary/shutDown/${id}`,
+    method: 'get',
+  })
+}

+ 48 - 0
src/api/purchase/basic.js

@@ -0,0 +1,48 @@
+import request from '@/utils/request'
+
+// 获取物料分工列表
+export function getDivisionList(data) {
+  return request({
+    url: `/material/division/list?pageSize=${data.pageSize}&pageNum=${data.pageNum}`,
+    method: 'post',
+    data: data
+  })
+}
+// 物料分工新增
+export function addDivision(data) {
+  return request({
+    url: `/material/division/add`,
+    method: 'post',
+    data: data
+  })
+}
+// 物料分工编辑保存
+export function editDivision(data) {
+  return request({
+    url: `/material/division/edit`,
+    method: 'put',
+    data: data
+  })
+}
+// 物料分工详情
+export function getDivisions(id) {
+  return request({
+    url: `/material/division/detail/${id}`,
+    method: 'get',
+  })
+}
+// 物料分工删除
+export function delDivision(ids) {
+  return request({
+    url: `/material/division/delete/${ids}`,
+    method: 'DELETE',
+  })
+}
+// 参照统一接口
+export function getRefer(data) {
+  return request({
+    url: `/refer/query?pageSize=${data.pageSize}&pageNum=${data.pageNo}`,
+    method: 'post',
+    data: data
+  })
+}

+ 40 - 0
src/api/purchase/deliveryAddress.js

@@ -0,0 +1,40 @@
+import request from '@/utils/request'
+
+// 获取收货地址档案列表
+export function getAddressList(data) {
+  return request({
+    url: `/pu/delivery/address/list?pageSize=${data.pageSize}&pageNum=${data.pageNum}`,
+    method: 'post',
+    data: data
+  })
+}
+// 收货地址档案新增
+export function addAddress(data) {
+  return request({
+    url: `/pu/delivery/address/add`,
+    method: 'post',
+    data: data
+  })
+}
+// 收货地址档案修改保存
+export function editAddress(data) {
+  return request({
+    url: `/pu/delivery/address/edit`,
+    method: 'put',
+    data: data
+  })
+}
+// 收货地址档案详情
+export function getAddressDetail(id) {
+  return request({
+    url: `/pu/delivery/address/detail/${id}`,
+    method: 'get',
+  })
+}
+// 收货地址档案删除
+export function delAddress(ids) {
+  return request({
+    url: `/pu/delivery/address/delete/${ids}`,
+    method: 'DELETE',
+  })
+}

+ 57 - 0
src/api/purchase/purchaseDemand.js

@@ -0,0 +1,57 @@
+import request from '@/utils/request'
+
+// 采购需求单列表
+export function getDemandList(data) {
+  return request({
+    url: `/pu/demand/list?pageSize=${data.pageSize}&pageNum=${data.pageNum}`,
+    method: 'post',
+    data: data
+  })
+}
+// 采购需求单新增
+export function addDemand(data) {
+  return request({
+    url: `/pu/demand/add`,
+    method: 'post',
+    data: data
+  })
+}
+// 采购需求单编辑
+export function editDemand(data) {
+  return request({
+    url: `/pu/demand/edit`,
+    method: 'put',
+    data: data
+  })
+}
+// 采购需求单基本信息详情
+export function getDemandDetail(id) {
+  return request({
+    url: `/pu/demand/detail/${id}`,
+    method: 'get',
+  })
+}
+// 采购需求单基本子表详情
+export function getDemandSonDetail(data) {
+  return request({
+    url: `/pu/demand/item/list/${data.id}?pageSize=${data.pageSize}&pageNum=${data.pageNum}`,
+    method: 'post',
+    data: data
+  })
+}
+// 采购需求单删除
+export function delDemand(ids) {
+  return request({
+    url: `/pu/demand/delete/${ids}`,
+    method: 'delete',
+  })
+}
+// 采购需求单模板下载
+export function downLoadDemand(data) {
+  return request({
+    url: `/pu/demand/download`,
+    method: 'post',
+    data: data,
+    responseType: 'blob'
+  })
+}

+ 48 - 0
src/api/purchase/transferOrder.js

@@ -0,0 +1,48 @@
+import request from '@/utils/request'
+
+// 调拨订单列表
+export function getOrderList(data) {
+  return request({
+    url: `/pu/allot/list?pageSize=${data.pageSize}&pageNum=${data.pageNum}`,
+    method: 'post',
+    data: data
+  })
+}
+// 调拨订单新增
+export function addOrder(data) {
+  return request({
+    url: `/pu/allot/add`,
+    method: 'post',
+    data: data
+  })
+}
+// 调拨订单编辑
+export function editOrder(data) {
+  return request({
+    url: `/pu/allot/edit`,
+    method: 'put',
+    data: data
+  })
+}
+// 调拨订单详情
+// 调拨订单详情
+export function getOrderDetail(id) {
+  return request({
+    url: `/pu/allot/detail/${id}`,
+    method: 'get',
+  })
+}
+// 调拨订单删除
+export function delOrder(ids) {
+  return request({
+    url: `/pu/allot/delete/${ids}`,
+    method: 'delete',
+  })
+}
+// 货权预留单详情
+export function getResevedDetail(id) {
+  return request({
+    url: `/pu/ownership/detail/${id}`,
+    method: 'get',
+  })
+}

BIN
src/assets/images/background.png


+ 123 - 0
src/components/MyCollapse/collapse.vue

@@ -0,0 +1,123 @@
+<template>
+  <transition
+    :name="transitionName"
+    @before-enter="collapseBeforeEnter"
+    @enter="collapseEnter"
+    @after-enter="collapseAfterEnter"
+    @before-leave="collapseBeforeLeave"
+    @leave="collapseLeave"
+    @after-leave="collapseAfterLeave">
+    <slot></slot>
+  </transition>
+</template>
+
+<script>
+/**
+ * 元素折叠过度效果
+ */
+export default {
+  name: 'CollapseTransition',
+  props: {
+    transitionName: {
+      type: String,
+      default: 'collapse-transition'
+    }
+  },
+  data () {
+    return {
+      oldPaddingTop: '',
+      oldPaddingBottom: '',
+      oldOverflow: ''
+    }
+  },
+  methods: {
+    collapseBeforeEnter (el) {
+      // console.log('11, collapseBeforeEnter');
+      this.oldPaddingBottom = el.style.paddingBottom;
+      this.oldPaddingTop = el.style.paddingTop;
+      // 过渡效果开始前设置元素的maxHeight为0,让元素maxHeight有一个初始值
+      el.style.paddingTop = '0';
+      el.style.paddingBottom = '0';
+      el.style.maxHeight = '0';
+    },
+    collapseEnter (el, done) {
+      // console.log('22, collapseEnter');
+      //
+      this.oldOverflow = el.style.overflow;
+      let elHeight = el.scrollHeight;
+      // 过渡效果进入后将元素的maxHeight设置为元素本身的高度,将元素maxHeight设置为auto不会有过渡效果
+      if (elHeight > 0) {
+        el.style.maxHeight = elHeight + 'px';
+      } else {
+        el.style.maxHeight = '0';
+      }
+      el.style.paddingTop = this.oldPaddingTop;
+      el.style.paddingBottom = this.oldPaddingBottom;
+
+      el.style.overflow = 'hidden';
+      // done();
+      let onTransitionDone = function () {
+        done();
+        // console.log('enter onTransitionDone');
+        el.removeEventListener('transitionend', onTransitionDone, false);
+        el.removeEventListener('transitioncancel', onTransitionDone, false);
+      };
+      // 绑定元素的transition完成事件,在transition完成后立即完成vue的过度动效
+      el.addEventListener('transitionend', onTransitionDone, false);
+      el.addEventListener('transitioncancel', onTransitionDone, false);
+    },
+    collapseAfterEnter (el) {
+      // console.log('33, collapseAfterEnter');
+      // 过渡效果完成后恢复元素的maxHeight
+      el.style.maxHeight = '';
+      el.style.overflow = this.oldOverflow;
+    },
+
+    collapseBeforeLeave (el) {
+      // console.log('44, collapseBeforeLeave', el.scrollHeight);
+
+      this.oldPaddingBottom = el.style.paddingBottom;
+      this.oldPaddingTop = el.style.paddingTop;
+      this.oldOverflow = el.style.overflow;
+
+      el.style.maxHeight = el.scrollHeight + 'px';
+      el.style.overflow = 'hidden';
+    },
+    collapseLeave (el, done) {
+      // console.log('55, collapseLeave', el.scrollHeight);
+
+      if (el.scrollHeight !== 0) {
+        el.style.maxHeight = '0';
+        el.style.paddingBottom = '0';
+        el.style.paddingTop = '0';
+      }
+      // done();
+      let onTransitionDone = function () {
+        done();
+        // console.log('leave onTransitionDone');
+        el.removeEventListener('transitionend', onTransitionDone, false);
+        el.removeEventListener('transitioncancel', onTransitionDone, false);
+      };
+      // 绑定元素的transition完成事件,在transition完成后立即完成vue的过度动效
+      el.addEventListener('transitionend', onTransitionDone, false);
+      el.addEventListener('transitioncancel', onTransitionDone, false);
+    },
+    collapseAfterLeave (el) {
+      // console.log('66, collapseAfterLeave');
+      el.style.maxHeight = '';
+      el.style.overflow = this.oldOverflow;
+      el.style.paddingBottom = this.oldPaddingBottom;
+      el.style.paddingTop = this.oldPaddingTop;
+
+      this.oldOverflow = this.oldPaddingBottom = this.oldPaddingTop = '';
+    }
+  }
+};
+</script>
+
+<style lang="scss">
+.collapse-transition-enter-active,
+.collapse-transition-leave-active{
+  transition: height .3s ease-in-out, padding .3s ease-in-out, max-height .3s ease-in-out;
+}
+</style>

+ 30 - 99
src/components/PopDialog/index.vue

@@ -1,123 +1,47 @@
 <template>
   <div>
-    <el-dialog
-      title="物料编码选择"
-      width="1000px"
-      :close-on-click-modal="false"
-      :append-to-body="true"
-      v-dialogDrag
-      class="userDialog"
-      :visible.sync="visible"
-    >
+    <el-dialog title="物料编码选择" width="1000px" :close-on-click-modal="false" :append-to-body="true" v-dialogDrag
+      class="userDialog" :visible.sync="visible">
       <el-container style="height: 500px">
         <el-container>
           <el-header style="text-align: left; font-size: 12px; height: 30px">
-            <el-form
-              size="small"
-              :inline="true"
-              ref="searchForm"
-              :model="searchForm"
-              @keyup.enter.native="refreshList()"
-              @submit.native.prevent
-            >
+            <el-form size="small" :inline="true" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()"
+              @submit.native.prevent>
               <el-form-item prop="code">
-                <el-input
-                  size="small"
-                  v-model="searchForm.code"
-                  placeholder="请输入物料编号查询"
-                  clearable
-                ></el-input>
+                <el-input size="small" v-model="searchForm.code" placeholder="请输入物料编号查询" clearable></el-input>
               </el-form-item>
               <el-form-item prop="name">
-                <el-input
-                  size="small"
-                  v-model="searchForm.name"
-                  placeholder="请输入物料名称查询"
-                  clearable
-                ></el-input>
+                <el-input size="small" v-model="searchForm.name" placeholder="请输入物料名称查询" clearable></el-input>
               </el-form-item>
               <el-form-item>
-                <el-button
-                  type="primary"
-                  @click="refreshList()"
-                  size="small"
-                  icon="el-icon-search"
-                  >查询</el-button
-                >
-                <el-button
-                  @click="resetSearch()"
-                  size="small"
-                  icon="el-icon-refresh-right"
-                >重置</el-button>
+                <el-button type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
+                <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
               </el-form-item>
             </el-form>
           </el-header>
           <el-main>
-            <el-table
-              :data="dataList"
-              v-loading="loading"
-              size="small"
-              border
-              ref="contractTable"
-              @row-click="rowSelect"
-              @select="handleSelectionChange"
-              height="calc(100% - 40px)"
-              style="width: 100%"
-            >
-              <el-table-column
-                type="selection"
-                header-align="center"
-                align="center"
-                width="50"
-              >
+            <el-table :data="dataList" v-loading="loading" size="small" border ref="contractTable" @row-click="rowSelect"
+              @select="handleSelectionChange" height="calc(100% - 40px)" style="width: 100%">
+              <el-table-column type="selection" header-align="center" align="center" width="50">
               </el-table-column>
-              <el-table-column
-                prop="code"
-                header-align="center"
-                align="center"
-                sortable="custom"
-                min-width="90"
-                label="物料编码"
-              >
+              <el-table-column prop="code" header-align="center" align="center" sortable="custom" min-width="90"
+                label="物料编码">
               </el-table-column>
-              <el-table-column
-                prop="name"
-                header-align="center"
-                align="center"
-                sortable="custom"
-                min-width="90"
-                label="物料名称"
-              >
+              <el-table-column prop="name" header-align="center" align="center" sortable="custom" min-width="90"
+                label="物料名称">
               </el-table-column>
             </el-table>
 
-            <el-pagination
-              @size-change="sizeChangeHandle"
-              @current-change="currentChangeHandle"
-              :current-page="searchForm.pageNo"
-              :page-sizes="[5, 10, 15, 20]"
-              :page-size="searchForm.pageSize"
-              :total="total"
-              layout="total, sizes, prev, pager, next, jumper"
-            >
+            <el-pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle"
+              :current-page="searchForm.pageNo" :page-sizes="[5, 10, 15, 20]" :page-size="searchForm.pageSize"
+              :total="total" layout="total, sizes, prev, pager, next, jumper">
             </el-pagination>
           </el-main>
         </el-container>
       </el-container>
       <span slot="footer" class="dialog-footer">
-        <el-button
-          size="small"
-          @click="visible = false"
-          icon="el-icon-circle-close"
-          >关闭</el-button
-        >
-        <el-button
-          size="small"
-          type="primary"
-          icon="el-icon-circle-check"
-          @click="doSubmit()"
-          >确定</el-button
-        >
+        <el-button size="small" @click="visible = false" icon="el-icon-circle-close">关闭</el-button>
+        <el-button size="small" type="primary" icon="el-icon-circle-check" @click="doSubmit()">确定</el-button>
       </span>
     </el-dialog>
   </div>
@@ -177,8 +101,13 @@ export default {
       //     // orders: this.orders,
       //     // ...this.searchForm,
       //   },
-      getMaterialList(this.searchForm).then(({ data }) => {
-        console.log('data',data)
+      let params = {
+        ...this.searchForm,
+        // 默认查询已启用
+        isEnable: '0'
+      }
+      getMaterialList(params).then(({ data }) => {
+        console.log('data', data)
         this.dataList = data.tableBody.rows;
         this.total = data.tableBody.total;
         this.loading = false;
@@ -234,7 +163,7 @@ export default {
     },
     doSubmit() {
       this.visible = false;
-      console.log('选择的数据?',this.dataListAllSelections)
+      console.log('选择的数据?', this.dataListAllSelections)
       this.$emit("doSubmit", this.dataListAllSelections);
     },
   },
@@ -248,8 +177,10 @@ export default {
     font-size: 14px;
     word-break: break-all;
   }
+
   .el-main {
     padding: 20px 20px 5px 20px;
+
     .el-pagination {
       margin-top: 5px;
     }

+ 43 - 48
src/views/business/spd/bo/refer/dept/index copy.vue → src/components/PopDialog/innerPackingUnit.vue

@@ -1,7 +1,7 @@
 <template>
   <div>
     <el-dialog
-      title="部门选择"
+      title="中包装单位选择"
       width="1000px"
       :close-on-click-modal="false"
       :append-to-body="true"
@@ -17,29 +17,21 @@
               :inline="true"
               ref="searchForm"
               :model="searchForm"
-              @keyup.enter.native="getList()"
+              @keyup.enter.native="refreshList()"
               @submit.native.prevent
             >
-              <el-form-item prop="code">
+            <el-form-item prop="param" label="名称/编号" >
                 <el-input
                   size="small"
-                  v-model="queryParams.deptId"
-                  placeholder="部门编码"
-                  clearable
-                ></el-input>
-              </el-form-item>
-              <el-form-item prop="name">
-                <el-input
-                  size="small"
-                  v-model="queryParams.deptName"
-                  placeholder="部门名称"
+                  v-model="searchForm.param"
+                  placeholder="输入名称/编号查询"
                   clearable
                 ></el-input>
               </el-form-item>
               <el-form-item>
                 <el-button
                   type="primary"
-                  @click="getList()"
+                  @click="refreshList()"
                   size="small"
                   icon="el-icon-search"
                   >查询</el-button
@@ -60,6 +52,7 @@
               border
               ref="contractTable"
               @select="handleSelectionChange"
+              @row-click="rowSelect"
               height="calc(100% - 40px)"
               style="width: 100%"
             >
@@ -71,30 +64,30 @@
               >
               </el-table-column>
               <el-table-column
-                prop="deptId"
+                prop="code"
                 header-align="center"
-                align="left"
+                align="center"
                 sortable="custom"
                 min-width="90"
-                label="部门编码"
+                label="code"
               >
               </el-table-column>
               <el-table-column
-                prop="deptName"
+                prop="name"
                 header-align="center"
-                align="left"
+                align="center"
                 sortable="custom"
                 min-width="90"
-                label="部门名称"
+                label="名称"
               >
               </el-table-column>
             </el-table>
             <el-pagination
               @size-change="sizeChangeHandle"
               @current-change="currentChangeHandle"
-              :current-page="queryParams.pageNum"
+              :current-page="searchForm.pageNo"
               :page-sizes="[5, 10, 15, 20]"
-              :page-size="queryParams.pageSize"
+              :page-size="searchForm.pageSize"
               :total="total"
               layout="total, sizes, prev, pager, next, jumper"
             >
@@ -122,26 +115,18 @@
 </template>
 
 <script>
-import { queryDeptList } from "@/api/system/dept";
+import { getUnit } from '@/api/requisition/basic'
 export default {
   data() {
     return {
-      // 查询参数
-      queryParams: {
-        pageNum: 1,
-        pageSize: 10,
-        deptId: undefined,
-        deptName: undefined,
-      },
       searchForm: {
-        code: '',
-        name: ''
+        param: '',
+        pageNo: 1,
+        pageSize: 10,
       },
       dataListAllSelections: [], // 所有选中的数据包含跨页数据
       idKey: "id", // 标识列表数据中每一行的唯一键的名称(需要按自己的数据改一下)
       dataList: [],
-      pageNo: 1,
-      pageSize: 10,
       total: 0,
       orders: [],
       loading: false,
@@ -170,33 +155,43 @@ export default {
       });
     },
     // 获取数据列表
-    getList() {
+    refreshList() {
       this.loading = true;
-      queryDeptList(this.addDateRange(this.queryParams)).then(response => {
-          this.dataList = response.data;
-          this.total = response.total;
-          this.loading = false;
-        }
-      );
+      getUnit(this.searchForm).then(({ data }) => {
+        console.log('data',data)
+        this.dataList = data.tableBody;
+        this.total = data.total;
+        this.loading = false;
+        this.$nextTick(() => {
+          this.setSelectRow();
+        });
+      });
     },
     // 每页数
     sizeChangeHandle(val) {
-      this.queryParams.pageSize = val;
-      this.queryParams.pageNum = 1;
-      this.getList();
+      this.searchForm.pageSize = val;
+      this.refreshList();
     },
     // 当前页
     currentChangeHandle(val) {
-      this.queryParams.pageNum = val;
-      this.getList();
+      this.searchForm.pageNo = val;
+      this.refreshList();
     },
     // 排序
     resetSearch() {
-      this.$refs.searchForm.resetFields();
-      this.getList();
+      this.$refs['searchForm'].resetFields();
+      this.searchForm.pageNo = 1;
+      this.refreshList();
+    },
+    // 表格选中数据
+    rowSelect(row, column, event) {
+      this.$refs.contractTable.clearSelection();
+      this.$refs.contractTable.toggleRowSelection(row);
+      this.dataListAllSelections = this.single ? [row] : selection
     },
     // 选中数据
     handleSelectionChange(selection, row) {
+      console.log('selection11', selection)
       if (this.single && selection.length > 1) {
         this.$refs.contractTable.clearSelection();
         this.$refs.contractTable.toggleRowSelection(row);

+ 2 - 0
src/utils/data-transform.js

@@ -0,0 +1,2 @@
+export const arr2obj = (data, keyName, valueName) =>
+  Object.fromEntries(data.map((item) => [item[keyName], item[valueName]]));

+ 39 - 0
src/utils/init-something.js

@@ -0,0 +1,39 @@
+import { arr2obj } from "./data-transform";
+import Components from "@/views/common-dialog";
+
+export const initParams = (arr) => arr2obj(arr, "key", "value");
+
+export const initDicts = (arr) =>
+  arr
+    .filter((column) => column.type === "Select")
+    .map((column) => column.config.optionsName);
+
+export const initRules = (arr) => {
+  const rules = {};
+  arr
+    .filter((column) => column.require)
+    .forEach((column) => {
+      const message = `${column.title}不能为空`;
+      rules[column.key] = [
+        { required: true, message: message, trigger: "change" },
+      ];
+    });
+  return rules;
+};
+
+export const initComponents = (arr) => {
+  const c = {};
+  try {
+    arr
+      .filter((element) => element.type === "InputDialog")
+      .map((element) => element.config.componentName)
+      .forEach((element) => {
+        c[element] = Components[element];
+      });
+
+    return c;
+  } catch (err) {
+    return c;
+  } finally {
+  }
+};

+ 141 - 224
src/views/business/spd/bo/authority/index.vue

@@ -1,222 +1,115 @@
 <template>
   <div class="app-container">
-    <!-- <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
-      <el-form-item label="项目岗位" prop="post">
-        <el-input
-          v-model="queryParams.post"
-          placeholder="请输入项目岗位"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="商机-下一步" prop="boNext">
-        <el-input
-          v-model="queryParams.boNext"
-          placeholder="请输入商机-下一步"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="商机-修改" prop="boEdit">
-        <el-input
-          v-model="queryParams.boEdit"
-          placeholder="请输入商机-修改"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="商机-关闭" prop="boClose">
-        <el-input
-          v-model="queryParams.boClose"
-          placeholder="请输入商机-关闭"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="商机-赢单" prop="boWin">
-        <el-input
-          v-model="queryParams.boWin"
-          placeholder="请输入商机-赢单"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="商机-丢单" prop="boLose">
-        <el-input
-          v-model="queryParams.boLose"
-          placeholder="请输入商机-丢单"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="任务-新增" prop="taskAdd">
-        <el-input
-          v-model="queryParams.taskAdd"
-          placeholder="请输入任务-新增"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="任务-删除" prop="taskDel">
-        <el-input
-          v-model="queryParams.taskDel"
-          placeholder="请输入任务-删除"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="任务-编辑" prop="taskEdit">
-        <el-input
-          v-model="queryParams.taskEdit"
-          placeholder="请输入任务-编辑"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="任务-查看" prop="taskView">
-        <el-input
-          v-model="queryParams.taskView"
-          placeholder="请输入任务-查看"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="行动-新增" prop="behaviorAdd">
-        <el-input
-          v-model="queryParams.behaviorAdd"
-          placeholder="请输入行动-新增"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="行动-删除" prop="behaviorDel">
-        <el-input
-          v-model="queryParams.behaviorDel"
-          placeholder="请输入行动-删除"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="行动-编辑" prop="behaviorEdit">
-        <el-input
-          v-model="queryParams.behaviorEdit"
-          placeholder="请输入行动-编辑"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="行动-查看" prop="behaviorView">
-        <el-input
-          v-model="queryParams.behaviorView"
-          placeholder="请输入行动-查看"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="联系人-新增" prop="contactAdd">
-        <el-input
-          v-model="queryParams.contactAdd"
-          placeholder="请输入联系人-新增"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="联系人-删除" prop="contactDel">
-        <el-input
-          v-model="queryParams.contactDel"
-          placeholder="请输入联系人-删除"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="联系人-编辑" prop="contactEdit">
-        <el-input
-          v-model="queryParams.contactEdit"
-          placeholder="请输入联系人-编辑"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item label="联系人-查看" prop="contactView">
-        <el-input
-          v-model="queryParams.contactView"
-          placeholder="请输入联系人-查看"
-          clearable
-          @keyup.enter.native="handleQuery"
-        />
-      </el-form-item>
-      <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
-      </el-form-item>
-    </el-form> -->
-
-    <!-- <el-row :gutter="10" class="mb8">
-      <el-col :span="1.5">
-        <el-button
-          type="primary"
-          plain
-          icon="el-icon-plus"
-          size="mini"
-          @click="handleAdd"
-          v-hasPermi="['material:authority:add']"
-        >新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-          v-hasPermi="['material:authority:edit']"
-        >修改</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-          v-hasPermi="['material:authority:remove']"
-        >删除</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-          v-hasPermi="['material:authority:export']"
-        >导出</el-button>
-      </el-col>
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
-    </el-row> -->
-
     <el-table v-loading="loading" :data="authorityList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column type="selection" width="55" align="center"/>
       <el-table-column label="项目岗位" align="center" prop="postName" />
-      <el-table-column label="商机-下一步" align="center" prop="boNext" />
-      <el-table-column label="商机-修改" align="center" prop="boEdit" />
-      <el-table-column label="商机-关闭" align="center" prop="boClose" />
-      <el-table-column label="商机-赢单" align="center" prop="boWin" />
-      <el-table-column label="商机-丢单" align="center" prop="boLose" />
-      <el-table-column label="任务-新增" align="center" prop="taskAdd" />
-      <el-table-column label="任务-删除" align="center" prop="taskDel" />
-      <el-table-column label="任务-编辑" align="center" prop="taskEdit" />
-      <el-table-column label="任务-查看" align="center" prop="taskView" />
-      <el-table-column label="行动-新增" align="center" prop="behaviorAdd" />
-      <el-table-column label="行动-删除" align="center" prop="behaviorDel" />
-      <el-table-column label="行动-编辑" align="center" prop="behaviorEdit" />
-      <el-table-column label="行动-查看" align="center" prop="behaviorView" />
-      <el-table-column label="联系人-新增" align="center" prop="contactAdd" />
-      <el-table-column label="联系人-删除" align="center" prop="contactDel" />
-      <el-table-column label="联系人-编辑" align="center" prop="contactEdit" />
-      <el-table-column label="联系人-查看" align="center" prop="contactView" />
+      <el-table-column label="商机-下一步" align="center" prop="boNext">
+        <template slot-scope="scope">
+          {{scope.row.boNext ? '√' : '×'}}
+        </template>
+      </el-table-column>
+      <el-table-column label="商机-修改" align="center" prop="boEdit">
+        <template slot-scope="scope">
+          {{scope.row.boEdit ? '√' : '×'}}
+        </template>
+      </el-table-column>
+      <el-table-column label="商机-关闭" align="center" prop="boClose">
+        <template slot-scope="scope">
+          {{scope.row.boClose ? '√' : '×'}}
+        </template>
+      </el-table-column>
+      <el-table-column label="商机-赢单" align="center" prop="boWin">
+        <template slot-scope="scope">
+          {{scope.row.boWin ? '√' : '×'}}
+        </template>
+      </el-table-column>
+      <el-table-column label="商机-丢单" align="center" prop="boLose">
+        <template slot-scope="scope">
+          {{scope.row.boLose ? '√' : '×'}}
+        </template>
+      </el-table-column>
+
+      <el-table-column label="项目成员-新增" align="center" prop="pojpsnAdd" >
+        <template slot-scope="scope">
+          {{scope.row.pojpsnAdd ? '√' : '×'}}
+        </template>
+      </el-table-column>
+      <el-table-column label="项目成员-删除" align="center" prop="pojpsnDel">
+        <template slot-scope="scope">
+          {{scope.row.pojpsnDel ? '√' : '×'}}
+        </template>
+      </el-table-column>
+      <el-table-column label="项目成员-编辑" align="center" prop="pojpsnEdit">
+        <template slot-scope="scope">
+          {{scope.row.pojpsnEdit ? '√' : '×'}}
+        </template>
+      </el-table-column>
+      <el-table-column label="项目成员-查看" align="center" prop="pojpsnView">
+        <template slot-scope="scope">
+          {{scope.row.pojpsnView ? '√' : '×'}}
+        </template>
+      </el-table-column>
+
+      <el-table-column label="任务-新增" align="center" prop="taskAdd" >
+        <template slot-scope="scope">
+          {{scope.row.taskAdd ? '√' : '×'}}
+        </template>
+      </el-table-column>
+      <el-table-column label="任务-删除" align="center" prop="taskDel">
+        <template slot-scope="scope">
+          {{scope.row.taskDel ? '√' : '×'}}
+        </template>
+      </el-table-column>
+      <el-table-column label="任务-编辑" align="center" prop="taskEdit">
+        <template slot-scope="scope">
+          {{scope.row.taskEdit ? '√' : '×'}}
+        </template>
+      </el-table-column>
+      <el-table-column label="任务-查看" align="center" prop="taskView">
+        <template slot-scope="scope">
+          {{scope.row.taskView ? '√' : '×'}}
+        </template>
+      </el-table-column>
+      <el-table-column label="行动-新增" align="center" prop="behaviorAdd">
+        <template slot-scope="scope">
+          {{scope.row.behaviorAdd ? '√' : '×'}}
+        </template>
+      </el-table-column>
+      <el-table-column label="行动-删除" align="center" prop="behaviorDel">
+        <template slot-scope="scope">
+          {{scope.row.behaviorDel ? '√' : '×'}}
+        </template>
+      </el-table-column>
+      <el-table-column label="行动-编辑" align="center" prop="behaviorEdit">
+        <template slot-scope="scope">
+          {{scope.row.behaviorEdit ? '√' : '×'}}
+        </template>
+      </el-table-column>
+      <el-table-column label="行动-查看" align="center" prop="behaviorView">
+        <template slot-scope="scope">
+          {{scope.row.behaviorView ? '√' : '×'}}
+        </template>
+      </el-table-column>
+      <el-table-column label="联系人-新增" align="center" prop="contactAdd">
+        <template slot-scope="scope">
+          {{scope.row.contactAdd ? '√' : '×'}}
+        </template>
+      </el-table-column>
+      <el-table-column label="联系人-删除" align="center" prop="contactDel">
+        <template slot-scope="scope">
+          {{scope.row.contactDel ? '√' : '×'}}
+        </template>
+      </el-table-column>
+      <el-table-column label="联系人-编辑" align="center" prop="contactEdit">
+        <template slot-scope="scope">
+          {{scope.row.contactEdit ? '√' : '×'}}
+        </template>
+      </el-table-column>
+      <el-table-column label="联系人-查看" align="center" prop="contactView">
+        <template slot-scope="scope">
+          {{scope.row.contactView ? '√' : '×'}}
+        </template>
+      </el-table-column>
       <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
         <template slot-scope="scope">
           <el-button
@@ -226,17 +119,10 @@
             @click="handleUpdate(scope.row)"
             v-hasPermi="['material:authority:edit']"
           >修改</el-button>
-          <!-- <el-button
-            size="mini"
-            type="text"
-            icon="el-icon-delete"
-            @click="handleDelete(scope.row)"
-            v-hasPermi="['material:authority:remove']"
-          >删除</el-button> -->
         </template>
       </el-table-column>
     </el-table>
-    
+
     <pagination
       v-show="total>0"
       :total="total"
@@ -286,7 +172,38 @@
           <el-col :span="8">
           </el-col>
         </el-row>
-          <el-divider content-position="left">
+        <el-divider content-position="left">
+          <dev style="width: 50px; height: 40px; font-size: 18px">项目成员</dev>
+        </el-divider>
+        <el-row>
+          <el-col :span="8">
+            <el-form-item prop="taskAdd">
+              <el-checkbox v-model="form.pojpsnAdd">新增</el-checkbox>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item prop="pojpsnDel">
+              <el-checkbox v-model="form.pojpsnDel">删除</el-checkbox>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+            <el-form-item prop="pojpsnEdit">
+              <el-checkbox v-model="form.pojpsnEdit">编辑</el-checkbox>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        <el-row>
+          <el-col :span="8">
+            <el-form-item prop="pojpsnView">
+              <el-checkbox v-model="form.pojpsnView">查看</el-checkbox>
+            </el-form-item>
+          </el-col>
+          <el-col :span="8">
+          </el-col>
+          <el-col :span="8">
+          </el-col>
+        </el-row>
+        <el-divider content-position="left">
           <dev style="width: 50px; height: 40px; font-size: 18px">任务</dev>
         </el-divider>
         <el-row>

+ 221 - 0
src/views/business/spd/bo/basic/accessoryList.vue

@@ -0,0 +1,221 @@
+<template>
+  <div class="app-container">
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="info"
+          plain
+          icon="el-icon-upload2"
+          size="small"
+          @click="uploadAccessory"
+          >上传</el-button
+        >
+      </el-col>
+    </el-row>
+    <el-table v-loading="loading" :data="accessoryList">
+      <el-table-column
+        type="index"
+        label="序号"
+        width="55"
+        align="center"
+      />
+      <el-table-column label="名称" align="center" prop="fileName" />
+      <el-table-column label="上传者" align="center" prop="createByName" />
+      <el-table-column label="上传时间" align="center" prop="createTime" />
+      <el-table-column
+        label="操作"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
+        <template slot-scope="scope">
+          <el-row>
+            <el-col :span="1.5">
+              <el-button
+                size="small"
+                type="danger"
+                plain
+                icon="el-icon-delete"
+                @click="deleteAccessory(scope.row.id)"
+                >删除</el-button
+              >
+            </el-col>
+            <el-col :span="1.5">
+              <el-button
+                type="success"
+                plain
+                icon="el-icon-download"
+                size="small"
+                @click="downloadAccessory(scope.row)"
+                >下载</el-button
+              >
+            </el-col>
+          </el-row>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <el-dialog
+      :title="upload.title"
+      :visible.sync="upload.open"
+      width="400px"
+      append-to-body
+    >
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls, .doc, .docx, .word, .wordx, .png, .jpg, .gif, .txt"
+        :headers="upload.headers"
+        :action="upload.url + '?boId=' + bo.id"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import { listAccessory, delAccessory, addAccessory} from "@/api/business/spd/bo/accessory";
+import { getToken } from "@/utils/auth";
+import axios from "axios";
+
+export default {
+  name: "accessoryList",
+  props:["source","bo","boAuthority"],
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 总条数
+      total: 0,
+      // 表格数据
+      contactList: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        boId: null,
+        name: null,
+        code: null,
+        customer: null,
+        params:{},
+      },
+      // 上传参数
+      upload: {
+        // 是否显示弹出层
+        open: false,
+        // 弹出层标题
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 上传类型
+        flag: "",
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/mk/bo/accessory/upload",
+      },
+    };
+  },
+  created() {
+    this.queryParams.boId = this.bo.id;
+    this.queryParams.params = {"post":this.boAuthority.post};
+    this.getList();
+  },
+  methods: {
+    /** 查询附件列表 */
+    getList() {
+      this.loading = true;
+      listAccessory(this.queryParams).then(response => {
+        this.accessoryList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    //上传附件公共方法
+    uploadAccessory() {
+      this.upload.open = true;
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert(
+        "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
+          response.msg +
+          "</div>",
+        "上传结果",
+        { dangerouslyUseHTMLString: true }
+      );
+      this.getList();
+    },
+    //下载附件
+    downloadAccessory(row) {
+      console.log('row',row);
+      var resUrl = "https://sy.derom.com/document-center/fastdfs/download?id=" + row.urlId;
+      axios
+        .create({
+          timeout: 3000,
+          responseType: "blob", // 响应类型, 将响应数据转换为二进制数据
+          headers: {},
+        })
+        .get(resUrl)
+        .then((res) => {
+          console.log(res);
+          // 地址转换
+          let url = window.URL.createObjectURL(res.data);
+          const a = document.createElement("a");
+          a.setAttribute("href", url);
+          a.setAttribute("download", row.fileName);
+          document.body.append(a);
+          a.click();
+          document.body.removeChild(a);
+        });
+    },
+    //删除附件
+    deleteAccessory(id) {
+      this.$modal
+        .confirm("是否确认删除?")
+        .then(function () {})
+        .then(() => {
+          delAccessory(id).then((res) => {
+            if (res.code == 200) {
+              this.$modal.msgSuccess("删除成功");
+              this.getList();
+            } else {
+              this.$modal.msgSuccess("删除失败");
+            }
+          });
+        })
+        .catch(() => {});
+    },
+  }
+};
+</script>

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 29 - 981
src/views/business/spd/bo/basic/details.vue


+ 152 - 0
src/views/business/spd/bo/basic/filemanager copy.vue

@@ -0,0 +1,152 @@
+<template>
+  <div>
+    <el-form :model="form">
+      <el-form-item :label="name">
+        <el-row>
+          <el-col :span="1.5">
+            <el-input v-model="fileName" placeholder="待上传" readonly />
+          </el-col>
+          <el-col :span="1.5" v-show="!fileUrlid">
+            <el-button type="info" plain icon="el-icon-upload2" size="small" @click="uploadAccessory(field)">
+              上传
+            </el-button>
+          </el-col>
+          <el-col :span="1.5" v-show="fileUrlid" >
+            <el-button type="success" plain icon="el-icon-download" size="small" @click="exportAccessory">
+              下载
+            </el-button>
+          </el-col>
+          <el-col :span="1.5" v-show="fileUrlid">
+            <el-button size="small" type="danger" plain icon="el-icon-delete" @click="deleteAccessory(field)">
+              删除
+            </el-button>
+          </el-col>
+        </el-row>
+      </el-form-item>
+    </el-form>
+    <!-- 上传对话框 -->
+    <el-dialog
+      :title="upload.title"
+      :visible.sync="upload.open"
+      width="400px"
+      append-to-body
+    >
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls, .doc, .docx, .word, .wordx, .png, .jpg, .gif, .txt"
+        :headers="upload.headers"
+        :action="upload.url + '?boId=' + form.id + '&flag=' + upload.flag + '&boType=' + form.boType"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {delAccessory} from "@/api/business/spd/bo/basic";
+import axios from "axios";
+import { getToken } from "@/utils/auth";
+
+export default {
+  name: "filemanager",
+  props: ["form","name","fileName","fileUrlid","field"],
+  data() {
+    return {
+      // 上传参数
+      upload: {
+        // 是否显示弹出层
+        open: false,
+        // 弹出层标题
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 上传类型
+        flag: "",
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/mk/bo/basic/upload",
+      },
+    };
+  },
+  created() {
+  },
+  methods: {
+    //上传附件公共方法
+    uploadAccessory(f) {
+      // this.upload.title = "上传附件";
+      this.upload.open = true;
+      this.upload.flag = f;
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert(
+        "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
+          response.msg +
+          "</div>",
+        "上传结果",
+        { dangerouslyUseHTMLString: true }
+      );
+      this.$emit('reload');
+    },
+    //下载附件
+    exportAccessory() {
+      let resUrl = "https://sy.derom.com/document-center/fastdfs/download?id=" + this.fileUrlid;
+      axios
+        .create({
+          timeout: 3000,
+          responseType: "blob", // 响应类型, 将响应数据转换为二进制数据
+          headers: {},
+        })
+        .get(resUrl)
+        .then((res) => {
+          console.log(res);
+          // 地址转换
+          let url = window.URL.createObjectURL(res.data);
+          const a = document.createElement("a");
+          a.setAttribute("href", url);
+          a.setAttribute("download", this.fileName);
+          document.body.append(a);
+          a.click();
+          document.body.removeChild(a);
+        });
+    },
+    //删除附件
+    deleteAccessory(f) {
+      this.$modal
+        .confirm("是否确认删除?")
+        .then(function () {})
+        .then(() => {
+          delAccessory(this.form.id, f, this.form.boType,this.fileUrlid).then((res) => {
+            console.log('删除返回',res);
+            this.$emit('reload');
+          });
+        })
+        .catch(() => {});
+    },
+  },
+};
+</script>

+ 124 - 0
src/views/business/spd/bo/basic/filemanager.vue

@@ -0,0 +1,124 @@
+<template>
+  <div>
+    <el-form :model="form">
+      <el-form-item :label="name">
+        <el-row>
+          <el-col :span="1.5">
+            <el-input v-model="fileName" placeholder="待上传" readonly />
+          </el-col>
+          <el-col :span="1.5" v-show="!fileUrlid">
+            <el-upload
+              class="upload-demo"
+              ref="upload"
+              action="123"
+              :show-file-list="false"
+              :on-change="fileChange"
+              :file-list="fileList"
+              accept=".xlsx, .xls, .doc, .docx, .word, .wordx, .png, .jpg, .gif, .txt"
+              :auto-upload="false"
+              >
+              <el-button type="info" plain icon="el-icon-upload2" size="small">
+                上传
+              </el-button>
+            </el-upload>
+          </el-col>
+          <el-col :span="1.5" v-show="fileUrlid" >
+            <el-button type="success" plain icon="el-icon-download" size="small" @click="exportAccessory">
+              下载
+            </el-button>
+          </el-col>
+          <el-col :span="1.5" v-show="fileUrlid" >
+            <el-button type="success" plain icon="el-icon-download" size="small" @click="exportAccessory">
+              下载
+            </el-button>
+          </el-col>
+          <el-col :span="1.5" v-show="fileUrlid">
+            <el-button size="small" type="danger" plain icon="el-icon-delete" @click="deleteAccessory(field)">
+              删除
+            </el-button>
+          </el-col>
+        </el-row>
+      </el-form-item>
+    </el-form>
+  </div>
+</template>
+
+<script>
+import {insertAccessory,delAccessory} from "@/api/business/spd/bo/basic";
+import axios from "axios";
+
+export default {
+  name: "filemanager",
+  props: ["form","name","fileName","fileUrlid","field"],
+  data() {
+    return {
+      //文件
+      fileList: [],
+    };
+  },
+  created() {
+  },
+  methods: {
+    fileChange (file, fileList) {
+      if (fileList.length > 0) {
+        this.fileList = [fileList[fileList.length - 1]]
+        console.log('this.fileList',this.fileList);
+        let formData = new FormData();
+        if(this.fileList.length < 1){
+          formData.append('file', null);
+        }else{
+          this.fileList.forEach(el => {
+            formData.append('file', el.raw);
+          })
+        }
+        formData.append("boId",this.form.id);
+        formData.append("flag",this.field);
+        formData.append("boType",this.form.boType);
+        insertAccessory(formData).then(response => {
+          console.log('response',response);
+          if(response.code == 200){
+            this.$emit('reload');
+          }else{
+
+          }
+        });
+      }
+    },
+    //下载附件
+    exportAccessory() {
+      let resUrl = "https://sy.derom.com/document-center/fastdfs/download?id=" + this.fileUrlid;
+      axios
+        .create({
+          timeout: 3000,
+          responseType: "blob", // 响应类型, 将响应数据转换为二进制数据
+          headers: {},
+        })
+        .get(resUrl)
+        .then((res) => {
+          console.log(res);
+          // 地址转换
+          let url = window.URL.createObjectURL(res.data);
+          const a = document.createElement("a");
+          a.setAttribute("href", url);
+          a.setAttribute("download", this.fileName);
+          document.body.append(a);
+          a.click();
+          document.body.removeChild(a);
+        });
+    },
+    //删除附件
+    deleteAccessory(f) {
+      this.$modal
+        .confirm("是否确认删除?")
+        .then(function () {})
+        .then(() => {
+          delAccessory(this.form.id, f, this.form.boType,this.fileUrlid).then((res) => {
+            console.log('删除返回',res);
+            this.$emit('reload');
+          });
+        })
+        .catch(() => {});
+    },
+  },
+};
+</script>

+ 337 - 172
src/views/business/spd/bo/basic/index.vue

@@ -1,7 +1,14 @@
 <!-- 商机-列表 -->
 <template>
   <div class="app-container">
-    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+    <el-form
+      :model="queryParams"
+      ref="queryForm"
+      size="small"
+      :inline="true"
+      v-show="showSearch"
+      label-width="68px"
+    >
       <el-form-item label="商机名称" prop="boName">
         <el-input
           v-model="queryParams.boName"
@@ -11,7 +18,12 @@
         />
       </el-form-item>
       <el-form-item label="商机类型" prop="boType">
-        <el-select v-model="queryParams.boType" placeholder="请输入商机类型" clearable>
+        <el-select
+          v-model="queryParams.boType"
+          placeholder="请输入商机类型"
+          @change="boTypeChange"
+          clearable
+        >
           <el-option
             v-for="dict in dict.type.mk_bo_type"
             :key="dict.value"
@@ -21,7 +33,11 @@
         </el-select>
       </el-form-item>
       <el-form-item label="商机状态" prop="boState" clearable>
-        <el-select v-model="queryParams.boState" placeholder="请输入商机状态" clearable>
+        <el-select
+          v-model="queryParams.boState"
+          placeholder="请输入商机状态"
+          clearable
+        >
           <el-option
             v-for="dict in dict.type.mk_bo_state"
             :key="dict.value"
@@ -31,7 +47,11 @@
         </el-select>
       </el-form-item>
       <el-form-item label="商机来源" prop="boSource">
-        <el-select v-model="queryParams.boSource" placeholder="请输入商机来源" clearable>
+        <el-select
+          v-model="queryParams.boSource"
+          placeholder="请输入商机来源"
+          clearable
+        >
           <el-option
             v-for="dict in dict.type.mk_bo_source"
             :key="dict.value"
@@ -41,12 +61,16 @@
         </el-select>
       </el-form-item>
       <el-form-item label="商机阶段" prop="boStage">
-        <el-select v-model="queryParams.boStage" placeholder="请输入商机阶段" clearable>
+        <el-select
+          v-model="queryParams.boStage"
+          placeholder="请输入商机阶段"
+          clearable
+        >
           <el-option
-            v-for="dict in dict.type.mk_bo_stage"
-            :key="dict.value"
-            :label="dict.label"
-            :value="dict.value"
+            v-for="item in mk_bo_stage"
+            :key="item.code"
+            :label="item.name"
+            :value="item.code"
           ></el-option>
         </el-select>
       </el-form-item>
@@ -77,8 +101,16 @@
         />
       </el-form-item>
       <el-form-item>
-        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
-        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+        <el-button
+          type="primary"
+          icon="el-icon-search"
+          size="mini"
+          @click="handleQuery"
+          >搜索</el-button
+        >
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery"
+          >重置</el-button
+        >
       </el-form-item>
     </el-form>
 
@@ -90,17 +122,8 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
-        >新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-top"
-          size="mini"
-          :disabled="single"
-          @click="submitOa"
-        >提交</el-button>
+          >新增</el-button
+        >
       </el-col>
       <!-- <el-col :span="1.5">
         <el-button
@@ -122,79 +145,113 @@
           @click="handleDelete"
         >删除</el-button>
       </el-col> -->
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <right-toolbar
+        :showSearch.sync="showSearch"
+        @queryTable="getList"
+      ></right-toolbar>
     </el-row>
 
-    <el-table v-loading="loading" :data="basicList" @selection-change="handleSelectionChange" @cell-dblclick="enterDetails" >
+    <el-table
+      v-loading="loading"
+      :data="basicList"
+      @selection-change="handleSelectionChange"
+      @cell-dblclick="enterDetails"
+    >
       <el-table-column type="selection" align="center" />
       <el-table-column label="编号" align="center" prop="boCode" />
       <el-table-column label="商机名称" align="center" prop="boName" />
-      <el-table-column label="商机类型" align="center" prop="boType" >
+      <el-table-column label="商机类型" align="center" prop="boType">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.mk_bo_type" :value="scope.row.boType"/>
+          <dict-tag :options="dict.type.mk_bo_type" :value="scope.row.boType" />
         </template>
       </el-table-column>
-      <el-table-column label="商机状态" align="center" prop="boState" >
+      <el-table-column label="商机状态" align="center" prop="boState">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.mk_bo_state" :value="scope.row.boState"/>
+          <dict-tag
+            :options="dict.type.mk_bo_state"
+            :value="scope.row.boState"
+          />
         </template>
       </el-table-column>
-      <el-table-column label="商机来源" align="center" prop="boSource" >
+      <el-table-column label="商机来源" align="center" prop="boSource">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.mk_bo_source" :value="scope.row.boSource"/>
-        </template>
-      </el-table-column>
-      <el-table-column label="商机阶段" align="center" prop="boStage" >
-        <template slot-scope="scope">
-          <dict-tag :options="dict.type.mk_bo_stage" :value="scope.row.boStage"/>
+          <dict-tag
+            :options="dict.type.mk_bo_source"
+            :value="scope.row.boSource"
+          />
         </template>
       </el-table-column>
+      <el-table-column label="商机阶段" align="center" prop="boStageName" />
       <el-table-column label="客户名称" align="center" prop="customerName" />
-      <el-table-column label="医院耗材预估值(万元)" align="center" prop="hosDiscreetValue" />
+      <el-table-column
+        label="医院耗材预估值(万元)"
+        align="center"
+        prop="hosDiscreetValue"
+      />
       <el-table-column label="赢单率" align="center" prop="winningRate" />
-      <el-table-column label="赢单率状态" align="center" prop="winningState" >
+      <el-table-column label="赢单率状态" align="center" prop="winningState">
         <template slot-scope="scope">
-          <dict-tag :options="dict.type.mk_bo_winstate" :value="scope.row.winningState"/>
+          <dict-tag
+            :options="dict.type.mk_bo_winstate"
+            :value="scope.row.winningState"
+          />
         </template>
       </el-table-column>
-      <el-table-column label="销售区域" align="center" prop="marketingAreaName" />
-      <el-table-column label="销售组织" align="center" prop="marketingOrganizingName" />
+      <el-table-column
+        label="销售区域"
+        align="center"
+        prop="marketingAreaName"
+      />
+      <el-table-column
+        label="销售组织"
+        align="center"
+        prop="marketingOrganizingName"
+      />
       <el-table-column label="部门" align="center" prop="deptName" />
       <el-table-column label="商机负责人" align="center" prop="principalName" />
       <el-table-column label="创建人" align="center" prop="createBy" />
       <el-table-column label="创建时间" align="center" prop="createTime" />
-      <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width">
+      <el-table-column
+        label="操作"
+        fixed="right"
+        align="center"
+        class-name="small-padding fixed-width"
+      >
         <template slot-scope="scope">
           <el-button
             size="mini"
             type="text"
             icon="el-icon-search"
             @click="enterDetails(scope.row)"
-          >进入详情</el-button>
+            >进入详情</el-button
+          >
           <el-button
             size="mini"
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
-          >修改</el-button>
+            >修改</el-button
+          >
           <el-button
             size="mini"
             type="text"
             icon="el-icon-view"
             @click="handleBrowse(scope.row)"
-          >查看</el-button>
+            >查看</el-button
+          >
           <el-button
             size="mini"
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
-          >删除</el-button>
+            >删除</el-button
+          >
         </template>
       </el-table-column>
     </el-table>
 
     <pagination
-      v-show="total>0"
+      v-show="total > 0"
       :total="total"
       :page.sync="queryParams.pageNum"
       :limit.sync="queryParams.pageSize"
@@ -202,15 +259,32 @@
     />
 
     <!-- 添加或修改商机基础信息对话框 -->
-    <el-dialog :title="title" :visible.sync="open" width="1000px" append-to-body>
-      <el-form ref="form" :model="form" :rules="rules" label-width="80px" :disabled="this.form.winningState > 0 || this.operatingState == 'Browse'">
+    <el-dialog
+      :title="title"
+      :visible.sync="open"
+      width="1000px"
+      append-to-body
+    >
+      <el-form
+        ref="form"
+        :model="form"
+        :rules="rules"
+        label-width="80px"
+        :disabled="
+          this.form.winningState > 0 || this.operatingState == 'Browse'
+        "
+      >
         <el-divider content-position="left">
           <dev style="width: 50px; height: 40px; font-size: 18px">基本信息</dev>
         </el-divider>
         <el-row>
           <el-col :span="8">
             <el-form-item label="商机名称" prop="boName">
-              <el-input v-model="form.boName" placeholder="商机名称自动生成" :disabled="true"/>
+              <el-input
+                v-model="form.boName"
+                placeholder="商机名称自动生成"
+                :disabled="true"
+              />
             </el-form-item>
           </el-col>
           <el-col :span="8">
@@ -226,9 +300,20 @@
             </el-form-item>
           </el-col>
           <el-col :span="8">
-            <el-form-item label="推荐人" prop="referrerName" v-show="form.boSource == 2" :rules="form.boSource == 2 ? rules.referrer : [{require: false}]">
-              <el-input v-model="form.referrerName" placeholder="请输入推荐人" >
-                <el-button slot="append" icon="el-icon-more" @click="refereStaff"></el-button>
+            <el-form-item
+              label="推荐人"
+              prop="referrerName"
+              v-show="form.boSource == '2'"
+              :rules="
+                form.boSource == '2' ? rules.referrer : [{ require: false }]
+              "
+            >
+              <el-input v-model="form.referrerName" placeholder="请输入推荐人">
+                <el-button
+                  slot="append"
+                  icon="el-icon-more"
+                  @click="refereStaff"
+                ></el-button>
               </el-input>
             </el-form-item>
           </el-col>
@@ -236,7 +321,11 @@
         <el-row>
           <el-col :span="8">
             <el-form-item label="商机类型" prop="boType">
-              <el-select v-model="form.boType" placeholder="商机类型" :disabled = "this.operatingState == 'Update'">
+              <el-select
+                v-model="form.boType"
+                placeholder="商机类型"
+                :disabled="this.operatingState == 'Update'"
+              >
                 <el-option
                   v-for="dict in dict.type.mk_bo_type"
                   :key="dict.value"
@@ -248,14 +337,27 @@
           </el-col>
           <el-col :span="8">
             <el-form-item label="客户名称" prop="customerName">
-              <el-input v-model="form.customerName" placeholder="请输入客户" :disabled = "this.operatingState == 'Update'">
-                <el-button slot="append" icon="el-icon-more" @click="refereCustomer" :disabled = "this.operatingState == 'Update'"></el-button>
+              <el-input
+                v-model="form.customerName"
+                placeholder="请输入客户"
+                :disabled="this.operatingState == 'Update'"
+              >
+                <el-button
+                  slot="append"
+                  icon="el-icon-more"
+                  @click="refereCustomer"
+                  :disabled="this.operatingState == 'Update'"
+                ></el-button>
               </el-input>
             </el-form-item>
           </el-col>
           <el-col :span="8">
             <el-form-item label="医院营收总额" prop="totalHosRevenue">
-              <el-select v-model="form.totalHosRevenue" placeholder="请输入医院营收总额">
+              <el-select
+                v-model="form.totalHosRevenue"
+                placeholder="请输入医院营收总额"
+                @change="totalHosRevenueChange"
+              >
                 <el-option
                   v-for="dict in dict.type.mk_bo_total_revenue"
                   :key="dict.value"
@@ -268,22 +370,29 @@
         </el-row>
         <el-row>
           <el-col :span="8">
-            <el-form-item label="医院耗材预估值(万元)" prop="hosDiscreetValue">
-              <el-input type="number" v-model="form.hosDiscreetValue" placeholder="请输入医院耗材预估值" />
+            <el-form-item
+              label="医院耗材预估值(万元)"
+              prop="hosDiscreetValue"
+            >
+              <el-input
+                type="number"
+                v-model="form.hosDiscreetValue"
+                placeholder="请输入医院耗材预估值"
+              />
             </el-form-item>
           </el-col>
         </el-row>
         <el-row>
           <el-col>
-            <el-form-item label="商机内容"  prop="boContent">
+            <el-form-item label="商机内容" prop="boContent">
               <el-input
                 type="textarea"
-                maxlength=900
+                maxlength="900"
                 rows="2"
                 placeholder="请输入商机内容"
                 autosize
                 v-model="form.boContent"
-                >
+              >
               </el-input>
             </el-form-item>
           </el-col>
@@ -294,8 +403,15 @@
         <el-row>
           <el-col :span="6">
             <el-form-item label="销售区域" prop="marketingAreaName">
-              <el-input v-model="form.marketingAreaName" placeholder="请输入销售区域">
-                <el-button slot="append" icon="el-icon-more" @click="refereSaleaea"></el-button>
+              <el-input
+                v-model="form.marketingAreaName"
+                placeholder="请输入销售区域"
+              >
+                <el-button
+                  slot="append"
+                  icon="el-icon-more"
+                  @click="refereSaleaea"
+                ></el-button>
               </el-input>
             </el-form-item>
           </el-col>
@@ -323,7 +439,12 @@
         </el-row>
       </el-form>
       <div slot="footer" class="dialog-footer">
-        <el-button type="primary" @click="submitForm" v-if="this.operatingState != 'Browse'">确 定</el-button>
+        <el-button
+          type="primary"
+          @click="submitForm"
+          v-if="this.operatingState != 'Browse'"
+          >确 定</el-button
+        >
         <el-button @click="cancel">取 消</el-button>
       </div>
     </el-dialog>
@@ -340,11 +461,7 @@
       :single="true"
     />
     <!-- 组织参照 -->
-    <OrgRef
-      ref="orgSelect"
-      @doSubmit="orgSelectionsToInput"
-      :single="true"
-    />
+    <OrgRef ref="orgSelect" @doSubmit="orgSelectionsToInput" :single="true" />
     <!-- 部门参照 -->
     <DeptRef
       ref="deptSelect"
@@ -361,17 +478,30 @@
 </template>
 
 <script>
-import { listBasic, getBasic, addBasic, updateBasic, delBasic ,submit} from "@/api/business/spd/bo/basic";
-import CustomerRef from '@/views/business/spd/bo/refer/customer/index.vue';
-import SaleaeaRef from '@/views/business/spd/bo/refer/saleaea/index.vue';
-import OrgRef from '@/views/business/spd/bo/refer/org/index.vue';
-import DeptRef from '@/views/business/spd/bo/refer/dept/index.vue';
-import StaffRef from '@/views/business/spd/bo/refer/staff/index.vue';
+import {
+  listBasic,
+  getBasic,
+  addBasic,
+  updateBasic,
+  delBasic,
+} from "@/api/business/spd/bo/basic";
+import CustomerRef from "@/views/business/spd/bo/refer/customer/index.vue";
+import SaleaeaRef from "@/views/business/spd/bo/refer/saleaea/index.vue";
+import OrgRef from "@/views/business/spd/bo/refer/org/index.vue";
+import DeptRef from "@/views/business/spd/bo/refer/dept/index.vue";
+import StaffRef from "@/views/business/spd/bo/refer/staff/index.vue";
+import { getBoNodeListByType } from "@/api/business/spd/bo/boNode";
 
 export default {
   name: "Basic",
-  dicts: ['mk_bo_type','mk_bo_state','mk_bo_stage','mk_bo_source','mk_bo_total_revenue','mk_bo_winstate'],
-  components: {CustomerRef,SaleaeaRef,OrgRef,DeptRef,StaffRef},
+  dicts: [
+    "mk_bo_type",
+    "mk_bo_state",
+    "mk_bo_source",
+    "mk_bo_total_revenue",
+    "mk_bo_winstate",
+  ],
+  components: { CustomerRef, SaleaeaRef, OrgRef, DeptRef, StaffRef },
   data() {
     return {
       // 遮罩层
@@ -393,7 +523,7 @@ export default {
       // 是否显示弹出层
       open: false,
       //当前操作状态
-      operatingState: '',
+      operatingState: "",
       // 查询参数
       queryParams: {
         pageNum: 1,
@@ -426,71 +556,45 @@ export default {
         createBy: null,
         createTime: null,
         updateBy: null,
-        updateTime: null
+        updateTime: null,
       },
       // 表单参数
-      form: {},
+      form: {
+        referrer: null,
+        referrerName: null,
+      },
       //表单校验
       rules: {
         boSource: [
-          { required: true, message: "商机来源不能为空", trigger: "blur" }
+          { required: true, message: "商机来源不能为空", trigger: "blur" },
         ],
         referrerName: [
-          { required: true, message: "推荐人不能为空", trigger: "blur" }
+          { required: true, message: "推荐人不能为空", trigger: "blur" },
         ],
         boType: [
-          { required: true, message: "商机类型不能为空", trigger: "blur" }
+          { required: true, message: "商机类型不能为空", trigger: "blur" },
         ],
         customerName: [
-          { required: true, message: "客户名称不能为空", trigger: "blur" }
+          { required: true, message: "客户名称不能为空", trigger: "blur" },
         ],
         totalHosRevenue: [
-          { required: true, message: "医院营收总额不能为空", trigger: "blur" }
+          { required: true, message: "医院营收总额不能为空", trigger: "blur" },
         ],
         hosDiscreetValue: [
-          { required: true, message: "医院耗材预估值不能为空", trigger: "blur" }
+          {
+            required: true,
+            message: "医院耗材预估值不能为空",
+            trigger: "blur",
+          },
         ],
         boContent: [
-          { required: true, message: "商机内容不能为空", trigger: "blur" }
+          { required: true, message: "商机内容不能为空", trigger: "blur" },
         ],
       },
+      //阶段列表
+      mk_bo_stage:[],
     };
   },
-  //监听属性
-  watch:{
-    //阶段
-    'form.totalHosRevenue':{
-      handler(newName, oldName) {
-        switch(newName) {
-          //5000万以下
-          case '0':
-            this.form.hosDiscreetValue = 5000 * 0.2;
-            break;
-          //5000万-1亿
-          case '1':
-            this.form.hosDiscreetValue = 10000 * 0.2;
-            break;
-          //1亿-2亿
-          case '2':
-            this.form.hosDiscreetValue = 20000 * 0.2;
-            break;
-          //2亿-5亿
-          case '3':
-            this.form.hosDiscreetValue = 50000 * 0.2;
-            break;
-          //5亿-10亿
-          case '4':
-            this.form.hosDiscreetValue = 100000 * 0.2;
-            break;
-          //10亿以上
-          case '5':
-            this.form.hosDiscreetValue = 100000 * 0.2;
-            break;
-        }
-      },
-      immediate: true,
-    },
-  },
   created() {
     this.getList();
   },
@@ -498,8 +602,30 @@ export default {
     /** 查询商机基础信息列表 */
     getList() {
       this.loading = true;
-      listBasic(this.queryParams).then(response => {
+      listBasic(this.queryParams).then((response) => {
         this.basicList = response.rows;
+        //对商机名称进行加*
+        console.log(this.basicList);
+        for (var i = 0; i < this.basicList.length; i++) {
+          var arr = this.basicList[i].boName.split("-");
+          this.basicList[i].boName =
+            arr[0] +
+            "-" +
+            arr[1].substring(0, 2) +
+            "******" +
+            arr[1].substring(arr[1].length - 2, arr[1].length) +
+            "-" +
+            arr[2];
+
+          var customerName = this.basicList[i].customerName;
+          this.basicList[i].customerName =
+            customerName.substring(0, 2) +
+            "******" +
+            customerName.substring(
+              customerName.length - 2,
+              customerName.length
+            );
+        }
         this.total = response.total;
         this.loading = false;
       });
@@ -540,7 +666,7 @@ export default {
         createBy: null,
         createTime: null,
         updateBy: null,
-        updateTime: null
+        updateTime: null,
       };
       this.resetForm("form");
     },
@@ -556,34 +682,35 @@ export default {
     },
     // 多选框选中数据
     handleSelectionChange(selection) {
-      this.ids = selection.map(item => item.id)
-      this.single = selection.length!==1
-      this.multiple = !selection.length
+      this.ids = selection.map((item) => item.id);
+      this.single = selection.length !== 1;
+      this.multiple = !selection.length;
     },
     /** 新增按钮操作 */
     handleAdd() {
       this.reset();
       this.open = true;
       this.operatingState = "Insert";
-      this.form.principal = this.$store.state.user.id;
-      this.form.principalName = this.$store.state.user.nickName;
-      this.form.dept = this.$store.state.user.deptId;
-      this.form.deptName = this.$store.state.user.deptName;
-      this.form.marketingOrganizing = this.$store.state.user.orgId;
-      this.form.marketingOrganizingName = this.$store.state.user.orgName;
+      const { id, orgId, deptId, nickName, deptName, orgName } = this.$store.state.user;
+      this.form.principal = id;
+      this.form.principalName = nickName;
+      this.form.dept = deptId;
+      this.form.deptName = deptName;
+      this.form.marketingOrganizing = orgId;
+      this.form.marketingOrganizingName = orgName;
       this.title = "添加商机基础信息";
     },
     /** 进入详情按钮操作 */
     enterDetails(row) {
-      console.log('列数据:',row);
+      console.log("列数据:", row);
       this.$router.push(`/basic/spd/bo/basic/details/${row.id}`);
     },
     /** 修改按钮操作 */
     handleUpdate(row) {
       this.reset();
-      const id = row.id || this.ids
-      getBasic(id).then(response => {
-        this.form = response.data;
+      const id = row.id || this.ids;
+      getBasic(id).then((response) => {
+        this.form = { ...this.form, ...response.data };
         this.open = true;
         this.operatingState = "Update";
         this.title = "修改商机基础信息";
@@ -592,8 +719,8 @@ export default {
     /** 查看按钮操作 */
     handleBrowse(row) {
       this.reset();
-      const id = row.id || this.ids
-      getBasic(id).then(response => {
+      const id = row.id || this.ids;
+      getBasic(id).then((response) => {
         this.form = response.data;
         this.open = true;
         this.operatingState = "Browse";
@@ -602,16 +729,16 @@ export default {
     },
     /** 提交按钮 */
     submitForm() {
-      this.$refs["form"].validate(valid => {
+      this.$refs["form"].validate((valid) => {
         if (valid) {
           if (this.form.id != null) {
-            updateBasic(this.form).then(response => {
+            updateBasic(this.form).then((response) => {
               this.$modal.msgSuccess("修改成功");
               this.open = false;
               this.getList();
             });
           } else {
-            addBasic(this.form).then(response => {
+            addBasic(this.form).then((response) => {
               this.$modal.msgSuccess("新增成功");
               this.open = false;
               this.getList();
@@ -623,74 +750,112 @@ export default {
     /** 删除按钮操作 */
     handleDelete(row) {
       const ids = row.id || this.ids;
-      this.$modal.confirm('是否确认删除商机基础信息编号为"' + ids + '"的数据项?').then(function() {
-        return delBasic(ids);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("删除成功");
-      }).catch(() => {});
+      this.$modal
+        .confirm('是否确认删除商机基础信息编号为"' + ids + '"的数据项?')
+        .then(function () {
+          return delBasic(ids);
+        })
+        .then(() => {
+          this.getList();
+          this.$modal.msgSuccess("删除成功");
+        })
+        .catch(() => {});
     },
     /** 导出按钮操作 */
     handleExport() {
-      this.download('system/basic/export', {
-        ...this.queryParams
-      }, `basic_${new Date().getTime()}.xlsx`)
+      this.download(
+        "system/basic/export",
+        {
+          ...this.queryParams,
+        },
+        `basic_${new Date().getTime()}.xlsx`
+      );
+    },
+    //选择医院营收总额后
+    totalHosRevenueChange(value) {
+      switch (value) {
+        //5000万以下
+        case "0":
+          this.form.hosDiscreetValue = 5000 * 0.2;
+          break;
+        //5000万-1亿
+        case "1":
+          this.form.hosDiscreetValue = 10000 * 0.2;
+          break;
+        //1亿-2亿
+        case "2":
+          this.form.hosDiscreetValue = 20000 * 0.2;
+          break;
+        //2亿-5亿
+        case "3":
+          this.form.hosDiscreetValue = 50000 * 0.2;
+          break;
+        //5亿-10亿
+        case "4":
+          this.form.hosDiscreetValue = 100000 * 0.2;
+          break;
+        //10亿以上
+        case "5":
+          this.form.hosDiscreetValue = 100000 * 0.2;
+          break;
+      }
     },
-    //  提交至OA进行审批
-    submitOa(row){
-      const id = row.id || this.ids
-      this.$modal.confirm('确认提交吗?').then(function() {
-        return submit(id);
-      }).then(() => {
-        this.getList();
-        this.$modal.msgSuccess("提交成功");
-      }).catch(() => {});
+    //查询参数商机类型改变后
+    boTypeChange(boType){
+      if(boType){
+        getBoNodeListByType(boType).then(response => {
+          this.mk_bo_stage = response.rows;
+        });
+      }else{
+        this.mk_bo_stage = [];
+      }
     },
     // 触发客户参照列表
     refereCustomer() {
-      this.$refs.customerSelect.init()
+      this.$refs.customerSelect.init();
     },
     //客户参照列表选择后
-    customerSelectionsToInput (selections) {
+    customerSelectionsToInput(selections) {
       this.form.customer = selections[0].id;
       this.form.customerName = selections[0].name;
     },
     // 触发销售区域参照列表
     refereSaleaea() {
-      this.$refs.saleaeaSelect.init()
+      this.$refs.saleaeaSelect.init();
     },
     //销售区域参照列表选择后
-    saleaeaSelectionsToInput (selections) {
+    saleaeaSelectionsToInput(selections) {
       this.form.marketingArea = selections[0].id;
       this.form.marketingAreaName = selections[0].name;
     },
     // 触发组织参照列表
     refereOrg() {
-      this.$refs.orgSelect.init()
+      this.$refs.orgSelect.init();
     },
     //组织参照列表选择后
-    orgSelectionsToInput (selections) {
+    orgSelectionsToInput(selections) {
       this.form.marketingOrganizing = selections[0].deptId;
       this.form.marketingOrganizingName = selections[0].deptName;
     },
     // 触发部门参照列表
     refereDept() {
-      this.$refs.deptSelect.init()
+      this.$refs.deptSelect.init();
     },
     //部门参照列表选择后
-    deptSelectionsToInput (selections) {
+    deptSelectionsToInput(selections) {
       this.form.dept = selections[0].deptId;
       this.form.deptName = selections[0].deptName;
     },
     // 触发员工参照列表
     refereStaff() {
-      this.$refs.staffSelect.init()
+      this.$refs.staffSelect.init();
     },
     //员工参照列表选择后
-    staffSelectionsToInput (selections) {
+    staffSelectionsToInput(selections) {
       this.form.referrer = selections[0].userId;
       this.form.referrerName = selections[0].nickName;
-    }
-  }
+      console.log("this.form", this.form);
+    },
+  },
 };
 </script>

+ 1660 - 0
src/views/business/spd/bo/basic/process.vue

@@ -0,0 +1,1660 @@
+<template>
+  <div class="app-container">
+    <el-steps :active="activeConversion(form.boStage)" finish-status="success" process-status="process-status" >
+      <el-step v-for="item in boStage" :title="item.name" @click.native="viewingProcedure(item)"/>
+    </el-steps>
+    <!-- 提交、下一步按钮 -->
+    <div style="text-align: center">
+      <el-button
+        style="margin-top: 12px"
+        @click="submitOa"
+        v-if="showSubmit && form.winningState == 0"
+        >提交</el-button>
+        <el-button
+        style="margin-top: 12px"
+        @click="next"
+        v-show="!isUpdate"
+        v-if="(showNext && form.winningState == 0) && this.boAuthority.boAuthority.boNext"
+        >变更为下一阶段</el-button>
+    </div>
+    <el-divider content-position="left" style="font-size: 30px">
+      该阶段任务
+    </el-divider>
+    <el-tabs v-model="activeName" @tab-click="tabsSwitch">
+      <!-- SPD商机页签 -->
+      <!-- 商机审核 -->
+      <el-tab-pane label="阶段动作" name="t00101" style="height: 200px; overflow-y: scroll" v-if="tabsName.t00101" >
+        <el-descriptions >
+          <el-descriptions-item label="医院应收总额">
+            <div v-for="dict in dict.type.mk_bo_total_revenue" v-if="form.totalHosRevenue == dict.value">
+              <div>{{dict.label}}</div>
+            </div>
+          </el-descriptions-item>
+          <el-descriptions-item label="医院耗材预估额(万元)">{{form.hosDiscreetValue}}</el-descriptions-item>
+        </el-descriptions>
+      </el-tab-pane>
+      <!-- 项目立项 -->
+      <el-tab-pane label="阶段动作" name="t00201" style="height: 200px; overflow-y: scroll" v-if="tabsName.t00201">
+        <el-form :disabled="!isUpdate" :model="form.boFlow">
+          <el-form-item label="项目立项是否通过" prop="projectApproval">
+            <el-radio
+              v-model="form.boFlow.projectApproval"
+              label="1"
+              >是</el-radio
+            >
+            <el-radio
+              v-model="form.boFlow.projectApproval"
+              label="0"
+              >否</el-radio
+            >
+          </el-form-item>
+          <el-form-item label="项目未通过原因:" prop="noPassCause"  v-if="form.boFlow.projectApproval == 0">
+            <el-row>
+              <el-col
+                :span="8"
+              >
+                <el-input
+                    v-model="form.boFlow.noPassCause"
+                  />
+              </el-col>
+            </el-row>
+          </el-form-item>
+          <Filemanager
+            @reload="reload"
+            :form="form"
+            :name="'商机审议会'"
+            :fileName="form.boFlow.businessCouncilAccessoryName"
+            :fileUrlid="form.boFlow.businessCouncilAccessoryUrlId"
+            :field="'business_council_accessory'"
+            v-if="form.boFlow.projectApproval == 1"
+          />
+          <Filemanager
+            @reload="reload"
+            :form="form"
+            :name="'立项书'"
+            :fileName="form.boFlow.projectProposalAccessoryName"
+            :fileUrlid="form.boFlow.projectProposalAccessoryUrlId"
+            :field="'project_proposal_accessory'"
+            v-if="form.boFlow.projectApproval == 1"
+          />
+        </el-form>
+      </el-tab-pane>
+      <!-- 售前提案/邀请考察 -->
+      <el-tab-pane label="售前提案" name="t00301" style="height: 200px; overflow-y: scroll" v-if="tabsName.t00301">
+        <el-row>
+          <el-col :span="8">
+            <Filemanager
+              @reload="reload"
+              :form="form"
+              :name="'售前提案文件'"
+              :fileName="form.boFlow.preSaleProposalAccessoryName"
+              :fileUrlid="form.boFlow.preSaleProposalAccessoryUrlId"
+              :field="'pre_sale_proposal_accessory'"
+            />
+          </el-col>
+        </el-row>
+      </el-tab-pane>
+      <el-tab-pane label="邀请考察" name="t00302" style="height: 200px; overflow-y: scroll" v-if="tabsName.t00302">
+        <el-form :inline="true" :disabled="!isUpdate" :model="form.boFlow" >
+          <el-form-item label="考察开始时间" prop="inspectStartTime">
+            <el-date-picker
+              value-format="yyyy-MM-dd"
+              v-model="form.boFlow.inspectStartTime"
+              :disabled="!isUpdate"
+            >
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="考察结束时间" prop="inspectStartTime">
+            <el-date-picker
+              value-format="yyyy-MM-dd"
+              v-model="form.boFlow.inspectEndTime"
+              :disabled="!isUpdate"
+            >
+            </el-date-picker>
+          </el-form-item>
+        </el-form>
+        <el-row>
+          <el-col :span="8">
+            <Filemanager
+              @reload="reload"
+              :form="form"
+              :name="'考察报告'"
+              :fileName="form.boFlow.investigationReportAccessoryName"
+              :fileUrlid="form.boFlow.investigationReportAccessoryUrlId"
+              :field="'investigation_report_accessory'"
+            />
+          </el-col>
+        </el-row>
+      </el-tab-pane>
+      <!-- 开院务会 -->
+      <el-tab-pane label="开院务会" name="t00401" style="height: 200px; overflow-y: scroll" v-if="tabsName.t00401">
+        <el-form :inline="true" :disabled="!isUpdate" :model="form.boFlow">
+          <el-form-item label="开院务会时间" prop="conferenceTime">
+            <el-date-picker
+              value-format="yyyy-MM-dd"
+              v-model="form.boFlow.conferenceTime"
+            >
+            </el-date-picker>
+          </el-form-item>
+        </el-form>
+      </el-tab-pane>
+      <!-- 院内立项 -->
+      <el-tab-pane label="院内立项" name="t00501" style="height: 200px;" v-if="tabsName.t00501">
+        <el-form :disabled="!isUpdate" :model="form.boFlow" >
+          <el-row>
+            <el-col :span="8">
+              <el-form-item
+                label="院内立项时间"
+                prop="hospitalApprovalTime"
+                label-width="100px"
+              >
+                <el-date-picker
+                  value-format="yyyy-MM-dd"
+                  v-model="form.boFlow.hospitalApprovalTime"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item
+                label="院内立项牵头人"
+                prop="hospitalApprovalInitiator"
+                label-width="200px"
+              >
+                <el-input
+                  v-model="form.boFlow.hospitalApprovalInitiator"
+                  placeholder="选择院内立项牵头人"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </el-tab-pane>
+      <!-- 进场调研 -->
+      <el-tab-pane label="进场调研" name="t00601" style="height: 200px; overflow-y: scroll" v-if="tabsName.t00601">
+        <el-form :disabled="!isUpdate" :model="form.boFlow">
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="调研时间" prop="researchTime">
+                <el-date-picker
+                  value-format="yyyy-MM-dd"
+                  v-model="form.boFlow.researchTime"
+                  type="datetime"
+                  placeholder="选择日期时间"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+        <Filemanager
+          @reload="reload"
+          :form="form"
+          :name="'调研报告'"
+          :fileName="form.boFlow.investigateReportAccessoryName"
+          :fileUrlid="form.boFlow.investigateReportAccessoryUrlId"
+          :field="'investigate_report_accessory'"
+        />
+      </el-tab-pane>
+      <!-- 解决方案-无 -->
+      <!-- 投标与签合同 -->
+      <el-tab-pane label="挂网投标" name="t00801" style="height: 200px; overflow-y: scroll" v-if="tabsName.t00801">
+        <el-form :disabled="!isUpdate" :model="form.boFlow" >
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="挂网时间" prop="researchTime">
+                <el-date-picker
+                  value-format="yyyy-MM-dd"
+                  v-model="form.boFlow.hangingTime"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <Filemanager
+              @reload="reload"
+              :form="form"
+              :name="'投标书'"
+              :fileName="form.boFlow.biddingDocumentsAccessoryName"
+              :fileUrlid="form.boFlow.biddingDocumentsAccessoryUrlId"
+              :field="'bidding_documents_accessory'"
+            />
+          </el-row>
+          <el-row>
+            <el-col :span="5">
+              <el-form-item label="投标是否通过" prop="biddingDocumentsPass">
+                <el-radio
+                  v-model="form.boFlow.biddingDocumentsPass"
+                  label="1"
+                  >是</el-radio
+                >
+                <el-radio
+                  v-model="form.boFlow.biddingDocumentsPass"
+                  label="0"
+                  >否</el-radio
+                >
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row v-show="this.form.boFlow.biddingDocumentsPass == '1'">
+            <el-col :span="8">
+              <el-form-item label="我方优势" prop="ourAdvantage">
+                <el-input
+                  v-model="form.boFlow.ourAdvantage"
+                  placeholder="我方优势"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row v-show="this.form.boFlow.biddingDocumentsPass == '0'">
+            <el-col :span="8">
+              <el-form-item label="我方劣势" prop="ourAdvantage">
+                <el-input
+                  v-model="form.boFlow.ourAdvantage"
+                  placeholder="我方劣势"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row v-if="form.boFlow.biddingDocumentsPass == 1">
+            <Filemanager
+              @reload="reload"
+              :form="form"
+              :name="'中标通知书'"
+              :fileName="form.boFlow.letterAcceptanceAccessoryName"
+              :fileUrlid="form.boFlow.letterAcceptanceAccessoryUrlId"
+              :field="'letter_acceptance_accessory'"
+            />
+          </el-row>
+        </el-form>
+      </el-tab-pane>
+      <el-tab-pane label="合同签订" name="t00802" style="height: 200px; overflow-y: scroll" v-if="tabsName.t00802">
+        <el-form :disabled="!isUpdate" :model="form.boFlow">
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="合同签订时间" prop="contractSigningTime">
+                <el-date-picker
+                  value-format="yyyy-MM-dd"
+                  v-model="form.boFlow.contractSigningTime"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <Filemanager
+              @reload="reload"
+              :form="form"
+              :name="'合同文件'"
+              :fileName="form.boFlow.contractDocumentAccessoryName"
+              :fileUrlid="form.boFlow.contractDocumentAccessoryUrlId"
+              :field="'contract_document_accessory'"
+            />
+          </el-row>
+        </el-form>
+      </el-tab-pane>
+
+      <!-- 耗材集采商机页签 -->
+      <!-- 商机审核 -->
+      <el-tab-pane label="阶段动作" name="t10101" style="height: 200px; overflow-y: scroll" v-if="tabsName.t10101">
+        <el-descriptions >
+          <el-descriptions-item label="医院应收总额">
+            <div v-for="dict in dict.type.mk_bo_total_revenue" v-if="form.totalHosRevenue == dict.value">
+              <div>{{dict.label}}</div>
+            </div>
+          </el-descriptions-item>
+          <el-descriptions-item label="医院耗材预估额(万元)">{{form.hosDiscreetValue}}</el-descriptions-item>
+        </el-descriptions>
+      </el-tab-pane>
+      <!-- 项目立项 -->
+      <el-tab-pane label="阶段动作" name="t10201" style="height: 200px; overflow-y: scroll" v-if="tabsName.t10201">
+        <el-form :disabled="!isUpdate" :model="form.consumablesBoFlow">
+          <el-form-item label="项目立项是否通过" prop="projectApproval">
+            <el-radio
+              v-model="form.consumablesBoFlow.projectApproval"
+              label="1"
+              >是</el-radio
+            >
+            <el-radio
+              v-model="form.consumablesBoFlow.projectApproval"
+              label="0"
+              >否</el-radio
+            >
+          </el-form-item>
+          <Filemanager
+            @reload="reload"
+            :form="form"
+            :name="'商机审议会'"
+            :fileName="form.consumablesBoFlow.businessCouncilAccessoryName"
+            :fileUrlid="form.consumablesBoFlow.businessCouncilAccessoryUrlId"
+            :field="'business_council_accessory'"
+            v-if="form.consumablesBoFlow.projectApproval == 1"
+          />
+          <Filemanager
+            @reload="reload"
+            :form="form"
+            :name="'立项书'"
+            :fileName="form.consumablesBoFlow.projectProposalAccessoryName"
+            :fileUrlid="form.consumablesBoFlow.projectProposalAccessoryUrlId"
+            :field="'project_proposal_accessory'"
+            v-if="form.consumablesBoFlow.projectApproval == 1"
+          />
+          <el-form-item label="项目未通过原因:" prop="noPassCause"  v-if="form.consumablesBoFlow.projectApproval == 0">
+            <el-row>
+              <el-col
+                :span="8"
+              >
+                <el-input
+                    v-model="form.consumablesBoFlow.noPassCause"
+                  />
+              </el-col>
+            </el-row>
+          </el-form-item>
+        </el-form>
+      </el-tab-pane>
+      <!-- 产品清单 -->
+      <el-tab-pane label="产品清单" name="t10301" style="height: 200px; overflow-y: scroll" v-if="tabsName.t10301">
+        <Filemanager
+          @reload="reload"
+          :form="form"
+          :name="'产品清单'"
+          :fileName="form.consumablesBoFlow.packagedProductAccessoryName"
+          :fileUrlid="form.consumablesBoFlow.packagedProductAccessoryUrlId"
+          :field="'packaged_product_accessory'"
+        />
+      </el-tab-pane>
+      <!-- 解决方案 -->
+      <el-tab-pane label="解决方案" name="t10401" style="height: 200px; overflow-y: scroll" v-if="tabsName.t10401">
+        <Filemanager
+          @reload="reload"
+          :form="form"
+          :name="'产品解决方案'"
+          :fileName="form.consumablesBoFlow.productSolutionAccessoryName"
+          :fileUrlid="form.consumablesBoFlow.productSolutionAccessoryUrlId"
+          :field="'product_solution_accessory'"
+        />
+      </el-tab-pane>
+      <!-- 院内决策 -->
+      <el-tab-pane label="院内决策" name="t10501" style="height: 200px; overflow-y: scroll" v-if="tabsName.t10501">
+        <el-form :inline="true" :disabled="!isUpdate" :model="form.consumablesBoFlow">
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="医院决策人" prop="hospitalDecisionMaker" >
+                <el-input v-model="form.consumablesBoFlow.hospitalDecisionMaker" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="医院决策时间" prop="hospitalDecisionTime" >
+                <el-date-picker   value-format="yyyy-MM-dd" v-model="form.consumablesBoFlow.hospitalDecisionTime">
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </el-tab-pane>
+      <!-- 投标与签合同 -->
+      <el-tab-pane label="挂网投标" name="t10601" style="height: 200px; overflow-y: scroll" v-if="tabsName.t10601">
+        <el-form :disabled="!isUpdate" :model="form.consumablesBoFlow" >
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="挂网时间" prop="researchTime">
+                <el-date-picker
+                  value-format="yyyy-MM-dd"
+                  v-model="form.consumablesBoFlow.hangingTime"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <Filemanager
+              @reload="reload"
+              :form="form"
+              :name="'投标书'"
+              :fileName="form.consumablesBoFlow.biddingDocumentsAccessoryName"
+              :fileUrlid="form.consumablesBoFlow.biddingDocumentsAccessoryUrlId"
+              :field="'bidding_documents_accessory'"
+            />
+          </el-row>
+          <el-row>
+            <el-col :span="5">
+              <el-form-item label="投标是否通过" prop="biddingDocumentsPass">
+                <el-radio
+                  v-model="form.consumablesBoFlow.biddingDocumentsPass"
+                  label="1"
+                  >是</el-radio
+                >
+                <el-radio
+                  v-model="form.consumablesBoFlow.biddingDocumentsPass"
+                  label="0"
+                  >否</el-radio
+                >
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row v-show="this.form.consumablesBoFlow.biddingDocumentsPass == '1'">
+            <el-col :span="8">
+              <el-form-item label="我方优势" prop="ourAdvantage">
+                <el-input
+                  v-model="form.consumablesBoFlow.ourAdvantage"
+                  placeholder="我方优势"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row v-show="this.form.consumablesBoFlow.biddingDocumentsPass == '0'">
+            <el-col :span="8">
+              <el-form-item label="我方劣势" prop="ourAdvantage">
+                <el-input
+                  v-model="form.consumablesBoFlow.ourAdvantage"
+                  placeholder="我方劣势"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row v-if="form.consumablesBoFlow.biddingDocumentsPass == 1">
+            <Filemanager
+              @reload="reload"
+              :form="form"
+              :name="'中标通知书'"
+              :fileName="form.consumablesBoFlow.letterAcceptanceAccessoryName"
+              :fileUrlid="form.consumablesBoFlow.letterAcceptanceAccessoryUrlId"
+              :field="'letter_acceptance_accessory'"
+            />
+          </el-row>
+        </el-form>
+      </el-tab-pane>
+      <el-tab-pane label="合同签订" name="t10602" style="height: 200px; overflow-y: scroll" v-if="tabsName.t10602">
+        <el-form :disabled="!isUpdate" :model="form.consumablesBoFlow">
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="合同签订时间" prop="contractSigningTime">
+                <el-date-picker
+                  value-format="yyyy-MM-dd"
+                  v-model="form.consumablesBoFlow.contractSigningTime"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <Filemanager
+              @reload="reload"
+              :form="form"
+              :name="'合同文件'"
+              :fileName="form.consumablesBoFlow.contractDocumentAccessoryName"
+              :fileUrlid="form.consumablesBoFlow.contractDocumentAccessoryUrlId"
+              :field="'contract_document_accessory'"
+            />
+          </el-row>
+        </el-form>
+      </el-tab-pane>
+
+      <!-- 医用耗材商机页签 -->
+      <!-- 需求信息收集 -->
+      <el-tab-pane label="需求详情" name="t20101" style="height: 200px; overflow-y: scroll" v-if="tabsName.t20101">
+        <Filemanager
+          @reload="reload"
+          :form="form"
+          :name="'耗材清单'"
+          :fileName="form.medicalBoFlow.hosSuppliesListAccessoryName"
+          :fileUrlid="form.medicalBoFlow.hosSuppliesListAccessoryUrlId"
+          :field="'hos_supplies_list_accessory'"
+        />
+      </el-tab-pane>
+      <!-- 商机审核 -->
+      <el-tab-pane label="阶段动作" name="t20201" style="height: 200px; overflow-y: scroll" v-if="tabsName.t20201">
+        <el-descriptions >
+          <el-descriptions-item label="医院应收总额">
+            <div v-for="dict in dict.type.mk_bo_total_revenue" v-if="form.totalHosRevenue == dict.value">
+              <div>{{dict.label}}</div>
+            </div>
+          </el-descriptions-item>
+          <el-descriptions-item label="医院耗材预估额(万元)">{{form.hosDiscreetValue}}</el-descriptions-item>
+        </el-descriptions>
+      </el-tab-pane>
+      <!-- 项目立项 -->
+      <el-tab-pane label="阶段动作" name="t20301" style="height: 200px; overflow-y: scroll" v-if="tabsName.t20301">
+        <el-form :disabled="!isUpdate" :model="form.medicalBoFlow" >
+          <el-form-item label="项目立项是否通过" prop="projectApproval">
+            <el-radio
+              v-model="form.medicalBoFlow.projectApproval"
+              label="1"
+              >是</el-radio
+            >
+            <el-radio
+              v-model="form.medicalBoFlow.projectApproval"
+              label="0"
+              >否</el-radio
+            >
+          </el-form-item>
+          <Filemanager
+            @reload="reload"
+            :form="form"
+            :name="'商机审议会'"
+            :fileName="form.medicalBoFlow.businessCouncilAccessoryName"
+            :fileUrlid="form.medicalBoFlow.businessCouncilAccessoryUrlId"
+            :field="'business_council_accessory'"
+            v-if="form.medicalBoFlow.projectApproval == 1"
+          />
+          <Filemanager
+            @reload="reload"
+            :form="form"
+            :name="'立项书'"
+            :fileName="form.medicalBoFlow.projectProposalAccessoryName"
+            :fileUrlid="form.medicalBoFlow.projectProposalAccessoryUrlId"
+            :field="'project_proposal_accessory'"
+            v-if="form.medicalBoFlow.projectApproval == 1"
+          />
+          <el-form-item label="项目未通过原因:" prop="noPassCause"  v-if="form.medicalBoFlow.projectApproval == 0">
+            <el-row>
+              <el-col
+                :span="8"
+              >
+                <el-input
+                    v-model="form.medicalBoFlow.noPassCause"
+                  />
+              </el-col>
+            </el-row>
+          </el-form-item>
+        </el-form>
+      </el-tab-pane>
+      <!-- 产品清单 -->
+      <el-tab-pane label="产品清单" name="t20401" style="height: 200px; overflow-y: scroll" v-if="tabsName.t20401">
+        <Filemanager
+          @reload="reload"
+          :form="form"
+          :name="'产品清单'"
+          :fileName="form.medicalBoFlow.hosSuppliesListAccessoryName"
+          :fileUrlid="form.medicalBoFlow.hosSuppliesListAccessoryUrlId"
+          :field="'hos_supplies_list_accessory'"
+        />
+      </el-tab-pane>
+      <!-- 解决方案 -->
+      <el-tab-pane label="解决方案" name="t20501" style="height: 200px; overflow-y: scroll" v-if="tabsName.t20501">
+        <Filemanager
+          @reload="reload"
+          :form="form"
+          :name="'产品解决方案'"
+          :fileName="form.medicalBoFlow.productSolutionAccessoryName"
+          :fileUrlid="form.medicalBoFlow.productSolutionAccessoryUrlId"
+          :field="'product_solution_accessory'"
+        />
+      </el-tab-pane>
+      <!-- 临床申请 -->
+      <el-tab-pane label="临床申请" name="t20601" style="height: 200px; overflow-y: scroll" v-if="tabsName.t20601">
+        <Filemanager
+          @reload="reload"
+          :form="form"
+          :name="'临床申请报告'"
+          :fileName="form.medicalBoFlow.clinicalReportAccessoryName"
+          :fileUrlid="form.medicalBoFlow.clinicalReportAccessoryUrlId"
+          :field="'clinical_report_accessory'"
+        />
+      </el-tab-pane>
+      <!-- 院内决策 -->
+      <el-tab-pane label="院内决策" name="t20701" style="height: 200px; overflow-y: scroll" v-if="tabsName.t20701">
+        <el-form :disabled="!isUpdate" :inline="true" :model="form.medicalBoFlow" >
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="医院决策人" prop="hospitalDecisionMaker" >
+                <el-input v-model="form.medicalBoFlow.hospitalDecisionMaker" />
+              </el-form-item>
+            </el-col>
+            <el-col :span="8">
+              <el-form-item label="医院决策时间" prop="hospitalDecisionTime" >
+                <el-date-picker
+                  value-format="yyyy-MM-dd"
+                  v-model="form.medicalBoFlow.hospitalDecisionTime">
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-form>
+      </el-tab-pane>
+      <!-- 投标与签合同 -->
+      <el-tab-pane label="挂网投标" name="t20801" style="height: 200px; overflow-y: scroll" v-if="tabsName.t20801">
+        <el-form :disabled="!isUpdate" :model="form.medicalBoFlow" >
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="挂网时间" prop="researchTime">
+                <el-date-picker
+                  value-format="yyyy-MM-dd"
+                  v-model="form.medicalBoFlow.hangingTime"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <Filemanager
+              @reload="reload"
+              :form="form"
+              :name="'投标书'"
+              :fileName="form.medicalBoFlow.biddingDocumentsAccessoryName"
+              :fileUrlid="form.medicalBoFlow.biddingDocumentsAccessoryUrlId"
+              :field="'bidding_documents_accessory'"
+            />
+          </el-row>
+          <el-row>
+            <el-col :span="5">
+              <el-form-item label="投标是否通过" prop="biddingDocumentsPass">
+                <el-radio
+                  v-model="form.medicalBoFlow.biddingDocumentsPass"
+                  label="1"
+                  >是</el-radio
+                >
+                <el-radio
+                  v-model="form.medicalBoFlow.biddingDocumentsPass"
+                  label="0"
+                  >否</el-radio
+                >
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row v-show="this.form.medicalBoFlow.biddingDocumentsPass == '1'">
+            <el-col :span="8">
+              <el-form-item label="我方优势" prop="ourAdvantage">
+                <el-input
+                  v-model="form.medicalBoFlow.ourAdvantage"
+                  placeholder="我方优势"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row v-show="this.form.medicalBoFlow.biddingDocumentsPass == '0'">
+            <el-col :span="8">
+              <el-form-item label="我方劣势" prop="ourAdvantage">
+                <el-input
+                  v-model="form.medicalBoFlow.ourAdvantage"
+                  placeholder="我方劣势"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row v-if="form.medicalBoFlow.biddingDocumentsPass == 1">
+            <Filemanager
+              @reload="reload"
+              :form="form"
+              :name="'中标通知书'"
+              :fileName="form.medicalBoFlow.letterAcceptanceAccessoryName"
+              :fileUrlid="form.medicalBoFlow.letterAcceptanceAccessoryUrlId"
+              :field="'letter_acceptance_accessory'"
+            />
+          </el-row>
+        </el-form>
+      </el-tab-pane>
+      <el-tab-pane label="合同签订" name="t20802" style="height: 200px; overflow-y: scroll" v-if="tabsName.t20802">
+        <el-form :disabled="!isUpdate" :model="form.medicalBoFlow">
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="合同签订时间" prop="contractSigningTime">
+                <el-date-picker
+                  value-format="yyyy-MM-dd"
+                  v-model="form.medicalBoFlow.contractSigningTime"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <Filemanager
+              @reload="reload"
+              :form="form"
+              :name="'合同文件'"
+              :fileName="form.medicalBoFlow.contractDocumentAccessoryName"
+              :fileUrlid="form.medicalBoFlow.contractDocumentAccessoryUrlId"
+              :field="'contract_document_accessory'"
+            />
+          </el-row>
+        </el-form>
+      </el-tab-pane>
+
+      <!-- 医疗设备商机页签 -->
+      <!-- 需求信息收集 -->
+      <el-tab-pane label="需求详情" name="t30101" style="height: 200px; overflow-y: scroll" v-if="tabsName.t30101">
+        <Filemanager
+          @reload="reload"
+          :form="form"
+          :name="'设备清单'"
+          :fileName="form.armariumBoFlow.hosEqPurchaseAccessoryName"
+          :fileUrlid="form.armariumBoFlow.hosEqPurchaseAccessoryUrlId"
+          :field="'hos_eq_purchase_accessory'"
+        />
+      </el-tab-pane>
+      <!-- 商机审核 -->
+      <el-tab-pane label="阶段动作" name="t30201" style="height: 200px; overflow-y: scroll" v-if="tabsName.t30201">
+        <el-descriptions >
+          <el-descriptions-item label="医院应收总额">
+            <div v-for="dict in dict.type.mk_bo_total_revenue" v-if="form.totalHosRevenue == dict.value">
+              <div>{{dict.label}}</div>
+            </div>
+          </el-descriptions-item>
+          <el-descriptions-item label="医院耗材预估额(万元)">{{form.hosDiscreetValue}}</el-descriptions-item>
+        </el-descriptions>
+      </el-tab-pane>
+      <!-- 项目立项 -->
+      <el-tab-pane label="阶段动作" name="t30301" style="height: 200px; overflow-y: scroll" v-if="tabsName.t30301">
+        <el-form :model="form.armariumBoFlow" :disabled="!isUpdate">
+          <el-form-item label="项目立项是否通过" prop="projectApproval">
+            <el-radio
+              v-model="form.armariumBoFlow.projectApproval"
+              label="1"
+              >是</el-radio
+            >
+            <el-radio
+              v-model="form.armariumBoFlow.projectApproval"
+              label="0"
+              >否</el-radio
+            >
+          </el-form-item>
+          <Filemanager
+            @reload="reload"
+            :form="form"
+            :name="'商机审议会'"
+            :fileName="form.armariumBoFlow.businessCouncilAccessoryName"
+            :fileUrlid="form.armariumBoFlow.businessCouncilAccessoryUrlId"
+            :field="'business_council_accessory'"
+            v-if="form.armariumBoFlow.projectApproval == 1"
+          />
+          <Filemanager
+            @reload="reload"
+            :form="form"
+            :name="'立项书'"
+            :fileName="form.armariumBoFlow.projectProposalAccessoryName"
+            :fileUrlid="form.armariumBoFlow.projectProposalAccessoryUrlId"
+            :field="'project_proposal_accessory'"
+            v-if="form.armariumBoFlow.projectApproval == 1"
+          />
+          <el-form-item label="项目未通过原因:" prop="noPassCause"  v-if="form.armariumBoFlow.projectApproval == 0">
+            <el-row>
+              <el-col
+                :span="8"
+              >
+                <el-input
+                    v-model="form.armariumBoFlow.noPassCause"
+                  />
+              </el-col>
+            </el-row>
+          </el-form-item>
+        </el-form>
+      </el-tab-pane>
+      <!-- 谈判产品 -->
+      <el-tab-pane label="谈判产品" name="t30401" style="height: 200px; overflow-y: scroll" v-if="tabsName.t30401">
+        <el-form :inline="true" :disabled="!isUpdate" :model="form.armariumBoFlow" >
+          <el-col :span="1.5">
+            <el-form-item label="谈判产品日期" prop="negotiationTime" >
+              <el-date-picker
+                value-format="yyyy-MM-dd"
+                v-model="form.armariumBoFlow.negotiationTime">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <Filemanager
+            @reload="reload"
+            :form="form"
+            :name="'谈判产品报告'"
+            :fileName="form.armariumBoFlow.negotiationProductAccessoryName"
+            :fileUrlid="form.armariumBoFlow.negotiationProductAccessoryUrlId"
+            :field="'negotiation_product_accessory'"
+          />
+        </el-form>
+      </el-tab-pane>
+      <!-- 获得授权 -->
+      <el-tab-pane label="获得授权" name="t30501" style="height: 200px; overflow-y: scroll" v-if="tabsName.t30501">
+        <el-form :inline="true" :disabled="!isUpdate" :model="form.armariumBoFlow" >
+          <el-form-item label="授权产品名称" prop="impowerProductName" >
+            <el-input v-model="form.armariumBoFlow.impowerProductName" />
+          </el-form-item>
+          <el-form-item label="授权产品品牌" prop="impowerProductBrand" >
+            <el-input v-model="form.armariumBoFlow.impowerProductBrand" />
+          </el-form-item>
+          <el-form-item label="授权开始时间" prop="impowerStartTime" >
+            <el-date-picker
+              value-format="yyyy-MM-dd"
+              v-model="form.armariumBoFlow.impowerStartTime"
+            >
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="授权结束时间" prop="impowerEndTime" >
+            <el-date-picker
+              value-format="yyyy-MM-dd"
+              v-model="form.armariumBoFlow.impowerEndTime"
+            >
+            </el-date-picker>
+          </el-form-item>
+        </el-form>
+      </el-tab-pane>
+      <!-- 解决方案 -->
+      <el-tab-pane label="解决方案" name="t30601" style="height: 200px; overflow-y: scroll" v-if="tabsName.t30601">
+        <Filemanager
+          @reload="reload"
+          :form="form"
+          :name="'产品解决方案'"
+          :fileName="form.armariumBoFlow.productSolutionAccessoryName"
+          :fileUrlid="form.armariumBoFlow.productSolutionAccessoryUrlId"
+          :field="'product_solution_accessory'"
+        />
+      </el-tab-pane>
+      <!-- 投标与签合同 -->
+      <el-tab-pane label="挂网投标" name="t30701" style="height: 200px; overflow-y: scroll" v-if="tabsName.t30701">
+        <el-form :disabled="!isUpdate" :model="form.armariumBoFlow" >
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="挂网时间" prop="researchTime">
+                <el-date-picker
+                  value-format="yyyy-MM-dd"
+                  v-model="form.armariumBoFlow.hangingTime"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <Filemanager
+              @reload="reload"
+              :form="form"
+              :name="'投标书'"
+              :fileName="form.armariumBoFlow.biddingDocumentsAccessoryName"
+              :fileUrlid="form.armariumBoFlow.biddingDocumentsAccessoryUrlId"
+              :field="'bidding_documents_accessory'"
+            />
+          </el-row>
+          <el-row>
+            <el-col :span="5">
+              <el-form-item label="投标是否通过" prop="biddingDocumentsPass">
+                <el-radio
+                  v-model="form.armariumBoFlow.biddingDocumentsPass"
+                  label="1"
+                  >是</el-radio
+                >
+                <el-radio
+                  v-model="form.armariumBoFlow.biddingDocumentsPass"
+                  label="0"
+                  >否</el-radio
+                >
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row v-show="this.form.armariumBoFlow.biddingDocumentsPass == '1'">
+            <el-col :span="8">
+              <el-form-item label="我方优势" prop="ourAdvantage">
+                <el-input
+                  v-model="form.armariumBoFlow.ourAdvantage"
+                  placeholder="我方优势"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row v-show="this.form.armariumBoFlow.biddingDocumentsPass == '0'">
+            <el-col :span="8">
+              <el-form-item label="我方劣势" prop="ourAdvantage">
+                <el-input
+                  v-model="form.armariumBoFlow.ourAdvantage"
+                  placeholder="我方劣势"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row v-if="form.armariumBoFlow.biddingDocumentsPass == 1">
+            <Filemanager
+              @reload="reload"
+              :form="form"
+              :name="'中标通知书'"
+              :fileName="form.armariumBoFlow.letterAcceptanceAccessoryName"
+              :fileUrlid="form.armariumBoFlow.letterAcceptanceAccessoryUrlId"
+              :field="'letter_acceptance_accessory'"
+            />
+          </el-row>
+        </el-form>
+      </el-tab-pane>
+      <el-tab-pane label="合同签订" name="t30702" style="height: 200px; overflow-y: scroll" v-if="tabsName.t30702">
+        <el-form :disabled="!isUpdate" :model="form.armariumBoFlow">
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="合同签订时间" prop="contractSigningTime">
+                <el-date-picker
+                  value-format="yyyy-MM-dd"
+                  v-model="form.armariumBoFlow.contractSigningTime"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <Filemanager
+              @reload="reload"
+              :form="form"
+              :name="'合同文件'"
+              :fileName="form.armariumBoFlow.contractDocumentAccessoryName"
+              :fileUrlid="form.armariumBoFlow.contractDocumentAccessoryUrlId"
+              :field="'contract_document_accessory'"
+            />
+          </el-row>
+        </el-form>
+      </el-tab-pane>
+
+      <!-- 军队医疗设备商机页签 -->
+      <!-- 需求信息收集 -->
+      <el-tab-pane label="设备清单" name="t40101" style="height: 200px; overflow-y: scroll" v-if="tabsName.t40101">
+        <Filemanager
+          @reload="reload"
+          :form="form"
+          :name="'设备清单'"
+          :fileName="form.amfBoFlow.hosEqPurchaseAccessoryName"
+          :fileUrlid="form.amfBoFlow.hosEqPurchaseAccessoryUrlId"
+          :field="'hos_eq_purchase_accessory'"
+        />
+      </el-tab-pane>
+      <!-- 商机审核 -->
+      <el-tab-pane label="阶段动作" name="t40201" style="height: 200px; overflow-y: scroll" v-if="tabsName.t40201">
+        <el-descriptions >
+          <el-descriptions-item label="医院应收总额">
+            <div v-for="dict in dict.type.mk_bo_total_revenue" v-if="form.totalHosRevenue == dict.value">
+              <div>{{dict.label}}</div>
+            </div>
+          </el-descriptions-item>
+          <el-descriptions-item label="医院耗材预估额(万元)">{{form.hosDiscreetValue}}</el-descriptions-item>
+        </el-descriptions>
+      </el-tab-pane>
+      <!-- 项目立项 -->
+      <el-tab-pane label="阶段动作" name="t40301" style="height: 200px; overflow-y: scroll" v-if="tabsName.t40301">
+        <el-form :disabled="!isUpdate" :model="form.amfBoFlow" >
+          <el-form-item label="项目立项是否通过" prop="projectApproval">
+            <el-radio
+              v-model="form.amfBoFlow.projectApproval"
+              label="1"
+              >是</el-radio
+            >
+            <el-radio
+              v-model="form.amfBoFlow.projectApproval"
+              label="0"
+              >否</el-radio
+            >
+          </el-form-item>
+          <Filemanager
+            @reload="reload"
+            :form="form"
+            :name="'设备清单'"
+            :fileName="form.amfBoFlow.businessCouncilAccessoryName"
+            :fileUrlid="form.amfBoFlow.businessCouncilAccessoryUrlId"
+            :field="'business_council_accessory'"
+            v-if="form.amfBoFlow.projectApproval == 1"
+          />
+          <Filemanager
+            @reload="reload"
+            :form="form"
+            :name="'立项书'"
+            :fileName="form.amfBoFlow.projectProposalAccessoryName"
+            :fileUrlid="form.amfBoFlow.projectProposalAccessoryUrlId"
+            :field="'project_proposal_accessory'"
+            v-if="form.amfBoFlow.projectApproval == 1"
+          />
+          <el-form-item label="项目未通过原因:" prop="noPassCause"  v-if="form.amfBoFlow.projectApproval == 0">
+            <el-row>
+              <el-col
+                :span="8"
+              >
+                <el-input
+                    v-model="form.amfBoFlow.noPassCause"
+                  />
+              </el-col>
+            </el-row>
+          </el-form-item>
+        </el-form>
+      </el-tab-pane>
+      <!-- 谈判产品 -->
+      <el-tab-pane label="谈判产品" name="t40401" style="height: 200px; overflow-y: scroll" v-if="tabsName.t40401">
+        <el-form :inline="true" :disabled="!isUpdate" :model="form.amfBoFlow" >
+          <el-col :span="1.5">
+            <el-form-item label="谈判产品日期" prop="negotiationTime" >
+              <el-date-picker
+                value-format="yyyy-MM-dd"
+                v-model="form.amfBoFlow.negotiationTime">
+              </el-date-picker>
+            </el-form-item>
+          </el-col>
+          <Filemanager
+            @reload="reload"
+            :form="form"
+            :name="'谈判产品报告'"
+            :fileName="form.amfBoFlow.negotiationProductAccessoryName"
+            :fileUrlid="form.amfBoFlow.negotiationProductAccessoryUrlId"
+            :field="'negotiation_product_accessory'"
+          />
+        </el-form>
+      </el-tab-pane>
+      <!-- 获得授权 -->
+      <el-tab-pane label="获得授权" name="t40501" style="height: 200px; overflow-y: scroll" v-if="tabsName.t40501">
+        <el-form :inline="true" :disabled="!isUpdate" :model="form.amfBoFlow">
+          <el-form-item label="授权产品名称" prop="impowerProductName" >
+            <el-input v-model="form.amfBoFlow.impowerProductName" />
+          </el-form-item>
+          <el-form-item label="授权产品品牌" prop="impowerProductBrand" >
+            <el-input v-model="form.amfBoFlow.impowerProductBrand" />
+          </el-form-item>
+          <el-form-item label="授权开始时间" prop="impowerStartTime" >
+            <el-date-picker
+              value-format="yyyy-MM-dd"
+              v-model="form.amfBoFlow.impowerStartTime">
+            </el-date-picker>
+          </el-form-item>
+          <el-form-item label="授权结束时间" prop="impowerEndTime" >
+            <el-date-picker
+              value-format="yyyy-MM-dd"
+              v-model="form.amfBoFlow.impowerEndTime">
+            </el-date-picker>
+          </el-form-item>
+        </el-form>
+      </el-tab-pane>
+      <!-- 解决方案 -->
+      <el-tab-pane label="解决方案" name="t40601" style="height: 200px; overflow-y: scroll" v-if="tabsName.t40601">
+        <Filemanager
+          @reload="reload"
+          :form="form"
+          :name="'产品解决方案'"
+          :fileName="form.amfBoFlow.productSolutionAccessoryName"
+          :fileUrlid="form.amfBoFlow.productSolutionAccessoryUrlId"
+          :field="'product_solution_accessory'"
+        />
+      </el-tab-pane>
+      <!-- 投标与签合同 -->
+      <el-tab-pane label="挂网投标" name="t40701" style="height: 200px; overflow-y: scroll" v-if="tabsName.t40701">
+        <el-form :disabled="!isUpdate" :model="form.amfBoFlow" >
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="挂网时间" prop="researchTime">
+                <el-date-picker
+                  value-format="yyyy-MM-dd"
+                  v-model="form.amfBoFlow.hangingTime"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <Filemanager
+              @reload="reload"
+              :form="form"
+              :name="'投标书'"
+              :fileName="form.amfBoFlow.biddingDocumentsAccessoryName"
+              :fileUrlid="form.amfBoFlow.biddingDocumentsAccessoryUrlId"
+              :field="'bidding_documents_accessory'"
+            />
+          </el-row>
+          <el-row>
+            <el-col :span="5">
+              <el-form-item label="投标是否通过" prop="biddingDocumentsPass">
+                <el-radio
+                  v-model="form.amfBoFlow.biddingDocumentsPass"
+                  label="1"
+                  >是</el-radio
+                >
+                <el-radio
+                  v-model="form.amfBoFlow.biddingDocumentsPass"
+                  label="0"
+                  >否</el-radio
+                >
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row v-show="this.form.amfBoFlow.biddingDocumentsPass == '1'">
+            <el-col :span="8">
+              <el-form-item label="我方优势" prop="ourAdvantage">
+                <el-input
+                  v-model="form.amfBoFlow.ourAdvantage"
+                  placeholder="我方优势"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row v-show="this.form.amfBoFlow.biddingDocumentsPass == '0'">
+            <el-col :span="8">
+              <el-form-item label="我方劣势" prop="ourAdvantage">
+                <el-input
+                  v-model="form.amfBoFlow.ourAdvantage"
+                  placeholder="我方劣势"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row v-if="form.amfBoFlow.biddingDocumentsPass == 1">
+            <Filemanager
+              @reload="reload"
+              :form="form"
+              :name="'中标通知书'"
+              :fileName="form.amfBoFlow.letterAcceptanceAccessoryName"
+              :fileUrlid="form.amfBoFlow.letterAcceptanceAccessoryUrlId"
+              :field="'letter_acceptance_accessory'"
+            />
+          </el-row>
+        </el-form>
+      </el-tab-pane>
+      <el-tab-pane label="合同签订" name="t40702" style="height: 200px; overflow-y: scroll" v-if="tabsName.t40702">
+        <el-form :disabled="!isUpdate" :model="form.amfBoFlow">
+          <el-row>
+            <el-col :span="8">
+              <el-form-item label="合同签订时间" prop="contractSigningTime">
+                <el-date-picker
+                  value-format="yyyy-MM-dd"
+                  v-model="form.amfBoFlow.contractSigningTime"
+                >
+                </el-date-picker>
+              </el-form-item>
+            </el-col>
+          </el-row>
+          <el-row>
+            <Filemanager
+              @reload="reload"
+              :form="form"
+              :name="'合同文件'"
+              :fileName="form.amfBoFlow.contractDocumentAccessoryName"
+              :fileUrlid="form.amfBoFlow.contractDocumentAccessoryUrlId"
+              :field="'contract_document_accessory'"
+            />
+          </el-row>
+        </el-form>
+      </el-tab-pane>
+
+      <!-- 公用页签 -->
+      <el-tab-pane label="项目成员" name="tB" style="height: 200px; overflow-y: scroll" v-if="tabsName.B">
+        <PojpsnList
+          :source="'BoDetails'"
+          :bo="form"
+          :boAuthority="boAuthority"
+          v-if="activeName == 'tB'"
+        />
+      </el-tab-pane>
+      <el-tab-pane label="跟进记录" name="tA" style="height: 200px; overflow-y: scroll" v-if="tabsName.A">
+        <BehaviorList
+          :source="'BoDetails'"
+          :bo="behaviorParame"
+          :boAuthority="boAuthority"
+          v-if="activeName == 'tA'"
+        />
+      </el-tab-pane>
+    </el-tabs>
+    <!-- 编辑按钮组 -->
+    <dev>
+      <el-row type="flex" class="row-bg" justify="end">
+        <el-col :span="2" v-show="!isUpdate && showStage.code == form.boStage && winningState == 0" v-if="this.boAuthority.boAuthority.boEdit">
+          <div class="grid-content bg-purple">
+            <el-button
+              @click="modifyButton"
+              >修改</el-button
+            >
+          </div>
+        </el-col>
+        <el-col :span="2" v-show="isUpdate">
+          <div class="grid-content bg-purple-light">
+            <el-button
+              @click="cancelButton"
+              >取消</el-button
+            >
+          </div>
+        </el-col>
+        <el-col :span="2" v-show="isUpdate">
+          <div class="grid-content bg-purple">
+            <el-button
+              @click="saveButton"
+              >保存</el-button
+            >
+          </div>
+        </el-col>
+      </el-row>
+    </dev>
+  </div>
+</template>
+
+<script>
+import {submit, changeNextStage, updateBasicFlow} from "@/api/business/spd/bo/basic";
+import BehaviorList from "../behavior/behaviorList.vue";
+import PojpsnList from "../pojpsn/pojpsnList.vue";
+import Filemanager from '../basic/filemanager.vue';
+
+export default {
+  name: "process",
+  props: ["form","boAuthority","boStage","dict"],
+  components: {BehaviorList,PojpsnList,Filemanager},
+  data() {
+    return {
+      //选择的选项卡
+      activeName: '',
+      //查看的节点
+      showStage: null,
+      //流程所在节点
+      active: null,
+      //提交按钮是否显示
+      showSubmit:false,
+      //下一步按钮是否显示
+      showNext:false,
+      //页签显示状态
+      tabsName:{
+        t00101:false,
+        t00201:false,
+        t00202:false,
+        t00301:false,
+        t00302:false,
+        t00303:false,
+        t00401:false,
+        t00501:false,
+        t00601:false,
+        t00801:false,
+        t00802:false,
+
+        t10101:false,
+        t10201:false,
+        t10301:false,
+        t10401:false,
+        t10501:false,
+        t10601:false,
+        t10602:false,
+
+        t20101:false,
+        t20201:false,
+        t20301:false,
+        t20401:false,
+        t20501:false,
+        t20601:false,
+        t20701:false,
+        t20801:false,
+        t20802:false,
+
+        t30101:false,
+        t30201:false,
+        t30301:false,
+        t30401:false,
+        t30501:false,
+        t30601:false,
+        t30701:false,
+        t30702:false,
+
+        t40101:false,
+        t40201:false,
+        t40301:false,
+        t40401:false,
+        t40501:false,
+        t40601:false,
+        t40701:false,
+        t40702:false,
+
+        A:false,
+        B:false,
+      },
+      //编辑状态
+      isUpdate:false,
+      //跟进记录参数
+      behaviorParame:{},
+    };
+  },
+  created() {
+    console.log("this.boAuthority", this.boAuthority);
+    console.log('流程组件的boStage',this.boStage);
+    console.log('流程组件的form',this.form);
+    //初始化流程数据
+    //控制提交、下一步按钮显示状态
+    var arr = this.boStage.filter(item=>item.name.toString().includes('审核'));
+    var auditNode = arr[0].orderNum;
+    console.log('auditNode',auditNode);
+    var arr1 = this.boStage.filter(item=>item.code == this.form.boStage);
+    var curNode = arr1[0].orderNum;
+    console.log('curNode',curNode);
+     if(auditNode == curNode || arr1[0].code.toString().includes('99')){
+      this.showSubmit = false;
+      this.showNext = false;
+    }else if(auditNode - 1 == curNode){
+      this.showSubmit = true;
+      this.showNext = false;
+    }else if(auditNode - 1 != curNode){
+      this.showNext = true;
+      this.showSubmit = false;
+    }
+    this.showStage = {code:this.form.boStage}
+    //控制初始化时展示哪些页签
+    this.showTabs(this.form.boStage);
+  },
+  methods: {
+    // 当前流程节点转换
+    activeConversion(val){
+      let arr = this.boStage.filter(item=>item.code == val);
+      return arr[0].orderNum;
+    },
+    //查看阶段时触发
+    viewingProcedure(stage) {
+      this.showStage = stage;
+      console.log(this.showStage,this.form.boStage);
+      if(this.isUpdate) return;
+      let arr = this.boStage.filter(item=>item.code == this.form.boStage);
+      this.showStage = stage;
+      if(stage.orderNum > arr[0].orderNum){
+        this.$modal.alert("只能查看之前的阶段信息!");
+      }else{
+        this.showTabs(stage.code);
+      }
+    },
+    //  提交至OA进行审批
+    submitOa(){
+      const id = this.form.id;
+      this.$modal.confirm('确认提交吗?').then(function() {
+        return submit(id);
+      }).then(() => {
+        this.$modal.msgSuccess("提交成功");
+        this.$emit('reload');
+      }).catch(() => {});
+    },
+    //下一步
+    next() {
+      var boId = this.form.id;
+      this.$modal.confirm('确定要变更为下一阶段吗?').then(function() {
+        return changeNextStage(boId);
+      }).then(() => {
+        this.$modal.msgSuccess("流程扭转成功");
+        this.$emit('reload');
+      }).catch(function() {
+      });
+    },
+    //修改按钮
+    modifyButton() {
+      this.isUpdate = true;
+    },
+    //取消按钮
+    cancelButton() {
+      this.isUpdate = false;
+      this.$emit('reload');
+    },
+    //保存按钮
+    saveButton() {
+      updateBasicFlow(this.form).then((response) => {
+        this.$modal.msgSuccess("修改成功");
+        this.isUpdate = false;
+        this.$emit('reload');
+      });
+    },
+    //多页签切换
+    tabsSwitch(e) {
+      console.log("当前查看的页签是",e.name);
+      switch(e.name) {
+        case 'tA':
+          this.behaviorParame = JSON.parse(JSON.stringify(this.form));
+          this.behaviorParame.boStage = this.showStage.code;
+          //跟进记录
+          break;
+        case 'tB':
+          //项目成员
+          break;
+        default:
+            break;
+      }
+    },
+    //展示哪些页签
+    showTabs(val){
+      console.log('当前查看的阶段是',val);
+      this.closeTabs();
+      switch(val){
+        case '0-01':
+          this.activeName = 't00101';
+          this.tabsName.t00101 = true;
+          this.tabsName.A = true;
+          break;
+        case '0-02':
+          this.activeName = 't00201';
+          this.tabsName.t00201 = true;
+          this.tabsName.t00202 = true;
+          this.tabsName.A = true;
+          this.tabsName.B = true;
+          break;
+        case '0-03':
+          this.activeName = 't00301';
+          this.tabsName.t00301 = true;
+          this.tabsName.t00302 = true;
+          break;
+        case '0-04':
+          this.activeName = 't00401';
+          this.tabsName.t00401 = true;
+          break;
+        case '0-05':
+          this.activeName = 't00501';
+          this.tabsName.t00501 = true;
+          break;
+        case '0-06':
+          this.activeName = 't00601';
+          this.tabsName.t00601 = true;
+          break;
+        case '0-07':
+          this.activeName = 't00301';
+          this.tabsName.t00301 = true;
+          this.tabsName.t00302 = true;
+          this.tabsName.t00303 = true;
+          this.tabsName.t00401 = true;
+          this.tabsName.t00501 = true;
+          this.tabsName.t00601 = true;
+          this.tabsName.A = true;
+          break;
+        case '0-08':
+          this.activeName = 't00801';
+          this.tabsName.t00801 = true;
+          this.tabsName.t00802 = true;
+          this.tabsName.A = true;
+          break;
+        case '0-09':
+          break;
+        case '0-10':
+          break;
+        case '0-11':
+          break;
+        case '0-12':
+          break;
+        case '1-01':
+          this.activeName = 't10101';
+          this.tabsName.t10101 = true;
+          this.tabsName.A = true;
+          break;
+        case '1-02':
+          this.activeName = 't10201';
+          this.tabsName.t10201 = true;
+          this.tabsName.B = true;
+          this.tabsName.A = true;
+          break;
+        case '1-03':
+          this.activeName = 't10301';
+          this.tabsName.t10301 = true;
+          break;
+        case '1-04':
+          this.activeName = 't10301';
+          this.tabsName.t10301 = true;
+          this.tabsName.t10401 = true;
+          this.tabsName.A = true;
+          break;
+        case '1-05':
+          this.activeName = 't10501';
+          this.tabsName.t10501 = true;
+          this.tabsName.A = true;
+          break;
+        case '1-06':
+          this.activeName = 't10601';
+          this.tabsName.t10601 = true;
+          this.tabsName.t10602 = true;
+          this.tabsName.A = true;
+          break;
+        case '2-01':
+          this.activeName = 't20101';
+          this.tabsName.t20101 = true;
+          this.tabsName.A = true;
+          break;
+        case '2-02':
+          this.activeName = 't20201';
+          this.tabsName.t20201 = true;
+          this.tabsName.A = true;
+          break;
+        case '2-03':
+          this.activeName = 't20301';
+          this.tabsName.t20301 = true;
+          this.tabsName.B = true;
+          this.tabsName.A = true;
+          break;
+        case '2-04':
+          this.activeName = 't20401';
+          this.tabsName.t20401 = true;
+          break;
+        case '2-05':
+          this.activeName = 't20401';
+          this.tabsName.t20401 = true;
+          this.tabsName.t20501 = true;
+          this.tabsName.A = true;
+          break;
+        case '2-06':
+          this.activeName = 't20601';
+          this.tabsName.t20601 = true;
+          this.tabsName.A = true;
+          break;
+        case '2-07':
+          this.activeName = 't20701';
+          this.tabsName.t20701 = true;
+          this.tabsName.A = true;
+          break;
+        case '2-08':
+          this.activeName = 't20801';
+          this.tabsName.t20801 = true;
+          this.tabsName.t20802 = true;
+          this.tabsName.A = true;
+          break;
+        case '3-01':
+          this.activeName = 't30101';
+          this.tabsName.t30101 = true;
+          this.tabsName.A = true;
+          break;
+        case '3-02':
+          this.activeName = 't30201';
+          this.tabsName.t30201 = true;
+          this.tabsName.A = true;
+          break;
+        case '3-03':
+          this.activeName = 't30301';
+          this.tabsName.t30301 = true;
+          this.tabsName.B = true;
+          this.tabsName.A = true;
+          break;
+        case '3-04':
+          this.activeName = 't30401';
+          this.tabsName.t30401 = true;
+          break;
+        case '3-05':
+          this.activeName = 't30501';
+          this.tabsName.t30501 = true;
+          break;
+        case '3-06':
+          this.activeName = 't30401';
+          this.tabsName.t30401 = true;
+          this.tabsName.t30501 = true;
+          // this.tabsName.t30601 = true;
+          this.tabsName.A = true;
+          break;
+        case '3-07':
+          this.activeName = 't30701';
+          this.tabsName.t30701 = true;
+          this.tabsName.t30702 = true;
+          this.tabsName.A = true;
+          break;
+        case '4-01':
+          this.activeName = 't40101';
+          this.tabsName.t40101 = true;
+          this.tabsName.A = true;
+          break;
+        case '4-02':
+          this.activeName = 't40201';
+          this.tabsName.t40201 = true;
+          this.tabsName.A = true;
+          break;
+        case '4-03':
+          this.activeName = 't40301';
+          this.tabsName.t40301 = true;
+          this.tabsName.B = true;
+          this.tabsName.A = true;
+          break;
+        case '4-04':
+          this.activeName = 't40401';
+          this.tabsName.t40401 = true;
+          break;
+        case '4-05':
+          this.activeName = 't40501';
+          this.tabsName.t40501 = true;
+          break;
+        case '4-06':
+          this.activeName = 't40401';
+          this.tabsName.t40401 = true;
+          this.tabsName.t40501 = true;
+          // this.tabsName.t40601 = true;
+          this.tabsName.A = true;
+          break;
+        case '4-07':
+          this.activeName = 't40701';
+          this.tabsName.t40701 = true;
+          this.tabsName.t40702 = true;
+          this.tabsName.A = true;
+          break;
+        default:
+          break;
+      }
+    },
+    closeTabs(){
+      this.tabsName = {
+        t00101:false,
+        t00201:false,
+        t00202:false,
+        t00301:false,
+        t00302:false,
+        t00303:false,
+        t00401:false,
+        t00501:false,
+        t00601:false,
+        t00801:false,
+        t00802:false,
+
+        t10101:false,
+        t10201:false,
+        t10301:false,
+        t10401:false,
+        t10501:false,
+        t10601:false,
+        t10602:false,
+
+        t20101:false,
+        t20201:false,
+        t20301:false,
+        t20401:false,
+        t20501:false,
+        t20601:false,
+        t20701:false,
+        t20801:false,
+        t20802:false,
+
+        t30101:false,
+        t30201:false,
+        t30301:false,
+        t30401:false,
+        t30501:false,
+        t30601:false,
+        t30701:false,
+        t30702:false,
+
+        t40101:false,
+        t40201:false,
+        t40301:false,
+        t40401:false,
+        t40501:false,
+        t40601:false,
+        t40701:false,
+        t40702:false,
+
+        A:false,
+        B:false,
+      };
+    },
+    //重新加载数据
+    reload(){
+      this.$emit('reload');
+    },
+  },
+};
+</script>

+ 0 - 231
src/views/business/spd/bo/behavior/AA copy.vue

@@ -1,231 +0,0 @@
-<template>
-  <div class="component-upload-image">
-    <el-upload
-      multiple
-      :action="uploadImgUrl"
-      :auto-upload="false"
-      list-type="picture-card"
-      :on-success="handleUploadSuccess"
-      :before-upload="handleBeforeUpload"
-      :limit="limit"
-      :on-error="handleUploadError"
-      :on-exceed="handleExceed"
-      ref="imageUpload"
-      :on-remove="handleDelete"
-      :show-file-list="true"
-      :headers="headers"
-      :file-list="fileList"
-      :on-preview="handlePictureCardPreview"
-      :class="{hide: this.fileList.length >= this.limit}"
-    >
-      <i class="el-icon-plus"></i>
-    </el-upload>
-    
-    <!-- 上传提示 -->
-    <div class="el-upload__tip" slot="tip" v-if="showTip">
-      请上传
-      <template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
-      <template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
-      的文件
-    </div>
-
-    <el-dialog
-      :visible.sync="dialogVisible"
-      title="预览"
-      width="800"
-      append-to-body
-    >
-      <img
-        :src="dialogImageUrl"
-        style="display: block; max-width: 100%; margin: 0 auto"
-      />
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import { getToken } from "@/utils/auth";
-
-export default {
-  props: {
-    value: [String, Object, Array],
-    // 图片数量限制
-    limit: {
-      type: Number,
-      default: 5,
-    },
-    // 大小限制(MB)
-    fileSize: {
-       type: Number,
-      default: 5,
-    },
-    // 文件类型, 例如['png', 'jpg', 'jpeg']
-    fileType: {
-      type: Array,
-      default: () => ["png", "jpg", "jpeg"],
-    },
-    // 是否显示提示
-    isShowTip: {
-      type: Boolean,
-      default: true
-    }
-  },
-  model: {
-    prop: 'fileList',
-    event: 'editFileList'
-  },
-  data() {
-    return {
-      number: 0,
-      uploadList: [],
-      dialogImageUrl: "",
-      dialogVisible: false,
-      hideUpload: false,
-      baseUrl: process.env.VUE_APP_BASE_API,
-      uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
-      headers: {
-        Authorization: "Bearer " + getToken(),
-      },
-      // fileList: []
-    };
-  },
-  watch: {
-    value: {
-      handler(val) {
-        if (val) {
-          // 首先将值转为数组
-          const list = Array.isArray(val) ? val : this.value.split(',');
-          // 然后将数组转为对象数组
-          this.fileList = list.map(item => {
-            if (typeof item === "string") {
-              if (item.indexOf(this.baseUrl) === -1) {
-                  item = { name: this.baseUrl + item, url: this.baseUrl + item };
-              } else {
-                  item = { name: item, url: item };
-              }
-            }
-            return item;
-          });
-        } else {
-          this.fileList = [];
-          return [];
-        }
-      },
-      deep: true,
-      immediate: true
-    }
-  },
-  computed: {
-    // 是否显示提示
-    showTip() {
-      return this.isShowTip && (this.fileType || this.fileSize);
-    },
-  },
-  methods: {
-    // 上传前loading加载
-    handleBeforeUpload(file) {
-      let isImg = false;
-      if (this.fileType.length) {
-        let fileExtension = "";
-        if (file.name.lastIndexOf(".") > -1) {
-          fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
-        }
-        isImg = this.fileType.some(type => {
-          if (file.type.indexOf(type) > -1) return true;
-          if (fileExtension && fileExtension.indexOf(type) > -1) return true;
-          return false;
-        });
-      } else {
-        isImg = file.type.indexOf("image") > -1;
-      }
-
-      if (!isImg) {
-        this.$modal.msgError(`文件格式不正确, 请上传${this.fileType.join("/")}图片格式文件!`);
-        return false;
-      }
-      if (this.fileSize) {
-        const isLt = file.size / 1024 / 1024 < this.fileSize;
-        if (!isLt) {
-          this.$modal.msgError(`上传头像图片大小不能超过 ${this.fileSize} MB!`);
-          return false;
-        }
-      }
-      this.$modal.loading("正在上传图片,请稍候...");
-      this.number++;
-    },
-    // 文件个数超出
-    handleExceed() {
-      this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
-    },
-    // 上传成功回调
-    handleUploadSuccess(res, file) {
-      if (res.code === 200) {
-        this.uploadList.push({ name: res.fileName, url: res.fileName });
-        this.uploadedSuccessfully();
-      } else {
-        this.number--;
-        this.$modal.closeLoading();
-        this.$modal.msgError(res.msg);
-        this.$refs.imageUpload.handleRemove(file);
-        this.uploadedSuccessfully();
-      }
-    },
-    // 删除图片
-    handleDelete(file) {
-      const findex = this.fileList.map(f => f.name).indexOf(file.name);
-      if(findex > -1) {
-        this.fileList.splice(findex, 1);
-        this.$emit("input", this.listToString(this.fileList));
-      }
-    },
-    // 上传失败
-    handleUploadError() {
-      this.$modal.msgError("上传图片失败,请重试");
-      this.$modal.closeLoading();
-    },
-    // 上传结束处理
-    uploadedSuccessfully() {
-      if (this.number > 0 && this.uploadList.length === this.number) {
-        this.fileList = this.fileList.concat(this.uploadList);
-        this.uploadList = [];
-        this.number = 0;
-        this.$emit("input", this.listToString(this.fileList));
-        this.$modal.closeLoading();
-      }
-    },
-    // 预览
-    handlePictureCardPreview(file) {
-      this.dialogImageUrl = file.url;
-      this.dialogVisible = true;
-    },
-    // 对象转成指定字符串分隔
-    listToString(list, separator) {
-      let strs = "";
-      separator = separator || ",";
-      for (let i in list) {
-        if (list[i].url) {
-          strs += list[i].url.replace(this.baseUrl, "") + separator;
-        }
-      }
-      return strs != '' ? strs.substr(0, strs.length - 1) : '';
-    }
-  }
-};
-</script>
-<style scoped lang="scss">
-// .el-upload--picture-card 控制加号部分
-::v-deep.hide .el-upload--picture-card {
-    display: none;
-}
-// 去掉动画效果
-::v-deep .el-list-enter-active,
-::v-deep .el-list-leave-active {
-    transition: all 0s;
-}
-
-::v-deep .el-list-enter, .el-list-leave-active {
-    opacity: 0;
-    transform: translateY(0);
-}
-</style>
-

+ 0 - 230
src/views/business/spd/bo/behavior/AA.vue

@@ -1,230 +0,0 @@
-<template>
-  <div class="component-upload-image">
-    <el-upload
-      multiple
-      :action="uploadImgUrl"
-      list-type="picture-card"
-      :on-success="handleUploadSuccess"
-      :before-upload="handleBeforeUpload"
-      :limit="limit"
-      :on-error="handleUploadError"
-      :on-exceed="handleExceed"
-      ref="imageUpload"
-      :on-remove="handleDelete"
-      :show-file-list="true"
-      :headers="headers"
-      :file-list="fileList"
-      :on-preview="handlePictureCardPreview"
-      :class="{hide: this.fileList.length >= this.limit}"
-    >
-      <i class="el-icon-plus"></i>
-    </el-upload>
-    
-    <!-- 上传提示 -->
-    <div class="el-upload__tip" slot="tip" v-if="showTip">
-      请上传
-      <template v-if="fileSize"> 大小不超过 <b style="color: #f56c6c">{{ fileSize }}MB</b> </template>
-      <template v-if="fileType"> 格式为 <b style="color: #f56c6c">{{ fileType.join("/") }}</b> </template>
-      的文件
-    </div>
-
-    <el-dialog
-      :visible.sync="dialogVisible"
-      title="预览"
-      width="800"
-      append-to-body
-    >
-      <img
-        :src="dialogImageUrl"
-        style="display: block; max-width: 100%; margin: 0 auto"
-      />
-    </el-dialog>
-  </div>
-</template>
-
-<script>
-import { getToken } from "@/utils/auth";
-
-export default {
-  model: {
-    prop: 'fileList',
-    event: 'editFileList'
-  },
-  props: {
-    value: [String, Object, Array],
-    // 图片数量限制
-    limit: {
-      type: Number,
-      default: 5,
-    },
-    // 大小限制(MB)
-    fileSize: {
-       type: Number,
-      default: 5,
-    },
-    // 文件类型, 例如['png', 'jpg', 'jpeg']
-    fileType: {
-      type: Array,
-      default: () => ["png", "jpg", "jpeg"],
-    },
-    // 是否显示提示
-    isShowTip: {
-      type: Boolean,
-      default: true
-    }
-  },
-  data() {
-    return {
-      number: 0,
-      uploadList: [],
-      dialogImageUrl: "",
-      dialogVisible: false,
-      hideUpload: false,
-      baseUrl: process.env.VUE_APP_BASE_API,
-      uploadImgUrl: process.env.VUE_APP_BASE_API + "/common/upload", // 上传的图片服务器地址
-      headers: {
-        Authorization: "Bearer " + getToken(),
-      },
-      fileList: []
-    };
-  },
-  watch: {
-    value: {
-      handler(val) {
-        if (val) {
-          // 首先将值转为数组
-          const list = Array.isArray(val) ? val : this.value.split(',');
-          // 然后将数组转为对象数组
-          this.fileList = list.map(item => {
-            if (typeof item === "string") {
-              if (item.indexOf(this.baseUrl) === -1) {
-                  item = { name: this.baseUrl + item, url: this.baseUrl + item };
-              } else {
-                  item = { name: item, url: item };
-              }
-            }
-            return item;
-          });
-        } else {
-          this.fileList = [];
-          return [];
-        }
-      },
-      deep: true,
-      immediate: true
-    }
-  },
-  computed: {
-    // 是否显示提示
-    showTip() {
-      return this.isShowTip && (this.fileType || this.fileSize);
-    },
-  },
-  methods: {
-    // 上传前loading加载
-    handleBeforeUpload(file) {
-      let isImg = false;
-      if (this.fileType.length) {
-        let fileExtension = "";
-        if (file.name.lastIndexOf(".") > -1) {
-          fileExtension = file.name.slice(file.name.lastIndexOf(".") + 1);
-        }
-        isImg = this.fileType.some(type => {
-          if (file.type.indexOf(type) > -1) return true;
-          if (fileExtension && fileExtension.indexOf(type) > -1) return true;
-          return false;
-        });
-      } else {
-        isImg = file.type.indexOf("image") > -1;
-      }
-
-      if (!isImg) {
-        this.$modal.msgError(`文件格式不正确, 请上传${this.fileType.join("/")}图片格式文件!`);
-        return false;
-      }
-      if (this.fileSize) {
-        const isLt = file.size / 1024 / 1024 < this.fileSize;
-        if (!isLt) {
-          this.$modal.msgError(`上传头像图片大小不能超过 ${this.fileSize} MB!`);
-          return false;
-        }
-      }
-      this.$modal.loading("正在上传图片,请稍候...");
-      this.number++;
-    },
-    // 文件个数超出
-    handleExceed() {
-      this.$modal.msgError(`上传文件数量不能超过 ${this.limit} 个!`);
-    },
-    // 上传成功回调
-    handleUploadSuccess(res, file) {
-      if (res.code === 200) {
-        this.uploadList.push({ name: res.fileName, url: res.fileName });
-        this.uploadedSuccessfully();
-      } else {
-        this.number--;
-        this.$modal.closeLoading();
-        this.$modal.msgError(res.msg);
-        this.$refs.imageUpload.handleRemove(file);
-        this.uploadedSuccessfully();
-      }
-    },
-    // 删除图片
-    handleDelete(file) {
-      const findex = this.fileList.map(f => f.name).indexOf(file.name);
-      if(findex > -1) {
-        this.fileList.splice(findex, 1);
-        this.$emit("input", this.listToString(this.fileList));
-      }
-    },
-    // 上传失败
-    handleUploadError() {
-      this.$modal.msgError("上传图片失败,请重试");
-      this.$modal.closeLoading();
-    },
-    // 上传结束处理
-    uploadedSuccessfully() {
-      if (this.number > 0 && this.uploadList.length === this.number) {
-        this.fileList = this.fileList.concat(this.uploadList);
-        this.uploadList = [];
-        this.number = 0;
-        this.$emit("input", this.listToString(this.fileList));
-        this.$modal.closeLoading();
-      }
-    },
-    // 预览
-    handlePictureCardPreview(file) {
-      this.dialogImageUrl = file.url;
-      this.dialogVisible = true;
-    },
-    // 对象转成指定字符串分隔
-    listToString(list, separator) {
-      let strs = "";
-      separator = separator || ",";
-      for (let i in list) {
-        if (list[i].url) {
-          strs += list[i].url.replace(this.baseUrl, "") + separator;
-        }
-      }
-      return strs != '' ? strs.substr(0, strs.length - 1) : '';
-    }
-  }
-};
-</script>
-<style scoped lang="scss">
-// .el-upload--picture-card 控制加号部分
-::v-deep.hide .el-upload--picture-card {
-    display: none;
-}
-// 去掉动画效果
-::v-deep .el-list-enter-active,
-::v-deep .el-list-leave-active {
-    transition: all 0s;
-}
-
-::v-deep .el-list-enter, .el-list-leave-active {
-    opacity: 0;
-    transform: translateY(0);
-}
-</style>
-

+ 17 - 63
src/views/business/spd/bo/behavior/behaviorList.vue

@@ -31,11 +31,11 @@
           @click="handleDelete"
         >删除</el-button>
       </el-col> -->
-      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+      <!-- <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar> -->
     </el-row>
 
     <el-table v-loading="loading" :data="behaviorList" @selection-change="handleSelectionChange">
-      <el-table-column type="selection" width="55" align="center" />
+      <el-table-column type="index" label="序号" width="55" align="center"/>
       <el-table-column label="负责人" align="center" prop="staffName" />
       <el-table-column label="行动日期" align="center" prop="time" />
       <el-form-item label="行动日期" prop="time">
@@ -244,54 +244,22 @@
         <el-divider content-position="left">
           <dev style="width: 50px; height: 40px; font-size: 18px">照片信息</dev>
         </el-divider>
-        <!-- <AA :limit="2" v-model="fileList"></AA> -->
-  
+
         <el-upload
-          :action="actionUrl"
+          action="actionUrl"
           list-type="picture-card"
           :on-change="uploadPic"
+          :on-preview="handlePictureCardPreview"
+          :on-remove="handleRemove"
+          :auto-upload="false"
           :file-list="fileList"
-          :auto-upload="false">
-            <i slot="default" class="el-icon-plus"></i>
-            <div slot="file" slot-scope="{file}">
-              <img
-                class="el-upload-list__item-thumbnail"
-                :src="file.url" alt=""
-              >
-              <span class="el-upload-list__item-actions">
-                <span
-                  class="el-upload-list__item-preview"
-                  @click="handlePictureCardPreview(file)"
-                >
-                  <i class="el-icon-zoom-in"></i>
-                </span>
-                <span
-                  v-if="!disabled"
-                  class="el-upload-list__item-delete"
-                  @click="handleDownload(file)"
-                >
-                  <i class="el-icon-download"></i>
-                </span>
-                <span
-                  v-if="!disabled"
-                  class="el-upload-list__item-delete"
-                  @click="handleRemove(file)"
-                >
-                  <i class="el-icon-delete"></i>
-                </span>
-              </span>
-            </div>
+          >
+          <i class="el-icon-plus"></i>
         </el-upload>
         <el-dialog :visible.sync="dialogVisible">
           <img width="100%" :src="dialogImageUrl" alt="">
         </el-dialog>
-        <div class="demo-image__preview">
-          <el-image 
-            style="width: 100px; height: 100px"
-            :src="url" 
-            :preview-src-list="srcList">
-          </el-image>
-        </div>
+        
         <div class="md-auditInfo">
           <el-divider content-position="left">
             <dev style="width: 50px; height: 40px; font-size: 18px">其它信息</dev>
@@ -347,22 +315,14 @@
 import { listBehavior, getBehavior, delBehavior, addBehavior, updateBehavior,addPicture } from "@/api/business/spd/bo/behavior";
 import ContactRef from '@/views/business/spd/bo/refer/contact/index.vue';
 import SaleaeaRef from '@/views/business/spd/bo/refer/saleaea/index.vue';
-import AA from '@/views/business/spd/bo/behavior/AA.vue';
 
 export default {
   name: "BehaviorList",
   props:["source","bo","boAuthority"],
   dicts: ['mk_bo_behavior_res','mk_bo_behavior_type','sys_yes_no','mk_bo_behavior_goal'],
-  components: {ContactRef,SaleaeaRef,AA},
+  components: {ContactRef,SaleaeaRef},
   data() {
     return {
-url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
-        srcList: [
-          'https://fuss10.elemecdn.com/8/27/f01c15bb73e1ef3793e64e6b7bbccjpeg.jpeg',
-          'https://fuss10.elemecdn.com/1/8e/aeffeb4de74e2fde4bd74fc7b4486jpeg.jpeg',
-          'https://test-sy.derom.com/document-center/fastdfs/upload/433',
-        ],
-
       dialogImageUrl: '',
       dialogVisible: false,
       disabled: false,
@@ -448,28 +408,20 @@ url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
     if(this.source == 'TaskList'){
       this.queryParams.taskCode = this.bo.code;
     }
+    console.log("this.queryParams", this.queryParams);
     this.getList();
   },
   methods: {
     uploadPic(file, fileList) {
-      console.log('文件',file)
-      console.log('文件列表',fileList)
       this.fileList = fileList
+      console.log('this.fileList',this.fileList);
     },
     handleRemove(file) {
-      console.log('单击图片移除',file);
-      console.log('此时文件列表里面', this.fileList)
       this.fileList = this.fileList.filter(item => item.uid !== file.uid)
-      console.log('过滤后的', this.fileList)
     },
     handlePictureCardPreview(file) {
-      console.log(file)
       this.dialogImageUrl = file.url;
       this.dialogVisible = true;
-      console.log('图片列表',this.dialogImageUrl)
-    },
-    handleDownload(file) {
-      console.log(file);
     },
     /** 提交按钮 */
     submitForm() {
@@ -546,6 +498,7 @@ url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
     },
     /** 新增按钮操作 */
     handleAdd() {
+      this.fileList = [];
       this.reset();
       this.operatingState = "Insert";
       //新增行动设置默认值
@@ -584,8 +537,7 @@ url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
       const id = row.id || this.ids
       getBehavior(id).then(response => {
         this.form = response.data;
-        this.fileList = this.form.behaviorPs;
-        console.log('this.fileList',this.fileList);
+        
         this.open = true;
         this.title = "修改行动";
       });
@@ -596,6 +548,8 @@ url: 'https://fuss10.elemecdn.com/e/5d/4a731a90594a4af544c0c25941171jpeg.jpeg',
       const id = row.id || this.ids
       getBehavior(id).then(response => {
         this.form = response.data;
+        this.fileList = this.form.behaviorPs;
+        console.log('this.fileList',this.fileList);
         this.open = true;
         this.operatingState = "Browse";
         this.title = "基础信息";

+ 10 - 61
src/views/business/spd/bo/contact/contactList.vue

@@ -11,38 +11,8 @@
           v-if="this.boAuthority.boAuthority.contactAdd"
         >新增</el-button>
       </el-col>
-      <!-- <el-col :span="1.5">
-        <el-button
-          type="success"
-          plain
-          icon="el-icon-edit"
-          size="mini"
-          :disabled="single"
-          @click="handleUpdate"
-        >修改</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button
-          type="danger"
-          plain
-          icon="el-icon-delete"
-          size="mini"
-          :disabled="multiple"
-          @click="handleDelete"
-        >删除</el-button>
-      </el-col> -->
-      <!-- <el-col :span="1.5">
-        <el-button
-          type="warning"
-          plain
-          icon="el-icon-download"
-          size="mini"
-          @click="handleExport"
-        >导出</el-button>
-      </el-col> -->
       <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
     </el-row>
-
     <el-table v-loading="loading" :data="contactList" @selection-change="handleSelectionChange">
       <el-table-column type="selection" width="55" align="center" />
       <el-table-column label="编号" align="center" prop="code" />
@@ -72,37 +42,6 @@
           <dict-tag :options="dict.type.mk_bo_contact_state" :value="scope.row.state"/>
         </template>
       </el-table-column>
-      <!-- <el-table-column label="商机id" align="center" prop="boId" /> -->
-      <!-- <el-table-column label="创建日期" align="center" prop="createDate" width="180">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.createDate, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="部门编码" align="center" prop="departmentCode" />
-      <el-table-column label="销售区域" align="center" prop="area" />
-      <el-table-column label="销售组织" align="center" prop="organization" />
-      <el-table-column label="最佳拜访地点" align="center" prop="visitPlace" />
-      <el-table-column label="最佳拜访时间" align="center" prop="visitTime" width="180">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.visitTime, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="邮件" align="center" prop="mail" />
-      <el-table-column label="关键决策人" align="center" prop="decisionMaker" />
-      <el-table-column label="擅长领域" align="center" prop="fieldExpertise" />
-      <el-table-column label="支持度" align="center" prop="support" />
-      <el-table-column label="职称" align="center" prop="jobTitle" />
-      <el-table-column label="任职科室" align="center" prop="section" />
-      <el-table-column label="上级联系人" align="center" prop="superiorContact" />
-      <el-table-column label="籍贯" align="center" prop="birthplace" />
-      <el-table-column label="生日" align="center" prop="birthday" width="180">
-        <template slot-scope="scope">
-          <span>{{ parseTime(scope.row.birthday, '{y}-{m}-{d}') }}</span>
-        </template>
-      </el-table-column>
-      <el-table-column label="联系人分类" align="center" prop="contactClassification" />
-
-      <el-table-column label="所属客户编码" align="center" prop="customerCode" /> -->
       <el-table-column label="操作" fixed="right" align="center" class-name="small-padding fixed-width" v-if="this.source == 'BoDetails' ? this.bo.winningState == 0 ? true : false : true">
         <template slot-scope="scope">
           <el-button
@@ -514,6 +453,7 @@ export default {
     if(this.source == 'Contact'){
       this.queryParams = this.bo;
     }
+    console.log('this.boAuthority',this.boAuthority);
     this.getList();
   },
   methods: {
@@ -522,6 +462,15 @@ export default {
       this.loading = true;
       listContact(this.queryParams).then(response => {
         this.contactList = response.rows;
+        if(this.source == 'BoDetails'){
+          console.log('this.contactList',this.contactList);
+          for (var i = 0; i < this.contactList.length; i++) {
+            this.contactList[i].telephone = this.contactList[i].telephone.substring(0,3) + '******' + this.contactList[i].telephone.substring(this.contactList[i].telephone.length - 4,this.contactList[i].telephone.length);
+            this.contactList[i].customerName = this.contactList[i].customerName.substring(0,2) + '******' + this.contactList[i].customerName.substring(this.contactList[i].customerName.length - 2,this.contactList[i].customerName.length);
+            const start = new Array(this.contactList[i].name.length).join('*');
+            this.contactList[i].name = start + this.contactList[i].name.slice(-1);
+          }
+        }
         this.total = response.total;
         this.loading = false;
       });

+ 97 - 0
src/views/business/spd/bo/filetemplate/botabs.vue

@@ -0,0 +1,97 @@
+<template>
+  <div class="app-container">
+    <el-table v-loading="loading" :data="filetemplateList" @selection-change="handleSelectionChange">
+      <el-table-column type="index" label="序号" width="55" align="center"/>
+      <el-table-column label="模板名称" align="center" prop="name" />
+      <el-table-column label="上传者" align="center" prop="createByName" />
+      <el-table-column label="上传时间" align="center" prop="createTime" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            type="success"
+            plain
+            icon="el-icon-download"
+            size="small"
+            @click="downloadAccessory(scope.row)"
+            >下载</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+  </div>
+</template>
+
+<script>
+import { listFiletemplate } from "@/api/business/spd/bo/filetemplate";
+import axios from "axios";
+
+export default {
+  name: "Filetemplate",
+  props:["botype"],
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 总条数
+      total: 0,
+      // 文件模板表格数据
+      filetemplateList: [],
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        boType: null,
+        url: null,
+        name: null,
+      },
+
+    };
+  },
+  created() {
+    this.queryParams.boType = this.botype;
+    this.getList();
+  },
+  methods: {
+    /** 查询文件模板列表 */
+    getList() {
+      this.loading = true;
+      listFiletemplate(this.queryParams).then(response => {
+        this.filetemplateList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    //下载附件
+    downloadAccessory(row) {
+      console.log('row',row);
+      var resUrl = "https://sy.derom.com/document-center/fastdfs/download?id=" + row.url;
+      axios
+        .create({
+          timeout: 3000,
+          responseType: "blob", // 响应类型, 将响应数据转换为二进制数据
+          headers: {},
+        })
+        .get(resUrl)
+        .then((res) => {
+          console.log(res);
+          // 地址转换
+          let url = window.URL.createObjectURL(res.data);
+          const a = document.createElement("a");
+          a.setAttribute("href", url);
+          a.setAttribute("download", row.name);
+          document.body.append(a);
+          a.click();
+          document.body.removeChild(a);
+        });
+    },
+  }
+};
+</script>

+ 252 - 0
src/views/business/spd/bo/filetemplate/index.vue

@@ -0,0 +1,252 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="商机类型" prop="boType">
+        <el-input
+          v-model="queryParams.url"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="模板名称" prop="name">
+        <el-input
+          v-model="queryParams.name"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+
+    <el-row :gutter="10" class="mb8">
+      <el-col :span="1.5">
+        <el-button
+          type="primary"
+          plain
+          icon="el-icon-plus"
+          size="mini"
+          @click="uploadAccessory"
+        >上传</el-button>
+      </el-col>
+      <right-toolbar :showSearch.sync="showSearch" @queryTable="getList"></right-toolbar>
+    </el-row>
+
+    <el-table v-loading="loading" :data="filetemplateList" @selection-change="handleSelectionChange">
+      <el-table-column
+        type="index"
+        label="序号"
+        width="55"
+        align="center"
+      />
+      <el-table-column label="商机类型" align="center" prop="boType" >
+        <template slot-scope="scope">
+          <dict-tag :options="dict.type.mk_bo_type" :value="scope.row.boType"/>
+        </template>
+      </el-table-column>
+      <el-table-column label="模板名称" align="center" prop="name" />
+      <el-table-column label="操作" align="center" class-name="small-padding fixed-width">
+        <template slot-scope="scope">
+          <el-button
+            size="small"
+            type="danger"
+            plain
+            icon="el-icon-delete"
+            @click="deleteAccessory(scope.row.id)"
+          >删除</el-button>
+          <el-button
+            type="success"
+            plain
+            icon="el-icon-download"
+            size="small"
+            @click="downloadAccessory(scope.row)"
+            >下载</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <pagination
+      v-show="total>0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+
+    <el-dialog
+      :title="upload.title"
+      :visible.sync="upload.open"
+      width="400px"
+      append-to-body
+    >
+      <el-form ref="form" :model="form" label-width="80px">
+        <el-form-item label="商机类型">
+          <el-select v-model="form.boType">
+            <el-option
+              v-for="dict in dict.type.mk_bo_type"
+              :key="dict.value"
+              :label="dict.label"
+              :value="dict.value"
+            ></el-option>
+          </el-select>
+        </el-form-item>
+      </el-form>
+      <el-upload
+        ref="upload"
+        :limit="1"
+        accept=".xlsx, .xls, .doc, .docx, .word, .wordx, .png, .jpg, .gif, .txt"
+        :headers="upload.headers"
+        :action="upload.url + '?boType=' + form.boType"
+        :disabled="upload.isUploading"
+        :on-progress="handleFileUploadProgress"
+        :on-success="handleFileSuccess"
+        :auto-upload="false"
+        drag
+      >
+        <i class="el-icon-upload"></i>
+        <div class="el-upload__text">将文件拖到此处,或<em>点击上传</em></div>
+      </el-upload>
+      <div slot="footer" class="dialog-footer">
+        <el-button type="primary" @click="submitFileForm">确 定</el-button>
+        <el-button @click="upload.open = false">取 消</el-button>
+      </div>
+    </el-dialog>
+
+  </div>
+</template>
+
+<script>
+import { listFiletemplate,delFiletemplate } from "@/api/business/spd/bo/filetemplate";
+import { getToken } from "@/utils/auth";
+import axios from "axios";
+
+export default {
+  name: "Filetemplate",
+  dicts: ['mk_bo_type'],
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      // 显示搜索条件
+      showSearch: true,
+      // 总条数
+      total: 0,
+      // 文件模板表格数据
+      filetemplateList: [],
+      // 弹出层标题
+      title: "",
+      // 是否显示弹出层
+      open: false,
+      // 查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        boType: null,
+        url: null,
+        name: null,
+      },
+      // 表单参数
+      form: {},
+      // 表单校验
+      rules: {
+      },
+      // 上传参数
+      upload: {
+        // 是否显示弹出层
+        open: false,
+        // 弹出层标题
+        title: "",
+        // 是否禁用上传
+        isUploading: false,
+        // 上传类型
+        flag: "",
+        // 设置上传的请求头部
+        headers: { Authorization: "Bearer " + getToken() },
+        // 上传的地址
+        url: process.env.VUE_APP_BASE_API + "/mk/bo/filetemplate/upload",
+      },
+    };
+  },
+  created() {
+    this.getList();
+  },
+  methods: {
+    /** 查询文件模板列表 */
+    getList() {
+      this.loading = true;
+      listFiletemplate(this.queryParams).then(response => {
+        this.filetemplateList = response.rows;
+        this.total = response.total;
+        this.loading = false;
+      });
+    },
+    //上传附件公共方法
+    uploadAccessory() {
+      this.upload.open = true;
+    },
+    // 提交上传文件
+    submitFileForm() {
+      this.$refs.upload.submit();
+    },
+    // 文件上传中处理
+    handleFileUploadProgress(event, file, fileList) {
+      this.upload.isUploading = true;
+    },
+    // 文件上传成功处理
+    handleFileSuccess(response, file, fileList) {
+      this.upload.open = false;
+      this.upload.isUploading = false;
+      this.$refs.upload.clearFiles();
+      this.$alert(
+        "<div style='overflow: auto;overflow-x: hidden;max-height: 70vh;padding: 10px 20px 0;'>" +
+          response.msg +
+          "</div>",
+        "上传结果",
+        { dangerouslyUseHTMLString: true }
+      );
+      this.getList();
+    },
+    //下载附件
+    downloadAccessory(row) {
+      var resUrl = "https://sy.derom.com/document-center/fastdfs/download?id=" + row.url;
+      axios
+        .create({
+          timeout: 3000,
+          responseType: "blob", // 响应类型, 将响应数据转换为二进制数据
+          headers: {},
+        })
+        .get(resUrl)
+        .then((res) => {
+          console.log(res);
+          // 地址转换
+          let url = window.URL.createObjectURL(res.data);
+          const a = document.createElement("a");
+          a.setAttribute("href", url);
+          a.setAttribute("download", row.name);
+          document.body.append(a);
+          a.click();
+          document.body.removeChild(a);
+        });
+    },
+    //删除附件
+    deleteAccessory(id) {
+      this.$modal
+        .confirm("是否确认删除?")
+        .then(function () {})
+        .then(() => {
+          delFiletemplate(id).then((res) => {
+            if (res.code == 200) {
+              this.$modal.msgSuccess("删除成功");
+              this.getList();
+            } else {
+              this.$modal.msgSuccess("删除失败");
+            }
+          });
+        })
+        .catch(() => {});
+    },
+  }
+};
+</script>

+ 36 - 20
src/views/business/spd/bo/pojpsn/pojpsnList.vue

@@ -1,6 +1,6 @@
 <template>
   <div class="app-container">
-    <el-row :gutter="10" class="mb8">
+    <el-row :gutter="10" class="mb8" v-if="this.source == 'BoDetails' ? this.bo.winningState == 0 ? true : false : true">
       <el-col :span="1.5">
         <el-button
           type="primary"
@@ -8,10 +8,11 @@
           icon="el-icon-plus"
           size="mini"
           @click="handleAdd"
+          :disabled="!pojpsnAuthority.pojpsnAdd"
           >新增</el-button
         >
       </el-col>
-      <el-col :span="1.5">
+      <!-- <el-col :span="1.5">
         <el-button
           type="success"
           plain
@@ -32,11 +33,11 @@
           @click="handleDelete"
           >删除</el-button
         >
-      </el-col>
-      <right-toolbar
+      </el-col> -->
+      <!-- <right-toolbar
         :showSearch.sync="showSearch"
         @queryTable="getList"
-      ></right-toolbar>
+      ></right-toolbar> -->
     </el-row>
 
     <el-table
@@ -44,8 +45,7 @@
       :data="pojpsnList"
       @selection-change="handleSelectionChange"
     >
-      <el-table-column type="selection" width="55" align="center" />
-      <!-- <el-table-column label="主键" align="center" prop="id" /> -->
+      <el-table-column type="index" label="序号" width="55" align="center"/>
       <el-table-column
         label="商机名称"
         align="center"
@@ -65,10 +65,10 @@
         <template slot-scope="scope">
           <el-select v-model="scope.row.jobs" multiple disabled size="medium">
             <el-option
-              v-for="dict in dict.type.mk_bo_pojpsn_job"
-              :key="dict.value"
-              :label="dict.label"
-              :value="dict.value"
+              v-for="item in mk_bo_pojpsn_job"
+              :key="item.code"
+              :label="item.name"
+              :value="item.code"
             >
             </el-option>
           </el-select>
@@ -79,6 +79,7 @@
         fixed="right"
         align="center"
         class-name="small-padding fixed-width"
+        v-if="this.source == 'BoDetails' ? this.bo.winningState == 0 ? true : false : true"
       >
         <template slot-scope="scope">
           <el-button
@@ -86,6 +87,7 @@
             type="text"
             icon="el-icon-edit"
             @click="handleUpdate(scope.row)"
+            :disabled="!pojpsnAuthority.pojpsnEdit"
             >修改</el-button
           >
           <el-button
@@ -93,6 +95,7 @@
             type="text"
             icon="el-icon-delete"
             @click="handleDelete(scope.row)"
+            :disabled="!pojpsnAuthority.pojpsnDel"
             >删除</el-button
           >
         </template>
@@ -127,7 +130,7 @@
           </el-input>
         </el-form-item>
         <el-form-item label="项目岗位" prop="post">
-          <el-select v-model="form.post" placeholder="请选择项目岗位">
+          <el-select v-model="form.post" placeholder="请选择项目岗位" disabled>
             <el-option
               v-for="dict in dict.type.mk_bo_pojpsn_post"
               :key="dict.value"
@@ -139,10 +142,10 @@
         <el-form-item label="职责" prop="jobs">
           <el-select v-model="form.jobs" multiple placeholder="请选择职责">
             <el-option
-              v-for="dict in dict.type.mk_bo_pojpsn_job"
-              :key="dict.value"
-              :label="dict.label"
-              :value="dict.value"
+              v-for="item in mk_bo_pojpsn_job"
+              :key="item.code"
+              :label="item.name"
+              :value="item.code"
             >
             </el-option>
           </el-select>
@@ -171,11 +174,12 @@ import {
   updatePojpsn,
 } from "@/api/business/spd/bo/pojpsn";
 import StaffRef from "@/views/business/spd/bo/refer/staff/index.vue";
+import { getBoJobListByType } from "@/api/business/spd/bo/boJob";
 
 export default {
   name: "pojpsnList",
-  props: ["source", "bo"],
-  dicts: ["mk_bo_pojpsn_post", "mk_bo_pojpsn_job"],
+  props: ["source", "bo","boAuthority"],
+  dicts: ["mk_bo_pojpsn_post",],
   components: { StaffRef },
   data() {
     return {
@@ -219,6 +223,14 @@ export default {
       },
       //当前操作状态
       operatingState: "",
+      pojpsnAuthority:{
+        pojpsnAdd:true,
+        pojpsnDel:true,
+        pojpsnEdit:true,
+        pojpsnView:true,
+      },
+      //职责列表
+      mk_bo_pojpsn_job:[],
     };
   },
   created() {
@@ -227,9 +239,12 @@ export default {
     }
     if (this.source == "BoDetails") {
       this.queryParams.bo = this.bo.id;
+      this.pojpsnAuthority = this.boAuthority.boAuthority;
     }
-    this.getList();
-    console.log("dict.type.mk_bo_pojpsn_job", this.dict.type.mk_bo_pojpsn_job);
+    getBoJobListByType(this.bo.boType).then((response) => {
+      this.mk_bo_pojpsn_job = response.rows;
+      this.getList();
+    });
   },
   methods: {
     /** 查询项目成员列表 */
@@ -290,6 +305,7 @@ export default {
       if (this.source == "BoDetails") {
         this.form.bo = this.bo.id;
         this.form.boName = this.bo.boName;
+        this.form.post = "1";
       }
       this.open = true;
       this.title = "添加项目成员";

+ 0 - 2
src/views/business/spd/bo/refer/contact/index.vue

@@ -74,7 +74,6 @@
                 prop="customerName"
                 header-align="center"
                 align="left"
-                sortable="custom"
                 min-width="90"
                 label="客户名称"
               >
@@ -83,7 +82,6 @@
                 prop="name"
                 header-align="center"
                 align="left"
-                sortable="custom"
                 min-width="90"
                 label="联系人"
               >

+ 0 - 2
src/views/business/spd/bo/refer/customer/index.vue

@@ -74,7 +74,6 @@
                 prop="code"
                 header-align="center"
                 align="left"
-                sortable="custom"
                 min-width="90"
                 label="客户编码"
               >
@@ -83,7 +82,6 @@
                 prop="name"
                 header-align="center"
                 align="left"
-                sortable="custom"
                 min-width="90"
                 label="客户名称"
               >

+ 0 - 2
src/views/business/spd/bo/refer/dept/index.vue

@@ -74,7 +74,6 @@
                 prop="deptId"
                 header-align="center"
                 align="left"
-                sortable="custom"
                 min-width="90"
                 label="部门编码"
               >
@@ -83,7 +82,6 @@
                 prop="deptName"
                 header-align="center"
                 align="left"
-                sortable="custom"
                 min-width="90"
                 label="部门名称"
               >

+ 0 - 2
src/views/business/spd/bo/refer/org/index.vue

@@ -74,7 +74,6 @@
                 prop="deptId"
                 header-align="center"
                 align="left"
-                sortable="custom"
                 min-width="90"
                 label="组织编码"
               >
@@ -83,7 +82,6 @@
                 prop="deptName"
                 header-align="center"
                 align="left"
-                sortable="custom"
                 min-width="90"
                 label="组织名称"
               >

+ 0 - 2
src/views/business/spd/bo/refer/saleaea/index.vue

@@ -74,7 +74,6 @@
                 prop="code"
                 header-align="center"
                 align="left"
-                sortable="custom"
                 min-width="90"
                 label="区域编码"
               >
@@ -83,7 +82,6 @@
                 prop="name"
                 header-align="center"
                 align="left"
-                sortable="custom"
                 min-width="90"
                 label="区域名称"
               >

+ 0 - 2
src/views/business/spd/bo/refer/staff/index.vue

@@ -74,7 +74,6 @@
                 prop="userName"
                 header-align="center"
                 align="left"
-                sortable="custom"
                 min-width="90"
                 label="员工编码"
               >
@@ -83,7 +82,6 @@
                 prop="nickName"
                 header-align="center"
                 align="left"
-                sortable="custom"
                 min-width="90"
                 label="员工名称"
               >

+ 643 - 0
src/views/business/spd/bo/statement/index.vue

@@ -0,0 +1,643 @@
+<template>
+  <div class="app-container">
+    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
+      <el-form-item label="商机名称" prop="boName">
+        <el-input
+          v-model="queryParams.boName"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="客户" prop="customerName">
+        <el-input
+          v-model="queryParams.customerName"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="负责人" prop="principalName">
+        <el-input
+          v-model="queryParams.principalName"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item label="商机来源" prop="boSource">
+        <el-input
+          v-model="queryParams.boSource"
+          clearable
+          @keyup.enter.native="handleQuery"
+        />
+      </el-form-item>
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" size="mini" @click="handleQuery">搜索</el-button>
+        <el-button icon="el-icon-refresh" size="mini" @click="resetQuery">重置</el-button>
+      </el-form-item>
+    </el-form>
+    <el-tabs v-model="activeName" @tab-click="handleClick">
+      <el-tab-pane label="SPD商机" name="0">
+        <el-table :data="boList" >
+          <el-table-column label="客户" align="center" prop="customerName" />
+          <el-table-column label="部门" align="center" prop="deptName" />
+          <el-table-column label="负责人" align="center" prop="principalName" />
+          <el-table-column label="商机名称" align="center" prop="boName" />
+          <el-table-column label="商机编码" align="center" prop="boCode" />
+          <el-table-column label="创建日期" align="center" prop="createTime" />
+          <el-table-column label="商机挖掘" align="center" prop="b000">
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b000">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b000}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="商机审核" align="center" prop="b001" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b001">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b001}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="项目立项" align="center" prop="b002" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b002">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b002}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="解决方案" align="center" prop="b007" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b007">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b007}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="投标与签合同" align="center" prop="b008" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b008">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b008}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="完成" align="center" prop="b099" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b099">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b099}}
+              </dev>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-tab-pane>
+      <el-tab-pane label="耗材集采商机" name="1">
+        <el-table :data="boList" >
+          <el-table-column label="客户" align="center" prop="customerName" />
+          <el-table-column label="部门" align="center" prop="deptName" />
+          <el-table-column label="负责人" align="center" prop="principalName" />
+          <el-table-column label="商机名称" align="center" prop="boName" />
+          <el-table-column label="商机编码" align="center" prop="boCode" />
+          <el-table-column label="创建日期" align="center" prop="createTime" />
+          <el-table-column label="商机挖掘" align="center" prop="b100">
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b100">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b100}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="商机审核" align="center" prop="b101" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b101">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b101}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="项目立项" align="center" prop="b102" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b102">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b102}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="解决方案" align="center" prop="b104" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b104">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b104}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="院内决策" align="center" prop="b105" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b105">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b105}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="投标与签合同" align="center" prop="b106" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b106">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b106}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="完成" align="center" prop="b199" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b199">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b199}}
+              </dev>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-tab-pane>
+      <el-tab-pane label="耗材集采商机" name="2">
+        <el-table :data="boList" >
+          <el-table-column label="客户" align="center" prop="customerName" />
+          <el-table-column label="部门" align="center" prop="deptName" />
+          <el-table-column label="负责人" align="center" prop="principalName" />
+          <el-table-column label="商机名称" align="center" prop="boName" />
+          <el-table-column label="商机编码" align="center" prop="boCode" />
+          <el-table-column label="创建日期" align="center" prop="createTime" />
+          <el-table-column label="商机挖掘" align="center" prop="b200">
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b200">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b200}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="需求信息收集" align="center" prop="b201">
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b201">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b201}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="商机审核" align="center" prop="b202" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b202">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b202}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="项目立项" align="center" prop="b203" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b203">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b203}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="解决方案" align="center" prop="b205" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b205">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b205}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="临床申请" align="center" prop="b206" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b206">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b206}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="院内决策" align="center" prop="b207" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b207">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b207}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="投标与签合同" align="center" prop="b208" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b208">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b208}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="完成" align="center" prop="b299" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b299">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b299}}
+              </dev>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-tab-pane>
+      <el-tab-pane label="医疗设备商机" name="3">
+        <el-table :data="boList" >
+          <el-table-column label="客户" align="center" prop="customerName" />
+          <el-table-column label="部门" align="center" prop="deptName" />
+          <el-table-column label="负责人" align="center" prop="principalName" />
+          <el-table-column label="商机名称" align="center" prop="boName" />
+          <el-table-column label="商机编码" align="center" prop="boCode" />
+          <el-table-column label="创建日期" align="center" prop="createTime" />
+          <el-table-column label="商机挖掘" align="center" prop="b300">
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b300">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b300}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="需求信息收集" align="center" prop="b301">
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b301">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b301}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="商机审核" align="center" prop="b302" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b302">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b302}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="项目立项" align="center" prop="b303" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b303">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b303}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="解决方案" align="center" prop="b306" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b306">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b306}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="投标与签合同" align="center" prop="b307" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b307">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b307}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="完成" align="center" prop="b399" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b399">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b399}}
+              </dev>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-tab-pane>
+      <el-tab-pane label="军队医疗设备商机" name="4">
+        <el-table :data="boList" >
+          <el-table-column label="客户" align="center" prop="customerName" />
+          <el-table-column label="部门" align="center" prop="deptName" />
+          <el-table-column label="负责人" align="center" prop="principalName" />
+          <el-table-column label="商机名称" align="center" prop="boName" />
+          <el-table-column label="商机编码" align="center" prop="boCode" />
+          <el-table-column label="创建日期" align="center" prop="createTime" />
+          <el-table-column label="商机挖掘" align="center" prop="b400">
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b400">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b400}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="需求信息收集" align="center" prop="b401">
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b401">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b401}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="商机审核" align="center" prop="b402" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b402">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b402}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="项目立项" align="center" prop="b403" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b403">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b403}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="解决方案" align="center" prop="b406" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b406">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b406}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="投标与签合同" align="center" prop="b407" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b407">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b407}}
+              </dev>
+            </template>
+          </el-table-column>
+          <el-table-column label="完成" align="center" prop="b499" >
+            <template slot-scope="scope">
+              <dev v-if="scope.row.b499">
+                <el-button size="medium" type="text" icon="el-icon-s-flag" />
+                {{scope.row.b499}}
+              </dev>
+            </template>
+          </el-table-column>
+        </el-table>
+      </el-tab-pane>
+    </el-tabs>
+
+    <pagination
+      v-show="total > 0"
+      :total="total"
+      :page.sync="queryParams.pageNum"
+      :limit.sync="queryParams.pageSize"
+      @pagination="getList"
+    />
+  </div>
+</template>
+
+
+<script>
+import { listBasic } from "@/api/business/spd/bo/statement";
+
+export default {
+  data() {
+    return {
+      // 遮罩层
+      loading: true,
+      //查询参数
+      queryParams: {
+        pageNum: 1,
+        pageSize: 10,
+        boType: null,
+        boName: null,
+        customerName: null,
+        principalName: null,
+        boSource: null,
+      },
+      // 显示搜索条件
+      showSearch: true,
+      //列表数据
+      boList:[],
+      //当前页签
+      activeName: '0',
+      //分页参数
+      total:0,
+    };
+  },
+  created() {
+    var e = {
+      name: '0',
+    }
+    this.handleClick(e);
+  },
+  methods: {
+    /** 查询任务列表 */
+    getList() {
+      var e = {
+        name: this.activeName,
+      }
+      this.handleClick(e);
+    },
+    handleClick(e) {
+      console.log('e',e);
+      this.queryParams.boType = e.name;
+      switch (e.name) {
+        case "0":
+          listBasic(this.queryParams).then(response => {
+            this.boList = response.rows;
+            console.log('this.boList',this.boList);
+            for(var i = 0;i < this.boList.length;i++){
+              var nodes = this.boList[i].boNodeFlowList;
+              console.log('nodes',nodes);
+              var nodesfilter = nodes.filter(n => n.code == '0-00');
+              if(nodesfilter.length > 0){
+                this.boList[i].b000 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '0-01');
+              if(nodesfilter.length > 0){
+                this.boList[i].b001 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '0-02');
+              if(nodesfilter.length > 0){
+                this.boList[i].b002 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '0-07');
+              if(nodesfilter.length > 0){
+                this.boList[i].b007 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '0-08');
+              if(nodesfilter.length > 0){
+                this.boList[i].b008 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '0-99');
+              if(nodesfilter.length > 0){
+                this.boList[i].b099 = nodesfilter[0].day;
+              }
+            }
+            this.total = response.total;
+            this.loading = false;
+          });
+          break;
+        case "1":
+          listBasic(this.queryParams).then(response => {
+            this.boList = response.rows;
+            for(var i = 0;i < this.boList.length;i++){
+              var nodes = this.boList[i].boNodeFlowList;
+              var nodesfilter = nodes.filter(n => n.code == '1-00');
+              if(nodesfilter.length > 0){
+                this.boList[i].b100 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '1-01');
+              if(nodesfilter.length > 0){
+                this.boList[i].b101 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '1-02');
+              if(nodesfilter.length > 0){
+                this.boList[i].b102 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '1-04');
+              if(nodesfilter.length > 0){
+                this.boList[i].b104 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '1-05');
+              if(nodesfilter.length > 0){
+                this.boList[i].b105 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '1-06');
+              if(nodesfilter.length > 0){
+                this.boList[i].b106 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '1-99');
+              if(nodesfilter.length > 0){
+                this.boList[i].b199 = nodesfilter[0].day;
+              }
+            }
+            this.total = response.total;
+            this.loading = false;
+          });
+          break;
+        case "2":
+          listBasic(this.queryParams).then(response => {
+            this.boList = response.rows;
+            for(var i = 0;i < this.boList.length;i++){
+              var nodes = this.boList[i].boNodeFlowList;
+              var nodesfilter = nodes.filter(n => n.code == '2-00');
+              if(nodesfilter.length > 0){
+                this.boList[i].b200 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '2-01');
+              if(nodesfilter.length > 0){
+                this.boList[i].b201 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '2-02');
+              if(nodesfilter.length > 0){
+                this.boList[i].b202 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '2-03');
+              if(nodesfilter.length > 0){
+                this.boList[i].b203 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '2-05');
+              if(nodesfilter.length > 0){
+                this.boList[i].b205 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '2-06');
+              if(nodesfilter.length > 0){
+                this.boList[i].b206 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '2-07');
+              if(nodesfilter.length > 0){
+                this.boList[i].b207 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '2-99');
+              if(nodesfilter.length > 0){
+                this.boList[i].b299 = nodesfilter[0].day;
+              }
+            }
+            this.total = response.total;
+            this.loading = false;
+          });
+          break;
+        case "3":
+          listBasic(this.queryParams).then(response => {
+            this.boList = response.rows;
+            for(var i = 0;i < this.boList.length;i++){
+              var nodes = this.boList[i].boNodeFlowList;
+              var nodesfilter = nodes.filter(n => n.code == '3-00');
+              if(nodesfilter.length > 0){
+                this.boList[i].b300 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '3-01');
+              if(nodesfilter.length > 0){
+                this.boList[i].b301 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '3-02');
+              if(nodesfilter.length > 0){
+                this.boList[i].b302 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '3-03');
+              if(nodesfilter.length > 0){
+                this.boList[i].b303 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '3-06');
+              if(nodesfilter.length > 0){
+                this.boList[i].b306 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '3-07');
+              if(nodesfilter.length > 0){
+                this.boList[i].b307 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '3-99');
+              if(nodesfilter.length > 0){
+                this.boList[i].b399 = nodesfilter[0].day;
+              }
+            }
+            this.total = response.total;
+            this.loading = false;
+          });
+          break;
+        case "4":
+          listBasic(this.queryParams).then(response => {
+            this.boList = response.rows;
+            for(var i = 0;i < this.boList.length;i++){
+              var nodes = this.boList[i].boNodeFlowList;
+              var nodesfilter = nodes.filter(n => n.code == '4-00');
+              if(nodesfilter.length > 0){
+                this.boList[i].b400 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '4-01');
+              if(nodesfilter.length > 0){
+                this.boList[i].b401 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '4-02');
+              if(nodesfilter.length > 0){
+                this.boList[i].b402 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '4-03');
+              if(nodesfilter.length > 0){
+                this.boList[i].b403 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '4-06');
+              if(nodesfilter.length > 0){
+                this.boList[i].b406 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '4-07');
+              if(nodesfilter.length > 0){
+                this.boList[i].b407 = nodesfilter[0].day;
+              }
+              nodesfilter = nodes.filter(n => n.code == '4-99');
+              if(nodesfilter.length > 0){
+                this.boList[i].b499 = nodesfilter[0].day;
+              }
+            }
+            this.total = response.total;
+            this.loading = false;
+          });
+          break;
+        default:
+          break;
+      }
+    },
+    /** 搜索按钮操作 */
+    handleQuery() {
+      this.queryParams.pageNum = 1;
+      this.getList();
+    },
+    /** 重置按钮操作 */
+    resetQuery() {
+      this.resetForm("queryForm");
+      this.handleQuery();
+    },
+  }
+};
+</script>

+ 11 - 14
src/views/business/spd/bo/task/taskList.vue

@@ -63,14 +63,7 @@
         prop="boName"
         v-if="source == 'Task'"
       />
-      <el-table-column label="商机阶段" align="center" prop="boStage">
-        <template slot-scope="scope">
-          <dict-tag
-            :options="dict.type.mk_bo_stage"
-            :value="scope.row.boStage"
-          />
-        </template>
-      </el-table-column>
+      <el-table-column label="商机阶段" align="center" prop="boStageName"/>
       <el-table-column
         label="客户名称"
         align="center"
@@ -348,12 +341,7 @@
           >
           </el-input>
         </el-form-item>
-        <BehaviorList
-          :key="timer"
-          :source="'TaskList'"
-          :bo="this.form"
-          v-if="this.operatingState != 'Insert'"
-        />
+        
         <div class="md-auditInfo">
           <el-divider content-position="left">其它信息</el-divider>
           <el-form :inline="true" label-position="right" :model="form">
@@ -398,6 +386,15 @@
           </el-form>
         </div>
       </el-form>
+
+      <BehaviorList
+          :key="timer"
+          :source="'TaskList'"
+          :bo="this.form"
+          :boAuthority="boAuthority"
+          v-if="this.operatingState != 'Insert'"
+        />
+        
       <div slot="footer" class="dialog-footer">
         <el-button
           type="primary"

+ 50 - 3
src/views/canteen/addFood.vue

@@ -63,10 +63,19 @@
     </el-form>
 
     <span>食材列表</span>
+    <div style="text-align: right;">
+      <el-button size="small" type="primary" @click="delitems">批量删除</el-button>
+    </div>
     <el-table
       :data="tableData"
+      @selection-change="handleSelectionChange"
+      max-height="500"
       style="width: 100%">
       <el-table-column
+      type="selection"
+      width="55">
+    </el-table-column>
+      <el-table-column
         prop="billDate"
         label="日期"
         align="center"
@@ -88,7 +97,7 @@
 </template>
 
 <script>
-import {addFood, foodList} from '@/api/canteen/basic.js'
+import {addFood, foodList, delFood} from '@/api/canteen/basic.js'
 export default {
   data() {
     return {
@@ -101,10 +110,13 @@ export default {
         address: [{ required: true, message: '请输入购买地址', trigger: 'blur' }],
         billDate: [{ required: true, message: '请选择时段', trigger: 'change' }],
       },
-      tableData: []
+      tableData: [],
+      nowDate: '',
+      ids: ''
     }
   },
   created() {
+    this.getNow()
     this.getList()
   },
   methods: {
@@ -124,6 +136,18 @@ export default {
     reset(formName) {
       this.$refs[formName].resetFields();
     },
+    delitems() {
+      if (this.ids) {
+        delFood(this.ids).then(res => {
+          if (res.code === 200) {
+            this.$modal.msgSuccess("操作成功");
+            this.getList()
+          }
+        })
+      } else {
+        this.$modal.alertWarning("请选择至少一条数据");
+      }
+    },
     addRow() {
       this.menu.items.push({product: ''})
     },
@@ -133,11 +157,34 @@ export default {
       })
     },
     getList() {
-      foodList().then(res => {
+      this.getNow()
+      foodList({pageSize: 100,billDate: this.nowDate}).then(res => {
         if (res.code === 200 ) {
           this.tableData = res.rows
         }
       })
+    },
+    handleSelectionChange(selection) {
+      console.log('选中数据', selection)
+      let id = []
+      id = selection.map(item => item.productId)
+      console.log('id',id.join())
+      this.ids = id.join()
+    },
+    getNow() {
+      var date = new Date();
+      var year = date.getFullYear();
+      var month = date.getMonth() + 1;
+      var day = date.getDate();
+      if (month < 10) {
+        month = "0" + month;
+      }
+      if (day < 10) {
+        day = "0" + day;
+      }
+      const nowDate = year + "-" + month + "-" + day;
+      this.nowDate = nowDate
+      this.menu.billDate = nowDate
     }
   }
 }

+ 55 - 3
src/views/canteen/addMenu.vue

@@ -34,10 +34,19 @@
     </el-form>
 
     <span>菜单列表</span>
+    <div style="text-align: right;">
+      <el-button size="small" type="primary" @click="delitems">批量删除</el-button>
+    </div>
     <el-table
       :data="tableData"
+      @selection-change="handleSelectionChange"
+      max-height="500"
       style="width: 100%">
       <el-table-column
+      type="selection"
+      width="55">
+    </el-table-column>
+      <el-table-column
         prop="billDate"
         label="日期"
         align="center"
@@ -53,18 +62,24 @@
         prop="price"
         align="center"
         label="价格">
+        <template slot-scope="scope">
+            <span>¥{{ scope.row.price }}</span>
+          </template>
       </el-table-column>
       <el-table-column
         prop="timeFrame"
         align="center"
         label="时段">
+        <template slot-scope="scope">
+          <span>{{ scope.row.timeFrame == '1' ? '早餐' : scope.row.timeFrame == '2' ? '午餐' : '晚餐' }}</span>
+        </template>
       </el-table-column>
     </el-table>
   </div>
 </template>
 
 <script>
-import {addMenu, menuList} from '@/api/canteen/basic.js'
+import {addMenu, menuList, delMenu} from '@/api/canteen/basic.js'
 export default {
   data() {
     return {
@@ -85,7 +100,9 @@ export default {
         price: [{ required: true, message: '请输入价格', trigger: 'blur' }],
         billDate: [{ required: true, message: '请选择时段', trigger: 'change' }],
       },
-      tableData: []
+      tableData: [],
+      nowDate: '',
+      ids: ''
     }
   },
   created() {
@@ -108,12 +125,47 @@ export default {
     reset(formName) {
       this.$refs[formName].resetFields();
     },
+    delitems() {
+      if (this.ids) {
+        delMenu(this.ids).then(res => {
+          if (res.code === 200) {
+            this.$modal.msgSuccess("操作成功");
+            this.getList()
+          }
+        })
+      } else {
+        this.$modal.alertWarning("请选择至少一条数据");
+      }
+    },
     getList() {
-      menuList().then(res => {
+      this.getNow()
+      menuList({pageSize: 100, billDate: this.nowDate}).then(res => {
         if (res.code === 200 ) {
           this.tableData = res.rows
         }
       })
+    },
+    handleSelectionChange(selection) {
+      console.log('选中数据', selection)
+      let id = []
+      id = selection.map(item => item.id)
+      console.log('id',id.join())
+      this.ids = id.join()
+    },
+    getNow() {
+      var date = new Date();
+      var year = date.getFullYear();
+      var month = date.getMonth() + 1;
+      var day = date.getDate();
+      if (month < 10) {
+        month = "0" + month;
+      }
+      if (day < 10) {
+        day = "0" + day;
+      }
+      const nowDate = year + "-" + month + "-" + day;
+      this.nowDate = nowDate
+      this.menu.billDate = nowDate
     }
   }
 }

+ 98 - 59
src/views/canteen/foodScreen.vue

@@ -1,58 +1,52 @@
 <template>
   <div id="menuScreen">
     <div class="title">今日食材</div>
-    <div class="title2" style="width: 80%;color: #FFF;margin:1% auto;display: flex;justify-content: space-around;">
-        <span>食材</span>
-        <span>地址</span>
-        <span>日期</span>
+    <div class="title2">
+      <span>食材</span>
+      <span>地址</span>
+      <span>日期</span>
     </div>
 
     <div class="tables">
-    <div class="gun">
-      <el-table
-      :cell-style="{ color: '#fff' }"
-      :header-cell-style="{ color: '#fff' }"
-      :data="tableData"
-      style="width: 100%;height:100%;font-size: 2.5vh;">
-      <el-table-column
-        prop="product"
-        align="center"
-        label="">
-      </el-table-column>
-      <el-table-column
-        prop="address"
-        label=""
-        align="center">
-      </el-table-column>
-      <el-table-column
-        prop="billDate"
-        label=""
-        align="center">
-      </el-table-column>
-      </el-table>
-    </div>
+      <div class="gun">
+        <el-table :cell-style="{ color: '#fff' }" :header-cell-style="{ color: '#fff' }" :data="tableData"
+          style="width: 100%;height:100%;font-size: 2.4vh;">
+          <el-table-column prop="product" align="center" label="">
+          </el-table-column>
+          <el-table-column prop="address" label="" align="center">
+          </el-table-column>
+          <el-table-column prop="billDate" label="" align="center">
+          </el-table-column>
+        </el-table>
+      </div>
     </div>
   </div>
 </template>
 
 <script>
-import {foodList} from '@/api/canteen/basic.js'
+import { foodList } from '@/api/canteen/basic.js'
 export default {
   data() {
-    return{
+    return {
       tableData: [],
-      nowDate: ''
+      nowDate: '',
+      intervalId: null
     }
   },
   created() {
     this.getList()
+    this.dataRefreh()
+  },
+  destroyed(){
+    // 在页面销毁后,清除计时器
+    this.clear();
   },
   methods: {
     getList() {
       this.getNow()
       // {billDate: this.nowDate}
-      foodList().then(res => {
-        if (res.code === 200 ) {
+      foodList({pageSize: 100,billDate: this.nowDate}).then(res => {
+        if (res.code === 200) {
           this.tableData = res.rows
         }
       })
@@ -63,14 +57,31 @@ export default {
       var month = date.getMonth() + 1;
       var day = date.getDate();
       if (month < 10) {
-          month = "0" + month;
+        month = "0" + month;
       }
       if (day < 10) {
-          day = "0" + day;
+        day = "0" + day;
       }
       const nowDate = year + "-" + month + "-" + day;
       this.nowDate = nowDate
-    }
+    },
+   // 定时刷新数据函数
+   dataRefreh() {
+      // 计时器正在进行中,退出函数
+      if (this.intervalId != null) {
+        return;
+      }
+      // 计时器为空,操作
+      this.intervalId = setInterval(() => {
+        console.log("刷新" + new Date());
+        this.getList(); //加载数据函数
+      }, 1000*60*10);
+    },
+    // 停止定时器
+    clear() {
+      clearInterval(this.intervalId); //清除计时器
+      this.intervalId = null; //设置为null
+    },
   }
 }
 </script>
@@ -79,62 +90,90 @@ export default {
 #menuScreen {
   width: 100%;
   height: 100%;
-  background-image: url('../../assets/images/menu_bg.jpg');
+  // overflow: hidden;
+  background-image: url('../../assets/images/background.png');
   background-repeat: no-repeat;
   background-size: cover;
 }
+
 .title {
   text-align: center;
   font-size: 8vh;
   color: #fff;
-  text-shadow: 0 0 5px #fff,
-  0 0 10px #fff,
-  0 0 15px #fff,
-  0 0 20px #00a67c,
-  0 0 35px #00a67c,
-  0 0 40px #00a67c,
-  0 0 50px #00a67c,
-  0 0 75px #00a67c;
+  font-weight: 600;
+  // text-shadow: 0 0 5px #fff,
+  //   0 0 10px #fff,
+  //   0 0 15px #fff,
+  //   0 0 20px #00a67c,
+  //   0 0 35px #00a67c,
+  //   0 0 40px #00a67c,
+  //   0 0 50px #00a67c,
+  //   0 0 75px #00a67c;
 }
+
 .title2 {
   text-align: center;
   font-size: 3vh;
   color: #fff;
-  text-shadow: 0 0 5px #fff,
-  0 0 10px #fff,
-  0 0 15px #fff,
-  0 0 20px #00a67c,
-  0 0 35px #00a67c,
-  0 0 40px #00a67c,
-  0 0 50px #00a67c,
-  0 0 75px #00a67c;
+  font-weight: 600;
+  width: 80%;
+  color: #FFF;
+  margin: 2% auto;
+  display: flex;
+  justify-content: space-around;
+  //   text-shadow: 0 0 5px #fff,
+  //     0 0 10px #fff,
+  //     0 0 15px #fff,
+  //     0 0 20px #00a67c,
+  //     0 0 35px #00a67c,
+  //     0 0 40px #00a67c,
+  //     0 0 50px #00a67c,
+  //     0 0 75px #00a67c;
+  // }
 }
+
 .gun {
   animation: tables 12s linear infinite;
 }
+
 .tables {
   width: 80%;
   height: 680px;
   margin: 0 auto;
   overflow: hidden;
 }
+
 @keyframes tables {
-        0%{
-            transform:translateY(0px)
-        }
-        100%{
-            transform: translateY(calc(-100% + 680px));
-        }
-    }
+  0% {
+    transform: translateY(0px)
+  }
+
+  100% {
+    transform: translateY(calc(-100% + 680px));
+  }
+}
+
 /*最外层透明*/
 ::v-deep .el-table,
 ::v-deep .el-table__expanded-cell {
+  // font-size: 18px;
   background-color: transparent !important;
 }
+
 /* 表格内背景颜色 */
 ::v-deep .el-table th,
 ::v-deep .el-table tr,
 ::v-deep .el-table td {
   background-color: transparent !important;
+
+  border-top: 1px solid #808DA6;
+  border-bottom: none;
+}
+
+::v-deep .el-table .el-table__header-wrapper {
+  display: none;
+}
+::v-deep .el-table .cell {
+  line-height: normal;
 }
 </style>

+ 102 - 65
src/views/canteen/menuScreen.vue

@@ -1,47 +1,34 @@
 <template>
   <div id="menuScreen">
     <div class="title">德荣食堂</div>
-    <div class="title2" style="width: 80%;color: #FFF;margin:1% auto;display: flex;justify-content: space-around;">
-        <span>时段</span>
-        <span>菜名</span>
-        <span>价格</span>
-        <span>日期</span>
+    <div class="title2">
+      <span>时段</span>
+      <span>菜名</span>
+      <span>价格</span>
+      <span>日期</span>
     </div>
     <div class="tables">
+      <!--  class="gun" -->
       <div class="gun">
-        <el-table
-        :cell-style="{ color: '#fff' }"
-        :header-cell-style="{ color: '#fff' }"
-        :data="tableData"
-        style="width: 100%;height:100%;font-size: 2.5vh;"
-        ref="tableBox">
-          <el-table-column
-            prop="timeFrame"
-            align="center"
-            label="">
+        <el-table :cell-style="{ color: '#fff' }" :header-cell-style="{ color: '#fff' }" :data="tableData"
+          style="width: 100%;height:100%;font-size: 2.4vh;" ref="tableBox">
+
+          <el-table-column prop="timeFrame" align="center" label="">
             <template slot-scope="scope">
-              <span>{{ scope.row.timeFrame == '1' ? '早餐' :  scope.row.timeFrame == '2' ? '午餐' : '晚餐'}}</span>
+              <span>{{ scope.row.timeFrame == '1' ? '早餐' : scope.row.timeFrame == '2' ? '午餐' : '晚餐' }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            prop="name"
-            label=""
-            align="center"
-            >
+
+          <el-table-column prop="name" label="" align="center">
           </el-table-column>
-          <el-table-column
-            prop="price"
-            align="center"
-            label="">
+
+          <el-table-column prop="price" align="center" label="">
             <template slot-scope="scope">
               <span>¥{{ scope.row.price }}</span>
             </template>
           </el-table-column>
-          <el-table-column
-            prop="billDate"
-            label=""
-            align="center"
-            >
+
+          <el-table-column prop="billDate" label="" align="center">
           </el-table-column>
         </el-table>
       </div>
@@ -50,27 +37,35 @@
 </template>
 
 <script>
-import {menuList} from '@/api/canteen/basic.js'
+import { menuList } from '@/api/canteen/basic.js'
 export default {
   data() {
-    return{
+    return {
       tableData: [],
-      nowDate: ''
+      nowDate: '',
+      intervalId: null
     }
   },
   created() {
-    this.getList()
+    this.getList();
+    this.dataRefreh()
   },
-  mounted () {
-
+  destroyed(){
+    // 在页面销毁后,清除计时器
+    this.clear();
   },
   methods: {
     getList() {
       this.getNow()
       // {billDate: this.nowDate}
-      menuList({pageSize: 50}).then(res => {
-        if (res.code === 200 ) {
+      menuList({ pageSize: 100, billDate: this.nowDate }).then(res => {
+        if (res.code === 200) {
           this.tableData = res.rows
+          this.tableData = this.tableData.map(data => {
+            data.billDate = data.billDate.substring(0, 11)
+            return data;
+          })
+          console.log(this.tableData, 'this.tableData');
         }
       })
     },
@@ -80,14 +75,31 @@ export default {
       var month = date.getMonth() + 1;
       var day = date.getDate();
       if (month < 10) {
-          month = "0" + month;
+        month = "0" + month;
       }
       if (day < 10) {
-          day = "0" + day;
+        day = "0" + day;
       }
       const nowDate = year + "-" + month + "-" + day;
       this.nowDate = nowDate
     },
+   // 定时刷新数据函数
+   dataRefreh() {
+      // 计时器正在进行中,退出函数
+      if (this.intervalId != null) {
+        return;
+      }
+      // 计时器为空,操作
+      this.intervalId = setInterval(() => {
+        console.log("刷新" + new Date());
+        this.getList(); //加载数据函数
+      }, 1000*60*10);
+    },
+    // 停止定时器
+    clear() {
+      clearInterval(this.intervalId); //清除计时器
+      this.intervalId = null; //设置为null
+    },
   },
 }
 </script>
@@ -96,64 +108,89 @@ export default {
 #menuScreen {
   width: 100%;
   height: 100%;
-  background-image: url('../../assets/images/menu_bg.jpg');
+  background-image: url('../../assets/images/background.png');
   background-repeat: no-repeat;
   background-size: cover;
+  // overflow: hidden;
 }
+
 .title {
   text-align: center;
   font-size: 8vh;
   color: #fff;
-  text-shadow: 0 0 5px #fff,
-  0 0 10px #fff,
-  0 0 15px #fff,
-  0 0 20px #00a67c,
-  0 0 35px #00a67c,
-  0 0 40px #00a67c,
-  0 0 50px #00a67c,
-  0 0 75px #00a67c;
+  font-weight: 600;
+  // text-shadow: 0 0 5px #fff,
+  // 0 0 10px #fff,
+  // 0 0 15px #fff,
+  // 0 0 20px #00a67c,
+  // 0 0 35px #00a67c,
+  // 0 0 40px #00a67c,
+  // 0 0 50px #00a67c,
+  // 0 0 75px #00a67c;
 }
+
 .title2 {
   text-align: center;
   font-size: 3vh;
+  font-weight: 600;
   color: #fff;
-  text-shadow: 0 0 5px #fff,
-  0 0 10px #fff,
-  0 0 15px #fff,
-  0 0 20px #00a67c,
-  0 0 35px #00a67c,
-  0 0 40px #00a67c,
-  0 0 50px #00a67c,
-  0 0 75px #00a67c;
+  width: 80%;
+  color: #FFF;
+  margin: 2% auto;
+  display: flex;
+  justify-content: space-around;
+  // text-shadow: 0 0 5px #fff,
+  // 0 0 10px #fff,
+  // 0 0 15px #fff,
+  // 0 0 20px #00a67c,
+  // 0 0 35px #00a67c,
+  // 0 0 40px #00a67c,
+  // 0 0 50px #00a67c,
+  // 0 0 75px #00a67c;
 }
+
 .gun {
   animation: tables 12s linear infinite;
 }
+
 .tables {
   width: 80%;
   height: 680px;
   margin: 0 auto;
   overflow: hidden;
 }
+
 @keyframes tables {
-        0%{
-            transform:translateY(0px)
-        }
-        100%{
-            transform: translateY(calc(-100% + 680px));
-        }
-    }
+  0% {
+    transform: translateY(0px)
+  }
+
+  100% {
+    transform: translateY(calc(-100% + 680px));
+  }
+}
+
 /*最外层透明*/
 ::v-deep .el-table,
 ::v-deep .el-table__expanded-cell {
   background-color: transparent !important;
 }
+
 /* 表格内背景颜色 */
 ::v-deep .el-table th,
 ::v-deep .el-table tr,
 ::v-deep .el-table td {
   background-color: transparent !important;
+  // border-top-color: #808DA6;
+  // border-bottom-color: #808DA6;
+  border-top: 1px solid #808DA6;
+  border-bottom: none;
 }
 
-
+::v-deep .el-table .el-table__header-wrapper {
+  display: none;
+}
+::v-deep .el-table .cell {
+  line-height: normal;
+}
 </style>

+ 17 - 0
src/views/common-dialog/api/index.js

@@ -0,0 +1,17 @@
+import request from "@/utils/request";
+
+export function list(url, params) {
+  return request({
+    url: `/pu/contract/${url}/list`,
+    method: "get",
+    params: params,
+  });
+}
+
+export function refer(data) {
+  return request({
+    url: `/refer/query`,
+    method: "POST",
+    data: data,
+  });
+}

+ 214 - 0
src/views/common-dialog/currency.vue

@@ -0,0 +1,214 @@
+<script>
+import { initParams } from "./utils/init-something";
+import { list } from "./api/index";
+
+export default {
+  name: "CurrencyInputDialog",
+  props: ["title", "value"],
+  components: {},
+  data() {
+    const columns = [
+      {
+        key: "name",
+        title: "币种",
+        type: "Input",
+        search: true,
+      },
+      {
+        key: "code",
+        title: "币种简称",
+        type: "Input",
+        search: true,
+      },
+      {
+        key: "",
+        title: "单价精度",
+      },
+      {
+        key: "",
+        title: "单价舍入规则",
+      },
+      {
+        key: "",
+        title: "金额精度",
+      },
+      {
+        key: "",
+        title: "金额舍入规则",
+      },
+    ];
+    const initTableColumns = () => columns.filter((column) => column.key);
+    const initSearchColumns = () => columns.filter((column) => column.search);
+    return {
+      // global
+      size: "mini",
+      width: "50%",
+      page: { pageNum: 1, pageSize: 25, total: 0 },
+      pageSizes: [25, 50],
+      layout: "prev, pager, next, jumper",
+      api: "puCurrType",
+      showKey: "name",
+      // dialog
+      visible: false,
+      loading: false,
+      // search
+      searchColumns: initSearchColumns(),
+      params: initParams(initSearchColumns()),
+      // table
+      tableColumns: initTableColumns(),
+      data: [],
+      currentData: null,
+    };
+  },
+  computed: {},
+  watch: {},
+  methods: {
+    // set dialog visible
+    setVisible(prop) {
+      this.visible = prop;
+    },
+    // do something before dialog open
+    beforeOpen() {
+      const { value } = this.$props;
+      this.params[this.showKey] = value;
+      this.fetchList(this.params, this.page);
+    },
+    // fetch table data
+    async fetchList(prop, page) {
+      try {
+        this.loading = true;
+        const { pageNum, pageSize } = page;
+        const { code, msg, rows, total } = await list(this.api, {
+          ...prop,
+          pageNum,
+          pageSize,
+        });
+        if (code === 200) {
+          this.data = rows;
+          this.page.total = total;
+          this.$notify.success({ title: msg });
+        } else {
+          this.$notify.warning({ title: msg });
+        }
+      } catch (err) {
+        this.$notify.error({ title: "error", message: err });
+      } finally {
+        this.loading = false;
+        this.setCurrentData(
+          this.data.find(
+            (column) => column[this.showKey] === this.currentData[this.showKey]
+          )
+        );
+      }
+    },
+    // setting up to fetch table data
+    queryList() {
+      this.fetchList(this.params, this.page);
+    },
+    // reset to fetch table data
+    resetList() {
+      this.page.pageNum = 1;
+      this.params = initParams(this.searchColumns);
+      this.fetchList(this.params, this.page);
+    },
+    // size change to fetch table data
+    pageSizeChange(prop) {
+      this.page.pageSize = prop;
+      this.fetchList(this.params, this.page);
+    },
+    // number change to fetch table data
+    pageNumberChange(prop) {
+      this.page.pageNum = prop;
+      this.fetchList(this.params, this.page);
+    },
+    // select row data
+    selectCurrentData(row) {
+      this.currentData = row;
+    },
+    // set row data highlight
+    setCurrentData(row) {
+      this.$refs.singleTable.setCurrentRow(row);
+    },
+    //
+    confirm() {
+      if (this.currentData) {
+        this.$emit("confirm", this.currentData);
+      }
+      this.setVisible(false);
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="visible"
+    :width="width"
+    append-to-body
+    @open="beforeOpen"
+  >
+    <el-form :size="size" :inline="true" :model="params">
+      <el-form-item
+        v-for="(column, index) in searchColumns"
+        :key="index"
+        :label="column.title"
+      >
+        <el-input v-model="params[column.key]" @change="queryList"> </el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button icon="el-icon-refresh" @click="resetList"></el-button>
+      </el-form-item>
+    </el-form>
+    <el-table
+      v-loading="loading"
+      :data="data"
+      :size="size"
+      ref="singleTable"
+      height="45vh"
+      highlight-current-row
+      style="width: 100%; margin-bottom: 20px"
+      @row-click="selectCurrentData"
+    >
+      <el-table-column
+        v-for="(column, index) in tableColumns"
+        :key="index"
+        :prop="column.key"
+        :label="column.title"
+        :width="column.width"
+        show-overflow-tooltip
+      >
+      </el-table-column>
+    </el-table>
+    <div
+      style="display: flex; justify-content: space-between; align-items: center"
+    >
+      <p>
+        <span style="font-size: 12px">已选择 :</span>
+        <el-tag v-if="currentData" :size="size">{{
+          currentData[showKey]
+        }}</el-tag>
+        <span v-else>无</span>
+      </p>
+      <el-pagination
+        :layout="layout"
+        :total="page.total"
+        :page-sizes="pageSizes"
+        :page-size="page.pageSize"
+        :current-page="page.pageNum"
+        :small="size === 'mini'"
+        background
+        @size-change="pageSizeChange"
+        @current-change="pageNumberChange"
+      >
+      </el-pagination>
+    </div>
+    <div style="margin-top: 20px; text-align: right">
+      <el-button :size="size" @click="visible = false">取 消</el-button>
+      <el-button :size="size" type="primary" @click="confirm">确 定</el-button>
+    </div>
+  </el-dialog>
+</template>
+<style scoped></style>

+ 198 - 0
src/views/common-dialog/department.vue

@@ -0,0 +1,198 @@
+<script>
+import { initParams } from "./utils/init-something";
+import { list } from "./api/index";
+
+export default {
+  name: "DepartmentInputDialog",
+  props: ["title", "value"],
+  components: {},
+  data() {
+    const columns = [
+      {
+        key: "deptId",
+        title: "组织编码",
+        type: "Input",
+        search: true,
+      },
+      {
+        key: "deptName",
+        title: "组织名称",
+        type: "Input",
+        search: true,
+      },
+    ];
+    const initTableColumns = () => columns.filter((column) => column.key);
+    const initSearchColumns = () => columns.filter((column) => column.search);
+    return {
+      // global
+      size: "mini",
+      width: "50%",
+      page: { pageNum: 1, pageSize: 25, total: 0 },
+      pageSizes: [25, 50],
+      layout: "prev, pager, next, jumper",
+      api: "puDept",
+      showKey: "deptName",
+      // dialog
+      visible: false,
+      loading: false,
+      // search
+      searchColumns: initSearchColumns(),
+      params: initParams(initSearchColumns()),
+      // table
+      tableColumns: initTableColumns(),
+      data: [],
+      currentData: null,
+    };
+  },
+  computed: {},
+  watch: {},
+  methods: {
+    // set dialog visible
+    setVisible(prop) {
+      this.visible = prop;
+    },
+    // do something before dialog open
+    beforeOpen() {
+      const { value } = this.$props;
+      this.params[this.showKey] = value;
+      this.fetchList(this.params, this.page);
+    },
+    // fetch table data
+    async fetchList(prop, page) {
+      try {
+        this.loading = true;
+        const { pageNum, pageSize } = page;
+        const { code, msg, rows, total } = await list(this.api, {
+          ...prop,
+          pageNum,
+          pageSize,
+        });
+        if (code === 200) {
+          this.data = rows;
+          this.page.total = total;
+          this.$notify.success({ title: msg });
+        } else {
+          this.$notify.warning({ title: msg });
+        }
+      } catch (err) {
+        this.$notify.error({ title: "error", message: err });
+      } finally {
+        this.loading = false;
+        this.setCurrentData(
+          this.data.find(
+            (column) => column[this.showKey] === this.currentData[this.showKey]
+          )
+        );
+      }
+    },
+    // setting up to fetch table data
+    queryList() {
+      this.fetchList(this.params, this.page);
+    },
+    // reset to fetch table data
+    resetList() {
+      this.page.pageNum = 1;
+      this.params = initParams(this.searchColumns);
+      this.fetchList(this.params, this.page);
+    },
+    // size change to fetch table data
+    pageSizeChange(prop) {
+      this.page.pageSize = prop;
+      this.fetchList(this.params, this.page);
+    },
+    // number change to fetch table data
+    pageNumberChange(prop) {
+      this.page.pageNum = prop;
+      this.fetchList(this.params, this.page);
+    },
+    // select row data
+    selectCurrentData(row) {
+      this.currentData = row;
+    },
+    // set row data highlight
+    setCurrentData(row) {
+      this.$refs.singleTable.setCurrentRow(row);
+    },
+    //
+    confirm() {
+      if (this.currentData) {
+        this.$emit("confirm", this.currentData);
+      }
+      this.setVisible(false);
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="visible"
+    :width="width"
+    append-to-body
+    @open="beforeOpen"
+  >
+    <el-form :size="size" :inline="true" :model="params">
+      <el-form-item
+        v-for="(column, index) in searchColumns"
+        :key="index"
+        :label="column.title"
+      >
+        <el-input v-model="params[column.key]" @change="queryList"> </el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button icon="el-icon-refresh" @click="resetList"></el-button>
+      </el-form-item>
+    </el-form>
+    <el-table
+      v-loading="loading"
+      :data="data"
+      :size="size"
+      ref="singleTable"
+      height="45vh"
+      highlight-current-row
+      style="width: 100%; margin-bottom: 20px"
+      @row-click="selectCurrentData"
+    >
+      <el-table-column
+        v-for="(column, index) in tableColumns"
+        :key="index"
+        :prop="column.key"
+        :label="column.title"
+        :width="column.width"
+        show-overflow-tooltip
+      >
+      </el-table-column>
+    </el-table>
+    <div
+      style="display: flex; justify-content: space-between; align-items: center"
+    >
+      <p>
+        <span style="font-size: 12px">已选择 :</span>
+        <el-tag v-if="currentData" :size="size">{{
+          currentData[showKey]
+        }}</el-tag>
+        <span v-else>无</span>
+      </p>
+      <el-pagination
+        :layout="layout"
+        :total="page.total"
+        :page-sizes="pageSizes"
+        :page-size="page.pageSize"
+        :current-page="page.pageNum"
+        :small="size === 'mini'"
+        background
+        @size-change="pageSizeChange"
+        @current-change="pageNumberChange"
+      >
+      </el-pagination>
+    </div>
+    <div style="margin-top: 20px; text-align: right">
+      <el-button :size="size" @click="visible = false">取 消</el-button>
+      <el-button :size="size" type="primary" @click="confirm">确 定</el-button>
+    </div>
+  </el-dialog>
+</template>
+<style scoped></style>

+ 20 - 0
src/views/common-dialog/index.js

@@ -0,0 +1,20 @@
+// 员工
+import user from "./user.vue";
+// 组织
+import organization from "./organization.vue";
+// 部门
+import department from "./department.vue";
+// 供应商
+import supplier from "./supplier.vue";
+// 税率
+import tax from "./tax.vue";
+// 币种
+import currency from "./currency.vue";
+
+export const User = user;
+export const Organization = organization;
+export const Department = department;
+export const Supplier = supplier;
+export const Tax = tax;
+export const Currency = currency;
+export default { Tax, User, Supplier, Currency, Department, Organization };

+ 204 - 0
src/views/common-dialog/organization.vue

@@ -0,0 +1,204 @@
+<script>
+import { list, refer } from "./api/index";
+import { initParams } from "@/utils/init-something";
+
+export default {
+  name: "OrganizationInputDialog",
+  props: ["title", "value"],
+  components: {},
+  data() {
+    const columns = [
+      {
+        key: "deptId",
+        title: "组织编码",
+        type: "Input",
+        search: true,
+      },
+      {
+        key: "deptName",
+        title: "组织名称",
+        type: "Input",
+        search: true,
+      },
+    ];
+    const initTableColumns = () => columns.filter((column) => column.key);
+    const initSearchColumns = () => columns.filter((column) => column.search);
+    return {
+      // global
+      size: "mini",
+      width: "50%",
+      page: { pageNum: 1, pageSize: 25, total: 0 },
+      pageSizes: [25, 50],
+      layout: "prev, pager, next, jumper",
+      api: "puOrg",
+      showKey: "deptName",
+      // dialog
+      visible: false,
+      loading: false,
+      // search
+      searchColumns: initSearchColumns(),
+      params: initParams(initSearchColumns()),
+      // table
+      tableColumns: initTableColumns(),
+      data: [],
+      currentData: null,
+    };
+  },
+  computed: {},
+  watch: {},
+  methods: {
+    // set dialog visible
+    setVisible(prop) {
+      this.visible = prop;
+    },
+    // do something before dialog open
+    beforeOpen() {
+      const { value } = this.$props;
+      this.params[this.showKey] = value;
+      this.fetchList(this.params, this.page);
+    },
+    // fetch table data
+    async fetchList(prop, page) {
+      try {
+        this.loading = true;
+        const { pageNum, pageSize } = page;
+        // const { code, msg, rows, total } = await refer({
+        //   pageNum,
+        //   pageSize,
+        //   isPage: true,
+        //   type: "ORG_PARAM",
+        // });
+        const { code, msg, rows, total } = await list(this.api, {
+          ...prop,
+          pageNum,
+          pageSize,
+        });
+        if (code === 200) {
+          this.data = rows;
+          this.page.total = total;
+          this.$notify.success({ title: msg });
+        } else {
+          this.$notify.warning({ title: msg });
+        }
+      } catch (err) {
+        this.$notify.error({ title: "error", message: err });
+      } finally {
+        this.loading = false;
+        this.setCurrentData(
+          this.data.find(
+            (column) => column[this.showKey] === this.currentData[this.showKey]
+          )
+        );
+      }
+    },
+    // setting up to fetch table data
+    queryList() {
+      this.fetchList(this.params, this.page);
+    },
+    // reset to fetch table data
+    resetList() {
+      this.page.pageNum = 1;
+      this.params = initParams(this.searchColumns);
+      this.fetchList(this.params, this.page);
+    },
+    // size change to fetch table data
+    pageSizeChange(prop) {
+      this.page.pageSize = prop;
+      this.fetchList(this.params, this.page);
+    },
+    // number change to fetch table data
+    pageNumberChange(prop) {
+      this.page.pageNum = prop;
+      this.fetchList(this.params, this.page);
+    },
+    // select row data
+    selectCurrentData(row) {
+      this.currentData = row;
+    },
+    // set row data highlight
+    setCurrentData(row) {
+      this.$refs.singleTable.setCurrentRow(row);
+    },
+    //
+    confirm() {
+      if (this.currentData) {
+        this.$emit("confirm", this.currentData);
+      }
+      this.setVisible(false);
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="visible"
+    :width="width"
+    append-to-body
+    @open="beforeOpen"
+  >
+    <el-form :size="size" :inline="true" :model="params">
+      <el-form-item
+        v-for="(column, index) in searchColumns"
+        :key="index"
+        :label="column.title"
+      >
+        <el-input v-model="params[column.key]" @change="queryList"> </el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button icon="el-icon-refresh" @click="resetList"></el-button>
+      </el-form-item>
+    </el-form>
+    <el-table
+      v-loading="loading"
+      :data="data"
+      :size="size"
+      ref="singleTable"
+      height="45vh"
+      highlight-current-row
+      style="width: 100%; margin-bottom: 20px"
+      @row-click="selectCurrentData"
+    >
+      <el-table-column
+        v-for="(column, index) in tableColumns"
+        :key="index"
+        :prop="column.key"
+        :label="column.title"
+        :width="column.width"
+        show-overflow-tooltip
+      >
+      </el-table-column>
+    </el-table>
+    <div
+      style="display: flex; justify-content: space-between; align-items: center"
+    >
+      <p>
+        <span style="font-size: 12px">已选择 :</span>
+        <el-tag v-if="currentData" :size="size">{{
+          currentData[showKey]
+        }}</el-tag>
+        <span v-else>无</span>
+      </p>
+      <el-pagination
+        :layout="layout"
+        :total="page.total"
+        :page-sizes="pageSizes"
+        :page-size="page.pageSize"
+        :current-page="page.pageNum"
+        :small="size === 'mini'"
+        background
+        @size-change="pageSizeChange"
+        @current-change="pageNumberChange"
+      >
+      </el-pagination>
+    </div>
+    <div style="margin-top: 20px; text-align: right">
+      <el-button :size="size" @click="visible = false">取 消</el-button>
+      <el-button :size="size" type="primary" @click="confirm">确 定</el-button>
+    </div>
+  </el-dialog>
+</template>
+<style scoped></style>

+ 203 - 0
src/views/common-dialog/payment-plan.vue

@@ -0,0 +1,203 @@
+<script>
+import { initParams } from "./utils/init-something";
+import { list } from "./api/index";
+
+export default {
+  name: "PaymentPlanInputDialog",
+  props: ["title", "value"],
+  components: {},
+  data() {
+    const columns = [
+      {
+        key: "",
+        title: "付款协议名称",
+        type: "Input",
+        search: true,
+      },
+      {
+        key: "",
+        title: "付款协议编码",
+        type: "Input",
+        search: true,
+      },
+      {
+        key: "",
+        title: "管理组织",
+      },
+      {
+        key: "",
+        title: "有效期开始时间",
+      },
+      {
+        key: "",
+        title: "有效期结束时间",
+      },
+      {
+        key: "",
+        title: "说明",
+      },
+    ];
+    const initTableColumns = () => columns.filter((column) => column.key);
+    const initSearchColumns = () => columns.filter((column) => column.search);
+    return {
+      // global
+      size: "mini",
+      width: "50%",
+      page: { pageNum: 1, pageSize: 25, total: 0 },
+      pageSizes: [25, 50],
+      layout: "prev, pager, next, jumper",
+      api: "puTaxRate",
+      showKey: "mattaxesname",
+      // dialog
+      visible: false,
+      loading: false,
+      // search
+      searchColumns: initSearchColumns(),
+      params: initParams(initSearchColumns()),
+      // table
+      tableColumns: initTableColumns(),
+      data: [],
+      currentData: null,
+    };
+  },
+  computed: {},
+  watch: {},
+  methods: {
+    // set dialog visible
+    setVisible(prop) {
+      this.visible = prop;
+    },
+    // do something before dialog open
+    beforeOpen() {
+      const { value } = this.$props;
+      this.params.deptName = value;
+      this.fetchList(this.params, this.page);
+    },
+    // fetch table data
+    async fetchList(prop, page) {
+      try {
+        this.loading = true;
+        const { pageNum, pageSize } = page;
+        const { code, msg, rows, total } = await list(this.api, {
+          ...prop,
+          pageNum,
+          pageSize,
+        });
+        if (code === 200) {
+          this.data = rows;
+          this.page.total = total;
+          this.$notify.success({ title: msg });
+        } else {
+          this.$notify.warning({ title: msg });
+        }
+      } catch (err) {
+        this.$notify.error({ title: "error", message: err });
+      } finally {
+        this.loading = false;
+      }
+    },
+    // setting up to fetch table data
+    queryList() {
+      this.fetchList(this.params, this.page);
+    },
+    // reset to fetch table data
+    resetList() {
+      this.page.pageNum = 1;
+      this.params = initParams(this.searchColumns);
+      this.fetchList(this.params, this.page);
+    },
+    // size change to fetch table data
+    pageSizeChange(prop) {
+      this.page.pageSize = prop;
+      this.fetchList(this.params, this.page);
+    },
+    // number change to fetch table data
+    pageNumberChange(prop) {
+      this.page.pageNum = prop;
+      this.fetchList(this.params, this.page);
+    },
+    // select row data
+    selectCurrentData(row) {
+      this.currentData = row;
+    },
+    //
+    confirm() {
+      if (this.currentData) {
+        this.$emit("confirm", this.currentData);
+      }
+      this.setVisible(false);
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="visible"
+    :width="width"
+    append-to-body
+    @open="beforeOpen"
+  >
+    <el-form :size="size" :inline="true" :model="params">
+      <el-form-item
+        v-for="(column, index) in searchColumns"
+        :key="index"
+        :label="column.title"
+      >
+        <el-input v-model="params[column.key]" @change="queryList"> </el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button icon="el-icon-refresh" @click="resetList"></el-button>
+      </el-form-item>
+    </el-form>
+    <el-table
+      v-loading="loading"
+      :data="data"
+      :size="size"
+      height="45vh"
+      style="width: 100%; margin-bottom: 20px"
+      @row-click="selectCurrentData"
+    >
+      <el-table-column
+        v-for="(column, index) in tableColumns"
+        :key="index"
+        :prop="column.key"
+        :label="column.title"
+        :width="column.width"
+        show-overflow-tooltip
+      >
+      </el-table-column>
+    </el-table>
+    <div
+      style="display: flex; justify-content: space-between; align-items: center"
+    >
+      <p>
+        <span style="font-size: 12px">已选择 :</span>
+        <el-tag v-if="currentData" :size="size">{{
+          currentData[showKey]
+        }}</el-tag>
+        <span v-else>无</span>
+      </p>
+      <el-pagination
+        :layout="layout"
+        :total="page.total"
+        :page-sizes="pageSizes"
+        :page-size="page.pageSize"
+        :current-page="page.pageNum"
+        :small="size === 'mini'"
+        background
+        @size-change="pageSizeChange"
+        @current-change="pageNumberChange"
+      >
+      </el-pagination>
+    </div>
+    <div style="margin-top: 20px; text-align: right">
+      <el-button :size="size" @click="visible = false">取 消</el-button>
+      <el-button :size="size" type="primary" @click="confirm">确 定</el-button>
+    </div>
+  </el-dialog>
+</template>
+<style scoped></style>

+ 198 - 0
src/views/common-dialog/supplier.vue

@@ -0,0 +1,198 @@
+<script>
+import { initParams } from "./utils/init-something";
+import { list } from "./api/index";
+
+export default {
+  name: "SupplierInputDialog",
+  props: ["title", "value"],
+  components: {},
+  data() {
+    const columns = [
+      {
+        key: "code",
+        title: "供应商编码",
+        type: "Input",
+        search: true,
+      },
+      {
+        key: "name",
+        title: "供应商名称",
+        type: "Input",
+        search: true,
+      },
+    ];
+    const initTableColumns = () => columns.filter((column) => column.key);
+    const initSearchColumns = () => columns.filter((column) => column.search);
+    return {
+      // global
+      size: "mini",
+      width: "50%",
+      page: { pageNum: 1, pageSize: 25, total: 0 },
+      pageSizes: [25, 50],
+      layout: "prev, pager, next, jumper",
+      api: "puSupplier",
+      showKey: "name",
+      // dialog
+      visible: false,
+      loading: false,
+      // search
+      searchColumns: initSearchColumns(),
+      params: initParams(initSearchColumns()),
+      // table
+      tableColumns: initTableColumns(),
+      data: [],
+      currentData: null,
+    };
+  },
+  computed: {},
+  watch: {},
+  methods: {
+    // set dialog visible
+    setVisible(prop) {
+      this.visible = prop;
+    },
+    // do something before dialog open
+    beforeOpen() {
+      const { value } = this.$props;
+      this.params[this.showKey] = value;
+      this.fetchList(this.params, this.page);
+    },
+    // fetch table data
+    async fetchList(prop, page) {
+      try {
+        this.loading = true;
+        const { pageNum, pageSize } = page;
+        const { code, msg, rows, total } = await list(this.api, {
+          ...prop,
+          pageNum,
+          pageSize,
+        });
+        if (code === 200) {
+          this.data = rows;
+          this.page.total = total;
+          this.$notify.success({ title: msg });
+        } else {
+          this.$notify.warning({ title: msg });
+        }
+      } catch (err) {
+        this.$notify.error({ title: "error", message: err });
+      } finally {
+        this.loading = false;
+        this.setCurrentData(
+          this.data.find(
+            (column) => column[this.showKey] === this.currentData[this.showKey]
+          )
+        );
+      }
+    },
+    // setting up to fetch table data
+    queryList() {
+      this.fetchList(this.params, this.page);
+    },
+    // reset to fetch table data
+    resetList() {
+      this.page.pageNum = 1;
+      this.params = initParams(this.searchColumns);
+      this.fetchList(this.params, this.page);
+    },
+    // size change to fetch table data
+    pageSizeChange(prop) {
+      this.page.pageSize = prop;
+      this.fetchList(this.params, this.page);
+    },
+    // number change to fetch table data
+    pageNumberChange(prop) {
+      this.page.pageNum = prop;
+      this.fetchList(this.params, this.page);
+    },
+    // select row data
+    selectCurrentData(row) {
+      this.currentData = row;
+    },
+    // set row data highlight
+    setCurrentData(row) {
+      this.$refs.singleTable.setCurrentRow(row);
+    },
+    //
+    confirm() {
+      if (this.currentData) {
+        this.$emit("confirm", this.currentData);
+      }
+      this.setVisible(false);
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="visible"
+    :width="width"
+    append-to-body
+    @open="beforeOpen"
+  >
+    <el-form :size="size" :inline="true" :model="params">
+      <el-form-item
+        v-for="(column, index) in searchColumns"
+        :key="index"
+        :label="column.title"
+      >
+        <el-input v-model="params[column.key]" @change="queryList"> </el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button icon="el-icon-refresh" @click="resetList"></el-button>
+      </el-form-item>
+    </el-form>
+    <el-table
+      v-loading="loading"
+      :data="data"
+      :size="size"
+      ref="singleTable"
+      height="45vh"
+      highlight-current-row
+      style="width: 100%; margin-bottom: 20px"
+      @row-click="selectCurrentData"
+    >
+      <el-table-column
+        v-for="(column, index) in tableColumns"
+        :key="index"
+        :prop="column.key"
+        :label="column.title"
+        :width="column.width"
+        show-overflow-tooltip
+      >
+      </el-table-column>
+    </el-table>
+    <div
+      style="display: flex; justify-content: space-between; align-items: center"
+    >
+      <p>
+        <span style="font-size: 12px">已选择 :</span>
+        <el-tag v-if="currentData" :size="size">{{
+          currentData[showKey]
+        }}</el-tag>
+        <span v-else>无</span>
+      </p>
+      <el-pagination
+        :layout="layout"
+        :total="page.total"
+        :page-sizes="pageSizes"
+        :page-size="page.pageSize"
+        :current-page="page.pageNum"
+        :small="size === 'mini'"
+        background
+        @size-change="pageSizeChange"
+        @current-change="pageNumberChange"
+      >
+      </el-pagination>
+    </div>
+    <div style="margin-top: 20px; text-align: right">
+      <el-button :size="size" @click="visible = false">取 消</el-button>
+      <el-button :size="size" type="primary" @click="confirm">确 定</el-button>
+    </div>
+  </el-dialog>
+</template>
+<style scoped></style>

+ 198 - 0
src/views/common-dialog/tax.vue

@@ -0,0 +1,198 @@
+<script>
+import { initParams } from "./utils/init-something";
+import { list } from "./api/index";
+
+export default {
+  name: "TaxInputDialog",
+  props: ["title", "value"],
+  components: {},
+  data() {
+    const columns = [
+      {
+        key: "mattaxesname",
+        title: "税目税率名称",
+        type: "Input",
+        search: true,
+      },
+      {
+        key: "mattaxescode",
+        title: "税目税率编码",
+        type: "Input",
+        search: true,
+      },
+    ];
+    const initTableColumns = () => columns.filter((column) => column.key);
+    const initSearchColumns = () => columns.filter((column) => column.search);
+    return {
+      // global
+      size: "mini",
+      width: "50%",
+      page: { pageNum: 1, pageSize: 25, total: 0 },
+      pageSizes: [25, 50],
+      layout: "prev, pager, next, jumper",
+      api: "puTaxRate",
+      showKey: "mattaxesname",
+      // dialog
+      visible: false,
+      loading: false,
+      // search
+      searchColumns: initSearchColumns(),
+      params: initParams(initSearchColumns()),
+      // table
+      tableColumns: initTableColumns(),
+      data: [],
+      currentData: null,
+    };
+  },
+  computed: {},
+  watch: {},
+  methods: {
+    // set dialog visible
+    setVisible(prop) {
+      this.visible = prop;
+    },
+    // do something before dialog open
+    beforeOpen() {
+      const { value } = this.$props;
+      this.params[this.showKey] = value;
+      this.fetchList(this.params, this.page);
+    },
+    // fetch table data
+    async fetchList(prop, page) {
+      try {
+        this.loading = true;
+        const { pageNum, pageSize } = page;
+        const { code, msg, rows, total } = await list(this.api, {
+          ...prop,
+          pageNum,
+          pageSize,
+        });
+        if (code === 200) {
+          this.data = rows;
+          this.page.total = total;
+          this.$notify.success({ title: msg });
+        } else {
+          this.$notify.warning({ title: msg });
+        }
+      } catch (err) {
+        this.$notify.error({ title: "error", message: err });
+      } finally {
+        this.loading = false;
+        this.setCurrentData(
+          this.data.find(
+            (column) => column[this.showKey] === this.currentData[this.showKey]
+          )
+        );
+      }
+    },
+    // setting up to fetch table data
+    queryList() {
+      this.fetchList(this.params, this.page);
+    },
+    // reset to fetch table data
+    resetList() {
+      this.page.pageNum = 1;
+      this.params = initParams(this.searchColumns);
+      this.fetchList(this.params, this.page);
+    },
+    // size change to fetch table data
+    pageSizeChange(prop) {
+      this.page.pageSize = prop;
+      this.fetchList(this.params, this.page);
+    },
+    // number change to fetch table data
+    pageNumberChange(prop) {
+      this.page.pageNum = prop;
+      this.fetchList(this.params, this.page);
+    },
+    // select row data
+    selectCurrentData(row) {
+      this.currentData = row;
+    },
+    // set row data highlight
+    setCurrentData(row) {
+      this.$refs.singleTable.setCurrentRow(row);
+    },
+    //
+    confirm() {
+      if (this.currentData) {
+        this.$emit("confirm", this.currentData);
+      }
+      this.setVisible(false);
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="visible"
+    :width="width"
+    append-to-body
+    @open="beforeOpen"
+  >
+    <el-form :size="size" :inline="true" :model="params">
+      <el-form-item
+        v-for="(column, index) in searchColumns"
+        :key="index"
+        :label="column.title"
+      >
+        <el-input v-model="params[column.key]" @change="queryList"> </el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button icon="el-icon-refresh" @click="resetList"></el-button>
+      </el-form-item>
+    </el-form>
+    <el-table
+      v-loading="loading"
+      :data="data"
+      :size="size"
+      ref="singleTable"
+      height="45vh"
+      highlight-current-row
+      style="width: 100%; margin-bottom: 20px"
+      @row-click="selectCurrentData"
+    >
+      <el-table-column
+        v-for="(column, index) in tableColumns"
+        :key="index"
+        :prop="column.key"
+        :label="column.title"
+        :width="column.width"
+        show-overflow-tooltip
+      >
+      </el-table-column>
+    </el-table>
+    <div
+      style="display: flex; justify-content: space-between; align-items: center"
+    >
+      <p>
+        <span style="font-size: 12px">已选择 :</span>
+        <el-tag v-if="currentData" :size="size">{{
+          currentData[showKey]
+        }}</el-tag>
+        <span v-else>无</span>
+      </p>
+      <el-pagination
+        :layout="layout"
+        :total="page.total"
+        :page-sizes="pageSizes"
+        :page-size="page.pageSize"
+        :current-page="page.pageNum"
+        :small="size === 'mini'"
+        background
+        @size-change="pageSizeChange"
+        @current-change="pageNumberChange"
+      >
+      </el-pagination>
+    </div>
+    <div style="margin-top: 20px; text-align: right">
+      <el-button :size="size" @click="visible = false">取 消</el-button>
+      <el-button :size="size" type="primary" @click="confirm">确 定</el-button>
+    </div>
+  </el-dialog>
+</template>
+<style scoped></style>

+ 226 - 0
src/views/common-dialog/user.vue

@@ -0,0 +1,226 @@
+<script>
+import { initParams } from "./utils/init-something";
+import { list } from "./api/index";
+
+export default {
+  name: "UserInputDialog",
+  props: ["title"],
+  components: {},
+  data() {
+    const columns = [
+      {
+        key: "userName",
+        title: "员工姓名",
+        type: "Input",
+        search: true,
+      },
+      {
+        key: "userId",
+        title: "员工编码",
+        type: "Input",
+        search: true,
+      },
+      {
+        key: "orgName",
+        title: "任职(兼职)组织",
+        type: "Input",
+        width: 200,
+      },
+      {
+        key: "deptName",
+        title: "部门",
+        type: "Input",
+        width: 200,
+      },
+      {
+        key: "",
+        title: "岗位",
+        type: "Input",
+      },
+      {
+        key: "email",
+        title: "邮箱",
+        type: "Input",
+        width: 200,
+      },
+      {
+        key: "",
+        title: "职位",
+        type: "Input",
+      },
+    ];
+    const initTableColumns = () => columns.filter((column) => column.key);
+    const initSearchColumns = () => columns.filter((column) => column.search);
+    return {
+      // global
+      size: "mini",
+      width: "50%",
+      page: { pageNum: 1, pageSize: 25, total: 0 },
+      pageSizes: [25, 50],
+      layout: "prev, pager, next, jumper",
+      api: "puPersonnel",
+      showKey: "userName",
+      // dialog
+      visible: false,
+      loading: false,
+      // search
+      searchColumns: initSearchColumns(),
+      params: initParams(initSearchColumns()),
+      // table
+      tableColumns: initTableColumns(),
+      data: [],
+      currentData: null,
+    };
+  },
+  computed: {},
+  watch: {},
+  methods: {
+    // set dialog visible
+    setVisible(prop) {
+      this.visible = prop;
+    },
+    // do something before dialog open
+    beforeOpen() {
+      const { value } = this.$props;
+      this.params[this.showKey] = value;
+      this.fetchList(this.params, this.page);
+    },
+    // fetch table data
+    async fetchList(prop, page) {
+      try {
+        this.loading = true;
+        const { pageNum, pageSize } = page;
+        const { code, msg, rows, total } = await list(this.api, {
+          ...prop,
+          pageNum,
+          pageSize,
+        });
+        if (code === 200) {
+          this.data = rows;
+          this.page.total = total;
+          this.$notify.success({ title: msg });
+        } else {
+          this.$notify.warning({ title: msg });
+        }
+      } catch (err) {
+        this.$notify.error({ title: "error", message: err });
+      } finally {
+        this.loading = false;
+        this.setCurrentData(
+          this.data.find(
+            (column) => column[this.showKey] === this.currentData[this.showKey]
+          )
+        );
+      }
+    },
+    // setting up to fetch table data
+    queryList() {
+      this.fetchList(this.params, this.page);
+    },
+    // reset to fetch table data
+    resetList() {
+      this.page.pageNum = 1;
+      this.params = initParams(this.searchColumns);
+      this.fetchList(this.params, this.page);
+    },
+    // size change to fetch table data
+    pageSizeChange(prop) {
+      this.page.pageSize = prop;
+      this.fetchList(this.params, this.page);
+    },
+    // number change to fetch table data
+    pageNumberChange(prop) {
+      this.page.pageNum = prop;
+      this.fetchList(this.params, this.page);
+    },
+    // select row data
+    selectCurrentData(row) {
+      this.currentData = row;
+    },
+    // set row data highlight
+    setCurrentData(row) {
+      this.$refs.singleTable.setCurrentRow(row);
+    },
+    //
+    confirm() {
+      if (this.currentData) {
+        this.$emit("confirm", this.currentData);
+      }
+      this.setVisible(false);
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<template>
+  <el-dialog
+    :title="title"
+    :visible.sync="visible"
+    :width="width"
+    append-to-body
+    @open="beforeOpen"
+  >
+    <el-form :size="size" :inline="true" :model="params">
+      <el-form-item
+        v-for="(column, index) in searchColumns"
+        :key="index"
+        :label="column.title"
+      >
+        <el-input v-model="params[column.key]" @change="queryList"> </el-input>
+      </el-form-item>
+      <el-form-item>
+        <el-button icon="el-icon-refresh" @click="resetList"></el-button>
+      </el-form-item>
+    </el-form>
+    <el-table
+      v-loading="loading"
+      :data="data"
+      :size="size"
+      ref="singleTable"
+      height="45vh"
+      highlight-current-row
+      style="width: 100%; margin-bottom: 20px"
+      @row-click="selectCurrentData"
+    >
+      <el-table-column
+        v-for="(column, index) in tableColumns"
+        :key="index"
+        :prop="column.key"
+        :label="column.title"
+        :width="column.width"
+        show-overflow-tooltip
+      >
+      </el-table-column>
+    </el-table>
+    <div
+      style="display: flex; justify-content: space-between; align-items: center"
+    >
+      <p>
+        <span style="font-size: 12px">已选择 :</span>
+        <el-tag v-if="currentData" :size="size">{{
+          currentData[showKey]
+        }}</el-tag>
+        <span v-else>无</span>
+      </p>
+      <el-pagination
+        :layout="layout"
+        :total="page.total"
+        :page-sizes="pageSizes"
+        :page-size="page.pageSize"
+        :current-page="page.pageNum"
+        :small="size === 'mini'"
+        background
+        @size-change="pageSizeChange"
+        @current-change="pageNumberChange"
+      >
+      </el-pagination>
+    </div>
+    <div style="margin-top: 20px; text-align: right">
+      <el-button :size="size" @click="visible = false">取 消</el-button>
+      <el-button :size="size" type="primary" @click="confirm">确 定</el-button>
+    </div>
+  </el-dialog>
+</template>
+<style scoped></style>

+ 3 - 0
src/views/common-dialog/utils/init-something.js

@@ -0,0 +1,3 @@
+import { arr2obj } from "@/utils/data-transform";
+
+export const initParams = (arr) => arr2obj(arr, "key", "value");

+ 169 - 0
src/views/marketing/dealer-authorization/authprivAdd.vue

@@ -0,0 +1,169 @@
+<!-- 经销商授权信息 编辑新增-->
+<template>
+  <el-dialog :title="isAdd ? '新增' : '编辑'" :visible.sync="visible" :close-on-click-modal="false"
+    :close-on-press-escape="false" :before-close="beforeClose">
+    <el-form :model="formData" ref="authprivAdd" label-position="left" label-width="120px" v-loading="loading">
+
+      <el-form-item v-for="column in formColumns" :label="column.title" :prop="column.key"
+        :rules="{ required: true, message: `请输入${column.title}`, trigger: column.type == 'Input' ? 'blur' : 'change' }">
+
+        <el-input v-if="column.type == 'Input'" :clearable="column.clearable" v-model="formData[column.key]"
+          autocomplete="off"></el-input>
+
+        <el-date-picker v-if="column.type == 'DateRange'" :clearable="column.clearable" v-model="formData[column.key]"
+          format="yyyy-MM-dd " value-format="yyyy-MM-dd" type="daterange" range-separator="至" start-placeholder="开始日期"
+          end-placeholder="结束日期"></el-date-picker>
+
+        <el-date-picker v-if="column.type == 'Date'" :clearable="column.clearable" v-model="formData[column.key]"
+          format="yyyy-MM-dd " value-format="yyyy-MM-dd" type="date" placeholder="选择日期"></el-date-picker>
+
+      </el-form-item>
+    </el-form>
+    <div slot="footer" class="dialog-footer">
+      <el-button @click="handleCancel">取 消</el-button>
+      <el-button type="primary" @click="handleConfirm('authprivAdd')">确 定</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+import dealerApi from '@/api/marketing/dealer-authorization'
+
+export default {
+
+  name: 'authprivAdd',
+
+  data() {
+    const arr2Obj = function (data, keyName, valueName) {
+      return Object.fromEntries(
+        data.map((item) => [item[keyName], item[valueName]])
+      );
+    };
+
+    const formColumns = [
+      { title: '经销商名称', key: 'dealerName', type: 'Input' },
+      { title: '授权区/医院', key: 'authorizedAreaName', type: 'Input' },
+      { title: '授权产品', key: 'authorizedProductsName', type: 'Input' },
+      { title: '授权期限', key: 'time', type: 'DateRange' },
+      { title: '授权书开具时间', key: 'issueTime', type: 'Date' },
+    ];
+
+    const initFormColumns = () =>
+      formColumns.map((column) => {
+        const clearable = column.clearable || true;
+        return {
+          ...column,
+          clearable,
+        };
+      });
+
+    const initFormData = () => arr2Obj(initFormColumns(), "key", "value")
+
+    return {
+      visible: false,
+      isAdd: true,
+      loading: false,
+      formData: { ...initFormData() },
+      formColumns: initFormColumns(),
+
+    }
+  },
+  methods: {
+    // 控制弹窗展示
+    setVisible(val) {
+
+      this.visible = val;
+
+    },
+    setFormData(data) {
+
+      this.loading = true;
+      if (data.id) {
+
+        let objData = { ...data };
+
+        objData['time'] = [objData.startTime, objData.endTime];
+
+        // delete data.startTime
+        // delete data.endTime
+        this.formData = objData;
+
+      }
+
+      setTimeout(() => {
+        this.loading = false;
+      }, 250);
+      
+    },
+    // 重置表单数据
+    handleResetData() {
+      for (const key in this.formData) {
+        this.formData[key] = '';
+      }
+
+      this.$refs['authprivAdd'].clearValidate();
+    },
+    // 取消
+    handleCancel() {
+        this.handleResetData();
+      this.setVisible(false);
+    },
+    // 确定
+    handleConfirm(formName) {
+
+      console.log(this.formData, 'this.formData');
+
+      this.$refs[formName].validate((valid) => {
+        if (valid) {
+          // 校验通过
+          let isTime = this.formData.time && this.formData.time != '' && this.formData.time.length;
+          let params = {
+            ...this.formData,
+            startTime: isTime ? this.formData.time[0] : '',
+            endTime: isTime ? this.formData.time[1] : '',
+          }
+          delete params['time']
+          console.log(params, 'params--------');
+
+          if (this.isAdd) {
+            // 新增
+            dealerApi.dealerInsert(params).then(res => {
+
+            }).catch(error => {
+
+            })
+          } else {
+            // 编辑
+            dealerApi.dealerUpdate(params).then(res => {
+
+            }).catch(error => {
+
+            })
+          }
+
+          // this.setVisible(false);
+        } else {
+          console.log('error submit!!');
+          return false;
+        }
+      });
+    },
+    beforeClose(done) {
+      this.handleResetData();
+      done();
+    },
+  },
+  created() {
+  }
+
+}
+</script>
+
+
+<style lang="scss" scoped>
+.authpriv {
+  width: calc(100% - 24px);
+  height: 100%;
+  margin: 10px
+}
+</style>

+ 88 - 0
src/views/marketing/dealer-authorization/authprivSee.vue

@@ -0,0 +1,88 @@
+<!-- 经销商授权信息-查看 -->
+<template>
+  <el-dialog title="查看" :visible.sync="visible" :close-on-click-modal="false" :close-on-press-escape="false">
+    <el-form :model="formData" label-position="left" label-width="120px">
+      <el-form-item v-for="column in formColumns" :label="column.title" :prop="column.key">
+        <el-input v-if="column.type == 'Input'" readonly v-model="formData[column.key]" autocomplete="off"></el-input>
+
+        <el-date-picker v-if="column.type == 'DateRange'" readonly v-model="formData[column.key]" type="daterange"
+          format="yyyy-MM-dd " value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期"
+          end-placeholder="结束日期"></el-date-picker>
+
+        <el-date-picker v-if="column.type == 'Date'" readonly v-model="formData[column.key]" type="date"
+          format="yyyy-MM-dd " value-format="yyyy-MM-dd" placeholder="选择日期"></el-date-picker>
+
+      </el-form-item>
+    </el-form>
+    <div slot="footer" class="dialog-footer">
+      <el-button @click="setVisible(false)">取 消</el-button>
+    </div>
+  </el-dialog>
+</template>
+
+<script>
+export default {
+
+  name: 'authprivSee',
+  data() {
+    const arr2Obj = function (data, keyName, valueName) {
+      return Object.fromEntries(
+        data.map((item) => [item[keyName], item[valueName]])
+      );
+    };
+
+    const formColumns = [
+      { title: '经销商名称', key: 'dealerName', type: 'Input' },
+      { title: '授权区/医院', key: 'authorizedAreaName', type: 'Input' },
+      { title: '授权产品', key: 'authorizedProductsName', type: 'Input' },
+      { title: '授权期限', key: 'time', type: 'DateRange' },
+      { title: '授权书开具时间', key: 'issueTime', type: 'Date' },
+    ];
+
+    const initFormColumns = () => formColumns;
+    const initFormData = () => arr2Obj(initFormColumns(), "key", "value")
+
+    return {
+      visible: false,
+      formData: { ...initFormData() },
+      formColumns: initFormColumns(),
+
+    }
+  },
+  methods: {
+    // 控制弹窗展示
+    setVisible(val) {
+
+      this.visible = val;
+
+    },
+    setFormData(data) {
+
+      if (data.id) {
+
+        let objData = { ...data };
+
+        objData['time'] = [objData.startTime, objData.endTime];
+
+        // delete data.startTime
+        // delete data.endTime
+        this.formData = objData;
+
+      }
+
+    },
+  },
+  created() {
+  }
+
+}
+</script>
+
+
+<style lang="scss" scoped>
+.authpriv {
+  width: calc(100% - 24px);
+  height: 100%;
+  margin: 10px
+}
+</style>

+ 302 - 0
src/views/marketing/dealer-authorization/index.vue

@@ -0,0 +1,302 @@
+<!-- 经销商授权信息管理--列表 -->
+<template>
+  <el-card class="dealerAuthorization" v-loading="loading" :body-style="{ padding: 0 }">
+
+    <authprivAdd ref="addDialogRef"></authprivAdd>
+    <authprivSee ref="seeDialogRef"></authprivSee>
+
+    <!-- 检索区 -->
+    <el-form :inline="true" size="mini" label-position="right" label-width="100px" :model="searchParams"
+      style="padding: 10px 0 0 0">
+
+      <el-form-item v-for="column in searchColumns " :label="column.title" :key="column.key">
+
+        <el-input v-if="column.type == 'Input'" v-model="searchParams[column.key]" clearable></el-input>
+
+        <el-select v-if="column.type == 'Select'" v-model="searchParams[column.key]" clearable>
+          <el-option v-for="op in column.options" :label="op.label" :value="op.value"></el-option>
+        </el-select>
+
+        <el-date-picker v-if="column.type == 'DateRange'" v-model="searchParams[column.key]" clearable type="daterange"
+          format="yyyy-MM-dd " value-format="yyyy-MM-dd" range-separator="至" start-placeholder="开始日期"
+          end-placeholder="结束日期">
+        </el-date-picker>
+      </el-form-item>
+
+      <el-form-item>
+        <el-button type="primary" icon="el-icon-search" @click="handelSearch"
+          v-hasPermi="['pu:authorization:list']">查询</el-button>
+        <el-button icon="el-icon-refresh" @click="handelResetSearch">重置</el-button>
+      </el-form-item>
+
+    </el-form>
+
+    <!-- 操作区 -->
+    <el-row :gutter="24" style="padding: 0 10px">
+      <el-col :span="24" style="text-align: right">
+        <el-button size="mini" type="primary" @click="handleOpenAddDialog"
+          v-hasPermi="['pu:authorization:add']">新增</el-button>
+        <el-button size="mini" @click="handleSubmit">提交</el-button>
+        <el-button size="mini" @click="handleDownload">下载授权书</el-button>
+      </el-col>
+    </el-row>
+
+    <!-- 数据展示 -->
+    <el-table class="da-table" @row-dblclick="handleOpenSeeDialog" @select="handleSelect" :data="tableData"
+      highlight-current-row max-height="500">
+      <el-table-column type="selection" width="35"></el-table-column>
+      <el-table-column type="index" width="55" label="序号"></el-table-column>
+      <el-table-column v-for="column in tableColumns" :label="column.title" v-if="column.show"
+        :width="column.width || 180">
+        <template slot-scope="scope">
+          {{ column.key == 'status' ? judgeStatus(scope.row[column.key]) : scope.row[column.key] }}
+        </template>
+      </el-table-column>
+      <el-table-column fixed="right" label="操作" width="120">
+        <template slot-scope="scope">
+          <el-button type="text" size="small" @click="handleOpenAddDialog(scope.row)"
+            v-hasPermi="['pu:authorization:edit']">编辑</el-button>
+          <el-button type="text" size="small" @click="handleDelDialog(scope.row)"
+            v-hasPermi="['pu:authorization:remove']">删除</el-button>
+          <el-button @click="handleOpenSeeDialog(scope.row)" type="text" size="small">查看</el-button>
+        </template>
+      </el-table-column>
+    </el-table>
+
+    <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :total="total"
+      :page-sizes="pageSizes" :page-size="page.pageSize" :current-page="page.pageNum" hide-on-single-page
+      layout="total, prev, pager, next, sizes, jumper">
+    </el-pagination>
+
+  </el-card>
+</template>
+
+<script>
+import authprivAdd from './authprivAdd.vue';
+import authprivSee from './authprivSee.vue';
+import dealerApi from '@/api/marketing/dealer-authorization'
+
+export default {
+
+  name: 'dealerAuthorization',
+  components: {
+    authprivAdd,
+    authprivSee,
+  },
+
+  data() {
+    const arr2Obj = function (data, keyName, valueName) {
+      return Object.fromEntries(
+        data.map((item) => [item[keyName], item[valueName]])
+      );
+    };
+    // 查询条件列
+    const searchColumns = [
+      { key: "dealerName", title: "经销商名称", type: "Input" },
+      { key: "authorizedAreaName", title: "授权区域/医院", type: "Input" },
+      { key: "authorizedProductsName", title: "授权产品", type: "Input" },
+      // 单据状态0=自由态,1=审批中,2=已审核,3=已驳回
+      {
+        key: "status", title: "状态", type: "Select", options: [
+          { value: 0, label: '自由态' },
+          { value: 1, label: '审批中' },
+          { value: 2, label: '已审核' },
+          { value: 3, label: '已驳回' },
+        ]
+      },
+      { title: "授权时间", key: "time", type: "DateRange" },
+    ];
+
+    // 表列
+    const tableColumns = [
+      { key: "authorizedProductsCode", title: "授权产品 编码", show: true },
+      { key: "dealerName", title: "经销商名称", show: true },
+      { key: "authorizedAreaCode", title: "授权区域/医院 编码", show: false },
+      { key: "authorizedAreaName", title: "授权区域/医院 名称", show: true },
+      { key: "authorizedProductsName", title: "授权产品 名称", show: true },
+      { key: "status", title: "状态", show: true },
+      { key: "createPerson", title: "创建人", show: true },
+      { key: "createTime", title: "创建时间", show: true },
+      { key: "updatePerson", title: "最后修改人", show: true },
+      { key: "updateTime", title: "最后修改时间", show: true },
+      { key: "id", title: "主键id----该值不显示", show: false },
+      { key: "startTime", title: "开始时间", show: false },
+      { key: "endTime", title: "结束时间", show: false },
+      { key: "issueTime", title: "授权书开具时间", show: false },
+    ];
+
+    const initTableColumns = () => tableColumns;
+    const initSearchColumns = () => searchColumns;
+    const initSearchParams = () => arr2Obj(initSearchColumns(), "key", "value");
+    return {
+      loading: false,
+      searchColumns: initSearchColumns(),
+      searchParams: {
+        // isAsc: "desc",
+        // reasonable: "",
+        // orderByColumn: "",
+        ...initSearchParams(),
+      },
+      tableColumns: initTableColumns(),
+      tableData: [
+        {
+          authorizedProductsCode: "授权产品 编码",
+          dealerName: "经销商名称",
+          authorizedAreaCode: "授权区域/医院 编码",
+          authorizedAreaName: "授权区域/医院 名称",
+          authorizedProductsName: "授权产品 名称",
+          status: "0",
+          createPerson: "创建人",
+          createTime: "创建时间",
+          updatePerson: "最后修改人",
+          updateTime: "最后修改时间",
+          id: "主键id----该值不显示",
+          startTime: "2023-01-02",
+          endTime: "2025-01-01",
+          issueTime: "2023-01-02",
+        }
+      ],
+      checkedList: [],
+      page: { pageNum: 1, pageSize: 25 },
+      total: 0,
+      pageSizes: [10, 20, 50, 100],
+    }
+  },
+  methods: {
+    // 查询---列表查询
+    handelSearch() {
+      this.loading = true;
+      console.log(this.searchParams, '查询');
+      let isTime = this.searchParams.time && this.searchParams.time != '' && this.searchParams.time.length;
+      let params = {
+        ...this.searchParams,
+        startTime: isTime ? this.searchParams.time[0] : '',
+        endTime: isTime ? this.searchParams.time[1] : '',
+      }
+      delete params['time']
+      console.log(params, 'params--------');
+
+      dealerApi.dealerList(params, this.page).then(res => {
+        console.log(res, '获取列表');
+        this.loading = false;
+      }).catch(error => {
+        this.loading = false;
+      })
+    },
+    // 重置
+    handelResetSearch() {
+      console.log('重置');
+
+      for (const key in this.searchParams) {
+
+        this.searchParams[key] = '';
+      }
+    },
+    // 判断状态
+    judgeStatus(status) {
+      // 单据状态0=自由态,1=审批中,2=已审核,3=已驳回
+      let statusName = '';
+      switch (status) {
+        case '0':
+          statusName = '自由态';
+          break;
+        case '1':
+          statusName = '审批中';
+          break;
+        case '2':
+          statusName = '已审核';
+          break;
+        case '3':
+          statusName = '已驳回';
+          break;
+        default:
+          break;
+      }
+
+      return statusName;
+    },
+    // 刷新
+    handleRefresh() {
+
+    },
+    handleSizeChange(e) {
+      this.page.pageSize = e;
+      this.handelSearch();
+    },
+    handleCurrentChange(e) {
+      this.page.pageNum = e;
+      this.handelSearch();
+    },
+
+    // 选择列表
+    handleSelect(selection, row) {
+      console.log('selection/////////', selection, 'row/////////', row);
+      this.checkedList = [...selection];
+    },
+    // 新增、编辑授权信息
+    handleOpenAddDialog(rows) {
+      console.log(rows, '授权信息');
+      const { setVisible, setFormData } = this.$refs.addDialogRef;
+      setFormData(rows);
+      setVisible(true);
+
+    },
+    // 查看
+    handleOpenSeeDialog(rows) {
+      console.log(rows, '编辑、查看');
+      const { setVisible, setFormData } = this.$refs.seeDialogRef;
+      setFormData(rows);
+      setVisible(true);
+    },
+    // 删除
+    handleDelDialog(rows) {
+      console.log(rows, '删除');
+
+      // dealerApi.dealerDelete().then(res => {
+      //   console.log(res, '删除');
+      // }).catch(error => {
+
+      // })
+    },
+    // 提交
+    handleSubmit() {
+      console.log('批量提交');
+      let params = {
+        id: '',
+        status: ''
+      }
+      // 编辑
+      // dealerApi.dealerUpdate(params).then(res => {
+      //   console.log(res, '编辑');
+
+      // }).catch(error => {
+
+      // })
+    },
+    // 下载
+    handleDownload() {
+      console.log('下载');
+    },
+
+  },
+  created() {
+
+  }
+
+}
+</script>
+
+<style lang="scss" scoped>
+.dealerAuthorization {
+  width: calc(100% - 24px);
+  height: 100%;
+  margin: 10px;
+  padding: 10px;
+  box-sizing: border-box;
+
+  .da-table {
+    width: 100%;
+    margin: 20px 0 0 0;
+  }
+}
+</style>

+ 211 - 120
src/views/material/basicFile/details.vue

@@ -4,7 +4,26 @@
     <!-- 操作栏 -->
     <!-- 基本信息栏 -->
     <div v-if="activeMainTab == 'material'">
-      <el-row :gutter="10" class="mb10" v-if="!updateButtonGroup">
+
+      <!-- 基本信息修改状态下—— 保存、保存新增、更新导入、取消 -->
+      <el-row :gutter="10" class="mb10" v-if="updateButtonGroup || maintainNewVersion">
+        <el-col :span="1.5">
+          <el-button-group>
+            <el-button size="small" @click="handleSave"
+              v-hasPermi="['system:material:add', `${maintainNewVersion ? '' : 'system:material:versions'}`]">
+              保存
+            </el-button>
+          </el-button-group>
+        </el-col>
+
+        <el-col :span="1.5">
+          <el-button-group>
+            <el-button size="small" @click="handleCancel">取消</el-button>
+          </el-button-group>
+        </el-col>
+      </el-row>
+
+      <el-row :gutter="10" class="mb10" v-else>
         <!-- 新增、修改、删除、复制 -->
         <el-col :span="1.5">
           <el-button-group>
@@ -19,17 +38,6 @@
         <el-col :span="1.5">
           <el-button-group>
 
-          <!-- <el-dropdown size="small" @command="handleFilter">
-              <el-button size="small">
-                过滤<i class="el-icon-arrow-down el-icon--right"></i>
-              </el-button>
-              <el-dropdown-menu slot="dropdown">
-                <el-dropdown-item :command="filterCondition('stop')">显示停用</el-dropdown-item>
-                <el-dropdown-item :command="filterCondition('allot')">显示已分配</el-dropdown-item>
-              </el-dropdown-menu>
-            </el-dropdown>
-
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              <el-button size="small" @click="handleQuery">查询</el-button> -->
             <el-button size="small" @click="handleRefresh">刷新</el-button>
 
           </el-button-group>
@@ -43,47 +51,19 @@
               <!-- 0:启用  2:停用 -->
               {{ basicData.value.isEnable == '已启用' ? '停用' : '启用' }}
             </el-button>
-          <!-- <el-dropdown split-button size="small" @click="handleIsInvoke(true)" @command="handleIsInvoke">
-              启用
-              <el-dropdown-menu slot="dropdown">
-                <el-dropdown-item :command="isInvoke(true)">启用</el-dropdown-item>
-                                                                                                                            <el-dropdown-item :command="isInvoke(false)">停用</el-dropdown-item></el-dropdown-menu></el-dropdown> -->
           </el-button-group>
         </el-col>
 
-        <!-- 申请单查询 -->
-      <!-- <el-col :span="1.5">
-          <el-button-group>
-            <el-button size="small" @click="handleQueryForm">申请单查询</el-button>
-          </el-button-group>
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      </el-col> -->
-
-        <!-- 导入导出 -->
-      <!-- <el-col :span="1.5">
-          <el-button-group>
-            <el-button size="small" @click="handleImport">批量导入</el-button>
-            <el-button size="small" @click="handleExport">批量导出</el-button>
-          </el-button-group>
-                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        </el-col> -->
-
-      </el-row>
-
-      <!-- 基本信息修改状态下—— 保存、保存新增、更新导入、取消 -->
-      <el-row :gutter="10" class="mb10" v-else>
+        <!-- 维护新版本 -->
         <el-col :span="1.5">
           <el-button-group>
-            <el-button size="small" @click="handleSave" v-hasPermi="['system:material:add']">保存</el-button>
-            <!-- <el-button size="small" @click="handleSaveAdd" :disabled="true">保存新增</el-button> -->
-            <!-- <el-button size="small" @click="handleUpdateImport">更新导入</el-button> -->
+            <el-button size="small" @click="handleNewVersion" v-hasPermi="['system:material:versions']">维护新版本</el-button>
           </el-button-group>
         </el-col>
 
-        <el-col :span="1.5">
-          <el-button-group>
-            <el-button size="small" @click="handleCancel">取消</el-button>
-          </el-button-group>
-        </el-col>
       </el-row>
+
+
     </div>
 
     <!-- 其他标签页操作  修改、删除 -->
@@ -91,7 +71,7 @@
       <el-col :span="1.5">
         <el-button-group>
           <el-button size="small" @click="handleOtherEdit">修改</el-button>
-          <el-button size="small" @click="handleOtherDel">删除</el-button>
+          <el-button size="small" v-show="activeMainTab != 'material_finance'" @click="handleOtherDel">删除</el-button>
         </el-button-group>
         <el-button-group>
           <el-button size="small" @click="handleOtherListRefresh">刷新</el-button>
@@ -108,11 +88,10 @@
         </el-col>
         <el-col :span="6" style="text-align: right;">
           <!-- 附件管理 -->
-        <!-- <el-button-group>
-                                  <el-button size="small" icon="el-icon-paperclip" @click="handleFile"></el-button></el-button-group> -->
+          <!-- <el-button-group> <el-button size="small" icon="el-icon-paperclip" @click="handleFile"></el-button></el-button-group> -->
 
           <!-- 切换 -->
-        <!-- <el-button-group>
+          <!-- <el-button-group>
             <el-button size="small" icon="el-icon-d-arrow-left" :disabled="!handleBasicEdit"
               @click="handleChangePage('first')" />
             <el-button size="small" icon="el-icon-arrow-left" :disabled="!handleBasicEdit"
@@ -120,7 +99,7 @@
             <el-button size="small" icon="el-icon-arrow-right" :disabled="!handleBasicEdit"
               @click="handleChangePage('next')" />
             <el-button size="small" icon="el-icon-d-arrow-right" :disabled="!handleBasicEdit"
-                                @click="handleChangePage('end')" /></el-button-group> -->
+            @click="handleChangePage('end')" /></el-button-group> -->
         </el-col>
       </el-row>
 
@@ -233,7 +212,7 @@
                 <el-table v-else :data="mainMsg.value" @cell-dblclick="handleMaindbClick"
                   @selection-change="handleMainChange">
                   <el-table-column type="selection" width="55" />
-                  <el-table-column type="index" label="序号" width="55" align="center" />
+                  <el-table-column type="index" v-if="mainMsg.form.length" label="序号" width="55" align="center" />
                   <el-table-column v-for="m in  mainMsg.form" v-if="m.show" :label="m.name" align="center"
                     :prop="m.attribute == 'select' ? `${m.prop}Name` : m.prop" show-overflow-tooltip>
                     <template slot-scope="scope">
@@ -323,7 +302,7 @@
                     <!-- 辅计量 -->
                     <el-table v-else-if="activeViceTab == 'material_unit'" :data="unitDetails.value"
                       class="material-table">
-                      <el-table-column type="index" label="序号" width="55" align="center" />
+                      <el-table-column type="index" v-if="unitDetails.form.length" label="序号" width="55" align="center" />
                       <el-table-column v-for="v in  unitDetails.form" v-if="v.show" :label="v.name" align="center"
                         :prop="v.attribute == 'select' ? `${v.prop}Name` : v.prop" show-overflow-tooltip>
                         <template slot-scope="scope">
@@ -339,7 +318,8 @@
                     <!-- 辅助属性 -->
                     <el-table v-else-if="activeViceTab == 'material_property'" :data="propertyDetail.value"
                       class="material-table">
-                      <el-table-column type="index" label="序号" width="55" align="center" />
+                      <el-table-column type="index" v-if="propertyDetail.form.length" label="序号" width="55"
+                        align="center" />
                       <el-table-column v-for="v in  propertyDetail.form" v-if="v.show" :label="v.name" align="center"
                         :prop="v.attribute == 'select' ? `${v.prop}Name` : v.prop" show-overflow-tooltip>
                         <template slot-scope="scope">
@@ -408,7 +388,7 @@
       </el-row>
       <!-- 表格数据 -->
       <el-table :data="materialType.value" stripe style="width: 100%" max-height="350" v-loading="materialType.loading"
-        :key="count" @selection-change="handleSelectionType">
+        :key="refer" @selection-change="handleSelectionType">
         <el-table-column type="selection" width="30" />
         <el-table-column type="index" width="50" label="序号" />
         <el-table-column v-for="mt in materialType.form" v-if="mt.show" :label="mt.name" width="180">
@@ -426,11 +406,10 @@
               <div slot="empty"></div>
             </el-select>
 
-          <!-- <el-select size="small" v-else-if="mt.attribute == 'select' && mt.dictId"  placeholder="请选择"
+            <!-- <el-select size="small" v-else-if="mt.attribute == 'select' && mt.dictId"  placeholder="请选择"
               :disabled="!(materialType.isEdit && mt.edit)" v-model="scope.row[mt.prop]" :key="scope.row[mt.prop]">
               <el-option v-if="mt.dictId" v-for="d in mt.dictId" :key="d.dictValue" :label="d.dictLabel"
-                :value="d.dictValue">
-                                              </el-option></el-select> -->
+                :value="d.dictValue"></el-option></el-select> -->
 
             <!-- 其他类型 -->
             <el-input v-else size="small" v-model="scope.row[mt.prop]" :readonly="!(materialType.isEdit && mt.edit)" />
@@ -496,7 +475,8 @@
             <div class="od-msg">
 
               <!-- 展示表单 -->
-              <el-form :inline="true" label-position="right" :hide-required-asterisk="true" :model="otherDeatils.value">
+              <el-form :inline="true" label-position="right" :key="refer" :hide-required-asterisk="true"
+                :model="otherDeatils.value">
 
                 <el-row :gutter="10">
                   <el-col :span="8" v-for="f in otherDeatils.form" style="text-align: right;">
@@ -519,7 +499,7 @@
                         </el-select>
 
                         <!-- 字典-下拉 -->
-                        <el-select v-if="f.dictId" v-model="otherDeatils.value[`${f.prop}Name`]" placeholder="请选择"
+                        <el-select v-if="f.dictId" v-model="otherDeatils.value[f.prop]" placeholder="请选择"
                           :key="otherDeatils.value[f.prop]" :disabled="!(otherDeatils.isEdit && f.edit)">
                           <el-option v-if="f.dictId" v-for="d in f.dictValue" :key="d.dictValue" :label="d.dictLabel"
                             :value="d.dictValue">
@@ -576,7 +556,7 @@
 
     <!-- 参照弹窗 -->
     <el-dialog :title="MoreDataDialog.msg.name" :visible.sync="MoreDataDialog.show" width="70%" class="MoreDataDialog"
-      :key="count" :close-on-press-escape="false" :close-on-click-modal="false" :before-close="handleCloseRefer">
+      :close-on-press-escape="false" :close-on-click-modal="false" :before-close="handleCloseRefer">
       <div>
         <el-row>
           <el-col :span="1.5">
@@ -585,7 +565,7 @@
         </el-row>
         <!-- 树形 -->
         <el-tree class="referTree" v-loading="MoreDataDialog.loading" v-if="MoreDataDialog.type == 'tree'"
-          :data="MoreDataDialog.list" @node-click="handleNodeClick"
+          :data="MoreDataDialog.list" @node-click="handleNodeClick" :key="refer"
           :props="MoreDataDialog.msg.apiUrl == 'queryMedcineItemDrug' ? drugProps : defaultProps" node-key="id">
         </el-tree>
         <!-- queryMedcineItemDrug -->
@@ -630,7 +610,10 @@ export default {
   data() {
     return {
       count: 1,
+      refer: 1,
       loading: false,
+      // 维护新版本
+      maintainNewVersion: false,
       // 详情固定标签页
       detailsTabs,
       defaultProps: {
@@ -753,28 +736,40 @@ export default {
         pageNum: 1,
         total: 0,
         pageSize: 10,
-      }
+      },
     }
   },
 
   methods: {
     // 判断效期管理
     handleJudge(attribute) {
+      // 维护新版本才能修改:批号及库存状态管理(isInventoryStatus)、
+      if (attribute.prop == 'isInventoryStatus') {
+        return !(this.maintainNewVersion && attribute.edit);
+      }
+      // 序列号管理(serialNoManager):维护新版本 && 批号及库存状态管理
+      else if (attribute.prop == 'serialNoManager') {
+
+        if (this.basicData.value['isInventoryStatus'] == '2') this.basicData.value['serialNoManager'] = '2';
+
+        return !(this.maintainNewVersion && attribute.edit && this.basicData.value['isInventoryStatus'] == '0');
 
+      }
       // 批号及库存状态管理(isInventoryStatus) 控制 效期管理是否展示(expiryDateManagerment)
-      if (attribute.prop == 'expiryDateManagerment') {
+      else if (attribute.prop == 'expiryDateManagerment') {
 
         if (this.basicData.value['isInventoryStatus'] == '2') this.basicData.value['expiryDateManagerment'] = '2';
 
         return !(this.updateButtonGroup && attribute.edit && this.basicData.value['isInventoryStatus'] == '0');
       }
+      // 效期管理(expiryDateManagerment):控制一下几个是否可编辑
+      // expiryUnitId 效期单位  usefulLife 有效期 usefulLifeUnitId 有效期至单位  "recentWarningPeriod" 近效期预警天数
+
       else if (attribute.prop == 'expiryUnitId'
         || attribute.prop == 'usefulLife'
         || attribute.prop == 'usefulLifeUnitId'
         || attribute.prop == 'recentWarningPeriod'
       ) {
-        // 效期管理(expiryDateManagerment):控制一下几个是否可编辑
-        // expiryUnitId 效期单位  usefulLife 有效期 usefulLifeUnitId 有效期至单位  "recentWarningPeriod" 近效期预警天数
         if (this.basicData.value['expiryDateManagerment'] == '2') {
 
           this.basicData.value['expiryUnitId'] = '';
@@ -784,7 +779,12 @@ export default {
         }
 
         return !(this.updateButtonGroup && attribute.edit && this.basicData.value['expiryDateManagerment'] == '0');
-      } else {
+      }
+      // 默认采购组织:purchasingOrganization  业务部门:businessDepartment
+      else if (attribute.prop == 'businessDepartment') {
+        return !(this.updateButtonGroup && attribute.edit && this.basicData.value['purchasingOrganization']);
+      }
+      else {
         // 其他属性是否可编辑
         return !(this.updateButtonGroup && attribute.edit);
       }
@@ -793,9 +793,11 @@ export default {
     },
     // 返回
     handleBack() {
-      this.$router.push({
-        path: `/basic/material/basicFile`,
-      });
+      this.$store.dispatch('tagsView/delView', this.$route)
+      this.$router.go(-1)
+      // this.$router.push({
+      //   path: `/basic/material/basicFile`,
+      // });
 
     },
     // 附件按钮
@@ -921,7 +923,8 @@ export default {
           _this.MoreDataDialog.list = data.tableBody;
           _this.MoreDataDialog.form = data.tableHeader;
         }
-        this.count++;
+        this.refer++;
+        // this.count++;s
         console.log(_this.MoreDataDialog.list, 'this.MoreDataDialog.list');
         console.log(_this.MoreDataDialog.form, 'this.MoreDataDialog.form');
 
@@ -939,13 +942,21 @@ export default {
       this.handleQueryMore(this.MoreDataDialog.msg, this.MoreDataDialog.key, this.MoreDataDialog.target);
     },
     // 根据apiUrl获取对应参照的值
-    getExecuteMethods(methodName, params, cb) {
+    getExecuteMethods(methodName, param, cb) {
 
       let page = {
         pageSize: this.queryParams.pageSize,
         pageNum: this.queryParams.pageNum,
       }
 
+      let params = { ...param };
+      // 业务部门需要  依据默认采购组组织查询
+      if (methodName == "queryOperatingDepptTree") {
+
+        params['puOrgId'] = this.basicData.value['purchasingOrganization']
+
+      }
+
       materialApi.executeMethods(methodName, params, page).then(res => {
         this.MoreDataDialog.loading = false;
         if (res.code == 200) {
@@ -1433,10 +1444,10 @@ export default {
       this.updateButtonGroup = true;
       // this.count++;
       //需要禁止点击其他标签
-      this.detailsTabs = this.detailsTabs.map(item => {
-        item['disabled'] = true;
-        return item
-      })
+      // this.detailsTabs = this.detailsTabs.map(item => {
+      //   item['disabled'] = true;
+      //   return item
+      // })
       console.log(this.detailsTabs, 'this.detailsTabs ');
 
     },
@@ -1481,13 +1492,6 @@ export default {
     // 启用
     handleIsInvoke(e) {
       console.log('启用', this.basicData.value.isEnable);
-      // if (this.basicData.value.isEnable == '已启用') {
-      //   this.basicData.value.isEnable = '2';
-      // } else {
-      //   // this.basicData.isEnable 为空或者为2
-      //   this.basicData.value.isEnable = '0';
-      // }
-      // this.handleSave();
 
       let param = {
         isEnable: this.basicData.value.isEnable == '已启用' ? '2' : '0',
@@ -1499,22 +1503,41 @@ export default {
         if (res.code == 200) this.handleRefresh();
       })
     },
-    isInvoke(val) {
-      return val;
-    },
-    // 申请单查询
-    handleQueryForm() {
-      console.log('申请单查询');
-    },
-    // 批量导入
-    handleImport() {
-      console.log('批量导入');
-    },
-    // 批量导出
-    handleExport() {
-      console.log('批量导出');
+    // 维护新版本
+    handleNewVersion() {
+      let _this = this;
+      let data = {
+        // 物料编码
+        code: this.basicData.value.code
+      }
+      materialApi.versions(data).then(res => {
+        console.log(res, '维护新版本');
+        if (res.code == 200) {
+          _this.maintainNewVersion = res.data.result;
+        }
+      })
     },
+    // 维护物料保存
+    handleSaveNewVersion(cb) {
+      let data = {
+        // 物料编码
+        materialCode: this.basicData.value.code,
+        //序列号管理; 2= 否,0= 是	
+        serialNoManager: this.basicData.value.serialNoManager,
+        // 批号及库存状态管理;2=否,0=是
+        isInventoryStatus: this.basicData.value.isInventoryStatus,
+      }
+      materialApi.saveVersions(data).then(res => {
+        console.log(res, '维护物料保存');
 
+        if (res.code == 200) {
+          cb();
+        }
+      })
+        .catch((error) => {
+          this.loading = false;
+        })
+    },
     // 取消保存
     handleCancel() {
       console.log('取消保存');
@@ -1524,10 +1547,18 @@ export default {
     // 保存修改
     handleSave() {
       console.log('保存修改');
-      this.handleSaveMaterial(() => {
+      this.loading = true;
+      // 普通保存修改
+      this.updateButtonGroup && this.handleSaveMaterial(() => {
         this.updateButtonGroup = false;
         this.handleRefresh();
       });
+
+      // 维护新版本保存修改
+      this.maintainNewVersion && this.handleSaveNewVersion(() => {
+        this.maintainNewVersion = false;
+        this.handleRefresh();
+      })
     },
     // 物料类别列表选中
     handleSelectionType(list) {
@@ -1712,21 +1743,25 @@ export default {
 
       this.optionDialog.show = false;
 
+      // 取消基本信息修改
       if (this.updateButtonGroup) {
         this.updateButtonGroup = false;
         this.handleRest();
 
-        //需要禁止点击其他标签
-        this.detailsTabs = this.detailsTabs.map(item => {
-          item['disabled'] = false;
-          return item;
-        })
       }
 
+      // 取消其他主页签详情弹窗修改
       if (this.otherDeatils.isEdit) {
         this.otherDeatils.isEdit = false;
         this.handleOtherRefresh();
       }
+
+      // 取消维护新版本修改
+      if (this.maintainNewVersion) {
+        console.log('取消维护新版本修改');
+        this.maintainNewVersion = false;
+        this.handleRefresh();
+      }
     },
     // 参照弹窗过滤
     handleFilterRefer() {
@@ -1765,24 +1800,25 @@ export default {
         //  基本信息
         this.basicData.value[this.MoreDataDialog.target.prop] = this.MoreDataDialog.value.id;
 
-        // this.basicData.value[`${this.MoreDataDialog.target.prop}Label`] = this.MoreDataDialog.value.name;
         this.basicData.value[`${this.MoreDataDialog.target.prop}Name`] = this.MoreDataDialog.value.name;
 
         console.log(this.MoreDataDialog.target.prop, 'props-----------------', this.MoreDataDialog.value);
 
         console.log(this.basicData.value[`${this.MoreDataDialog.target.prop}`], '值', this.basicData.value[`${this.MoreDataDialog.target.prop}Name`], '//////////基本信息///////////');
+        // 默认采购组织:purchasingOrganization  业务部门:businessDepartment
+        if (this.MoreDataDialog.target.prop == 'purchasingOrganization') {
+
+          this.basicData.value['businessDepartment'] = '';
+          this.basicData.value['businessDepartmentName'] = '';
+
+        }
+
 
       } else if (this.MoreDataDialog.target.name == 'medcineData') {
-        // console.log('this.MoreDataDialog.value', this.MoreDataDialog.value, this.MoreDataDialog.target.prop, this.medcineData);
-        // if (this.MoreDataDialog.target.prop === 'dosageFrom')
-        //   this.medcineData.form = this.medcineData.form.map((item) => {
-        //     if (item.prop === "dosageFrom") item.dictValue = [{ dictLabel: this.MoreDataDialog.value.name, dictValue: this.MoreDataDialog.value.id }]
-        //     return item
-        //   })
+
         //  医药信息
         this.medcineData.value[this.MoreDataDialog.target.prop] = this.MoreDataDialog.value.id;
 
-        // this.medcineData.value[`${this.MoreDataDialog.target.prop}Label`] = this.MoreDataDialog.value.name;
         this.medcineData.value[`${this.MoreDataDialog.target.prop}Name`] = this.MoreDataDialog.value.name;
 
         console.log(this.MoreDataDialog.target.prop, 'props-----------------', this.MoreDataDialog.value);
@@ -1794,7 +1830,6 @@ export default {
         //  其他页签
         this.otherDeatils.value[this.MoreDataDialog.target.prop] = this.MoreDataDialog.value.id;
 
-        // this.otherDeatils.value[`${this.MoreDataDialog.target.prop}Label`] = this.MoreDataDialog.value.name;
         this.otherDeatils.value[`${this.MoreDataDialog.target.prop}Name`] = this.MoreDataDialog.value.name;
 
         console.log(this.otherDeatils.value[`${this.MoreDataDialog.target.prop}Name`], '/////////其他页签///////');
@@ -1829,10 +1864,11 @@ export default {
       }
 
       if (confirm) {
-
-        this.count++;
+        // this.count++;
+        this.refer++;
         this.MoreDataDialog.show = false;
         this.MoreDataDialog.key = '';
+        this.MoreDataDialog.value = {};
       }
     },
     // 取消-关闭参照弹窗
@@ -1852,24 +1888,36 @@ export default {
     handledDelCenter(ids) {
       console.log('删除利润中心信息');
       materialApi.delCenter(ids).then(res => {
+        if (res.code == 200) {
+          this.handleOtherListRefresh();
+        }
       })
     },
     // 删除库存信息
     handleDelInventory(ids) {
       console.log('删除库存信息');
       materialApi.delInventory(ids).then(res => {
+        if (res.code == 200) {
+          this.handleOtherListRefresh();
+        }
       })
     },
     // 删除成本信息
     handleDelCost(ids) {
       console.log('删除成本信息');
       materialApi.delCost(ids).then(res => {
+        if (res.code == 200) {
+          this.handleOtherListRefresh();
+        }
       })
     },
     // 删除计划信息
     handleDelPlan(ids) {
       console.log('删除计划信息');
       materialApi.delPlan(ids).then(res => {
+        if (res.code == 200) {
+          this.handleOtherListRefresh();
+        }
 
       })
     },
@@ -1877,17 +1925,18 @@ export default {
     handleDelFinance(ids) {
       console.log('删除财物信息');
       materialApi.delFinance(ids).then(res => {
-
-        // if(res.code == 200){
-        //   this.handleOtherRefresh();
-        // }
+        if (res.code == 200) {
+          this.handleOtherListRefresh();
+        }
       })
     },
     // 删除采购信息
     handledelPurchase(ids) {
       console.log('删除采购信息');
       materialApi.delPurchase(ids).then(res => {
-
+        if (res.code == 200) {
+          this.handleOtherListRefresh();
+        }
       });
     },
 
@@ -1903,8 +1952,11 @@ export default {
       param.diCode = param.diCode.replace(/ /g, '');
       console.log(param, '保存物料以及相关页签param');
       materialApi.insertMaterialInfo(param).then(res => {
+
         console.log(res, '保存物料以及相关页签');
         if (res.code == 200) cb();
+      }).catch((error) => {
+        this.loading = false;
       })
     },
     // 保存财务信息——单个数据
@@ -1983,8 +2035,28 @@ export default {
     },
 
   },
-  created() {
 
+  watch: {
+    // 监听主标签修改标识,控制其他标签是否禁止点击
+    'updateButtonGroup': function (nVal, oVal) {
+      console.log(nVal, 'nVal', oVal, 'oVal');
+      this.detailsTabs = this.detailsTabs.map(item => {
+        item['disabled'] = nVal;
+        return item;
+      })
+    },
+    'maintainNewVersion': function (nVal, oVal) {
+      console.log(nVal, 'nVal', oVal, 'oVal');
+      this.detailsTabs = this.detailsTabs.map(item => {
+        item['disabled'] = nVal;
+        return item;
+      })
+    },
+
+  },
+
+  created() {
+    console.log(this, 'created');
     // 基本信息
     this.handleRest();
     if (window.name === '') {
@@ -1994,7 +2066,7 @@ export default {
       console.log('页面被刷新')
     }
 
-  },
+  }
 }
 </script>
 
@@ -2018,9 +2090,12 @@ export default {
 
   .md-content {
     margin-top: 12px;
-    height: calc(100vh - 260px);
+    // height: calc(100vh - 260px);
+    height: calc(100vh - 228px);
     box-sizing: border-box;
 
+
+
     .md-basic {
       overflow: auto;
 
@@ -2028,6 +2103,10 @@ export default {
         // height: calc(100vh - 625px);
         margin-bottom: 10px;
 
+        .el-table__body {
+          // height: calc(100vh - 300px);
+        }
+
         .el-form {
           max-height: 200px;
           overflow-y: auto;
@@ -2055,6 +2134,10 @@ export default {
 
   }
 
+  // .md-content>.el-tabs {
+  //   height: calc(100vh - 280px);
+  // }
+
   .otherDialog {
 
     .el-collapse-item__content {
@@ -2239,6 +2322,14 @@ export default {
   overflow-x: auto;
 }
 
+>>>.referTree {
+  margin-top: 10px;
+}
+
+/* .md-main>>>.el-table .el-table__body {
+  height: calc(100vh - 300px);
+} */
+
 /* .otherDialog>>>.el-collapse-item__content {
   padding-bottom: 12px;
 }

+ 73 - 34
src/views/material/basicFile/index.vue

@@ -19,7 +19,7 @@
         <el-col :span="1.5">
           <el-button-group>
 
-          <!-- <el-dropdown size="small" @command="handleFilter">
+            <!-- <el-dropdown size="small" @command="handleFilter">
             <el-button size="small">
               过滤<i class="el-icon-arrow-down el-icon--right"></i>
             </el-button>
@@ -27,7 +27,7 @@
               <el-dropdown-item :command="filterCondition('stop')">显示停用</el-dropdown-item>
               <el-dropdown-item :command="filterCondition('allot')">显示已分配</el-dropdown-item>
             </el-dropdown-menu>
-                                                                </el-dropdown> -->
+          </el-dropdown> -->
 
             <!-- <el-button size="small" @click="handleQuery">查询</el-button> -->
             <el-button size="small" @click="handleRefresh">刷新</el-button>
@@ -46,13 +46,6 @@
           </el-button-group>
         </el-col>
 
-        <!-- 申请单查询 -->
-      <!-- <el-col :span="1.5">
-        <el-button-group>
-          <el-button size="small" @click="handleQueryForm">申请单查询</el-button>
-        </el-button-group>
-                                                                                                                                                                                                                        </el-col> -->
-
         <!-- 导入导出 -->
         <el-col :span="1.5">
           <el-button-group>
@@ -65,7 +58,7 @@
       </el-row>
 
       <!-- 查询条件 -->
-      <el-row :gutter="10" >
+      <el-row :gutter="10">
         <el-col :span="1.5">
           <el-form :inline="true" :model="queryForm" class="mb-query" @submit.native.prevent>
             <el-form-item label="物料编码">
@@ -101,8 +94,10 @@
 
     <!-- 主体列表 -->
     <el-card class="material-list" v-loading="loading">
-      <el-table :data="taskList" @cell-dblclick="handledbClick" @selection-change="handleSelectionChange">
-        <el-table-column type="selection" width="30" />
+      <el-table :data="taskList" ref="materialTable" @cell-dblclick="handledbClick" :row-key="getRowKey"
+        @selection-change="handleSelectionChange" @select="handleSelect" @select-all="handleSelectAll">
+        <!--  -->
+        <el-table-column type="selection" width="30" :reserve-selection="true" />
         <el-table-column type="index" label="序号" width="55" align="center" />
         <el-table-column width="150" v-for="h in  tableHeader" v-if="h.show" :label="h.name" align="center"
           show-overflow-tooltip>
@@ -133,16 +128,14 @@
     </el-dialog>
 
     <!-- 导入弹窗 -->
-    <el-dialog title="批量导入" :visible.sync="importData.show" width="35%" center @before-close="handlefileDialogColse">
+    <el-dialog title="批量导入" :visible.sync="importData.show" width="35%" center :before-close="handlefileDialogColse">
       <div class="mb-import">
-
         <el-upload class="upload-demo" accept=".xls, .xlsx" ref="upload" action="#" :on-remove="handleFileRemove"
           :file-list="importData.list" :auto-upload="false" :on-change="handleChangeFile" :limit="1">
-          <el-button slot="trigger" type="primary">选取文件</el-button>
-          <!-- <el-button style="margin-left: 10px;" size="small" type="success" @click="handleSubmitUpload">上传到服务器</el-button> -->
+          <el-button slot="trigger" size="small" type="primary">选取文件</el-button>
+          <el-button style="margin-left: 10px;" size="small" type="success" @click="handleDownTemplate">下载模板</el-button>
           <div slot="tip" class="el-upload__tip">只能上传Excel文件</div>
         </el-upload>
-        <el-button type="success" @click="handleDownTemplate">下载模板</el-button>
 
       </div>
       <span slot="footer">
@@ -230,14 +223,9 @@ export default {
             isEdit: true
           }
         });
-      } else if (this.checkedList.length > 1) {
-        this.$message({
-          message: '修改只能选择单个数据!',
-          type: 'warning'
-        });
       } else {
         this.$message({
-          message: '请选择需要修改的信息!',
+          message: `${this.checkedList.length > 1 ? '修改只能选择单个数据!' : '请选择需要修改的信息!'}`,
           type: 'warning'
         });
       }
@@ -249,7 +237,12 @@ export default {
       if (this.checkedList.length) {
         let ids = this.checkedList.map(i => i.id);
         materialApi.delMaterial(ids).then(res => {
-          if (res.code == 200) this.handleRefresh();
+          if (res.code == 200) {
+            this.handleRefresh();
+            // 清空选中数据
+            this.checkedList = [];
+            this.$refs.materialTable.clearSelection();
+          }
         })
       } else {
         this.$message({
@@ -301,10 +294,14 @@ export default {
         isEnable: this.handleJudgeIsUsing() ? '2' : '0',
         id: this.checkedList[0].id
       };
-      console.log(param, '启用/停用param');
       materialApi.updateEnableMaterial(param).then(res => {
         console.log(res, '启用/停用');
-        if (res.code == 200) this.handleRefresh();
+        if (res.code == 200) {
+          this.handleRefresh();
+          // 清空选中数据
+          this.checkedList = [];
+          this.$refs.materialTable.clearSelection();
+        }
       })
 
     },
@@ -343,7 +340,14 @@ export default {
 
             formData.append('file', this.importData.list[0].raw);
             materialApi.fileImport(formData).then(res => {
-              if (res.code == 200) this.importData.show = false;
+              if (res.code == 200) {
+                this.importData.show = false;
+                this.importData.list = [];
+              }
+              this.$message({
+                message: res.msg,
+                type: res.code == 200 ? 'success' : 'warning'
+              });
             })
           } else {
             this.$message({
@@ -371,11 +375,20 @@ export default {
 
       let ids = this.checkedList.length ? this.checkedList.map(i => i.id) : [];
 
-      let params = {
-        // orgId: '1',
-        ids,
+      if (ids.length) {
+
+        let params = {
+          // orgId: '1',
+          ids,
+        }
+        this.download('/system/material/export', params, `物料基本信息${new Date().getTime()}.xlsx`);
+      } else {
+        this.$message({
+          message: '请选择需要导出的数据!',
+          type: 'warning'
+        });
       }
-      this.download('/system/material/export', params, `物料基本信息${new Date().getTime()}.xlsx`)
+
     },
     // 下载模板
     handleDownTemplate() {
@@ -410,10 +423,33 @@ export default {
         path: `/material/basicFile/detail/${e.id}`,
       });
     },
+    // 绑定row-key
+    getRowKey(row) {
+      return row.id;
+    },
+    // 对象数组去重
+    handleUnique(arr, key) {
+      // arr  需要去重的数组   type:作为去重依据的key
+      const res = new Map();
+      return arr.filter((arr) => !res.has(arr[key]) && res.set(arr[key], 1))
+    },
     // 选中数据改变
     handleSelectionChange(list) {
-      this.checkedList = list;
-      this.$emit('headerOption', JSON.stringify({ checkedList: [...list] }))
+      // this.checkedList = this.handleUnique([...this.checkedList, ...list], 'id');
+      // console.log(this.checkedList, '选中数据改变');
+      // this.$emit('headerOption', JSON.stringify({ checkedList: [... this.checkedList] }))
+    },
+    // 行数据勾选操作 
+    handleSelect(selection, row) {
+      this.checkedList = selection;
+      // // true就是选中,0或者false是取消选中
+      // let selected = selection.length && selection.indexOf(row) !== -1
+
+    },
+    //手动勾选全选 
+    handleSelectAll(selection) {
+      // console.log(selection, '手动勾选全选--------------');
+      this.checkedList = selection;
     },
     // 获取物料列表信息
     getMaterialList(templateCode, query) {
@@ -428,7 +464,7 @@ export default {
         templateCode,
         ...this.queryForm
       }
-      console.log(param, 'param');
+      // console.log(param, 'param');
       materialApi.materialList(param, page).then((res) => {
         _this.loading = false;
         console.log(res, '获取物料列表信息以及表头字段');
@@ -468,6 +504,9 @@ export default {
         // this.$store.getQuery(this.queryForm);
         console.log(vm, 'queryValue', vm.$store);
         vm.queryForm = vm.$store.state.query.queryVlue;
+        // 清空选中数据
+        vm.checkedList = [];
+        vm.$refs.materialTable.clearSelection();
       }
       vm.getTagList('material');
       vm.getMaterialList('material');

+ 79 - 167
src/views/material/changeApply/add.vue

@@ -30,20 +30,10 @@
             </el-col>
             <el-col :span="8">
               <el-form-item label="医药物料" prop="medicineMaterial">
-                <el-select
-                    v-model="basicForm.medicineMaterial"
-                    placeholder="医药物料"
-                    clearable
-                    :disabled="disable"
-                    @change="controlMedic"
-                  >
-                    <el-option
-                      v-for="item in options"
-                      :key="item.value"
-                      :label="item.label"
-                      :value="item.value"
-                    />
-                  </el-select>
+                <el-select v-model="basicForm.medicineMaterial" placeholder="医药物料" clearable :disabled="disable"
+                  @change="controlMedic">
+                  <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value" />
+                </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="8">
@@ -68,20 +58,9 @@
             </el-col>
             <el-col :span="8">
               <el-form-item label="生产厂家/代理人" prop="factory">
-                <el-select
-                    ref="factoryOrman"
-                    v-model="basicForm.factory"
-                    placeholder="生产厂家/代理人"
-                    clearable
-                    :disabled="disable"
-                    @focus="chooseFactory"
-                  >
-                    <el-option
-                      v-for="item in factoryOptions"
-                      :key="item.id"
-                      :label="item.name"
-                      :value="item.id"
-                    />
+                <el-select ref="factoryOrman" v-model="basicForm.factory" placeholder="生产厂家/代理人" clearable
+                  :disabled="disable" @focus="chooseFactory">
+                  <el-option v-for="item in factoryOptions" :key="item.id" :label="item.name" :value="item.id" />
                 </el-select>
                 <!-- <el-input :disabled="disable" v-model="basicForm.factory">
                   <el-button :disabled="disable" slot="append" icon="el-icon-more" @click="test02"></el-button>
@@ -97,36 +76,18 @@
             </el-col>
             <el-col :span="8">
               <el-form-item label="存储条件" prop="storageConditions">
-                <el-select
-                    v-model="basicForm.storageConditions"
-                    placeholder="存储条件"
-                    clearable
-                    :disabled="disable"
-                  >
-                    <el-option
-                      v-for="dict in dict.type.sys_storage_condition"
-                      :key="dict.value"
-                      :label="dict.label"
-                      :value="dict.value"
-                    />
-                  </el-select>
+                <el-select v-model="basicForm.storageConditions" placeholder="存储条件" clearable :disabled="disable">
+                  <el-option v-for="dict in dict.type.sys_storage_condition" :key="dict.value" :label="dict.label"
+                    :value="dict.value" />
+                </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="8">
               <el-form-item label="运输条件" prop="transportCondition">
-                <el-select
-                    v-model="basicForm.transportCondition"
-                    placeholder="运输条件"
-                    clearable
-                    :disabled="disable"
-                  >
-                    <el-option
-                      v-for="dict in dict.type.sys_conditions_carriage"
-                      :key="dict.value"
-                      :label="dict.label"
-                      :value="dict.value"
-                    />
-                  </el-select>
+                <el-select v-model="basicForm.transportCondition" placeholder="运输条件" clearable :disabled="disable">
+                  <el-option v-for="dict in dict.type.sys_conditions_carriage" :key="dict.value" :label="dict.label"
+                    :value="dict.value" />
+                </el-select>
               </el-form-item>
             </el-col>
           </el-row>
@@ -173,19 +134,10 @@
           <el-row :gutter="20">
             <el-col :span="8">
               <el-form-item label="药品" prop="drug">
-                <el-select
-                    v-model="basicForm2.drug"
-                    placeholder="请选择"
-                    clearable
-                    :disabled="disable || isControl"
-                  >
-                    <el-option
-                      v-for="dict in dict.type.sys_medicine"
-                      :key="dict.value"
-                      :label="dict.label"
-                      :value="dict.value"
-                    />
-                  </el-select>
+                <el-select v-model="basicForm2.drug" placeholder="请选择" clearable :disabled="disable || isControl">
+                  <el-option v-for="dict in dict.type.sys_medicine" :key="dict.value" :label="dict.label"
+                    :value="dict.value" />
+                </el-select>
               </el-form-item>
             </el-col>
             <el-col :span="8">
@@ -195,38 +147,22 @@
             </el-col>
             <el-col :span="8">
               <el-form-item label="医疗器械" prop="medicalDevices">
-                <el-select
-                    v-model="basicForm2.medicalDevices"
-                    placeholder="请选择"
-                    clearable
-                    :disabled="disable || isControl"
-                  >
-                    <el-option
-                      v-for="dict in dict.type.medical_instruments"
-                      :key="dict.value"
-                      :label="dict.label"
-                      :value="dict.value"
-                    />
-                  </el-select>
+                <el-select v-model="basicForm2.medicalDevices" placeholder="请选择" clearable
+                  :disabled="disable || isControl">
+                  <el-option v-for="dict in dict.type.medical_instruments" :key="dict.value" :label="dict.label"
+                    :value="dict.value" />
+                </el-select>
               </el-form-item>
             </el-col>
           </el-row>
           <el-row :gutter="20">
             <el-col :span="8">
               <el-form-item label="养护类型" prop="maintenanceType">
-                <el-select
-                    v-model="basicForm2.maintenanceType"
-                    placeholder="请选择"
-                    clearable
-                    :disabled="disable || isControl"
-                  >
-                    <el-option
-                      v-for="dict in dict.type.curing_type"
-                      :key="dict.value"
-                      :label="dict.label"
-                      :value="dict.value"
-                    />
-                  </el-select>
+                <el-select v-model="basicForm2.maintenanceType" placeholder="请选择" clearable
+                  :disabled="disable || isControl">
+                  <el-option v-for="dict in dict.type.curing_type" :key="dict.value" :label="dict.label"
+                    :value="dict.value" />
+                </el-select>
               </el-form-item>
             </el-col>
           </el-row>
@@ -268,10 +204,7 @@
       </el-tab-pane>
 
       <el-tab-pane label="修改记录" name="third">
-        <el-table 
-          :data="basicForm.changeRecords"
-          class="request-table"
-          >
+        <el-table :data="basicForm.changeRecords" class="request-table">
           <el-table-column label="字段名称" align="center" prop="pageCondtion" />
           <el-table-column label="变更前" align="center" prop="beforeChangeValue" />
           <el-table-column label="变更后" align="center" prop="afterChangeValue" />
@@ -327,16 +260,8 @@
             </el-col> -->
             <el-col :span="8">
               <el-form-item label="单据状态" prop="status">
-                <el-select 
-                  v-model="basicForm.status"
-                  size="small"
-                  disabled
-                  >
-                  <el-option
-                    v-for="item in statusOptions"
-                    :key="item.value"
-                    :label="item.label"
-                    :value="item.value">
+                <el-select v-model="basicForm.status" size="small" disabled>
+                  <el-option v-for="item in statusOptions" :key="item.value" :label="item.label" :value="item.value">
                   </el-option>
                 </el-select>
                 <!-- <el-input disabled v-model="basicForm.status"></el-input> -->
@@ -349,7 +274,8 @@
 
     <div class="btn_group">
       <el-col :span="1.5">
-        <el-button type="primary" size="small" plain @click="save" v-if="pageStu == 'add' || pageStu == 'edit'">保存</el-button>
+        <el-button type="primary" size="small" plain @click="save"
+          v-if="pageStu == 'add' || pageStu == 'edit'">保存</el-button>
       </el-col>
       <el-col :span="1.5" style="margin: 0 10px;">
         <el-button type="primary" size="small" plain @click="submit" v-if="pageStu == 'edit'">提交</el-button>
@@ -359,26 +285,11 @@
       </el-col>
     </div>
 
-    <popDialog
-      ref="contractSelect"
-      @doSubmit="selectionsToInput"
-      :selectData="selectData"
-      :single="true"
-    />
+    <popDialog ref="contractSelect" @doSubmit="selectionsToInput" :selectData="selectData" :single="true" />
 
-    <factory
-      ref="factory"
-      @doSubmit="acceptFactory"
-      :selectData="selectData2"
-      :single="true"
-    />
+    <factory ref="factory" @doSubmit="acceptFactory" :selectData="selectData2" :single="true" />
 
-    <fourClass
-      ref="fourClass"
-      @doSubmit="acceptFourClass"
-      :selectData="selectData3"
-      :single="true"
-    />
+    <fourClass ref="fourClass" @doSubmit="acceptFourClass" :selectData="selectData3" :single="true" />
   </div>
 </template>
 
@@ -406,7 +317,7 @@ export default {
     event: 'jugislist'
   },
   data() {
-    return{
+    return {
       factoryOptions: [],
       tabValue: 'first',
       isControl: true,
@@ -414,7 +325,7 @@ export default {
         code: '',
         orgId: '德荣集团',
         // 物料id
-        materialId:'',
+        materialId: '',
         materialCode: '',
         materialName: '',
         materialClassifyId: '',
@@ -436,7 +347,7 @@ export default {
         // 单据信息字段
         createBy: '',
         applicationTime: '',
-        createTime:'',
+        createTime: '',
         updateBy: '',
         updateTime: '',
         approver: '',
@@ -446,30 +357,30 @@ export default {
       options: [{
         value: '0',
         label: '是'
-      },{
+      }, {
         value: '2',
         label: '否'
       }],
       statusOptions: [{
         value: '0', label: '未提交'
-      },{
+      }, {
         value: '1', label: '审批中'
-      },{
+      }, {
         value: '2', label: '已完成'
-      },{
+      }, {
         value: '3', label: '已驳回'
       },],
       basicRules: {
-        materialCode: [{  required: true, message: '请选择物料编码', trigger: 'blur' }],
-        materialName: [{required: true, message: '请填写物料名称', trigger: 'blur'}],
-        specification: [{required: true, message: '请填写规格', trigger: 'blur'}],
-        materialClassifyId: [{required: true, message: '请选择物料分类', trigger: 'blur'}],
-        model: [{required: true, message: '请填写型号', trigger: 'blur'}],
-        factory: [{required: true, message: '请选择生产厂家/代理人', trigger: 'blur'}],
-        registrant: [{required: true, message: '请填写注册人/上市许可持有人', trigger: 'blur'}],
-        storageConditions: [{required: true, message: '请选择存储条件', trigger: 'blur'}],
-        transportCondition: [{required: true, message: '请选择运输条件', trigger: 'blur'}],
-        leadTime: [{required: true, message: '请填写交货周期', trigger: 'blur'}],
+        materialCode: [{ required: true, message: '请选择物料编码', trigger: 'blur' }],
+        materialName: [{ required: true, message: '请填写物料名称', trigger: 'blur' }],
+        specification: [{ required: true, message: '请填写规格', trigger: 'blur' }],
+        materialClassifyId: [{ required: true, message: '请选择物料分类', trigger: 'blur' }],
+        // model: [{required: true, message: '请填写型号', trigger: 'blur'}],
+        factory: [{ required: true, message: '请选择生产厂家/代理人', trigger: 'blur' }],
+        registrant: [{ required: true, message: '请填写注册人/上市许可持有人', trigger: 'blur' }],
+        storageConditions: [{ required: true, message: '请选择存储条件', trigger: 'blur' }],
+        // transportCondition: [{required: true, message: '请选择运输条件', trigger: 'blur'}],
+        leadTime: [{ required: true, message: '请填写交货周期', trigger: 'blur' }],
       },
       basicForm2: {
         drug: '',
@@ -518,9 +429,9 @@ export default {
   mounted() {
     this.$nextTick(() => {
       // console.log('页面状态',this.pageStu)
-      if(this.pageStu == 'check') {
+      if (this.pageStu == 'check') {
         // alert('详情页面:')
-        console.log('页面状态',this.pageStu)
+        console.log('页面状态', this.pageStu)
         console.log('数据', this.row)
         this.getDetails(this.row)
         // 生产厂家代理人用于回显
@@ -529,7 +440,7 @@ export default {
         }
       } else if (this.pageStu == 'edit') {
         // alert('修改页面')
-        console.log('页面状态',this.pageStu)
+        console.log('页面状态', this.pageStu)
         console.log('数据', this.row)
         this.getDetails(this.row)
         // 控制医药属性是否能够填写
@@ -542,24 +453,24 @@ export default {
         if (this.row.factory) {
           this.getFactoryDetails(this.row.factory)
         }
-      } else if(this.pageStu == 'add') {
+      } else if (this.pageStu == 'add') {
         // alert('新增页面')
-        console.log('页面状态',this.pageStu)
+        console.log('页面状态', this.pageStu)
       }
     })
   },
   methods: {
     // 生产厂家/代理人用于回显
     getFactoryDetails(id) {
-       getProductFactory({id:id}).then(res => {
-        if(res.code === 200) {
+      getProductFactory({ id: id }).then(res => {
+        if (res.code === 200) {
           this.factoryOptions = res.data.tableBody
         }
-       })
+      })
     },
     // 选择是否医药物料时控制医药属性
     controlMedic(val) {
-      console.log('val',val)
+      console.log('val', val)
       if (val == '0') {
         this.isControl = false
       } else {
@@ -572,12 +483,12 @@ export default {
     },
     handleClick(tab, event) {
       console.log(tab, event);
-      console.log('页面状态',this.pageStu)
+      console.log('页面状态', this.pageStu)
     },
     // 如果是详情进入,则调用详情接口
     getDetails(row) {
       getChangeDetails(row.id).then(res => {
-        if(res.code === 200) {
+        if (res.code === 200) {
           this.basicForm = res.data
           if (res.data.medicineChange) {
             this.basicForm2 = res.data.medicineChange
@@ -587,13 +498,13 @@ export default {
     },
     save() {
       // alert('保存传status:0')
-      let sparams = {...this.basicForm, ...{status: 0}}
+      let sparams = { ...this.basicForm, ...{ status: 0 } }
       sparams.medicineChange = this.basicForm2
       console.log('保存参数', sparams)
       this.$refs['basic'].validate((valid) => {
         if (valid) {
           addChangeList(sparams).then(res => {
-            if(res.code === 200) {
+            if (res.code === 200) {
               this.$message({
                 message: res.msg,
                 type: 'success'
@@ -606,13 +517,13 @@ export default {
     },
     submit() {
       // alert('提交传status:1')
-      let sparams = {...this.basicForm, ...{status: 1}}
+      let sparams = { ...this.basicForm, ...{ status: 1 } }
       sparams.medicineChange = this.basicForm2
       console.log('提交参数', sparams)
       this.$refs['basic'].validate((valid) => {
-        if(valid) {
+        if (valid) {
           editChangeList(sparams).then(res => {
-            if(res.code === 200) {
+            if (res.code === 200) {
               this.$message({
                 message: res.msg,
                 type: 'success'
@@ -666,12 +577,12 @@ export default {
     //   console.log('暂存总表单', params)
     // },
     // 设置选中
-    selectionsToInput (selections) {
+    selectionsToInput(selections) {
       console.log('父组件拿到的:', selections)
       this.selectData = selections
       this.$emit('getInfo', this.selectData)
       getMaterialDetails(selections[0].id).then(res => {
-        console.log('res',res)
+        console.log('res', res)
         if (res.code === 200) {
           let data = res.data.data
           // 物料id
@@ -692,10 +603,10 @@ export default {
           this.basicForm.storageConditions = data.storageCondition
           this.basicForm.transportCondition = data.transportationCondition
           this.basicForm.leadTime = data.deliveryPeriod
-          if(data.manufacturerId) {
+          if (data.manufacturerId) {
             this.getFactoryDetails(data.manufacturerId)
           }
-          if(data.medcines.length !== 0) {
+          if (data.medcines.length !== 0) {
             this.basicForm2.drug = data.medcines[0].isDrug
             this.basicForm2.registrationNo = data.medcines[0].registrationNo
             this.basicForm2.medicalDevices = data.medcines[0].medicalInstruments
@@ -724,8 +635,8 @@ export default {
     //   this.$refs.contractSelect2.init()
     // },
     // 选择生产厂家/代理人
-    acceptFactory (selections) {
-      console.log('选择的数据',selections)
+    acceptFactory(selections) {
+      console.log('选择的数据', selections)
       this.factoryOptions = selections
       this.basicForm.factory = selections[0].id
       this.getFactoryDetails(selections[0].id)
@@ -737,7 +648,7 @@ export default {
     },
     // 选择四级分类
     acceptFourClass(selections) {
-      console.log('收到的四级分类',selections)
+      console.log('收到的四级分类', selections)
       this.basicForm.materialClassifyId = selections.id
       this.getTreeDetails(selections.id)
     },
@@ -761,12 +672,13 @@ export default {
 </script>
 
 <style lang="scss" scoped>
-  .apply_add {
+.apply_add {
   height: calc(100vh - 84px);
   padding: 12px;
   box-sizing: border-box;
   overflow-y: auto;
 }
+
 .btn_group {
   width: 100%;
   margin: 20px 0;

+ 1 - 1
src/views/material/config/detailsTabs.js

@@ -6,7 +6,7 @@ const detailsTabs = [
     isShow: true,
   },
   {
-    label: '财信息',
+    label: '财信息',
     code: 'material_finance',
     isShow: true,
   },

+ 5 - 2
src/views/material/label/label-auto-bind-dialog.vue

@@ -13,7 +13,7 @@ export default {
   methods: {
     async fetchItem(prop) {
       this.dialogFormVisible = true;
-      this.form = { ...this.form, ...prop };
+      this.form = { ...this.form, labelId: prop.id };
     },
 
     async fetchClassifyTree() {
@@ -36,7 +36,10 @@ export default {
         if (valid) {
           let p = {
             ...this.form,
-            labelId: this.form.id,
+
+            classifyId: Array.isArray(this.form.classifyId)
+              ? this.form.classifyId[this.form.classifyId.length - 1]
+              : "",
           };
           this.loading = true;
           autoBind(p)

+ 8 - 6
src/views/material/label/label-bind-dialog.vue

@@ -5,7 +5,6 @@ import {
   removeBind,
   removeAllBind,
   classifyTree,
-  autoBind,
 } from "@/api/material/label";
 export default {
   name: "BindDialog",
@@ -34,14 +33,14 @@ export default {
       },
       {
         type: "text",
-        prop: "materialClassifyName",
+        prop: "materialClassifyId",
         label: "物料分类",
         required: false,
         showOverflowTooltip: true,
       },
       {
         type: "text",
-        prop: "materialStatues",
+        prop: "materialState",
         label: "物料状态",
         required: false,
         showOverflowTooltip: true,
@@ -84,9 +83,10 @@ export default {
   methods: {
     async fetchList(prop) {
       this.loading = true;
-      await bindList(prop)
+      let { pageNum, pageSize } = this.page;
+      await bindList({ ...prop, pageNum, pageSize })
         .then((res) => {
-          this.tableData = res;
+          this.tableData = res.rows;
         })
         .finally(() => {
           this.loading = false;
@@ -94,6 +94,8 @@ export default {
     },
 
     async fetchItem(prop) {
+      // console.log(prop);
+      // return;
       this.dialogFormVisible = true;
       this.form = { ...this.form, ...prop };
       await this.fetchList({ labelId: this.form.id });
@@ -117,7 +119,7 @@ export default {
     },
 
     async onUnbind(prop) {
-      const { id } = prop;
+      const { materialId: id } = prop;
       await removeBind({ id });
       await this.fetchList({ labelId: this.form.id });
     },

+ 5 - 2
src/views/material/label/label-hand-bind-dialog.vue

@@ -112,7 +112,7 @@ export default {
     onSearch(prop) {
       const classifyid = prop.classifyid || "";
       const code = prop.code ? prop.code[prop.code.length - 1] : "";
-      this.fetchList({ code: "408-01-01-000001", classifyid: "43" });
+      this.fetchList({ code, classifyid });
     },
 
     onClose() {
@@ -126,7 +126,10 @@ export default {
         if (valid) {
           this.loading = true;
           const labelId = this.form.id;
-          const material = this.multipleSelection;
+          const material = this.multipleSelection.map((item) => ({
+            ...item,
+            materialId: item.id,
+          }));
           manualBindOK({ labelId, material })
             .then((res) => {
               let { code } = res;

Файлын зөрүү хэтэрхий том тул дарагдсан байна
+ 436 - 651
src/views/material/requisition/add.vue


+ 161 - 0
src/views/purchase/DemandSummary/add.vue

@@ -0,0 +1,161 @@
+<template>
+  <div id="checkDemandSummary">
+    <el-card>
+      <span>采购需求汇总详情</span>
+      <div class="btn_grooup">
+        <el-button type="primary" size="small">编辑</el-button>
+        <el-button type="primary" size="small">确定</el-button>
+        <el-button type="primary" size="small" @click="closeLine">行关闭</el-button>
+        <el-button type="primary" size="small">重取批量</el-button>
+      </div>
+
+      <el-table 
+          :data="tableList" 
+          fit
+          max-height="680"
+          @selection-change="handleSelectionChange"
+        >
+        <el-table-column type="selection" width="55" />
+        <el-table-column label="序号" align="center" prop="index"/>
+        <el-table-column label="行号" align="center" prop="rowNo"/>
+        <el-table-column label="物料编码" align="center" prop="code"/>
+        <el-table-column label="品名" align="center" prop="code"/>
+        <el-table-column label="规格" align="center" prop="code"/>
+        <el-table-column label="单位" align="center" prop="code"/>
+        <el-table-column label="生产厂家/代理人" align="center" prop="manufacturer"/>
+        <el-table-column label="末级供应仓库库存量" align="center" prop="code"/>
+        <el-table-column label="月销量" align="center" prop="code"/>
+        <el-table-column label="采购周期" align="center" prop="code"/>
+        <el-table-column label="最终净需求量" align="center" prop="code"/>
+        <el-table-column label="最终采购量" align="center" prop="code"/>
+        <el-table-column label="需求客户" align="center" prop="code"/>
+        <el-table-column label="最小订货量" align="center" prop="code"/>
+        <el-table-column label="最小包装量" align="center" prop="code"/>
+        <el-table-column label="修改人" align="center" prop="code"/>
+        <el-table-column label="修改原因" align="center" prop="code"/>
+        <el-table-column label="业务备注" align="center" prop="code"/>
+        <el-table-column label="有效期" align="center" prop="code"/>
+        <el-table-column label="要求交货日期" align="center" prop="code"/>
+        <el-table-column label="紧急标识" align="center" prop="code"/>
+        <el-table-column label="补单标识" align="center" prop="code"/>
+        <el-table-column label="需求单单号" align="center" prop="code"/>
+        <el-table-column label="供应仓库" align="center" prop="code"/>
+        <el-table-column label="供应库位" align="center" prop="code"/>
+        <el-table-column label="业务类型" align="center" prop="code"/>
+        <el-table-column label="行状态" align="center" prop="code"/>
+        <el-table-column label="收货仓库" align="center" prop="code"/>
+        <el-table-column label="收货货位" align="center" prop="code"/>
+        <el-table-column label="采购员" align="center" prop="code"/>
+        <el-table-column label="制单人" align="center" prop="code"/>
+        <el-table-column label="审核人员" align="center" prop="code"/>
+        <el-table-column label="请购单号" align="center" prop="code"/>
+        <el-table-column label="品类" align="center" prop="code"/>
+        <el-table-column label="注册人" align="center" prop="code"/>
+        <el-table-column label="集团预测分类" align="center" prop="code"/>
+        <el-table-column label="修改时间" align="center" prop="code"/>
+        <el-table-column label="采购员编码" align="center" prop="code"/>
+        <el-table-column label="采购组织" align="center" prop="code"/>
+        <el-table-column label="物料类别" align="center" prop="code"/>
+        <el-table-column label="有效期单位" align="center" prop="code"/>
+        <el-table-column label="最小批量" align="center" prop="code"/>
+        <el-table-column label="业务部门" align="center" prop="code"/>
+        <el-table-column label="需求部门" align="center" prop="code"/>
+        <el-table-column label="批号锁定标识" align="center" prop="code"/>
+        <el-table-column label="采购需求单审批人" align="center" prop="code"/>
+        <el-table-column label="需求单审批时间" align="center" prop="code"/>
+        <el-table-column label="需求单提交时间" align="center" prop="code"/>
+        <el-table-column label="需求单提交人" align="center" prop="code"/>
+        <el-table-column label="处理需求时间" align="center" prop="code"/>
+        <el-table-column label="处理需求人员" align="center" prop="code"/>
+        <el-table-column label="汇总确认人" align="center" prop="code"/>
+        <el-table-column label="汇总确认时间" align="center" prop="code"/>
+        <el-table-column label="转请购时间" align="center" prop="code"/>
+        <el-table-column label="转请购人员" align="center" prop="code"/>
+        <el-table-column label="价格类型" align="center" prop="code"/>
+      </el-table>
+    </el-card>
+
+    <div class="btn_group">
+      <el-col :span="1.5">
+        <el-button size="small" plain @click="back">返回</el-button>
+      </el-col>
+    </div>
+  </div>
+</template>
+
+<script>
+import {getSummaryDetail, shutDownSummary } from '@/api/purchase/DemandSummary.js'
+export default {
+  name: 'checkDemandSummary',
+  props: ['pageStu','row', 'disable'],
+  model: {
+    prop: 'isList',
+    event: 'jugislist'
+  },
+  data() {
+    return{
+      tableList: [],
+      ids: []
+    }
+  },
+  created() {
+    if(this.pageStu == 'check') {
+      console.log('数据', this.row)
+      this.getDetails(this.row)
+    } else if(this.pageStu == 'edit') {
+      this.getDetails(this.row)
+    }
+  },
+  methods: {
+    handleSelectionChange(selection) {
+      console.log('选中', selection)
+      this.ids = selection.map(item => item.demandItemId)
+      console.log('选中数组', this.ids.join())
+    },
+    back() {
+      this.$emit('jugislist', true)
+      let queryParams = {
+        pageNum: 1,
+        pageSize: 10
+      }
+      this.$emit('refresh', queryParams)
+    },
+    // 如果需要回显则调用详情接口
+    getDetails(row) {
+      getSummaryDetail(row).then(res => {
+        if (res.code === 200) {
+          this.tableList = res.data
+        }
+      })
+    },
+    // 行关闭
+    closeLine() {
+      if (this.ids.length == 0) {
+        this.$modal.msgWarning("请选中至少一条数据");
+      } else {
+        let param = this.ids.join()
+        shutDownSummary(param).then(res => {
+          if (res.code === 200) {
+            this.$modal.msgSuccess("取消成功");
+            this.getDetails(this.row)
+          }
+        })
+      }
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+ .btn_group {
+  width: 100%;
+  margin: 20px 0;
+  display: flex;
+  justify-content: center;
+} 
+.btn_grooup {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: flex-end;
+} 
+</style>

+ 544 - 0
src/views/purchase/DemandSummary/index.vue

@@ -0,0 +1,544 @@
+<template>
+  <div id="demandSummary">
+    <div v-if="isList">
+      <el-form class="search_area" label-width="120px">
+        <el-row :gutter="10">
+          <el-col :span="1.5">
+            <el-form-item label="单据状态">
+              <el-select v-model="queryParams.code" size="small" style="width: 200px" clearable>
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="采购员">
+              <el-input
+              v-model="queryParams.cgy"
+              size="small"
+              placeholder=""
+              clearable
+              style="width: 200px"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="品类">
+              <el-input
+              v-model="queryParams.pl"
+              size="small"
+              placeholder=""
+              clearable
+              style="width: 200px"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="生产厂家">
+              <el-input
+              v-model="queryParams.sccj"
+              size="small"
+              placeholder=""
+              clearable
+              style="width: 200px"
+              />
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="" label-width="20px">
+              <el-button type="primary" size="small" icon="el-icon-search" plain>搜索</el-button>
+              <el-button size="small" icon="el-icon-refresh" plain>重置</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <CollapseTransition>
+        <div v-show="expanded">
+          <el-row :gutter="10">
+            <el-col :span="1.5">
+              <el-form-item label="物料类别">
+                <el-select v-model="queryParams.wllb" size="small" style="width: 200px" clearable>
+                  <el-option
+                    v-for="item in options"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="1.5">
+              <el-form-item label="周期单位">
+                <el-select v-model="queryParams.zqdw" size="small" style="width: 200px" clearable>
+                  <el-option
+                    v-for="item in options"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+            <el-col :span="1.5">
+              <el-form-item label="业务部门">
+                <el-input
+                v-model="queryParams.ywbm"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="1.5">
+              <el-form-item label="审核人">
+                <el-input
+                v-model="queryParams.shr"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row :gutter="10">
+            <el-col :span="1.5">
+              <el-form-item label="转请购单号">
+                <el-input
+                v-model="queryParams.zqgdh"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="1.5">
+              <el-form-item label="采购需求单号">
+                <el-input
+                v-model="queryParams.cgxqdh"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="1.5">
+              <el-form-item label="注册人">
+                <el-input
+                v-model="queryParams.zcr"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="1.5">
+              <el-form-item label="业务类型">
+                <el-select v-model="queryParams.ywlx" size="small" style="width: 200px" clearable>
+                  <el-option
+                    v-for="item in options"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row :gutter="10">
+            <el-col :span="1.5">
+              <el-form-item label="单据来源">
+                <el-input
+                v-model="queryParams.zqgdh"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="1.5">
+              <el-form-item label="需求客户">
+                <el-input
+                v-model="queryParams.cgxqdh"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="1.5">
+              <el-form-item label="末级供应仓库">
+                <el-input
+                v-model="queryParams.zcr"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="1.5">
+              <el-form-item label="末级供应库位">
+                <el-select v-model="queryParams.ywlx" size="small" style="width: 200px" clearable>
+                  <el-option
+                    v-for="item in options"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row :gutter="10">
+            <el-col :span="1.5">
+              <el-form-item label="物料编码">
+                <el-input
+                v-model="queryParams.zqgdh"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="1.5">
+              <el-form-item label="默认采购组织">
+                <el-input
+                v-model="queryParams.cgxqdh"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="1.5">
+              <el-form-item label="需求日期">
+                <el-input
+                v-model="queryParams.zcr"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="1.5">
+              <el-form-item label="转请购时间">
+                <el-select v-model="queryParams.ywlx" size="small" style="width: 200px" clearable>
+                  <el-option
+                    v-for="item in options"
+                    :key="item.value"
+                    :label="item.label"
+                    :value="item.value">
+                  </el-option>
+                </el-select>
+              </el-form-item>
+            </el-col>
+          </el-row>
+
+          <el-row :gutter="10">
+            <el-col :span="1.5">
+              <el-form-item label="汇总审核时间">
+                <el-input
+                v-model="queryParams.zqgdh"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+                />
+              </el-form-item>
+            </el-col>
+            <el-col :span="1.5">
+              <el-form-item label="汇总确认时间">
+                <el-input
+                v-model="queryParams.cgxqdh"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+                />
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </div>
+        </CollapseTransition>
+      </el-form>
+      <el-divider class="lines"><i style="cursor: pointer;" :class="expanded?'el-icon-arrow-up':'el-icon-arrow-down'" @click="drop"></i></el-divider>
+    
+      <el-card>
+        <div class="btn_grooup">
+          <el-button type="primary" size="small">编辑</el-button>
+          <el-button type="primary" size="small">保存</el-button>
+          <el-button type="primary" size="small" @click="confirms">确认</el-button>
+          <el-button type="primary" size="small" @click="cancels">取消</el-button>
+          <el-button type="primary" size="small" @click="audits">审核</el-button>
+          <el-button type="primary" size="small" @click="cancelAudits">弃审</el-button>
+
+          <el-dropdown size="small" @command="handleCommand">
+            <el-button size="small" type="primary" style="margin: 0 10px;">
+              导出<i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item command="Excel导出">Excel导出</el-dropdown-item>
+              <el-dropdown-item command="导出明细">导出明细</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+
+          <el-button type="primary" size="small">转请购</el-button>
+        </div>
+        <el-table 
+          :data="tableList" 
+          fit
+          show-summary
+          max-height="680"
+          @selection-change="handleSelectionChange"
+        >
+          <el-table-column type="selection" width="55" />
+          <el-table-column label="一级品类" align="center" prop="code"/>
+          <el-table-column label="物料编码" align="center" prop="code"/>
+          <el-table-column label="品名" align="center" prop="code"/>
+          <el-table-column label="规格" align="center" prop="code"/>
+          <el-table-column label="单位" align="center" prop="demandUnit"/>
+          <el-table-column label="生产厂家/代理人" align="center" prop="manufacturer"/>
+          <el-table-column label="需求单位数" align="center" prop="code"/>
+          <el-table-column label="总最终净需求量" align="center" prop="code"/>
+          <el-table-column label="总月销量" align="center" prop="totalMonthlySales"/>
+          <el-table-column label="需求可用周期" align="center" prop="demandCycle"/>
+          <el-table-column label="呆滞量" align="center" prop="dullQut"/>
+          <el-table-column label="采购周期" align="center" prop="buyPeriod"/>
+          <el-table-column label="中心公共库存" align="center" prop="centralPublicStock"/>
+          <el-table-column label="中心仓专属货位" align="center" prop="centralWarehouse"/>
+          <el-table-column label="区域分仓公共库存" align="center" prop="regionPublicStock"/>
+          <el-table-column label="各项目仓库存" align="center" prop="eachWarehouseStock"/>
+          <el-table-column label="电商仓库" align="center" prop="commerceWarehouse"/>
+          <el-table-column label="采购在途" align="center" prop="buyTransit"/>
+          <el-table-column label="借出在途" align="center" prop="lendTransit"/>
+          <el-table-column label="调拨在途" align="center" prop="transferTransit"/>
+          <el-table-column label="库存总计" align="center" prop="stockTotal"/>
+          <el-table-column label="最小包装量" align="center" prop="minPackage"/>
+          <el-table-column label="最小订货量" align="center" prop="minOrder"/>
+          <el-table-column label="最小批量" align="center" prop="minBatch"/>
+          <el-table-column label="人工调整数" align="center" prop="artificialAdjust"/>
+          <el-table-column label="修改原因" align="center" prop="modifyReason"/>
+          <el-table-column label="建议采购量" align="center" prop="suggestionPurchase"/>
+          <el-table-column label="建议净采购量" align="center" prop="suggestBuyQty"/>
+          <el-table-column label="最终采购量" align="center" prop="finalBuyQty"/>
+          <el-table-column label="二级品类" align="center" prop="code"/>
+          <el-table-column label="三级品类" align="center" prop="code"/>
+          <el-table-column label="四级品类" align="center" prop="code"/>
+          <el-table-column label="单据状态" align="center" prop="status"/>
+          <el-table-column label="采购员" align="center" prop="buyerName"/>
+          <el-table-column label="默认采购组织" align="center" prop="code"/>
+          <el-table-column label="有效期" align="center" prop="validityPeriod"/>
+          <el-table-column label="有效期单位" align="center" prop="validityPeriodUnit"/>
+          <el-table-column label="业务类型" align="center" prop="businessType"/>
+          <el-table-column label="安全库存量" align="center" prop="code"/>
+          <el-table-column label="单据来源" align="center" prop="billSource"/>
+          <el-table-column label="行号" align="center" prop="rowNo"/>
+          <el-table-column label="注册人" align="center" prop="code"/>
+          <el-table-column label="可用量" align="center" prop="qty"/>
+          <el-table-column label="总需与终采差异" align="center" prop="buyDiscrepancy"/>
+          <el-table-column label="集团预测分类" align="center" prop="forecastClassification"/>
+          <el-table-column label="中心仓占有量" align="center" prop="centerBinPossession"/>
+          <el-table-column label="中心仓可用量" align="center" prop="code"/>
+          <el-table-column label="物料类别" align="center" prop="materialCategory"/>
+          <el-table-column label="业务部门" align="center" prop="departmentName"/>
+          <el-table-column label="需求单位" align="center" prop="demandUnit"/>
+          <el-table-column label="采购经理审核人" align="center" prop="puManagerAuditor"/>
+          <el-table-column
+          fixed="right"
+          label="操作"
+          align="center"
+          width="150"
+          >
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="check(scope.row)">查看</el-button>
+          </template>
+        </el-table-column>
+        </el-table>
+
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="1"
+          :page-sizes="[5, 10, 15, 20]"
+          :page-size="100"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total=total>
+        </el-pagination>
+      </el-card>
+    </div>
+
+    <Add v-model="isList" v-if="!isList" :pageStu="page" :disable="disable" :row="rowDetail" @refresh="getList"/>
+  </div>
+</template>
+
+<script>
+import Add from './add.vue'
+import CollapseTransition from '@/components/MyCollapse/collapse.vue'
+import {getSummaryList, auditSummary, confirmSummary , cancelSummary , cancelAuditSummary } from '@/api/purchase/DemandSummary.js'
+export default {
+  name: 'demandSummary',
+  components: {
+    Add,
+    CollapseTransition
+  },
+  data() {
+    return {
+      expanded: false,
+      // 页面配置
+      isList: true,
+      // 页面状态
+      page: '',
+      queryParams: {
+        code: '',
+        cgy: '',
+        pl: '',
+        sccj: '',
+        wllb: '',
+        zqdw: '',
+        ywbm: '',
+        shr: '',
+        zqgdh: '',
+        cgxqdh: '',
+        zcr: '',
+        ywlx: '',
+        pageNum: 1,
+        pageSize: 10
+      },
+      options: [{
+        value: '0', label: '是',
+      }, {
+        value: '2', label: '否'
+      }],
+      tableList: [],
+      total: 0,
+      rowDetail: {},
+      disable: false,
+      ids: [],
+      allSelection: [],
+    }
+  },
+  created() {
+    this.getList(this.queryParams)
+  },
+  methods: {
+    getList(params){
+      getSummaryList(params).then(res => {
+        if (res.code === 200) {
+          this.tableList = res.rows
+          this.total = res.total
+        }
+      })
+    },
+    handleSelectionChange(selection) {
+      console.log('选中', selection)
+      this.allSelection = selection
+      this.ids = selection.map(item => item.demandItemId)
+      console.log('选中数组', this.ids.join())
+    },
+    handleCommand(command) {
+      alert(command)
+    },
+    check(row) {
+      this.isList = false
+      this.page = 'check'
+      this.rowDetail = row
+      this.disable = true
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+      this.queryParams.pageSize = val
+      this.getList(this.queryParams)
+    },
+    handleCurrentChange(val) {
+      console.log(`当前页: ${val}`);
+      this.queryParams.pageNum = val
+      this.getList(this.queryParams)
+    },
+    drop() {
+      this.expanded = !this.expanded
+    },
+    confirms() {
+      if (this.ids.length == 0) {
+        this.$modal.msgWarning("请选中至少一条数据");
+      } else {
+        confirmSummary(this.allSelection).then(res => {
+          this.$modal.msgSuccess("确认成功");
+          this.getList(this.queryParams)
+        })
+      }
+    },
+    cancels() {
+      if (this.ids.length == 0) {
+        this.$modal.msgWarning("请选中至少一条数据");
+      } else {
+        let param = this.ids.join()
+        cancelSummary(param).then(res => {
+          if (res.code === 200) {
+            this.$modal.msgSuccess("取消成功");
+            this.getList(this.queryParams)
+          }
+        })
+      }
+    },
+    audits() {
+      if(this.ids.length == 0) {
+        this.$modal.msgWarning("请选中至少一条数据");
+      } else {
+        let param = this.ids.join()
+        auditSummary(param).then(res => {
+          if (res.code === 200) {
+            this.$modal.msgSuccess("审核成功");
+            this.getList(this.queryParams)
+          }
+        })
+      }
+    },
+    cancelAudits() {
+      if (this.ids.length == 0) {
+        this.$modal.msgWarning("请选中至少一条数据");
+      } else {
+        let param = this.ids.join()
+        cancelAuditSummary(param).then(res => {
+          if (res.code === 200) {
+            this.$modal.msgSuccess("操作成功");
+            this.getList(this.queryParams)
+          }
+        })
+      } 
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+#demandSummary {
+  height: calc(100vh - 84px);
+  padding: 12px;
+  box-sizing: border-box;
+}
+.btn_grooup {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
+.lines {
+  margin-top: 0;
+}
+</style>

+ 481 - 0
src/views/purchase/MaterialClassDivision/add.vue

@@ -0,0 +1,481 @@
+<template>
+  <div id="addDivision">
+    <el-form :model="basicForm" :rules="basicRules" ref="basic" label-width="auto">
+      <el-row :gutter="10">
+        <el-col :span="1.5">
+            <el-form-item label="物料分类编码">
+              <el-input :disabled="disable"  size="small" style="width: 200px" readonly v-model="basicForm.materialClassify">
+                <el-button slot="append" icon="el-icon-more" @click="chooseFourClass"></el-button>
+              </el-input>
+            </el-form-item>
+         </el-col>
+
+        <el-col :span="1.5">
+            <el-form-item label="物料分类名称">
+              <el-input
+                v-model="basicForm.materialClassifyName"
+                size="small"
+                disabled
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+
+         <el-col :span="1.5">
+            <el-form-item label="一级分类编码">
+              <el-input
+                v-model="basicForm.materialClassifyOne"
+                size="small"
+                disabled
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+          </el-col>
+
+         <el-col :span="1.5">
+            <el-form-item label="一级分类名称">
+              <el-input
+                v-model="basicForm.materialClassifyOneName"
+                size="small"
+                disabled
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+          </el-col>
+
+         <el-col :span="1.5">
+            <el-form-item label="二级分类名称">
+              <el-input
+                v-model="basicForm.materialClassifyTwoName"
+                size="small"
+                disabled
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+          </el-col>
+
+         <el-col :span="1.5">
+            <el-form-item label="三级分类名称">
+              <el-input
+                v-model="basicForm.materialClassifyThreeName"
+                size="small"
+                disabled
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+          </el-col>
+
+         <el-col :span="1.5">
+            <el-form-item label="四级分类名称">
+              <el-input
+                v-model="basicForm.materialClassifyFourName"
+                size="small"
+                disabled
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="物料编码">
+              <el-input :disabled="disable" style="width: 200px" size="small" readonly v-model="basicForm.material">
+                  <el-button slot="append" icon="el-icon-more" @click="test01"></el-button>
+              </el-input>
+            </el-form-item>
+          </el-col>
+
+         <el-col :span="1.5">
+            <el-form-item label="物料名称">
+              <el-input
+                v-model="basicForm.materialName"
+                size="small"
+                disabled
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="生产厂家">
+              <el-input
+                v-model="basicForm.manufacturer"
+                size="small"
+                :disabled="disable"
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="所属组织">
+              <el-select
+                    ref="organizations"
+                    v-model="basicForm.org"
+                    size="small"
+                    style="width: 200px"
+                    :disabled="disable"
+                    clearable
+                    @focus="chooseOrganizations"
+                  >
+                    <el-option
+                      v-for="item in organizationsOptions"
+                      :key="item.id"
+                      :label="item.label"
+                      :value="item.id"
+                    />
+                </el-select>
+            </el-form-item>
+         </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="订单员">
+              <el-select
+                  ref="staffs"
+                  size="small"
+                  style="width: 200px"
+                  :disabled="disable"
+                  v-model="basicForm.orderPersonal"
+                  clearable
+                  @focus="chooseStaff"
+                >
+                  <el-option
+                    v-for="item in staffOptions"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.code"
+                  />
+              </el-select>
+            </el-form-item>
+         </el-col>
+
+         <el-col :span="1.5">
+            <el-form-item label="订单部门">
+              <el-input
+                v-model="basicForm.orderDept"
+                size="small"
+                disabled
+                style="width: 200px"
+              />
+            </el-form-item>
+          </el-col>
+
+         <el-col :span="1.5">
+            <el-form-item label="采购员">
+              <el-select
+                  ref="staffs2"
+                  size="small"
+                  style="width: 200px"
+                  :disabled="disable"
+                  v-model="basicForm.buyer"
+                  clearable
+                  @focus="chooseStaff2"
+                >
+                  <el-option
+                    v-for="item in staff2Options"
+                    :key="item.id"
+                    :label="item.name"
+                    :value="item.code"
+                  />
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="采购部门">
+              <el-input
+                v-model="basicForm.puDept"
+                size="small"
+                disabled
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="同步状态">
+              <el-input
+                v-model="basicForm.sendStatus"
+                size="small"
+                disabled
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="备注">
+              <el-input
+                v-model="basicForm.remark"
+                size="small"
+                :disabled="disable"
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+      </el-row>
+    </el-form>
+
+    <div class="btn_group">
+      <el-col :span="1.5" style="margin: 0 10px;">
+        <el-button type="primary" size="small" plain @click="save" v-if="pageStu == 'add' || pageStu == 'edit'">保存</el-button>
+      </el-col>
+      <!-- <el-col :span="1.5" style="margin: 0 10px;">
+        <el-button type="primary" size="small" plain @click="submit" v-if="pageStu == 'edit'">提交</el-button>
+      </el-col> -->
+      <el-col :span="1.5">
+        <el-button size="small" plain @click="back">返回</el-button>
+      </el-col>
+    </div>
+
+    <fourClass
+      ref="fourClass"
+      @doSubmit="acceptFourClass"
+      :single="true"
+    />
+
+    <popDialog
+      ref="contractSelect"
+      @doSubmit="selectionsToInput"
+      :single="true"
+    />
+
+    <orgs
+      ref="orgs"
+      @doSubmit="acceptOrgs"
+      :single="true"
+    />
+
+    <staff
+      ref="staff"
+      @doSubmit="acceptStaff"
+      :single="true"
+    />
+
+    <staff2
+      ref="staff2"
+      @doSubmit="acceptStaff2"
+      :single="true"
+    />
+  </div>
+</template>
+
+<script>
+import {addDivision, getDivisions, editDivision} from '@/api/purchase/basic.js'
+// 物料分类
+import fourClass from '@/components/PopDialog/fourClass.vue'
+// 调用物料分类详情接口用于数据回显
+import { getDetail } from '@/api/classify/basic';
+// 物料编码
+import popDialog from '@/components/PopDialog/index.vue'
+// 公用一个树形(组织部门传值不同)
+import orgs from '@/components/PopDialog/organization.vue'
+import staff from '@/components/PopDialog/staff.vue'
+import staff2 from '@/components/PopDialog/staff.vue'
+// 所属组织,订单员用于回显
+import { getOrgs, getStaff} from '@/api/requisition/basic'
+export default {
+  name: 'addDivision',
+  components: {
+    fourClass,
+    popDialog,
+    orgs,
+    staff,
+    staff2
+  },
+  props: ['pageStu','row', 'disable'],
+  model: {
+    prop: 'isList',
+    event: 'jugislist'
+  },
+  data() {
+    return {
+      basicForm: {
+        materialClassify: '',
+        materialClassifyName: '',
+        materialClassifyOne: '',
+        materialClassifyOneName: '',
+        materialClassifyTwoName: '',
+        materialClassifyThreeName: '',
+        materialClassifyFourName: '',
+        material: '',
+        materialName: '',
+        manufacturer: '',
+        org: '',
+        orgName: '',
+        orderPersonal: '',
+        orderPersonalName: '',
+        orderDept: '',
+        orderDeptName: '',
+        buyer: '',
+        buyerName: '',
+        puDept: '',
+        puDeptName: '',
+        sendStatus: '',
+        remark: ''
+      },
+      options: [{
+        value: 0, label: '仓库1'
+      }],
+      organizationsOptions: [],
+      staffOptions: [],
+      staff2Options: [],
+      basicRules: {}
+    }
+  },
+  mounted() {
+    if(this.pageStu == 'check') {
+      console.log('数据', this.row)
+      this.getDetails(this.row)
+    } else if(this.pageStu == 'edit') {
+      this.getDetails(this.row)
+    }
+  },
+  methods: {
+    save() {
+      if(this.pageStu == 'add') {
+        addDivision(this.basicForm).then(res => {
+          if (res.code === 200) {
+            this.$modal.msgSuccess("保存成功");
+            this.back()
+          }
+        })
+      } else if(this.pageStu == 'edit') {
+        editDivision(this.basicForm).then(res => {
+          this.$modal.msgSuccess("编辑成功");
+          this.back()
+        })
+      }
+    },
+    submit() {},
+    back() {
+      this.$emit('jugislist', true)
+      let queryParams = {
+        pageNum: 1,
+        pageSize: 10
+      }
+      this.$emit('refresh', queryParams)
+    },
+    // 如果需要回显则调用详情接口
+    getDetails(row) {
+      getDivisions(row.id).then(res => {
+        if (res.code === 200) {
+          this.basicForm = res.data
+          this.getOrgDetails(res.data.org)
+          this.getStaffDetails(res.data.orderPersonal)
+          this.getStaffDetails2(res.data.buyer)
+        }
+      })
+    },
+    // 选择物料分类
+    acceptFourClass(selections) {
+      console.log('收到的四级分类',selections)
+      this.basicForm.materialClassify = selections.code
+      this.basicForm.materialClassifyName = selections.materialType
+      this.getTreeDetails(selections.id)
+    },
+    // 物料分类显示列表
+    chooseFourClass() {
+      this.$refs.fourClass.init()
+    },
+    // 选择物料分类后需要根据id再次查询一下123级分类
+    getTreeDetails(id) {
+      getDetail(id).then(res => {
+        if (res.code === 200) {
+          this.basicForm.materialClassifyOneName = res.data.oneClass
+          this.basicForm.materialClassifyTwoName = res.data.twoClass
+          this.basicForm.materialClassifyThreeName = res.data.threeClass
+          this.basicForm.materialClassifyFourName = res.data.fourClass
+        }
+      })
+    },
+    selectionsToInput (selections) {
+      console.log('父组件拿到的:', selections)
+      this.selectData = selections
+      this.basicForm.material = selections[0].code
+      this.basicForm.materialName = selections[0].name
+    },
+    // 显示物料编码列表
+    test01() {
+      console.log('测试点击')
+      this.$refs.contractSelect.init()
+    },
+    // 选择默认采购组织
+    acceptOrgs (selections) {
+      console.log('接收的采购组织', selections)
+      this.basicForm.org = selections.id
+      this.getOrgDetails(selections.id)
+    },
+    // 默认采购组织显示列表
+    chooseOrganizations () {
+      this.$refs.organizations.blur()
+      this.$refs.orgs.init('1')
+    },
+    // 采购组织回显
+    getOrgDetails(id) {
+      getOrgs({deptId: id}).then(res => {
+        if (res.code === 200) {
+          this.organizationsOptions = res.data
+        }
+      })
+    },
+    // 选择订单员
+    acceptStaff (selections) {
+      this.staffOptions = selections
+      this.basicForm.orderPersonal = selections[0].code
+      this.getStaffDetails(selections[0].id)
+    },
+    // 订单员显示列表
+    chooseStaff () {
+      this.$refs.staffs.blur()
+      this.$refs.staff.init()
+    },
+    // 订单员回显
+    getStaffDetails(id) {
+      getStaff({id:id}).then(res => {
+        console.log('订单员', res)
+        if (res.code === 200 ) {
+          this.staffOptions = res.data.tableBody
+        }
+      })
+    },
+    // 选择采购员
+    acceptStaff2 (selections) {
+      this.staff2Options = selections
+      this.basicForm.buyer = selections[0].code
+      this.getStaffDetails2(selections[0].id)
+    },
+    // 采购员显示列表
+    chooseStaff2 () {
+      this.$refs.staffs2.blur()
+      this.$refs.staff2.init()
+    },
+    // 采购员回显
+    getStaffDetails2(id) {
+      getStaff({id:id}).then(res => {
+        console.log('采购员', res)
+        if (res.code === 200 ) {
+          this.staff2Options = res.data.tableBody
+        }
+      })
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.btn_group {
+  width: 100%;
+  margin: 20px 0;
+  display: flex;
+  justify-content: center;
+} 
+</style>

+ 397 - 0
src/views/purchase/MaterialClassDivision/index.vue

@@ -0,0 +1,397 @@
+<template>
+  <div id="MaterialClassDivision">
+    <div v-if="isList">
+      <el-form class="search_area" label-width="130px">
+        <el-row :gutter="10">
+          <el-col :span="1.5">
+            <el-form-item label="物料一级大类编码">
+              <el-select v-model="queryParams.materialClassifyOne" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="物料一级大类名称">
+              <el-select v-model="queryParams.materialClassifyOneName" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="物料二级大类编码">
+              <el-select v-model="queryParams.materialClassifyTwo" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="物料二级大类名称">
+              <el-select v-model="queryParams.materialClassifyTwoName" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="" label-width="20px">
+              <el-button type="primary" size="small" icon="el-icon-search" plain>搜索</el-button>
+              <el-button size="small" icon="el-icon-refresh" plain>重置</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <CollapseTransition>
+          <div v-show="expanded">
+        <el-row :gutter="10">
+          <el-col :span="1.5">
+            <el-form-item label="物料三级大类编码">
+              <el-select v-model="queryParams.materialClassifyThree" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="物料三级大类名称">
+              <el-select v-model="queryParams.materialClassifyThreeName" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="物料四级大类编码">
+              <el-select v-model="queryParams.materialClassifyFour" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="物料四级大类名称">
+              <el-select v-model="queryParams.materialClassifyFourName" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="10">
+          <el-col :span="1.5">
+            <el-form-item label="物料编码">
+              <el-select v-model="queryParams.material" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="物料名称">
+              <el-select v-model="queryParams.materialName" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="订单员">
+              <el-select v-model="queryParams.orderPersonal" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="采购员">
+              <el-select v-model="queryParams.buyer" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="10">
+          <el-col :span="1.5">
+            <el-form-item label="生产厂家">
+            <el-input
+              v-model="queryParams.manufacturer"
+              size="small"
+              placeholder=""
+              clearable
+              style="width: 200px"
+            />
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="备注">
+            <el-input
+              v-model="queryParams.remark"
+              size="small"
+              placeholder=""
+              clearable
+              style="width: 200px"
+            />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        </div>
+      </CollapseTransition>
+      </el-form>
+      <el-divider class="lines"><i style="cursor: pointer;" :class="expanded?'el-icon-arrow-up':'el-icon-arrow-down'" @click="drop"></i></el-divider>
+
+      <el-card>
+        <div class="btn_grooup">
+          <el-button type="primary" size="small" @click="addDivision">新增</el-button>
+
+          <el-dropdown size="small" @command="handleCommand">
+            <el-button size="small" type="primary" style="margin-left: 10px;">
+              导入<i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item command="数据导入">数据导入</el-dropdown-item>
+              <el-dropdown-item command="模板下载">模板下载</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+
+          <el-dropdown size="small" @command="handleCommand">
+            <el-button size="small" type="primary" style="margin: 0 10px;">
+              导出<i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item command="Excel导出">Excel导出</el-dropdown-item>
+              <el-dropdown-item command="导出明细">导出明细</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+
+          <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>
+        <el-table 
+          :data="tableList" 
+          fit
+          max-height="680"
+          @selection-change="handleSelectionChange"
+        >
+          <el-table-column type="selection" width="55" />
+          <el-table-column label="物料分类编码" align="center" prop="materialClassify"/>
+          <el-table-column label="物料分类名称" align="center" width="200" prop="materialClassifyName" />
+          <el-table-column label="一级分类名称" align="center" prop="materialClassifyOneName" />
+          <el-table-column label="二级分类名称" align="center" width="150" prop="materialClassifyTwoName" />
+          <el-table-column label="三级分类名称" align="center" width="150" prop="materialClassifyThreeName"/>
+          <el-table-column label="四级分类名称" align="center" width="150" prop="materialClassifyFourName" />
+          <el-table-column label="物料编码" align="center" width="150" prop="material" />
+          <el-table-column label="物料名称" align="center" prop="materialName" />
+          <el-table-column label="生产厂商" align="center" width="150" prop="manufacturer" />
+          <el-table-column label="所属组织" align="center" width="120" prop="orgName" />
+          <el-table-column label="订单员" align="center" width="150" prop="orderPersonalName" />
+          <el-table-column label="采购员" align="center" width="150" prop="buyerName" />
+          <el-table-column label="订单部门" align="center" width="150" prop="orderDeptName" />
+          <el-table-column label="部门" align="center" width="150" prop="puDeptName" />
+          <el-table-column label="创建人" align="center" width="150" prop="createdByName" />
+          <el-table-column label="创建时间" align="center" width="150" prop="createdTime" />
+          <el-table-column label="修改人" align="center" width="150" prop="updatedByName" />
+          <el-table-column label="修改时间" align="center" width="150" prop="updatedTime" />
+          <el-table-column
+          fixed="right"
+          label="操作"
+          align="center"
+          width="150"
+          >
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="check(scope.row)">查看</el-button>
+            <el-button type="text" size="small" @click="edit(scope.row)">编辑</el-button>
+            <el-button type="text" size="small" @click="deleteids(scope.row)">删除</el-button>
+          </template>
+        </el-table-column>
+        </el-table>
+
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="1"
+          :page-sizes="[5, 10, 15, 20]"
+          :page-size="100"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total=total>
+        </el-pagination>
+      </el-card>
+    </div>
+
+    <Add v-model="isList" v-if="!isList" :pageStu="page" :disable="disable" :row="rowDetail" @refresh="getList"/>
+  </div>
+</template>
+
+<script>
+import Add from './add.vue'
+import CollapseTransition from '@/components/MyCollapse/collapse.vue'
+import {getDivisionList, delDivision} from '@/api/purchase/basic.js'
+export default {
+  name: 'MaterialClassDivision',
+  components: {
+    Add,
+    CollapseTransition
+  },
+  data() {
+    return {
+      expanded: false,
+      // 页面配置
+      isList: true,
+      // 页面状态
+      page: '',
+      queryParams: {
+        materialClassifyOne: '',
+        materialClassifyOneName: '',
+        materialClassifyTwo: '',
+        materialClassifyTwoName: '',
+        materialClassifyThree: '',
+        materialClassifyThreeName: '',
+        materialClassifyFour: '',
+        materialClassifyFourName: '',
+        material: '',
+        materialName: '',
+        orderPersonal: '',
+        buyer: '',
+        manufacturer: '',
+        remark: '',
+        pageNum: 1,
+        pageSize: 10
+      },
+      options: [{
+        value: 0, label: '仓库1'
+      }],
+      tableList: [],
+      total: 0,
+      rowDetail: {},
+      disable: false
+    }
+  },
+  created() {
+    this.getList(this.queryParams)
+  },
+  methods: {
+    getList(params){
+      getDivisionList(params).then(res => {
+        if (res.code === 200) {
+          this.tableList = res.rows
+          this.total = res.total
+        }
+      })
+    },
+    handleSelectionChange() {},
+    handleCommand(command) {
+      alert(command)
+    },
+    addDivision() {
+      this.isList = false
+      this.page = 'add'
+      this.disable = false
+    },
+    check(row) {
+      this.isList = false
+      this.page = 'check'
+      this.rowDetail = row
+      this.disable = true
+    },
+    edit(row) {
+      this.isList = false
+      this.page = 'edit'
+      this.rowDetail = row
+      this.disable = false
+    },
+    deleteids(row) {
+      console.log('row', row)
+      this.$modal.confirm('确认信息').then(() => {
+        delDivision(row.id).then(res => {
+          if (res.code === 200) {
+            this.$modal.msgSuccess("删除成功");
+            this.getList(this.queryParams)
+          }
+        })
+        }).catch(() => {})
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+      this.queryParams.pageSize = val
+      this.getList(this.queryParams)
+    },
+    handleCurrentChange(val) {
+      console.log(`当前页: ${val}`);
+      this.queryParams.pageNum = val
+      this.getList(this.queryParams)
+    },
+    drop() {
+      this.expanded = !this.expanded
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+#MaterialClassDivision {
+  height: calc(100vh - 84px);
+  padding: 12px;
+  box-sizing: border-box;
+}
+.btn_grooup {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
+.lines {
+  margin-top: 0;
+}
+</style>

+ 773 - 0
src/views/purchase/PurchaseDemandList/add.vue

@@ -0,0 +1,773 @@
+<template>
+  <div id="addDemandList">
+    <span>基本信息</span>
+    <el-form :model="basicForm" :rules="basicRules" ref="basic" label-width="auto">
+      <el-row :gutter="10">
+        <el-col :span="1.5">
+            <el-form-item label="编码">
+              <el-input
+                v-model="basicForm.code"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+
+        <el-col :span="1.5">
+            <el-form-item label="组织">
+              <el-select size="small" v-model="basicForm.org" :disabled="disable" @focus="chooseOrg" style="width: 200px">
+                <el-option v-for="item in orgOptions" :key="item.id" :label="item.name" :value="item.id" />
+              </el-select>
+            </el-form-item>
+         </el-col>
+
+         <el-col :span="1.5">
+            <el-form-item label="需求处理方式">
+              <el-select v-model="basicForm.demandBusinessType" size="small" style="width: 200px">
+                <el-option v-for="dict in dict.type.sys_processing_mode" :key="dict.value" :label="dict.label" :value="dict.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+         <el-col :span="1.5">
+            <el-form-item label="单据状态">
+              <el-select v-model="basicForm.status" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option v-for="dict in dict.type.sys_status" :key="dict.value" :label="dict.label" :value="dict.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+         <el-col :span="1.5">
+            <el-form-item label="需求客户">
+              <el-select size="small" v-model="basicForm.customer" :disabled="disable" @focus="chooseCustomer" style="width: 200px">
+                <el-option v-for="item in customerOptions" :key="item.id" :label="item.name" :value="item.id" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+         <el-col :span="1.5">
+            <el-form-item label="需求客户名称">
+              <el-input v-model="basicForm.customerName" size="small" style="width: 200px"></el-input>
+            </el-form-item>
+          </el-col>
+
+         <el-col :span="1.5">
+            <el-form-item label="客户负责人">
+              <el-input v-model="basicForm.customerPrincipal" size="small" style="width: 200px"></el-input>
+            </el-form-item>
+          </el-col>
+
+         <el-col :span="1.5">
+            <el-form-item label="需求人员">
+                <el-select size="small" v-model="basicForm.demandPersonal" :disabled="disable" @focus="choosePerson" style="width: 200px">
+                  <el-option v-for="item in personOptions" :key="item.id" :label="item.name" :value="item.id" />
+                </el-select>
+            </el-form-item>
+          </el-col>
+
+         <el-col :span="1.5">
+            <el-form-item label="需求部门">
+              <el-select v-model="basicForm.demandDept" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="需求日期">
+              <el-date-picker
+                v-model="basicForm.demandDate"
+                type="date"
+                value-format="yyyy-MM-dd"
+                size="small"
+                style="width: 200px"
+              >
+              </el-date-picker>
+            </el-form-item>
+         </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="单据来源">
+              <el-select v-model="basicForm.source" size="small" style="width: 200px">
+                <el-option v-for="dict in dict.type.sys_bill_source" :key="dict.value" :label="dict.label" :value="dict.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+         </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="供应仓库">
+              <el-select size="small" v-model="basicForm.warehouse" :disabled="disable" @focus="chooseHouse" style="width: 200px">
+                <el-option v-for="item in houseOptions" :key="item.id" :label="item.name" :value="item.id" />
+              </el-select>
+            </el-form-item>
+         </el-col>
+
+         <el-col :span="1.5">
+            <el-form-item label="供应货位">
+              <el-select size="small" v-model="basicForm.goodsAllocation" :disabled="disable" @focus="chooseGoods" style="width: 200px">
+                <el-option v-for="item in goodsOptions" :key="item.id" :label="item.name" :value="item.id" />
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+         <el-col :span="1.5">
+            <el-form-item label="业务类型">
+              <el-select v-model="basicForm.billType" size="small" style="width: 200px">
+                <el-option v-for=" dict in dict.type.sys_business" :key="dict.value" :label="dict.label" :value="dict.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="是否客户指定">
+              <el-select v-model="basicForm.isSpeical" size="small" style="width: 200px">
+                <el-option v-for=" item in options" :key="item.value" :label="item.label" :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+         </el-col>
+
+          <!-- <el-col :span="1.5">
+            <el-form-item label="是否处理需求">
+              <el-input
+                v-model="basicForm.isProcess"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col> -->
+
+          <el-col :span="1.5">
+            <el-form-item label="是否月销量计算">
+              <el-input
+                v-model="basicForm.isMonthleyCalculate"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="备注">
+              <el-input
+                v-model="basicForm.remark"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+      </el-row>
+    
+
+    <span>明细信息</span>
+    <el-card>
+      <div class="btn_grooup">
+        <el-button type="primary" size="small" @click="addLine">增行</el-button>
+        <el-button type="primary" size="small" >批量调整</el-button>
+        <el-button type="primary" size="small" v-if="pageStu == 'check' || pageStu == 'edit'" @click="showReserved">货权预留单</el-button>
+      </div>
+
+      <el-table 
+          :data="basicForm.puDemandItemList" 
+          fit
+          max-height="300"
+          @selection-change="handleSelectionChange"
+        >
+          <el-table-column type="selection"/>
+          <el-table-column label="序号" type="index" align="center"/>
+          <el-table-column label="行状态" align="center" prop="status" />
+          <el-table-column label="行号" align="center" >
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.index"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="一级品类" align="center" width="150">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.materialClassifyOneName"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="二级品类" align="center" width="150" prop="materialClassifyTwoName">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.materialClassifyTwoName"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="三级品类" align="center" width="150" prop="materialClassifyThreeName">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.materialClassifyThreeName"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="四级品类" align="center" width="150" prop="materialClassifyFourName">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.materialClassifyFourName"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="预留比例" align="center" width="150" prop="reservedProportion">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.reservedProportion"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="预留周期" align="center" width="150" prop="reservedPeriod">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.reservedPeriod"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="预留数量" align="center" width="150" prop="reservedQty">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.reservedQty"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="采购员名称" align="center" prop="buyerName" />
+          <el-table-column label="采购员" align="center" width="150" prop="buyer" />
+          <el-table-column label="物料编码" align="center" width="120" prop="materialCode">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.materialCode"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="物料名称" align="center" width="150" prop="materialName" />
+          <el-table-column label="规格" align="center" width="150" prop="specification" />
+          <el-table-column label="型号" align="center" width="150" prop="model" />
+          <el-table-column label="单位" align="center" width="150" prop="unit	" />
+          <el-table-column label="生产厂家/代理人" align="center" width="150" prop="registrant" />
+          <el-table-column label="注册人" align="center" width="150" prop="registrant" />
+          <el-table-column label="采购周期" align="center" width="150" prop="puPeriod">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.puPeriod"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="有效期单位" align="center" width="150" prop="expiryUnit" />
+          <el-table-column label="有效期" align="center" width="150" prop="updateTime" />
+          <el-table-column label="最小包装" align="center" width="150" prop="minPackage" />
+          <el-table-column label="最小订货量" align="center" width="150" prop="minOrderQty" />
+          <el-table-column label="最小批量" align="center" width="150" prop="minBatch	" />
+          <el-table-column label="安全库存" align="center" width="150" prop="safeStock	">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.safeStock"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="月均销量" align="center" width="150" prop="averageQtyMonth" />
+          <el-table-column label="实际(业务)需求量" align="center" width="150" prop="qty">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.qty"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="需求可用周期" align="center" width="150" prop="demandPeriod" />
+          <el-table-column label="集团预测分类" align="center" width="150" prop="forecastClassify" />
+          <el-table-column label="交货日期" align="center" width="150" prop="deliveryDate">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.deliveryDate"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="补单标识" align="center" width="150" prop="isReplenishment">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.isReplenishment"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="批号锁定标识" align="center" width="150" prop="isBatchLock">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.isBatchLock"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="业务备注" align="center" width="150" prop="remark">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.remark"/>
+              </el-form-item>
+            </template>
+          </el-table-column> 
+          <el-table-column label="采购备注" align="center" width="150" prop="puRemark" />
+          <!-- <el-table-column label="末级供应仓库存量" align="center" width="150" prop="lastWarehouseQty" /> -->
+          <!-- <el-table-column label="调拨占有量" align="center" width="150" prop="superiorAllotQty"></el-table-column> -->
+          <el-table-column label="最终净需求量" align="center" width="150" prop="resDemandQty">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.resDemandQty"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="末级供应仓库" align="center" width="150" prop="lastWarehouseName">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.lastWarehouseName"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="收货仓库" align="center" width="150" prop="deliveryWarehouseName">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.deliveryWarehouseName"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="末级供应货位" align="center" width="150" prop="lastAllocationName">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.lastAllocationName"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="收货货位编码" align="center" width="150" prop="deliveryAllocation" />
+          <el-table-column label="收货货位" align="center" width="150" prop="deliveryAllocationName">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.deliveryAllocationName"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="紧急标识" align="center" width="150" prop="isUrgency">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.isUrgency"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="默认采购组织" align="center" width="150" prop="purOrgName" />
+          <el-table-column label="默认采购组织编码" align="center" width="150" prop="puOrg" />
+          <!-- <el-table-column label="末级供应调拨待入量" align="center" width="150" prop="lastStockQty">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.lastStockQty"/>
+              </el-form-item>
+            </template>
+          </el-table-column> -->
+          <el-table-column label="上级供应中心现存量" align="center" width="150" prop="superiorCenterQty" />
+          <el-table-column label="上级库存被调拨占用量" align="center" width="150" prop="superiorAllotQty" />
+          <el-table-column label="可用量" align="center" width="150" prop="availableQty" />
+          <el-table-column label="调拨状态" align="center" width="150" prop="statusAllot">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.statusAllot"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="补单供应商编码" align="center" width="150" prop="additionalSupplier">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.additionalSupplier"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="补单供应商名称" align="center" width="150" prop="additionalSupplierCode">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.additionalSupplierCode"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="周期单位" align="center" width="150" prop="periodUnit">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.periodUnit"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column label="需求客户" align="center" width="150" prop="customer">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-input v-model="scope.row.customer"/>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <!-- <el-table-column label="末级供应库存组织" align="center" width="150" prop="updateTime"></el-table-column> -->
+          <el-table-column label="中心仓可用量" align="center" width="150" prop="updateTime"></el-table-column>
+          <!-- <el-table-column label="调拨单号" align="center" width="150" prop="updateTime"></el-table-column> -->
+          <!-- <el-table-column label="收货地址" align="center" width="150" prop="updateTime"></el-table-column> -->
+          <!-- <el-table-column label="收货地址编码" align="center" width="150" prop="updateTime" /> -->
+          <el-table-column label="联系人" align="center" width="150" prop="contacts" />
+          <!-- <el-table-column label="联系人电话" align="center" width="150" prop="updateTime" /> -->
+          <!-- <el-table-column label="详细地址" align="center" width="150" prop="updateTime" /> -->
+          <!-- <el-table-column label="价格类型" align="center" width="150" prop="updateTime"></el-table-column> -->
+          <el-table-column
+          fixed="right"
+          label="操作"
+          align="center"
+          width="150"
+          >
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="delLine(scope.row)">删除</el-button>
+          </template>
+        </el-table-column>
+      </el-table>
+    </el-card>
+  </el-form>
+
+    <div class="btn_group">
+      <el-col :span="1.5" style="margin: 0 10px;">
+        <el-button type="primary" size="small" plain @click="save" v-if="pageStu == 'add' || pageStu == 'edit'">保存</el-button>
+      </el-col>
+      <!-- <el-col :span="1.5" style="margin: 0 10px;">
+        <el-button type="primary" size="small" plain @click="submit" v-if="pageStu == 'edit'">提交</el-button>
+      </el-col> -->
+      <el-col :span="1.5">
+        <el-button size="small" plain @click="back">返回</el-button>
+      </el-col>
+
+      <Reserved v-if="dialog.config" :isVisible="dialog.config" :info="row" @updateReserved="updateReserved"/>
+
+      <Refers ref="refer" @doSubmit="selectionsToInput" :single="true"/>
+    </div>
+  </div>
+</template>
+
+<script>
+import Reserved from './reserved.vue'
+import Refers from './refers.vue'
+import {addDemand,getDemandDetail, getDemandSonDetail, editDemand} from '@/api/purchase/purchaseDemand.js'
+// 用于回显参照框数据
+import {getRefer} from '@/api/purchase/basic.js'
+export default {
+  name: 'addDemandList',
+  props: ['pageStu','row', 'disable'],
+  dicts: ['sys_processing_mode', 'sys_status', 'sys_bill_source', 'sys_business'],
+  components: {
+    Reserved,
+    Refers
+  },
+  model: {
+    prop: 'isList',
+    event: 'jugislist'
+  },
+  data() {
+    return {
+      dialog: {
+        config: false
+      },
+      basicForm: {
+        code: '',
+        org: '',
+        demandBusinessType: '',
+        status: '',
+        customer: '',
+        customerName: '',
+        customerPrincipal: '',
+        demandPersonal: '',
+        demandDept: '',
+        demandDate: '',
+        source: '',
+        warehouse: '',
+        goodsAllocation: '',
+        billType: '',
+        isSpeical: '',
+        isProcess: '',
+        isMonthleyCalculate: '',
+        remark: '',
+        puDemandItemList: []
+      },
+      options: [{
+        value: '0', label: '是',
+      }, {
+        value: '2', label: '否'
+      }],
+      basicRules: {},
+      tableList: [],
+      referCondition: {
+        type: 'ORG_PARAM',
+        search: '',
+        isPage: true,
+        title: '选择组织'
+      },
+      orgOptions: [],
+      personOptions: [],
+      customerOptions: [],
+      houseOptions: [],
+      goodsOptions: []
+    }
+  },
+  created() {
+    if(this.pageStu == 'check') {
+      console.log('数据', this.row)
+      this.getDetails(this.row)
+    } else if(this.pageStu == 'edit') {
+      this.getDetails(this.row)
+    }
+  },
+  methods: {
+    save() {
+      if(this.pageStu == 'add') {
+        addDemand(this.basicForm).then(res => {
+          if (res.code === 200) {
+            this.$modal.msgSuccess("保存成功");
+            this.back()
+          }
+        })
+      } else if (this.pageStu == 'edit') {
+        editDemand(this.basicForm).then(res => {
+          if (res.code === 200) {
+            this.$modal.msgSuccess("编辑成功");
+            this.back()
+          }
+        })
+      }
+    },
+    submit() {},
+    // 增行
+    addLine() {
+      const newLine = {
+        contacts: null,
+        id: null,
+        demandId: null,
+        status: null,
+        businessDept: null,
+        businessDeptName: null,
+        materialCategory: null,
+        buyer: null,
+        buyerName: null,
+        mateiralClassifyOne: null,
+        materialClassifyOneName: null,
+        materialClassifyTwo: null,
+        materialClassifyTwoName: null,
+        materialClassifyThree: null,
+        materialClassifyThreeName: null,
+        materialClassifyFour: null,
+        materialClassifyFourName: null,
+        materialCode: null,
+        materialName: null,
+        specification: null,
+        unit: null,
+        registrant: null,
+        puPeriod: null,
+        expiryUnit: null,
+        minPackage: null,
+        minOrderQty: null,
+        minBatch: null,
+        safeStock: null,
+        averageQtyMonth: null,
+        qty: null,
+        adjustmentPersonal: null,
+        adjustmentTime: null,
+        manualRegulation: null,
+        updateCause: null,
+        reservedProportion: null,
+        reservedPeriod: null,
+        reservedQty: null,
+        demandPeriod: null,
+        forecastClassify: null,
+        deliveryDate: null,
+        isUrgency: null,
+        isReplenishment: null,
+        isBatchLock: null,
+        remark: null,
+        puRemark: null,
+        lastWarehouseQty: null,
+        resDemandQty: null,
+        lastWarehouse: null,
+        lastWarehouseName: null,
+        deliveryWarehouse: null,
+        deliveryWarehouseName: null,
+        lastAllocation: null,
+        lastAllocationName: null,
+        deliveryAllocation: null,
+        deliveryAllocationName: null,
+        passageOn: null,
+        puOrg: null,
+        purOrgName: null,
+        lastStockQty: null,
+        superiorCenterQty: null,
+        superiorAllotQty: null,
+        availableQty: null,
+        statusAllot: null,
+        additionalSupplier: null,
+        additionalSupplierCode: null,
+        periodUnit: null,
+        demandCustomer: null,
+        demandCustomerName: null,
+        lastStockOrg: null,
+        lastStockOrgName: null,
+        superiorStockOrg: null,
+        superiorStockOrgName: null,
+        allotCode: null,
+        deliveryAddress: null,
+        deliveryAddressName: null,
+        contacts: null,
+        contactsPhone: null,
+        address: null,
+        source: null,
+        priceType: null,
+        puManagerApprover: null,
+        puManagerApproverName: null,
+        processTime: null,
+        affirmer: null,
+        tenantId: null,
+        revision: null,
+        createBy: null,
+        createByName: null,
+        createTime: null,
+        updateBy: null,
+        updateByName: null,
+        updateTime: null,
+        delFlag: null,
+        // 新增字段
+        model: null,
+      }
+      this.basicForm.puDemandItemList.push(newLine)
+    },
+    delLine(row) {
+      console.log('删除行:', row)
+      this.basicForm.puDemandItemList = this.basicForm.puDemandItemList.filter(item => {
+        return item.id !== row.id
+      })
+    },
+    back() {
+      this.$emit('jugislist', true)
+      let queryParams = {
+        pageNum: 1,
+        pageSize: 10
+      }
+      this.$emit('refresh', queryParams)
+    },
+    // 如果需要回显则调用详情接口
+    getDetails(row) {
+      getDemandDetail(row.id).then(res => {
+        if (res.code === 200) {
+          // this.basicForm = res.data
+          let reciveForm = res.data
+          let params = {...{id: row.id}, ...{pageNum:1, pageSize: 10}}
+          getDemandSonDetail(params).then(res => {
+            if (res.code === 200) {
+              reciveForm.puDemandItemList = res.rows
+              console.log('reciveForm',reciveForm)
+              this.basicForm = reciveForm
+              this.reBackRefer({type: 'ORG_PARAM', search: this.basicForm.org, isPage: false})
+            }
+          })
+        }
+      })
+    },
+    handleSelectionChange() {},
+    // 点击预留单展示
+    showReserved() {
+      this.dialog.config = true
+    },
+    // 修改是否让页面显示与隐藏的事件
+	  updateReserved (val) {
+      this.dialog.config = val
+    },
+    // 回显参照框
+    reBackRefer(val) {
+      getRefer(val).then(res => {
+        console.log("🚀 ~ file: add.vue:706 ~ getRefer ~ res:", res)
+      })
+    },
+    chooseOrg() {
+      this.referCondition.type = 'ORG_PARAM'
+      this.referCondition.search = ''
+      this.referCondition.isPage = true
+      this.referCondition.title = '选择组织'
+      this.$refs.refer.init(this.referCondition)
+    },
+    chooseCustomer () {
+      this.referCondition.type = ''
+      this.referCondition.search = ''
+      this.referCondition.isPage = true
+      this.referCondition.title = '选择客户'
+      this.$refs.refer.init(this.referCondition)
+    },
+    choosePerson() {
+      this.referCondition.type = 'CONTACTS_PARAM'
+      this.referCondition.search = ''
+      this.referCondition.isPage = true
+      this.referCondition.title = '需求人员'
+      this.$refs.refer.init(this.referCondition)
+    },
+    chooseHouse() {
+      this.referCondition.type = 'WAREHOUSE_PARAM'
+      this.referCondition.search = ''
+      this.referCondition.isPage = true
+      this.referCondition.title = '供应仓库'
+      this.$refs.refer.init(this.referCondition)
+    },
+    chooseGoods() {
+      this.referCondition.type = 'ALLOCATION_PARAM'
+      this.referCondition.search = ''
+      this.referCondition.isPage = true
+      this.referCondition.title = '供应货位'
+      this.$refs.refer.init(this.referCondition)
+    },
+    selectionsToInput(selection) {
+      console.log("🚀 ~ file: add.vue:732 ~ selectionsToInput ~ selection:", selection)
+      if(this.referCondition.type == 'ORG_PARAM') {
+        this.orgOptions = selection
+        this.basicForm.org = selection[0].id
+      }
+      if(this.referCondition.type == 'CONTACTS_PARAM') {
+        this.personOptions = selection
+        this.basicForm.demandPersonal = selection[0].id
+      }
+      if(this.referCondition.type == 'WAREHOUSE_PARAM') {
+        this.houseOptions = selection
+        this.basicForm.warehouse = selection[0].id
+      }
+      if(this.referCondition.type == 'ALLOCATION_PARAM') {
+        this.goodsOptions = selection
+        this.basicForm.goodsAllocation = selection[0].id
+      }
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.btn_group {
+  width: 100%;
+  margin: 20px 0;
+  display: flex;
+  justify-content: center;
+} 
+.btn_grooup {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
+.hang {
+  margin: auto;
+}
+.hang ::v-deep .el-form-item__content{
+  margin-left: 0px !important;
+}
+</style>

+ 405 - 0
src/views/purchase/PurchaseDemandList/index.vue

@@ -0,0 +1,405 @@
+<template>
+  <div id="PurchaseDemandList">
+    <div v-if="isList">
+      <el-form class="search_area" label-width="120px">
+        <el-row :gutter="10">
+          <el-col :span="1.5">
+            <el-form-item label="单据编码">
+              <el-select v-model="queryParams.code" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="供应仓库">
+              <el-select v-model="queryParams.warehouse" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="需求客户">
+              <el-select v-model="queryParams.customer" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="是否客户指定">
+              <el-select v-model="queryParams.isProcess" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="" label-width="20px">
+              <el-button type="primary" size="small" icon="el-icon-search" plain>搜索</el-button>
+              <el-button size="small" icon="el-icon-refresh" plain>重置</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+      <CollapseTransition>
+        <div v-show="expanded">
+        <el-row :gutter="10">
+          <el-col :span="1.5">
+            <el-form-item label="单据类型">
+              <el-select v-model="queryParams.threeName" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="需求人员">
+              <el-select v-model="queryParams.demandPersonal" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="供应货位">
+              <el-select v-model="queryParams.goodsAllocation" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="单据来源">
+              <el-select v-model="queryParams.source" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="10">
+          <el-col :span="1.5">
+            <el-form-item label="业务类型">
+              <el-select v-model="queryParams.billType" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="需求部门">
+              <el-select v-model="queryParams.demandDept" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="需求日期">
+            <el-input
+              v-model="queryParams.demandDate"
+              size="small"
+              placeholder=""
+              clearable
+              style="width: 200px"
+            />
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="备注">
+            <el-input
+              v-model="queryParams.remark"
+              size="small"
+              placeholder=""
+              clearable
+              style="width: 200px"
+            />
+            </el-form-item>
+          </el-col>
+        </el-row>
+        </div>
+      </CollapseTransition>
+      </el-form>
+      <el-divider class="lines"><i style="cursor: pointer;" :class="expanded?'el-icon-arrow-up':'el-icon-arrow-down'" @click="drop"></i></el-divider>
+
+      <el-card>
+        <div class="btn_grooup">
+          <el-button type="primary" size="small" @click="addDivision">新增</el-button>
+
+          <el-dropdown size="small" @command="handleCommand">
+            <el-button size="small" type="primary" style="margin-left: 10px;">
+              导入<i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item command="数据导入">数据导入</el-dropdown-item>
+              <el-dropdown-item command="模板下载">模板下载</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+
+          <el-dropdown size="small" @command="handleCommand">
+            <el-button size="small" type="primary" style="margin: 0 10px;">
+              导出<i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item command="Excel导出">Excel导出</el-dropdown-item>
+              <el-dropdown-item command="导出明细">导出明细</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+
+          <el-button type="primary" size="small" @click="delItems">删除</el-button>
+          <el-button type="primary" size="small">打印</el-button>
+        </div>
+        <el-table 
+          :data="tableList" 
+          fit
+          max-height="350"
+          @selection-change="handleSelectionChange"
+        >
+          <el-table-column type="selection" width="55" />
+          <el-table-column label="编码" align="center" prop="code"/>
+          <el-table-column label="需求日期" align="center" width="200" prop="demandDate" />
+          <el-table-column label="单据状态" align="center" prop="status" />
+          <!-- <el-table-column label="是否已处理需求" align="center" width="150" prop="isProcess" /> -->
+          <el-table-column label="业务类型" align="center" width="150" prop="billType"/>
+          <!-- <el-table-column label="是否特殊需求" align="center" width="150" prop="isSpeical" /> -->
+          <el-table-column label="需求人员" align="center" width="150" prop="demandPersonalName" />
+          <el-table-column label="需求客户" align="center" prop="customerName" />
+          <el-table-column label="需求部门" align="center" width="150" prop="demandDeptName" />
+          <!-- <el-table-column label="供应仓库" align="center" width="120" prop="warehouseName" /> -->
+          <!-- <el-table-column label="供应货位" align="center" width="150" prop="goodsAllocationName" /> -->
+          <el-table-column label="单据来源" align="center" width="150" prop="source" />
+          <el-table-column label="组织" align="center" width="150" prop="orgName" />
+          <el-table-column label="备注" align="center" width="150" prop="remark" />
+          <el-table-column
+          fixed="right"
+          label="操作"
+          align="center"
+          width="150"
+          >
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="check(scope.row)">查看</el-button>
+            <el-button type="text" size="small" @click="edit(scope.row)">编辑</el-button>
+            <el-button type="text" size="small" @click="deleteids(scope.row)">删除</el-button>
+          </template>
+        </el-table-column>
+        </el-table>
+
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="1"
+          :page-sizes="[5, 10, 15, 20]"
+          :page-size="100"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total=total>
+        </el-pagination>
+      </el-card>
+    </div>
+
+    <Add v-model="isList" v-if="!isList" :pageStu="page" :disable="disable" :row="rowDetail" @refresh="getList"/>
+  </div>
+</template>
+
+<script>
+import Add from './add.vue'
+import CollapseTransition from '@/components/MyCollapse/collapse.vue'
+import {getDemandList, delDemand, downLoadDemand} from '@/api/purchase/purchaseDemand.js'
+export default {
+  name: 'PurchaseDemandList',
+  components: {
+    Add,
+    CollapseTransition
+  },
+  data() {
+    return {
+      expanded: false,
+      // 页面配置
+      isList: true,
+      // 页面状态
+      page: '',
+      queryParams: {
+        code: '',
+        warehouse: '',
+        customer: '',
+        isProcess: '',
+        threeName: '',
+        demandPersonal: '',
+        goodsAllocation: '',
+        source: '',
+        billType: '',
+        demandDept: '',
+        demandDate: '',
+        remark: '',
+        pageNum: 1,
+        pageSize: 10
+      },
+      options: [{
+        value: '1', label: '是',
+      }, {
+        value: '0', label: '否'
+      }],
+      tableList: [],
+      total: 0,
+      rowDetail: {},
+      disable: false,
+      ids: []
+    }
+  },
+  created() {
+    this.getList(this.queryParams)
+  },
+  methods: {
+    getList(params){
+      getDemandList(params).then(res => {
+        if (res.code === 200) {
+          this.tableList = res.rows
+          this.total = res.total
+        }
+      })
+    },
+    handleSelectionChange(selection) {
+      console.log('选中', selection)
+      this.ids = selection.map(item => item.id)
+      console.log('选中数组', this.ids.join())
+    },
+    handleCommand(command) {
+      // alert(command)
+      if(command == '模板下载') {
+        downLoadDemand({}).then(res => {
+          console.log('下载的文件流', res)
+          const blob = new Blob([res], {
+            type: "application/vnd.ms-excel;charset=UTF-8",
+          });// 创建一个类文件对象:Blob对象表示一个不可变的、原始数据的类文件对象
+          const downloadElement = document.createElement("a"); //创建a标签
+          const href = window.URL.createObjectURL(blob); // 创建下载的链接
+          // var temp = res.headers["content-disposition"]; 
+          // var fileName = decodeURIComponent(temp.split("filename=")[1]); // 中文需要转码 (前端乱码)
+          // var name = fileName.split(";")[0]; //切割成文件名
+          downloadElement.href = href;  //下载地址
+          downloadElement.download = '模板'; // 下载后文件名
+          document.body.appendChild(downloadElement);
+          downloadElement.click(); // 点击下载
+          document.body.removeChild(downloadElement); // 下载完成移除元素
+          window.URL.revokeObjectURL(href); // 释放blob对象
+        })
+      }
+    },
+    addDivision() {
+      this.isList = false
+      this.page = 'add'
+      this.disable = false
+    },
+    check(row) {
+      this.isList = false
+      this.page = 'check'
+      this.rowDetail = row
+      this.disable = true
+    },
+    edit(row) {
+      this.isList = false
+      this.page = 'edit'
+      this.rowDetail = row
+      this.disable = false
+    },
+    // 行内删除
+    deleteids(row) {
+      console.log('row', row)
+      this.$modal.confirm('确认信息').then(() => {
+        delDemand(row.id).then(res => {
+          if (res.code === 200) {
+            this.$modal.msgSuccess("删除成功");
+            this.getList(this.queryParams)
+          }
+        })
+        }).catch(() => {})
+    },
+    // 批量删除按钮
+    delItems() {
+      if(this.ids.length == 0) {
+        this.$modal.msgWarning("请选中至少一条数据");
+      } else {
+        let param = this.ids.join()
+        this.$modal.confirm('确认信息').then(() => {
+        delDemand(param).then(res => {
+          if (res.code === 200) {
+            this.$modal.msgSuccess("删除成功");
+            this.getList(this.queryParams)
+          }
+        })
+        }).catch(() => {})
+      }
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+      this.queryParams.pageSize = val
+      this.getList(this.queryParams)
+    },
+    handleCurrentChange(val) {
+      console.log(`当前页: ${val}`);
+      this.queryParams.pageNum = val
+      this.getList(this.queryParams)
+    },
+    drop() {
+      this.expanded = !this.expanded
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+#PurchaseDemandList {
+  height: calc(100vh - 84px);
+  padding: 12px;
+  box-sizing: border-box;
+}
+.btn_grooup {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
+.lines {
+  margin-top: 0;
+}
+</style>

+ 170 - 0
src/views/purchase/PurchaseDemandList/refers.vue

@@ -0,0 +1,170 @@
+<template>
+  <div>
+    <el-dialog :title="reciveForm.title" width="1000px" :close-on-click-modal="false" :append-to-body="true" v-dialogDrag
+      class="userDialog" :visible.sync="visible">
+      <el-container style="height: 500px">
+        <el-container>
+          <el-header style="text-align: left; font-size: 12px; height: 30px">
+            <el-form size="small" :inline="true" ref="searchForm" :model="searchForm" @keyup.enter.native="refreshList()"
+              @submit.native.prevent>
+              <el-form-item prop="param" label="名称/编号">
+                <el-input size="small" v-model="searchForm.param" placeholder="输入名称/编号查询" clearable></el-input>
+              </el-form-item>
+              <el-form-item>
+                <el-button type="primary" @click="refreshList()" size="small" icon="el-icon-search">查询</el-button>
+                <el-button @click="resetSearch()" size="small" icon="el-icon-refresh-right">重置</el-button>
+              </el-form-item>
+            </el-form>
+          </el-header>
+          <el-main>
+            <el-table :data="dataList" v-loading="loading" size="small" border ref="contractTable"
+              @select="handleSelectionChange" @row-click="rowSelect" height="calc(100% - 40px)" style="width: 100%">
+              <el-table-column type="selection" header-align="center" align="center" width="50">
+              </el-table-column>
+              <el-table-column prop="id" header-align="center" align="center" sortable="custom" min-width="90" label="id">
+              </el-table-column>
+              <el-table-column prop="name" header-align="center" align="center" sortable="custom" min-width="90"
+                label="名称">
+              </el-table-column>
+            </el-table>
+            <el-pagination @size-change="sizeChangeHandle" @current-change="currentChangeHandle"
+              :current-page="searchForm.pageNo" :page-sizes="[5, 10, 15, 20]" :page-size="searchForm.pageSize"
+              :total="total" layout="total, sizes, prev, pager, next, jumper">
+            </el-pagination>
+          </el-main>
+        </el-container>
+      </el-container>
+      <span slot="footer" class="dialog-footer">
+        <el-button size="small" @click="visible = false" icon="el-icon-circle-close">关闭</el-button>
+        <el-button size="small" type="primary" icon="el-icon-circle-check" @click="doSubmit()">确定</el-button>
+      </span>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import { getRefer } from '@/api/purchase/basic'
+export default {
+  data() {
+    return {
+      searchForm: {
+        param: '',
+        pageNo: 1,
+        pageSize: 10,
+      },
+      reciveForm: {},
+      dataListAllSelections: [], // 所有选中的数据包含跨页数据
+      idKey: "id", // 标识列表数据中每一行的唯一键的名称(需要按自己的数据改一下)
+      dataList: [],
+      total: 0,
+      orders: [],
+      loading: false,
+      visible: false,
+    };
+  },
+  props: {
+    selectData: {
+      type: Array,
+      default: () => {
+        return [];
+      },
+    },
+    // 是否启用单选
+    single: {
+      type: Boolean,
+      default: false
+    }
+  },
+  methods: {
+    init(val) {
+      this.visible = true;
+      console.log("🚀 ~ file: refers.vue:79 ~ init ~ init(val):", val)
+      this.reciveForm = val
+      this.$nextTick(() => {
+        this.dataListAllSelections = JSON.parse(JSON.stringify(this.selectData));
+        this.resetSearch();
+      });
+    },
+    // 获取数据列表
+    refreshList() {
+      this.loading = true;
+      let params = {...this.searchForm, ...this.reciveForm}
+      getRefer(params).then(res => {
+        console.log('res', res)
+        this.dataList = res.rows;
+        this.total = res.total
+        this.loading = false;
+        this.$nextTick(() => {
+          this.setSelectRow();
+        });
+      });
+    },
+    // 每页数
+    sizeChangeHandle(val) {
+      this.searchForm.pageSize = val;
+      this.refreshList();
+    },
+    // 当前页
+    currentChangeHandle(val) {
+      this.searchForm.pageNo = val;
+      this.refreshList();
+    },
+    // 排序
+    resetSearch() {
+      this.$refs['searchForm'].resetFields();
+      this.searchForm.pageNo = 1;
+      this.refreshList();
+    },
+    // 表格选中数据
+    rowSelect(row, column, event) {
+      this.$refs.contractTable.clearSelection();
+      this.$refs.contractTable.toggleRowSelection(row);
+      this.dataListAllSelections = this.single ? [row] : selection
+    },
+    // 选中数据
+    handleSelectionChange(selection, row) {
+      if (this.single && selection.length > 1) {
+        this.$refs.contractTable.clearSelection();
+        this.$refs.contractTable.toggleRowSelection(row);
+      }
+      this.dataListAllSelections = this.single ? [row] : selection
+    },
+    // 设置选中的方法
+    setSelectRow() {
+      this.$refs.contractTable.clearSelection();
+      if (!this.dataListAllSelections || this.dataListAllSelections.length <= 0) {
+        return;
+      }
+      for (let i = 0; i < this.dataList.length; i++) {
+        if (this.dataListAllSelections.some(item => item[this.idKey] == this.dataList[i][this.idKey])) {
+          // 设置选中,记住table组件需要使用ref="table"
+          this.$refs.contractTable.toggleRowSelection(this.dataList[i], true);
+        }
+      }
+    },
+    doSubmit() {
+      this.visible = false;
+      console.log('选择的数据?', this.dataListAllSelections)
+      this.$emit("doSubmit", this.dataListAllSelections);
+    },
+  },
+};
+</script>
+<style lang="scss">
+.userDialog {
+  .el-dialog__body {
+    padding: 10px 0px 0px 10px;
+    color: #606266;
+    font-size: 14px;
+    word-break: break-all;
+  }
+
+  .el-main {
+    padding: 20px 20px 5px 20px;
+
+    .el-pagination {
+      margin-top: 5px;
+    }
+  }
+}
+</style>

+ 98 - 0
src/views/purchase/PurchaseDemandList/reserved.vue

@@ -0,0 +1,98 @@
+<template>
+  <div class="reserved">
+    <el-dialog
+      title="货权预留单"
+      :visible.sync="visible"
+      :before-close="handleClose"
+      width="70%"
+    >
+      <el-table :data="tableList1">
+        <el-table-column property="date" label="预留单型号" width="150"></el-table-column>
+        <el-table-column property="date" label="来源单据号" width="150"></el-table-column>
+        <el-table-column property="date" label="客户" width="150"></el-table-column>
+        <el-table-column property="date" label="客户名称" width="150"></el-table-column>
+        <el-table-column property="date" label="创建人" width="150"></el-table-column>
+        <el-table-column property="date" label="创建人名称" width="150"></el-table-column>
+        <el-table-column property="date" label="创建时间" width="150"></el-table-column>
+        <el-table-column property="date" label="更新人" width="150"></el-table-column>
+        <el-table-column property="date" label="更新人名称" width="150"></el-table-column>
+        <el-table-column property="date" label="更新时间" width="150"></el-table-column>
+      </el-table>
+      <el-table style="margin-top: 50px" :data="tableList2">
+        <el-table-column property="date" label="物料编码" width="150"></el-table-column>
+        <el-table-column property="date" label="物料名称" width="150"></el-table-column>
+        <el-table-column property="date" label="单位" width="150"></el-table-column>
+        <el-table-column property="date" label="单位名称" width="150"></el-table-column>
+        <el-table-column property="date" label="预留数量" width="150"></el-table-column>
+        <el-table-column property="date" label="预留比例" width="150"></el-table-column>
+        <el-table-column property="date" label="预留周期" width="150"></el-table-column>
+        <el-table-column property="date" label="仓库" width="150"></el-table-column>
+        <el-table-column property="date" label="仓库名称" width="150"></el-table-column>
+        <el-table-column property="date" label="货位" width="150"></el-table-column>
+        <el-table-column property="date" label="货位名称" width="150"></el-table-column>
+        <el-table-column property="date" label="可用量" width="150"></el-table-column>
+        <el-table-column property="date" label="已用量" width="150"></el-table-column>
+      </el-table>
+      <el-table style="margin-top: 50px" :data="tableList3">
+        <el-table-column property="date" label="物料编码" width="150"></el-table-column>
+        <el-table-column property="date" label="物料名称" width="150"></el-table-column>
+        <el-table-column property="date" label="单位" width="150"></el-table-column>
+        <el-table-column property="date" label="单位名称" width="150"></el-table-column>
+        <el-table-column property="date" label="预留数量" width="150"></el-table-column>
+        <el-table-column property="date" label="预留比例" width="150"></el-table-column>
+        <el-table-column property="date" label="预留周期" width="150"></el-table-column>
+        <el-table-column property="date" label="调出仓库" width="150"></el-table-column>
+        <el-table-column property="date" label="调出仓库名称" width="150"></el-table-column>
+        <el-table-column property="date" label="调出货位" width="150"></el-table-column>
+        <el-table-column property="date" label="调出货位名称" width="150"></el-table-column>
+        <el-table-column property="date" label="调入仓库" width="150"></el-table-column>
+        <el-table-column property="date" label="调入仓库名称" width="150"></el-table-column>
+        <el-table-column property="date" label="调入货位" width="150"></el-table-column>
+        <el-table-column property="date" label="调入货位名称" width="150"></el-table-column>
+        <el-table-column property="date" label="调拨数量" width="150"></el-table-column>
+      </el-table>
+    </el-dialog>
+  </div>
+</template>
+
+<script>
+import {getResevedDetail} from '@/api/purchase/transferOrder.js'
+export default {
+  props: {
+    isVisible: {
+      type: Boolean,
+      default: false
+    },
+    info: {
+      type: Object,
+      default: null
+    }
+  },
+  mounted() {
+    console.log('出现')
+    console.log(this.info)
+    this.getDetails(this.info)
+  },
+  data() {
+    return {
+      visible:this.isVisible,
+      tableList1: [],
+      tableList2: [],
+      tableList3: [],
+    }
+  },
+  methods: {
+    getDetails(row) {
+      getResevedDetail(row.id).then(res => {
+        if (res.code === 200) {
+          // this.basicForm = res.data
+        }
+      })
+    },
+    handleClose() {
+      console.log('调用')
+      this.$emit('updateReserved', false)
+    }
+  }
+}
+</script>

+ 246 - 0
src/views/purchase/deliveryAddress/add.vue

@@ -0,0 +1,246 @@
+<template>
+  <div id="addAddress">
+    <el-form :model="basicForm" :rules="basicRules" ref="basic" label-width="auto">
+      <el-row :gutter="10">
+        <el-col :span="1.5">
+            <el-form-item label="收货仓库编码">
+              <el-input
+                v-model="basicForm.code"
+                size="small"
+                disabled
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+
+        <el-col :span="1.5">
+            <el-form-item label="收货仓库名称">
+              <el-input
+                v-model="basicForm.name"
+                size="small"
+                :disabled="disable"
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+
+        <el-col :span="1.5">
+            <el-form-item label="仓库档案名称">
+              <el-input
+                v-model="basicForm.warehouseCode"
+                size="small"
+                :disabled="disable"
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+
+         <el-col :span="1.5">
+            <el-form-item label="仓库属性">
+              <el-select v-model="basicForm.warehouseProperty" size="small" style="width: 200px" clearable :disabled="disable">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="地址信息">
+              <el-input
+                v-model="basicForm.address"
+                size="small"
+                :disabled="disable"
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="联系人">
+              <el-input
+                v-model="basicForm.contactsName"
+                size="small"
+                :disabled="disable"
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="联系人电话">
+              <el-input
+                v-model="basicForm.contactsPhone"
+                size="small"
+                :disabled="disable"
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="物料分类">
+              <el-input
+                v-model="basicForm.materialClassify"
+                size="small"
+                :disabled="disable"
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+
+         <el-col :span="1.5">
+            <el-form-item label="启用">
+              <el-select v-model="basicForm.status" size="small" style="width: 200px" clearable :disabled="disable">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+         <el-col :span="1.5">
+            <el-form-item label="同步状态">
+              <el-select v-model="basicForm.sendStatus" size="small" style="width: 200px" clearable :disabled="disable">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="备注">
+              <el-input
+                v-model="basicForm.remark"
+                size="small"
+                :disabled="disable"
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+
+      </el-row>
+    </el-form>
+
+    <div class="btn_group">
+      <el-col :span="1.5" style="margin: 0 10px;">
+        <el-button type="primary" size="small" plain @click="save" v-if="pageStu == 'add' || pageStu == 'edit'">保存</el-button>
+      </el-col>
+      <!-- <el-col :span="1.5" style="margin: 0 10px;">
+        <el-button type="primary" size="small" plain @click="submit" v-if="pageStu == 'edit'">提交</el-button>
+      </el-col> -->
+      <el-col :span="1.5">
+        <el-button size="small" plain @click="back">返回</el-button>
+      </el-col>
+    </div>
+  </div>
+</template>
+
+<script>
+import {addAddress, getAddressDetail, editAddress} from '@/api/purchase/deliveryAddress.js'
+export default {
+  name: 'addAddress',
+  props: ['pageStu','row', 'disable'],
+  model: {
+    prop: 'isList',
+    event: 'jugislist'
+  },
+  data() {
+    return {
+      basicForm: {
+        code: '',
+        name: '',
+        warehouse: '',
+        warehouseCode: '',
+        warehouseProperty: '',
+        address: '',
+        contacts: '',
+        contactsName: '',
+        contactsPhone: '',
+        materialClassify: '',
+        materialClassifyName: '',
+        status: '',
+        sendStatus: '',
+        remark: '',
+      },
+      options: [{
+        value: '1', label: '是',
+      }, {
+        value: '0', label: '否'
+      }],
+      basicRules: {}
+    }
+  },
+  mounted() {
+    if(this.pageStu == 'check') {
+      console.log('数据', this.row)
+      this.getDetails(this.row)
+    } else if(this.pageStu == 'edit') {
+      this.getDetails(this.row)
+    }
+  },
+  methods: {
+    save() {
+      if(this.pageStu == 'add') {
+        addAddress(this.basicForm).then(res => {
+          if (res.code === 200) {
+            this.$modal.msgSuccess("保存成功");
+            this.back()
+          }
+        })
+      } else if (this.pageStu == 'edit') {
+        editAddress(this.basicForm).then(res => {
+          if (res.code === 200) {
+            this.$modal.msgSuccess("编辑成功");
+            this.back()
+          }
+        })
+      }
+    },
+    submit() {},
+    back() {
+      this.$emit('jugislist', true)
+      let queryParams = {
+        pageNum: 1,
+        pageSize: 10
+      }
+      this.$emit('refresh', queryParams)
+    },
+    // 如果需要回显则调用详情接口
+    getDetails(row) {
+      getAddressDetail(row.id).then(res => {
+        if (res.code === 200) {
+          this.basicForm = res.data
+        }
+      })
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.btn_group {
+  width: 100%;
+  margin: 20px 0;
+  display: flex;
+  justify-content: center;
+} 
+</style>

+ 358 - 0
src/views/purchase/deliveryAddress/index.vue

@@ -0,0 +1,358 @@
+<template>
+  <div id="deliveryAddressList">
+    <div v-if="isList">
+      <el-form class="search_area" label-width="120px">
+        <el-row :gutter="10">
+          <el-col :span="1.5">
+            <el-form-item label="仓库属性">
+              <el-select v-model="queryParams.warehouseProperty" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="仓库档案名称">
+              <el-select v-model="queryParams.warehouseCode" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="收货仓库编码">
+              <el-input
+              v-model="queryParams.code"
+              size="small"
+              clearable
+              style="width: 200px"
+            />
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="收货仓库名称">
+              <el-input
+              v-model="queryParams.name"
+              size="small"
+              clearable
+              style="width: 200px"
+            />
+            </el-form-item>
+          </el-col>
+          <el-col :span="1.5">
+            <el-form-item label="" label-width="20px">
+              <el-button type="primary" size="small" icon="el-icon-search" plain>搜索</el-button>
+              <el-button size="small" icon="el-icon-refresh" plain>重置</el-button>
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <CollapseTransition>
+          <div v-show="expanded">
+        <el-row :gutter="10">
+          <el-col :span="1.5">
+            <el-form-item label="物料分类">
+              <el-select v-model="queryParams.materialClassify" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="详细地址">
+            <el-input
+              v-model="queryParams.address"
+              size="small"
+              placeholder=""
+              clearable
+              style="width: 200px"
+            />
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="联系人">
+            <el-input
+              v-model="queryParams.contactsName"
+              size="small"
+              placeholder=""
+              clearable
+              style="width: 200px"
+            />
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="联系人电话">
+            <el-input
+              v-model="queryParams.contactsPhone"
+              size="small"
+              placeholder=""
+              clearable
+              style="width: 200px"
+            />
+            </el-form-item>
+          </el-col>
+        </el-row>
+
+        <el-row :gutter="10">
+          <el-col :span="1.5">
+            <el-form-item label="备注">
+            <el-input
+              v-model="queryParams.remark"
+              size="small"
+              placeholder=""
+              clearable
+              style="width: 200px"
+            />
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="同步状态">
+            <el-input
+              v-model="queryParams.sendStatus"
+              size="small"
+              placeholder=""
+              clearable
+              style="width: 200px"
+            />
+            </el-form-item>
+          </el-col>
+
+          <el-col :span="1.5">
+            <el-form-item label="启用">
+              <el-select v-model="queryParams.status" size="small" style="width: 200px" clearable placeholder="请选择">
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value">
+                </el-option>
+              </el-select>
+            </el-form-item>
+          </el-col>
+        </el-row>
+        </div>
+      </CollapseTransition>
+      </el-form>
+      <el-divider class="lines"><i style="cursor: pointer;" :class="expanded?'el-icon-arrow-up':'el-icon-arrow-down'" @click="drop"></i></el-divider>
+
+      <el-card>
+        <div class="btn_grooup">
+          <el-button type="primary" size="small" @click="addAddress">新增</el-button>
+
+          <el-dropdown size="small" @command="handleCommand">
+            <el-button size="small" type="primary" style="margin-left: 10px;">
+              导入<i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item command="数据导入">数据导入</el-dropdown-item>
+              <el-dropdown-item command="模板下载">模板下载</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+
+          <el-dropdown size="small" @command="handleCommand">
+            <el-button size="small" type="primary" style="margin: 0 10px;">
+              导出<i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item command="Excel导出">Excel导出</el-dropdown-item>
+              <el-dropdown-item command="导出明细">导出明细</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+
+          <el-button type="primary" size="small">启用</el-button>
+          <el-button type="primary" size="small">停用</el-button>
+          <el-button type="primary" size="small">同步NC</el-button>
+          <el-button type="primary" size="small">删除</el-button>
+          <el-button type="primary" size="small">打印</el-button>
+        </div>
+        <el-table 
+          :data="tableList" 
+          fit
+          max-height="680"
+          @selection-change="handleSelectionChange"
+        >
+          <el-table-column type="selection" width="55" />
+          <el-table-column label="仓库属性" align="center" prop="warehouseProperty"/>
+          <el-table-column label="仓库档案名称" align="center" width="200" prop="warehouseCode"/>
+          <el-table-column label="收货仓库编码" align="center" prop="code" />
+          <el-table-column label="收货仓库名称" align="center" width="150" prop="name"/>
+          <el-table-column label="详细地址" align="center" width="150" prop="address"/>
+          <el-table-column label="物料分类" align="center" width="150" prop="materialClassifyName" />
+          <el-table-column label="联系人" align="center" width="150" prop="contactsName" />
+          <el-table-column label="联系人电话" align="center" prop="contactsPhone" />
+          <el-table-column label="NC档案ID" align="center" width="150" prop="createTime" />
+          <el-table-column label="备注" align="center" width="120" prop="remark" />
+          <el-table-column label="创建人" align="center" width="150" prop="createByName" />
+          <el-table-column label="创建时间" align="center" width="150" prop="createTime" />
+          <el-table-column label="修改人" align="center" width="150" prop="updateByName" />
+          <el-table-column label="修改时间" align="center" width="150" prop="updateTime" />
+          <el-table-column label="同步状态" align="center" width="150" prop="sendStatus" />
+          <el-table-column label="启用" align="center" width="150" prop="status" />
+          <el-table-column
+          fixed="right"
+          label="操作"
+          align="center"
+          width="150"
+          >
+          <template slot-scope="scope">
+            <el-button type="text" size="small" @click="check(scope.row)">查看</el-button>
+            <el-button type="text" size="small" @click="edit(scope.row)">编辑</el-button>
+            <el-button type="text" size="small" @click="deleteids(scope.row)">删除</el-button>
+          </template>
+        </el-table-column>
+        </el-table>
+
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :current-page="1"
+          :page-sizes="[5, 10, 15, 20]"
+          :page-size="100"
+          layout="total, sizes, prev, pager, next, jumper"
+          :total=total>
+        </el-pagination>
+      </el-card>
+    </div>
+    <Add v-model="isList" v-if="!isList" :pageStu="page" :disable="disable" :row="rowDetail" @refresh="getList"/>
+  </div>
+</template>
+
+<script>
+import Add from './add.vue'
+import CollapseTransition from '@/components/MyCollapse/collapse.vue'
+import {getAddressList, delAddress} from '@/api/purchase/deliveryAddress.js'
+export default {
+  name: 'deliveryAddress',
+  components: {
+    Add,
+    CollapseTransition
+  },
+  data() {
+    return {
+      expanded: false,
+      // 页面配置
+      isList: true,
+      // 页面状态
+      page: '',
+      // 搜索框参数
+      queryParams: {
+        code: '',
+        name: '',
+        warehouse: '',
+        warehouseCode: '',
+        warehouseProperty: '',
+        address: '',
+        contacts: '',
+        contactsName: '',
+        contactsPhone: '',
+        materialClassify: '',
+        materialClassifyName: '',
+        status: '',
+        sendStatus: '',
+        remark: '',
+        pageNum: 1,
+        pageSize: 10
+      },
+      options: [{
+        value: '1', label: '是',
+      }, {
+        value: '0', label: '否'
+      }],
+      tableList: [],
+      total: 0,
+      rowDetail: {},
+      disable: false
+    }
+  },
+  created() {
+    this.getList(this.queryParams)
+  },
+  methods: {
+    getList(params){
+      getAddressList(params).then(res => {
+        if (res.code === 200) {
+          this.tableList = res.rows
+          this.total = res.total
+        }
+      })
+    },
+    handleSelectionChange() {},
+    handleCommand(command) {
+      alert(command)
+    },
+    addAddress() {
+      this.isList = false
+      this.page = 'add'
+      this.disable = false
+    },
+    check(row) {
+      this.isList = false
+      this.page = 'check'
+      this.rowDetail = row
+      this.disable = true
+    },
+    edit(row) {
+      this.isList = false
+      this.page = 'edit'
+      this.rowDetail = row
+      this.disable = false
+    },
+    deleteids(row) {
+      console.log('row', row)
+      this.$modal.confirm('确认信息').then(() => {
+        delAddress(row.id).then(res => {
+          if (res.code === 200) {
+            this.$modal.msgSuccess("删除成功");
+            this.getList(this.queryParams)
+          }
+        })
+        }).catch(() => {})
+    },
+    handleSizeChange(val) {
+      console.log(`每页 ${val} 条`);
+      this.queryParams.pageSize = val
+      this.getList(this.queryParams)
+    },
+    handleCurrentChange(val) {
+      console.log(`当前页: ${val}`);
+      this.queryParams.pageNum = val
+      this.getList(this.queryParams)
+    },
+    drop() {
+      this.expanded = !this.expanded
+    }
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+#deliveryAddressList {
+  height: calc(100vh - 84px);
+  padding: 12px;
+  box-sizing: border-box;
+}
+.btn_grooup {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: flex-end;
+}
+.lines {
+  margin-top: 0;
+}
+</style>

+ 211 - 0
src/views/purchase/priceDeclaration/add-price-declaration.vue

@@ -0,0 +1,211 @@
+<!-- 价格申报单-新增 -->
+<template>
+  <el-drawer title="我是标题" direction="btt" size="100%" :with-header="false" :visible.sync="visible"
+    :before-close="handleClose">
+    <el-card :body-style="{
+        padding: '20px',
+        display: 'flex',
+        'flex-wrap': 'wrap',
+      }" style="margin: 10px">
+      <div slot="header" style="
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
+        ">
+        <h3>新增</h3>
+        <div style="text-align: right">
+          <el-button size="mini" @click="setVisible(false)">取消</el-button>
+          <el-button size="mini" type="info" @click="setVisible(false)">保存并新增</el-button>
+          <el-button size="mini" type="danger" @click="setVisible(false)">保存</el-button>
+        </div>
+      </div>
+      <el-row>
+        <el-form size="mini" label-position="right" label-width="150px" :model="params">
+          <el-col v-for="(column, index) in columns" :key="index" :span="column.span || 8">
+            <el-form-item :prop="column.key" :label="column.title" :required="column.required">
+
+              <el-input v-if="column.type === 'Input'" v-model="params[column.key]" :placeholder="column.placeholder"
+                :clearable="column.clearable" style="width: 90%"></el-input>
+
+              <el-input-number v-if="column.type === 'InputNumber'" v-model="params[column.key]"
+                :controls-position="column.config.controlsPosition" :placeholder="column.placeholder"
+                :clearable="column.clearable" style="width: 90%"></el-input-number>
+
+              <el-select v-if="column.type === 'Select'" v-model="params[column.key]" :placeholder="column.placeholder"
+                :clearable="column.clearable" style="width: 90%">
+                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
+                </el-option>
+              </el-select>
+
+              <el-select v-if="column.type === 'TagSelect'" v-model="params[column.key]" multiple clearable collapse-tags
+                :placeholder="column.placeholder" :clearable="column.clearable" style="width: 90%">
+                <template #prefix>
+                  <el-icon class="el-icon-s-operation" style="cursor: pointer" @click.stop="$message.info(234)"></el-icon>
+                </template>
+                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
+                </el-option>
+              </el-select>
+
+              <el-date-picker v-if="column.type === 'DatePicker'" v-model="params[column.key]" :type="column.config.type"
+                :placeholder="column.placeholder" :clearable="column.clearable" :picker-options="column.pickerOptions"
+                style="width: 90%">
+              </el-date-picker>
+
+              <el-upload v-if="column.type === 'Upload'" :file-list="params[column.key]" drag
+                action="https://jsonplaceholder.typicode.com/posts/" multiple>
+                <i class="el-icon-upload"></i>
+                <div class="el-upload__text">
+                  将文件拖到此处,或<em>点击上传</em>
+                </div>
+                <div class="el-upload__tip" slot="tip">
+                  只能上传jpg/png文件,且不超过500kb
+                </div>
+              </el-upload>
+
+            </el-form-item>
+          </el-col>
+        </el-form>
+      </el-row>
+    </el-card>
+    <el-card :body-style="{
+        padding: '20px',
+        display: 'flex',
+        'flex-wrap': 'wrap',
+      }" style="margin: 10px">
+      <el-tabs v-model="tabName" @tab-click="handleClick" style="width: 100%">
+        <el-tab-pane v-for="(column, index) in tabColumns" :key="index" :label="column.title" :name="column.key">
+          <el-table :data="tabTableDatas[column.key]" style="width: 100%">
+            <el-table-column v-for="(cColumn, cIndex) in column.tableColumns" :key="cIndex" :prop="cColumn.key"
+              :label="cColumn.title">
+            </el-table-column>
+          </el-table>
+        </el-tab-pane>
+      </el-tabs>
+    </el-card>
+  </el-drawer>
+</template>
+
+<script>
+export default {
+  name: 'addPriceDeclaration',
+  data() {
+    const arr2Obj = function (data, keyName, valueName) {
+      return Object.fromEntries(
+        data.map((item) => [item[keyName], item[valueName]])
+      );
+    };
+    const columns = [
+      { key: "id", title: "id", type: "TagSelect", require: true },
+      { key: "status", title: "单据状态" },
+      { key: "priceName", title: "价格名称" },
+      { key: "supplier", title: "供应商" },
+      { key: "supplierName", title: "供应商名称" },
+      { key: "puOrg", title: "采购组织" },
+      { key: "puOrgName", title: "采购组织名称" },
+      { key: "currency", title: "币种" },
+      { key: "currencyName", title: "币种名称" },
+      { key: "explain", title: "价格合理性说明" },
+      { key: "buyer", title: "采购员" },
+      { key: "buyerName", title: "采购员名称" },
+      { key: "puDept", title: "采购部门" },
+      { key: "puDeptName", title: "采购部门名称" },
+      { key: "sourceType", title: "来源单据类型" },
+      { key: "source", title: "来源单据号" },
+      { key: "isEffective", title: "是否已推价格" },
+      { key: "effectiveDate", title: "生效日期" },
+      { key: "file", title: "附件" },
+      { key: "tenantId", title: "租户号" },
+      { key: "revision", title: "乐观锁" },
+      { key: "createByName", title: "创建人名称" },
+      { key: "updateByName", title: "更新人" },
+      { key: "delFlag", title: "删除标记" }
+    ];
+    const initColumns = () =>
+      columns.map((column) => {
+        const clearable = column.clearable || true;
+        if (column.type === "InputNumber") {
+          return {
+            ...column,
+            clearable,
+            config: { controlsPosition: "right" },
+          };
+        }
+        if (column.type === "DatePicker") {
+          return {
+            ...column,
+            clearable,
+            config: { type: "date" },
+          };
+        }
+        return {
+          ...column,
+          clearable,
+        };
+      });
+    const initParams = () => arr2Obj(initColumns(), "key", "value");
+    // 标签页列
+    const tabColumns = [
+      {
+        key: 'materialBasic',
+        title: '物料信息表',
+        tableColumns: [],
+      },
+      {
+        key: 'enforcementScope',
+        title: '执行范围组织',
+        tableColumns: [],
+      },
+    ]
+    const initTabColumns = () => tabColumns;
+    return {
+      visible: false,
+      // 主数据表头
+      columns: initColumns(),
+      // 表单
+      params: initParams(),
+      options: [
+        {
+          value: "选项1",
+          label: "黄金糕",
+        },
+        {
+          value: "选项2",
+          label: "双皮奶",
+        },
+        {
+          value: "选项3",
+          label: "蚵仔煎",
+        },
+        {
+          value: "选项4",
+          label: "龙须面",
+        },
+        {
+          value: "选项5",
+          label: "北京烤鸭",
+        },
+      ],
+      // 标签页表格列
+      tabColumns: initTabColumns(),
+      // 标签页激活
+      tabName: "materialBasic",
+      // 标签页对应数据
+      tabTableDatas: {
+        materialBasic: [],
+        enforcementScope: [],
+      },
+    }
+  },
+  methods: {
+    setVisible(prop) {
+      this.visible = prop;
+    },
+    handleClose() { },
+    handleClick() { },
+
+  },
+  created() {
+    console.log(this.params, this.columns);
+  },
+}
+</script>

+ 373 - 0
src/views/purchase/priceDeclaration/index.vue

@@ -0,0 +1,373 @@
+<!-- 价格申报单-列表 -->
+<template>
+  <el-card v-loading="loading" class="priceDeclaration" :body-style="{ padding: 0 }">
+
+    <addPriceDeclaration ref="addDeclaration"></addPriceDeclaration>
+    <seePriceDeclaration ref="seeDeclaration"></seePriceDeclaration>
+
+    <!-- 检索 -->
+    <el-form size="mini" label-position="right" label-width="85px" :model="searchParams" style="padding: 20px 0 0 0">
+      <el-row :gutter="24">
+        <el-col :span="22">
+          <el-row :gutter="20">
+            <el-col v-for="column in showSearchColumns" :key="column.title" :xl="6" :lg="6" :md="8" :sm="12" :xs="24">
+              <el-form-item :prop="column.key" :label="column.title">
+                <el-input v-model="searchParams[column.key]" :placeholder="column.placeholder"></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-col>
+        <el-col :span="2">
+          <el-row :gutter="24">
+            <el-col :span="24">
+              <el-button type="primary" size="mini">搜索</el-button>
+            </el-col>
+            <el-col v-show="!isSimpleSearch" :span="24" style="margin: 10px 0 0">
+              <el-button size="mini">重置</el-button>
+            </el-col>
+          </el-row>
+        </el-col>
+      </el-row>
+    </el-form>
+    <el-divider>
+      <i :class="isSimpleSearch ? 'el-icon-arrow-down' : 'el-icon-arrow-up'" style="cursor: pointer"
+        @click="handleSearchChange"></i>
+    </el-divider>
+
+    <!-- 操作 -->
+    <el-row :gutter="24" style="padding: 0 20px">
+      <!-- <el-col :span="6">  </el-col> -->
+      <el-col :span="24" style="text-align: right">
+        <el-button size="mini" type="danger" @click="handleAddDeclaration">新增</el-button>
+        <el-button-group>
+          <el-dropdown>
+            <el-button size="mini">
+              导入<i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item>导入</el-dropdown-item>
+              <el-dropdown-item>模板下载</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+          <el-dropdown>
+            <el-button size="mini">
+              导出<i class="el-icon-arrow-down el-icon--right"></i>
+            </el-button>
+            <el-dropdown-menu slot="dropdown">
+              <el-dropdown-item>Excel导出</el-dropdown-item>
+              <el-dropdown-item>导出明细</el-dropdown-item>
+            </el-dropdown-menu>
+          </el-dropdown>
+        </el-button-group>
+
+        <el-button-group>
+          <el-button size="mini">删除</el-button>
+          <el-button size="mini">打印</el-button>
+          <el-button size="mini">下载</el-button>
+        </el-button-group>
+      </el-col>
+    </el-row>
+
+    <el-container>
+      <el-main>
+        <!-- 主信息 -->
+        <el-table class="pd-mainTable" :data="tableData" size="mini" @row-dblclick="handleOpenDetails">
+          <el-table-column type="selection" width="35" />
+          <el-table-column v-for="(column, index) in tableColumns" :key="index" :prop="column.key" :label="column.title"
+            :width="column.width || 180" :show-overflow-tooltip="column.showOverflowTooltip || true">
+          </el-table-column>
+          <!-- 操作 -->
+          <el-table-column label="操作" width="100">
+            <template slot-scope="scope">
+              <el-button size="mini" type="text" @click="handleEdit(scope.$index, scope.row)">编辑</el-button>
+              <el-button size="mini" type="text" @click="handleDelete(scope.$index, scope.row)">删除</el-button>
+            </template>
+          </el-table-column>
+        </el-table>
+        <!-- 分页 -->
+        <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange" :total="total"
+          :page-sizes="pageSizes" :page-size="page.pageSize" :current-page="page.pageNum" hide-on-single-page
+          layout="total, prev, pager, next, sizes, jumper">
+        </el-pagination>
+
+        <!-- 附表格 -->
+        <div class="pd-viceTable">
+          <el-tabs class="pd-tabs" v-model="activeName" @tab-click="handleTabClick" style="width: 100%;">
+            <el-tab-pane v-for="v in viceTable" :label="v.title" :name="v.name">
+
+              <el-table class="pd_viceTable" :data="tabTableDatas[v.name]" style="width: 100%;">
+                <el-table-column v-if="tabTableDatas[v.name].lenth" type="index" width="35" />
+                <el-table-column v-for="(column, index) in v.columns" :key="index" :prop="column.key"
+                  :label="column.title" :width="column.width || 180"
+                  :show-overflow-tooltip="column.showOverflowTooltip || true">
+                </el-table-column>
+              </el-table>
+            </el-tab-pane>
+          </el-tabs>
+        </div>
+
+      </el-main>
+    </el-container>
+
+  </el-card>
+</template>
+
+<script>
+import declaration from '@/api/business/purchase/priceDeclaration'
+import addPriceDeclaration from './add-price-declaration.vue'
+import seePriceDeclaration from './see-price-declaration.vue'
+
+export default {
+  name: 'priceDeclaration',
+  components: {
+    addPriceDeclaration,
+    seePriceDeclaration
+  },
+  data() {
+    const arr2Obj = function (data, keyName, valueName) {
+      return Object.fromEntries(
+        data.map((item) => [item[keyName], item[valueName]])
+      );
+    };
+    // 检索列
+    const searchColumns = [
+      // { key: "id", title: "id", type: '' },
+      // { key: "status", title: "单据状态" },
+      // { key: "priceName", title: "价格名称" },
+      // { key: "supplier", title: "供应商" },
+      // { key: "supplierName", title: "供应商名称" },
+      { key: "puOrg", title: "采购组织" },
+      // { key: "puOrgName", title: "采购组织名称" },
+      // { key: "currency", title: "币种" },
+      // { key: "currencyName", title: "币种名称" },
+      // { key: "explain", title: "价格合理性说明" },
+      { key: "buyer", title: "采购员" },
+      // { key: "buyerName", title: "采购员名称" },
+      { key: "puDept", title: "采购部门" },
+      // { key: "puDeptName", title: "采购部门名称" },
+      // { key: "sourceType", title: "来源单据类型" },
+      { key: "source", title: "来源单据号" },
+      // { key: "isEffective", title: "是否已推价格" },
+      // { key: "effectiveDate", title: "生效日期" },
+      // { key: "file", title: "附件" },
+      // { key: "tenantId", title: "租户号" },
+      // { key: "revision", title: "乐观锁" },
+      // { key: "createByName", title: "创建人名称" },
+      // { key: "updateByName", title: "更新人" },
+      // { key: "delFlag", title: "删除标记" }
+    ];
+    // 表头
+    const tableHeader = [
+      { key: "id", title: "id" },
+      { key: "status", title: "单据状态" },
+      { key: "priceName", title: "价格名称" },
+      { key: "supplier", title: "供应商" },
+      { key: "supplierName", title: "供应商名称" },
+      { key: "puOrg", title: "采购组织" },
+      { key: "puOrgName", title: "采购组织名称" },
+      { key: "currency", title: "币种" },
+      { key: "currencyName", title: "币种名称" },
+      { key: "explain", title: "价格合理性说明" },
+      { key: "buyer", title: "采购员" },
+      { key: "buyerName", title: "采购员名称" },
+      { key: "puDept", title: "采购部门" },
+      { key: "puDeptName", title: "采购部门名称" },
+      { key: "sourceType", title: "来源单据类型" },
+      { key: "source", title: "来源单据号" },
+      { key: "isEffective", title: "是否已推价格" },
+      { key: "effectiveDate", title: "生效日期" },
+      { key: "file", title: "附件" },
+      { key: "tenantId", title: "租户号" },
+      { key: "revision", title: "乐观锁" },
+      { key: "createByName", title: "创建人名称" },
+      { key: "updateByName", title: "更新人" },
+      { key: "delFlag", title: "删除标记" }
+    ];
+    // 附表
+    const viceTable = [
+      {
+        name: 'materialBasic',
+        title: '物料信息表',
+        columns: [],
+      },
+      {
+        name: 'enforcementScope',
+        title: '执行范围组织',
+        columns: [],
+      },
+    ]
+
+    // 初始化搜索列
+    const initSearchColumns = () => searchColumns;
+    // 初始化搜索参数
+    const initSearchParams = () => arr2Obj(initSearchColumns(), "key", "value");
+    // 初始化表头
+    const initTableHeader = () => tableHeader;
+    // 附表格
+    const initViceTable = () => viceTable;
+
+    return {
+      loading: false,
+      // 简单检索
+      isSimpleSearch: true,
+      // 标签页激活
+      activeName: 'materialBasic',
+      // 检索参数
+      searchParams: {
+        isAsc: "desc",
+        reasonable: "",
+        orderByColumn: "",
+        ...initSearchParams(),
+      },
+      // 检索列
+      searchColumns: initSearchColumns(),
+      // 列表
+      tableColumns: initTableHeader(),
+      // 附表格
+      viceTable: initViceTable(),
+      // 附表格数据
+      tabTableDatas: {
+        // 物料信息表
+        materialBasic: [],
+        // 执行范围组织
+        enforcementScope: [],
+      },
+      // 列表数据
+      tableData: [
+        {
+          buyer: '1',
+          buyerName: '1',
+          createByName: '1',
+          currency: '1',
+          currencyName: '1',
+          delFlag: '1',
+          effectiveDate: '1',
+          explain: '1',
+          file: '1',
+          id: '1',
+          isAsc: '1',
+          isEffective: '1',
+          orderByColumn: '1',
+          priceName: '1',
+          puDept: '1',
+          puDeptName: '1',
+          puOrg: '1',
+          puOrgName: '1',
+          reasonable: '1',
+          revision: '1',
+          source: '1',
+          sourceType: '1',
+          status: '1',
+          supplier: '1',
+          supplierName: '1',
+          tenantId: '1',
+          updateByName: '1'
+        }
+      ],
+      page: { pageNum: 1, pageSize: 25 },
+      total: 1,
+      pageSizes: [25, 50, 100],
+    }
+  },
+  computed: {
+    showSearchColumns() {
+      return this.isSimpleSearch
+        ? this.searchColumns.slice(0, 4)
+        : this.searchColumns;
+    },
+  },
+  methods: {
+    // 改变页数大小
+    handleSizeChange() { },
+    // 改变当前页
+    handleCurrentChange() { },
+    // 查询条件改变
+    handleSearchChange() {
+      this.isSimpleSearch = !this.isSimpleSearch;
+      // this.$notify.info({
+      //   title: this.isSimpleSearch ? "Simple Search" : "All Search",
+      // });
+    },
+    // 新增
+    handleAddDeclaration() {
+      const { setVisible } = this.$refs.addDeclaration;
+      setVisible(true);
+      setTimeout(() => {
+        this.$notify.info("Open Add Drawer");
+      }, 250);
+    },
+    // 标签页切换
+    handleTabClick() {
+      console.log(this.activeName, '标签页切换');
+
+    },
+    // 行双击-进入详情
+    handleOpenDetails(row) {
+      console.log(row, '行双击-进入详情');
+      const { setVisible } = this.$refs.seeDeclaration;
+      setVisible(true);
+      setTimeout(() => {
+        this.$notify.info("Open See Drawer");
+      }, 250);
+    },
+    // 行编辑
+    handleEdit(index, row) {
+      console.log(index, row, '行编辑');
+    },
+    // 行删除
+    handleDelete(index, row) {
+      console.log(index, row, '行删除');
+    },
+    // 查询列表
+    handlePriceApplyList() {
+      let data = {
+        ...this.page,
+        ...this.searchParams,
+      }
+      declaration.getPriceApplyList(data).then(res => {
+        console.log(res, 'res');
+      }).catch(error => {
+
+      })
+    },
+  },
+  created() {
+    console.log(this.searchParams, 'searchParams');
+    // this.handlePriceApplyList();
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.priceDeclaration {
+  width: calc(100% - 24px);
+  height: 100%;
+  margin: 10px;
+
+  .el-main {
+    padding-top: 0px;
+
+    .pd-mainTable {
+      width: 100%;
+      margin: 20px 0 0 0;
+    }
+
+    .pd-viceTable {
+      padding: 20px 0 0 0;
+      display: flex;
+      flex-wrap: wrap;
+    }
+
+    // .pd_tabs {
+    //   margin-top: 20px;
+    // }
+  }
+}
+</style>
+
+<style scoped>
+.pd_mainTable>>>.el-table__body-wrapper {
+  max-height: 400px;
+  overflow: auto;
+}
+</style>

+ 208 - 0
src/views/purchase/priceDeclaration/see-price-declaration.vue

@@ -0,0 +1,208 @@
+<!-- 价格申报单-详情 -->
+<template>
+  <el-drawer title="我是标题" direction="btt" size="100%" :with-header="false" :visible.sync="visible"
+    :before-close="handleClose">
+    <el-card :body-style="{
+        padding: '20px',
+        display: 'flex',
+        'flex-wrap': 'wrap',
+      }" style="margin: 10px">
+      <div slot="header" style="
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
+        ">
+        <h3>查看</h3>
+        <div style="text-align: right">
+          <el-button size="mini" @click="setVisible(false)">取消</el-button>
+          <el-button size="mini" type="info" @click="setVisible(false)">保存并新增</el-button>
+          <el-button size="mini" type="danger" @click="setVisible(false)">保存</el-button>
+        </div>
+      </div>
+      <el-row>
+        <el-form size="mini" label-position="right" label-width="150px" :model="params">
+          <el-col v-for="(column, index) in columns" :key="index" :span="column.span || 8">
+            <el-form-item :prop="column.key" :label="column.title" :required="column.required">
+
+              <el-input v-if="column.type === 'Input'" v-model="params[column.key]" :placeholder="column.placeholder"
+                :clearable="column.clearable" style="width: 90%"></el-input>
+
+              <el-input-number v-if="column.type === 'InputNumber'" v-model="params[column.key]"
+                :controls-position="column.config.controlsPosition" :placeholder="column.placeholder"
+                :clearable="column.clearable" style="width: 90%"></el-input-number>
+
+              <el-select v-if="column.type === 'Select'" v-model="params[column.key]" :placeholder="column.placeholder"
+                :clearable="column.clearable" style="width: 90%">
+                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
+                </el-option>
+              </el-select>
+
+              <el-select v-if="column.type === 'TagSelect'" v-model="params[column.key]" multiple clearable collapse-tags
+                :placeholder="column.placeholder" :clearable="column.clearable" style="width: 90%">
+                <template #prefix>
+                  <el-icon class="el-icon-s-operation" style="cursor: pointer" @click.stop="$message.info(234)"></el-icon>
+                </template>
+                <el-option v-for="item in options" :key="item.value" :label="item.label" :value="item.value">
+                </el-option>
+              </el-select>
+
+              <el-date-picker v-if="column.type === 'DatePicker'" v-model="params[column.key]" :type="column.config.type"
+                :placeholder="column.placeholder" :clearable="column.clearable" :picker-options="column.pickerOptions"
+                style="width: 90%">
+              </el-date-picker>
+
+              <el-upload v-if="column.type === 'Upload'" :file-list="params[column.key]" drag
+                action="https://jsonplaceholder.typicode.com/posts/" multiple>
+                <i class="el-icon-upload"></i>
+                <div class="el-upload__text">
+                  将文件拖到此处,或<em>点击上传</em>
+                </div>
+                <div class="el-upload__tip" slot="tip">
+                  只能上传jpg/png文件,且不超过500kb
+                </div>
+              </el-upload>
+
+            </el-form-item>
+          </el-col>
+        </el-form>
+      </el-row>
+    </el-card>
+    <el-card :body-style="{
+        padding: '20px',
+        display: 'flex',
+        'flex-wrap': 'wrap',
+      }" style="margin: 10px">
+      <el-tabs v-model="tabName" @tab-click="handleClick" style="width: 100%">
+        <el-tab-pane v-for="(column, index) in tabColumns" :key="index" :label="column.title" :name="column.key">
+          <el-table :data="tabTableDatas[column.key]" style="width: 100%">
+            <el-table-column v-for="(cColumn, cIndex) in column.tableColumns" :key="cIndex" :prop="cColumn.key"
+              :label="cColumn.title">
+            </el-table-column>
+          </el-table>
+        </el-tab-pane>
+      </el-tabs>
+    </el-card>
+  </el-drawer>
+</template>
+
+<script>
+export default {
+  name: 'seePriceDeclaration',
+  data() {
+    const arr2Obj = function (data, keyName, valueName) {
+      return Object.fromEntries(
+        data.map((item) => [item[keyName], item[valueName]])
+      );
+    };
+    const columns = [
+      { key: "id", title: "id", type: "TagSelect", require: true },
+      { key: "status", title: "单据状态" },
+      { key: "priceName", title: "价格名称" },
+      { key: "supplier", title: "供应商" },
+      { key: "supplierName", title: "供应商名称" },
+      { key: "puOrg", title: "采购组织" },
+      { key: "puOrgName", title: "采购组织名称" },
+      { key: "currency", title: "币种" },
+      { key: "currencyName", title: "币种名称" },
+      { key: "explain", title: "价格合理性说明" },
+      { key: "buyer", title: "采购员" },
+      { key: "buyerName", title: "采购员名称" },
+      { key: "puDept", title: "采购部门" },
+      { key: "puDeptName", title: "采购部门名称" },
+      { key: "sourceType", title: "来源单据类型" },
+      { key: "source", title: "来源单据号" },
+      { key: "isEffective", title: "是否已推价格" },
+      { key: "effectiveDate", title: "生效日期" },
+      { key: "file", title: "附件" },
+      { key: "tenantId", title: "租户号" },
+      { key: "revision", title: "乐观锁" },
+      { key: "createByName", title: "创建人名称" },
+      { key: "updateByName", title: "更新人" },
+      { key: "delFlag", title: "删除标记" }
+    ];
+    const initColumns = () =>
+      columns.map((column) => {
+        const clearable = column.clearable || true;
+        if (column.type === "InputNumber") {
+          return {
+            ...column,
+            clearable,
+            config: { controlsPosition: "right" },
+          };
+        }
+        if (column.type === "DatePicker") {
+          return {
+            ...column,
+            clearable,
+            config: { type: "date" },
+          };
+        }
+        return {
+          ...column,
+          clearable,
+        };
+      });
+    const initParams = () => arr2Obj(initColumns(), "key", "value");
+    // 标签页列
+    const tabColumns = [
+      {
+        key: 'materialBasic',
+        title: '物料信息表',
+        tableColumns: [],
+      },
+      {
+        key: 'enforcementScope',
+        title: '执行范围组织',
+        tableColumns: [],
+      },
+    ]
+    const initTabColumns = () => tabColumns;
+    return {
+      visible: false,
+      // 主数据表头
+      columns: initColumns(),
+      // 表单
+      params: initParams(),
+      options: [
+        {
+          value: "选项1",
+          label: "黄金糕",
+        },
+        {
+          value: "选项2",
+          label: "双皮奶",
+        },
+        {
+          value: "选项3",
+          label: "蚵仔煎",
+        },
+        {
+          value: "选项4",
+          label: "龙须面",
+        },
+        {
+          value: "选项5",
+          label: "北京烤鸭",
+        },
+      ],
+      // 标签页表格列
+      tabColumns: initTabColumns(),
+      // 标签页激活
+      tabName: "materialBasic",
+      // 标签页对应数据
+      tabTableDatas: {
+        materialBasic: [],
+        enforcementScope: [],
+      },
+    }
+  },
+  methods: {
+    setVisible(prop) {
+      this.visible = prop;
+    },
+    handleClose() { },
+    handleClick() { },
+  },
+  created() { },
+}
+</script>

+ 257 - 0
src/views/purchase/purchase-content/add-purchase-task.vue

@@ -0,0 +1,257 @@
+<script>
+export default {
+  name: "AddPurchaseTaskDrawer",
+  data() {
+    const arr2Obj = function (data, keyName, valueName) {
+      return Object.fromEntries(
+        data.map((item) => [item[keyName], item[valueName]])
+      );
+    };
+    const pickerOptions = {
+      disabledDate(time) {
+        return time.getTime() > Date.now();
+      },
+      shortcuts: [
+        {
+          text: "今天",
+          onClick(picker) {
+            picker.$emit("pick", new Date());
+          },
+        },
+        {
+          text: "昨天",
+          onClick(picker) {
+            const date = new Date();
+            date.setTime(date.getTime() - 3600 * 1000 * 24);
+            picker.$emit("pick", date);
+          },
+        },
+        {
+          text: "一周前",
+          onClick(picker) {
+            const date = new Date();
+            date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
+            picker.$emit("pick", date);
+          },
+        },
+      ],
+    };
+    const columns = [
+      {
+        title: "采购组织",
+        key: "puOrg",
+        type: "TagSelect",
+        value: [],
+        required: true,
+      },
+      { title: "需求来源", key: "source", type: "Input", value: "采购创建" },
+      { title: "采购员", key: "buyer", value: [], type: "TagSelect" },
+      { title: "交易类型", key: "billYpe", value: [], type: "TagSelect" },
+      { title: "物料编码", key: "material", type: "Input", required: true },
+      {
+        title: "物料名称",
+        key: "materialName",
+        type: "TagSelect",
+        value: [],
+        required: true,
+      },
+      {
+        title: "物料/物料描述",
+        key: "materialDesc",
+        type: "TagSelect",
+        value: [],
+        required: true,
+      },
+      { title: "生产厂家", key: "manufacturer", type: "Input" },
+      { title: "收货客户", key: "customer", type: "TagSelect", value: [] },
+      {
+        title: "采购单位",
+        key: "puUnit",
+        type: "TagSelect",
+        value: [],
+        required: true,
+      },
+      {
+        title: "采购数量",
+        key: "puQty",
+        type: "InputNumber",
+        required: true,
+      },
+      {
+        title: "需求时间",
+        key: "demandDate",
+        type: "DatePicker",
+        config: { type: "date", pickerOptions: pickerOptions },
+      },
+      { title: "项目名称", key: "projectName", type: "TagSelect", value: [] },
+      { title: "需求人", key: "demandPersonal", type: "TagSelect", value: [] },
+      {
+        title: "需求组织",
+        key: "demandOrg",
+        type: "TagSelect",
+        value: [],
+        require: true,
+      },
+      { title: "需求部门", key: "demandDept", type: "TagSelect", value: [] },
+      { title: "建议供应商", key: "supplier", type: "TagSelect", value: [] },
+      { title: "收货人", key: "a", type: "TagSelect", value: [] },
+      { title: "收货组织", key: "b", type: "TagSelect", value: [] },
+      { title: "收货人联系方式", key: "c", type: "Input" },
+      { title: "收货地址", key: "d", type: "Input" },
+      { title: "收货仓库", key: "e", type: "TagSelect", value: [] },
+      {
+        title: "指定供应商",
+        key: "assignSupplier",
+        type: "TagSelect",
+        value: [],
+      },
+      { title: "单位", key: "unit", type: "TagSelect", value: [] },
+      { title: "收货地址", key: "f", type: "TagSelect", value: [] },
+    ];
+    const initColumns = () => columns;
+    const initParams = () => arr2Obj(initColumns(), "key", "value");
+    return {
+      visible: false,
+      columns: initColumns(),
+      params: initParams(),
+      options: [
+        {
+          value: "选项1",
+          label: "黄金糕",
+        },
+        {
+          value: "选项2",
+          label: "双皮奶",
+        },
+        {
+          value: "选项3",
+          label: "蚵仔煎",
+        },
+        {
+          value: "选项4",
+          label: "龙须面",
+        },
+        {
+          value: "选项5",
+          label: "北京烤鸭",
+        },
+      ],
+    };
+  },
+  computed: {},
+  watch: {},
+  methods: {
+    setVisible(prop) {
+      this.visible = prop;
+    },
+  },
+  created() {
+    console.log(this.params);
+  },
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<template>
+  <el-drawer
+    title="我是标题"
+    direction="btt"
+    size="100%"
+    :with-header="false"
+    :visible.sync="visible"
+    :before-close="handleClose"
+  >
+    <el-form
+      size="mini"
+      label-position="right"
+      label-width="125px"
+      :model="params"
+    >
+      <el-card
+        :body-style="{
+          padding: '20px',
+          display: 'flex',
+          'flex-wrap': 'wrap',
+        }"
+        style="margin: 10px"
+      >
+        <el-form-item
+          v-for="(column, index) in columns"
+          :key="index"
+          :prop="column.key"
+          :label="column.title"
+          :required="column.required"
+          style="width: 33%"
+        >
+          <el-input
+            v-if="column.type === 'Input'"
+            v-model="params[column.key]"
+            :placeholder="column.placeholder"
+            style="width: 90%"
+          ></el-input>
+          <el-input-number
+            v-if="column.type === 'InputNumber'"
+            v-model="params[column.key]"
+            controls-position="right"
+            :placeholder="column.placeholder"
+            style="width: 90%"
+          ></el-input-number>
+          <el-select
+            v-if="column.type === 'TagSelect'"
+            v-model="params[column.key]"
+            multiple
+            clearable
+            collapse-tags
+            :placeholder="column.placeholder"
+            style="width: 90%"
+          >
+            <template #prefix>
+              <el-icon
+                class="el-icon-s-operation"
+                style="cursor: pointer"
+                @click.stop="$message.info(234)"
+              ></el-icon>
+            </template>
+            <el-option
+              v-for="item in options"
+              :key="item.value"
+              :label="item.label"
+              :value="item.value"
+            >
+            </el-option>
+          </el-select>
+          <el-date-picker
+            v-if="column.type === 'DatePicker'"
+            v-model="params[column.key]"
+            :type="column.config.type"
+            :placeholder="column.placeholder"
+            :picker-options="column.pickerOptions"
+            style="width: 90%"
+          >
+          </el-date-picker>
+        </el-form-item>
+      </el-card>
+      <el-card
+        :body-style="{
+          'text-align': 'right',
+          padding: '10px 20px',
+        }"
+        style="
+          position: fixed;
+          left: 0;
+          bottom: 0;
+          margin: 10px;
+          width: calc(100% - 20px);
+        "
+      >
+        <el-button size="mini" @click="setVisible(false)">取消</el-button>
+        <el-button size="mini" type="info" @click="setVisible(false)"
+          >保存并新增</el-button
+        >
+        <el-button size="mini" type="danger" @click="setVisible(false)"
+          >保存</el-button
+        >
+      </el-card>
+    </el-form>
+  </el-drawer>
+</template>

+ 386 - 0
src/views/purchase/purchase-content/direct-sourcing.vue

@@ -0,0 +1,386 @@
+<script>
+export default {
+  name: "DirectSourcing",
+  components: {},
+  data() {
+    const tableColumns = [
+      { title: "价格来源", key: "a" },
+      { title: "供应商", key: "b" },
+      { title: "采购组织", key: "c" },
+      { title: "客户", key: "d" },
+      { title: "价格类型", key: "e" },
+      { title: "配送价", key: "f" },
+      { title: "币种", key: "g" },
+      { title: "价格有效期", key: "h" },
+      { title: "税率", key: "i" },
+      { title: "协议单价", key: "j" },
+      {
+        title: "未执行量",
+        key: "k",
+        edit: true,
+        editConfig: { type: "InputNumber", controlsPosition: "right" },
+      },
+      {
+        title: "采购量",
+        key: "l",
+        edit: true,
+        editConfig: { type: "InputNumber", controlsPosition: "right" },
+      },
+      {
+        title: "计划到货",
+        key: "m",
+        edit: true,
+        editConfig: { type: "DatePicker", showType: "date" },
+      },
+      {
+        title: "期望到货",
+        key: "n",
+        edit: true,
+        editConfig: { type: "DatePicker", showType: "date" },
+      },
+      {
+        title: "备注",
+        key: "o",
+        edit: true,
+        editConfig: { type: "Textarea" },
+      },
+    ];
+    const initTableColumns = () => tableColumns;
+    return {
+      tableColumns: initTableColumns(),
+      data: [
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+      ],
+      page: { pageNum: 1, pageSize: 25 },
+      total: 0,
+      pageSizes: [25, 50, 100],
+    };
+  },
+  computed: {},
+  watch: {
+    data: {
+      handler: function (n) {
+        console.log(n);
+      },
+      deep: true,
+    },
+  },
+  methods: {},
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>
+
+<template>
+  <div class="directSourcing" style="height: 50vh">
+    <el-table :data="data" height="calc(50vh)" style="width: 100%">
+      <el-table-column
+        v-for="(column, index) in tableColumns"
+        :key="index"
+        :prop="column.key"
+        :label="column.title"
+        :width="column.width || 180"
+        :show-overflow-tooltip="column.showOverflowTooltip || true"
+      >
+        <template slot-scope="scope">
+          <el-input-number
+            v-if="column.edit && column.editConfig.type === 'InputNumber'"
+            v-model="scope.row[column.key]"
+            :controls-position="column.editConfig.controlsPosition"
+            :min="column.editConfig.min"
+            :max="column.editConfig.max"
+            :size="column.editConfig.size || 'mini'"
+            :placeholder="column.editConfig.placeholder"
+            style="width: 90%"
+          ></el-input-number>
+          <el-date-picker
+            v-else-if="column.edit && column.editConfig.type === 'DatePicker'"
+            v-model="scope.row[column.key]"
+            :type="column.editConfig.showType"
+            :picker-options="column.editConfig.pickerOptions"
+            :size="column.editConfig.size || 'mini'"
+            :placeholder="column.editConfig.placeholder"
+            style="width: 90%"
+          ></el-date-picker>
+          <el-input
+            v-else-if="column.edit && column.editConfig.type === 'Textarea'"
+            v-model="scope.row[column.key]"
+            type="textarea"
+            :autosize="column.editConfig.autosize || true"
+            :size="column.editConfig.size || 'mini'"
+            style="width: 90%"
+          ></el-input>
+          <span v-else>{{ scope.row[column.key] }}</span>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :total="total"
+      :page-sizes="pageSizes"
+      :page-size="page.pageSize"
+      :current-page="page.pageNum"
+      hide-on-single-page
+      layout="total, prev, pager, next, sizes, jumper"
+    >
+    </el-pagination>
+  </div>
+</template>
+
+<style scoped></style>

+ 404 - 0
src/views/purchase/purchase-content/index.vue

@@ -0,0 +1,404 @@
+<script>
+import { taskList } from "@/api/business/purchase/purchase-task";
+// import AddPurchaseTaskDrawer from "./add-purchase-task.vue";
+// import SeePurchaseTaskDrawer from "./see-purchase-task.vue";
+// import DirectSourcingTable from "./direct-sourcing.vue";
+export default {
+  name: "PuchaseTask",
+  components: {
+    // AddPurchaseTaskDrawer,
+    // SeePurchaseTaskDrawer,
+    // DirectSourcingTable,
+  },
+  data() {
+    const arr2Obj = function (data, keyName, valueName) {
+      return Object.fromEntries(
+        data.map((item) => [item[keyName], item[valueName]])
+      );
+    };
+    const searchColumns = [
+      { title: "采购组织", key: "", type: "TagSelect" },
+      { title: "客户", key: "", type: "TagSelect" },
+      { title: "价格来源", key: "material", type: "Select" },
+      { title: "主无税单价", key: "materialDesc", type: "Input" },
+      { title: "生产厂商", key: "", type: "Input" },
+      { title: "供应商", key: "", type: "TagSelect" },
+      { title: "采购员", key: "", type: "TagSelect" },
+      { title: "价格日期区间", key: "", type: "DatePicker" },
+      { title: "物料", key: "", type: "TagSelect" },
+      { title: "换算率", key: "", type: "Input" },
+    ];
+    const initSearchColumns = () => searchColumns;
+    const initSearchParams = () => arr2Obj(initSearchColumns(), "key", "value");
+    const tableColumns = [
+      {
+        title: "效期预警",
+        key: "materialName",
+      },
+      {
+        title: "采购组织",
+        key: "materialName",
+      },
+      {
+        title: "物料编码",
+        key: "materialName",
+      },
+      {
+        title: "物料一级分类",
+        key: "materialName",
+      },
+      {
+        title: "生产厂家",
+        key: "materialName",
+      },
+      {
+        title: "物料名称",
+        key: "materialName",
+      },
+      {
+        title: "物料型号",
+        key: "materialName",
+      },
+      {
+        title: "物料规格",
+        key: "materialName",
+      },
+      {
+        title: "供应商",
+        key: "materialName",
+      },
+      {
+        title: "客户",
+        key: "materialName",
+      },
+      {
+        title: "主含税单价",
+        key: "materialName",
+      },
+      {
+        title: "主单位",
+        key: "materialName",
+      },
+      {
+        title: "价格生效日期",
+        key: "materialName",
+      },
+      {
+        title: "价格失效日期",
+        key: "materialName",
+      },
+      {
+        title: "采购员",
+        key: "materialName",
+      },
+      {
+        title: "来源单据号",
+        key: "materialName",
+      },
+      {
+        title: "有效状态",
+        key: "materialName",
+      },
+      {
+        title: "启用状态",
+        key: "materialName",
+      },
+      {
+        title: "换算率",
+        key: "materialName",
+      },
+      {
+        title: "创建时间",
+        key: "materialName",
+      },
+      {
+        title: "物料启用状态",
+        key: "materialName",
+      },
+      {
+        title: "采购需求单号",
+        key: "materialName",
+      },
+      {
+        title: "含税/无税优先",
+        key: "materialName",
+      },
+      {
+        title: "最新操作人名称",
+        key: "materialName",
+      },
+      {
+        title: "最新操作时间",
+        key: "materialName",
+      },
+      {
+        title: "操作类型",
+        key: "materialName",
+      },
+    ];
+    const initTableColumns = () => tableColumns;
+    const initTableData = () => {
+      const data = [];
+      for (let index = 0; index < 50; index++) {
+        data.push({ materialName: index });
+      }
+      return data;
+    };
+    return {
+      loading: false,
+      isSimpleSearch: true,
+      searchColumns: initSearchColumns(),
+      searchParams: {
+        isAsc: "desc",
+        reasonable: "",
+        orderByColumn: "",
+        ...initSearchParams(),
+      },
+      tableColumns: initTableColumns(),
+      tableData: initTableData(),
+      page: { pageNum: 1, pageSize: 25 },
+      total: 0,
+      pageSizes: [25, 50, 100],
+    };
+  },
+  computed: {
+    showSearchColumns() {
+      return this.isSimpleSearch
+        ? this.searchColumns.slice(0, 4)
+        : this.searchColumns;
+    },
+  },
+  //   watch: {
+  //     $route: {
+  //       handler: function (route) {
+  //         this.redirect = route.query && route.query.redirect;
+  //       },
+  //       immediate: true,
+  //     },
+  //   },
+  created() {
+    // this.fetchTaskList();
+    console.log(this.tableData);
+  },
+  methods: {
+    async fetchTaskList() {
+      this.loading = true;
+      try {
+        const { code, msg, rows, total } = await taskList({
+          ...this.page,
+          ...this.searchParams,
+        });
+        if (code === 200) {
+          this.total = total;
+          this.tableData = rows;
+          this.$notify.success({ title: msg });
+        } else {
+          this.$notify.warning({ title: msg });
+        }
+      } catch (err) {
+        this.$notify.error({ title: "error", message: err });
+      } finally {
+        this.loading = false;
+      }
+    },
+    handleSearchChange() {
+      this.isSimpleSearch = !this.isSimpleSearch;
+      this.$notify.info({
+        title: this.isSimpleSearch ? "Simple Search" : "All Search",
+      });
+    },
+    handleSizeChange() {},
+    handleCurrentChange() {},
+    handleOpenAddDrawer() {
+      const { setVisible } = this.$refs.addDrawerFef;
+      setVisible(true);
+      setTimeout(() => {
+        this.$notify.info("Open Add Drawer");
+      }, 250);
+    },
+    handleOpenSeeDrawer() {
+      const { setVisible } = this.$refs.seeDrawerFef;
+      setVisible(true);
+      setTimeout(() => {
+        this.$notify.info("Open See Drawer");
+      }, 250);
+    },
+  },
+};
+</script>
+
+<template>
+  <el-card
+    v-loading="loading"
+    style="width: calc(100% - 24px); height: 100%; margin: 10px"
+    :body-style="{ padding: 0 }"
+  >
+    <!-- <AddPurchaseTaskDrawer ref="addDrawerFef"></AddPurchaseTaskDrawer> -->
+    <!-- <SeePurchaseTaskDrawer ref="seeDrawerFef"></SeePurchaseTaskDrawer> -->
+    <el-form
+      size="mini"
+      label-position="right"
+      label-width="100px"
+      :model="searchParams"
+      style="padding: 20px 0 0 0"
+    >
+      <el-row :gutter="24">
+        <el-col :span="22">
+          <el-row :gutter="20">
+            <el-col
+              v-for="column in showSearchColumns"
+              :key="column.title"
+              :xl="6"
+              :lg="6"
+              :md="8"
+              :sm="12"
+              :xs="24"
+            >
+              <el-form-item :prop="column.key" :label="column.title">
+                <el-input
+                  v-model="searchParams[column.key]"
+                  :placeholder="column.placeholder"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-col>
+        <el-col :span="2">
+          <el-row :gutter="24">
+            <el-col :span="24">
+              <el-button type="primary" size="mini">搜索</el-button>
+            </el-col>
+            <el-col
+              v-show="!isSimpleSearch"
+              :span="24"
+              style="margin: 10px 0 0"
+            >
+              <el-button size="mini">重置</el-button>
+            </el-col>
+          </el-row>
+        </el-col>
+      </el-row>
+    </el-form>
+    <el-divider>
+      <i
+        :class="isSimpleSearch ? 'el-icon-arrow-down' : 'el-icon-arrow-up'"
+        style="cursor: pointer"
+        @click="handleSearchChange"
+      ></i>
+    </el-divider>
+    <!-- <el-row :gutter="24" style="padding: 0 20px">
+      <el-col :span="6">123</el-col>
+      <el-col :span="18" style="text-align: right">
+        <el-button
+          size="mini"
+          type="danger"
+          style="margin: 0 10px 0 0"
+          @click="handleOpenAddDrawer"
+        >
+          新增
+        </el-button>
+        <el-dropdown placement="bottom-start">
+          <el-button size="mini" style="margin: 0 10px 0 0">
+            发布
+            <i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item>发布寻源</el-dropdown-item>
+            <el-dropdown-item>发布委托</el-dropdown-item>
+            <el-dropdown-item>采购方案</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+
+        <el-dropdown placement="bottom-start">
+          <el-button
+            size="mini"
+            style="border-right: 0; border-radius: 3px 0 0 3px"
+          >
+            首次协议直采
+            <i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item>首次协议直采</el-dropdown-item>
+            <el-dropdown-item>余量协议直采</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+        <el-dropdown placement="bottom-start">
+          <el-button size="mini" style="border-right: 0; border-radius: 0">
+            跟单采购
+            <i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item>按合同(普通)取价</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+        <el-button size="mini" style="border-right: 0; border-radius: 0">
+          Excel导出
+        </el-button>
+        <el-button
+          size="mini"
+          style="margin: 0; border-right: 0; border-radius: 0"
+        >
+          退回请购
+        </el-button>
+        <el-dropdown placement="bottom-start">
+          <el-button size="mini" style="border-right: 0; border-radius: 0">
+            清单采购
+            <i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item>商超匹配下单</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+        <el-button
+          size="mini"
+          disabled
+          style="margin: 0 10px 0 0; border-radius: 0 3px 3px 0"
+        >
+          一键合同下单
+        </el-button>
+        <el-button size="mini" style="margin: 0 10px 0 0">删除</el-button>
+        <el-dropdown placement="bottom-end">
+          <el-button size="mini">
+            更多
+            <i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item>抢单</el-dropdown-item>
+            <el-dropdown-item>批量修改收货组织</el-dropdown-item>
+            <el-dropdown-item>批量退回</el-dropdown-item>
+            <el-dropdown-item>退回需求申请</el-dropdown-item>
+            <el-dropdown-item>刷新缓存</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+      </el-col>
+    </el-row> -->
+    <el-table
+      @row-dblclick="handleOpenSeeDrawer"
+      :data="tableData"
+      size="mini"
+      style="width: 100%; margin: 20px 0 0 0"
+    >
+      <el-table-column
+        v-for="(column, index) in tableColumns"
+        :key="index"
+        :prop="column.key"
+        :label="column.title"
+        :width="column.width || 180"
+        :show-overflow-tooltip="column.showOverflowTooltip || true"
+      >
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :total="total"
+      :page-sizes="pageSizes"
+      :page-size="page.pageSize"
+      :current-page="page.pageNum"
+      hide-on-single-page
+      layout="total, prev, pager, next, sizes, jumper"
+    >
+    </el-pagination>
+    <!-- <DirectSourcingTable></DirectSourcingTable> -->
+  </el-card>
+</template>

+ 158 - 0
src/views/purchase/purchase-content/see-purchase-task.vue

@@ -0,0 +1,158 @@
+<script>
+export default {
+  name: "SeePurchaseTaskDrawer",
+  data() {
+    const arr2Obj = function (data, keyName, valueName) {
+      return Object.fromEntries(
+        data.map((item) => [item[keyName], item[valueName]])
+      );
+    };
+    const columns = [
+      {
+        title: "采购组织",
+        key: "puOrg",
+        type: "TagSelect",
+        value: [],
+        required: true,
+      },
+      { title: "需求来源", key: "source", type: "Input", value: "采购创建" },
+      { title: "采购员", key: "buyer", value: [], type: "TagSelect" },
+      { title: "交易类型", key: "billYpe", value: [], type: "TagSelect" },
+      { title: "物料编码", key: "material", type: "Input", required: true },
+      {
+        title: "物料名称",
+        key: "materialName",
+        type: "TagSelect",
+        value: [],
+        required: true,
+      },
+      {
+        title: "物料/物料描述",
+        key: "materialDesc",
+        type: "TagSelect",
+        value: [],
+        required: true,
+      },
+      { title: "生产厂家", key: "manufacturer", type: "Input" },
+      { title: "收货客户", key: "customer", type: "TagSelect", value: [] },
+      {
+        title: "采购单位",
+        key: "puUnit",
+        type: "TagSelect",
+        value: [],
+        required: true,
+      },
+      {
+        title: "采购数量",
+        key: "puQty",
+        type: "InputNumber",
+        required: true,
+      },
+      {
+        title: "需求时间",
+        key: "demandDate",
+        type: "DatePicker",
+        config: { type: "date" },
+      },
+      { title: "项目名称", key: "projectName", type: "TagSelect", value: [] },
+      { title: "需求人", key: "demandPersonal", type: "TagSelect", value: [] },
+      {
+        title: "需求组织",
+        key: "demandOrg",
+        type: "TagSelect",
+        value: [],
+        require: true,
+      },
+      { title: "需求部门", key: "demandDept", type: "TagSelect", value: [] },
+      { title: "建议供应商", key: "supplier", type: "TagSelect", value: [] },
+      { title: "收货人", key: "a", type: "TagSelect", value: [] },
+      { title: "收货组织", key: "b", type: "TagSelect", value: [] },
+      { title: "收货人联系方式", key: "c", type: "Input" },
+      { title: "收货地址", key: "d", type: "Input" },
+      { title: "收货仓库", key: "e", type: "TagSelect", value: [] },
+      {
+        title: "指定供应商",
+        key: "assignSupplier",
+        type: "TagSelect",
+        value: [],
+      },
+      { title: "单位", key: "unit", type: "TagSelect", value: [] },
+      { title: "收货地址", key: "f", type: "TagSelect", value: [] },
+    ];
+    const initColumns = () => columns;
+    const initParams = () => arr2Obj(initColumns(), "key", "value");
+    return {
+      visible: false,
+      loading: false,
+      columns: initColumns(),
+      params: initParams(),
+    };
+  },
+  computed: {},
+  watch: {},
+  methods: {
+    setVisible(prop) {
+      this.visible = prop;
+    },
+    async fetchTaskItem() {
+      this.loading = true;
+      try {
+        // do something
+      } catch (err) {
+        this.$notify.error({ title: "error", message: err });
+      } finally {
+        this.loading = false;
+      }
+    },
+  },
+  created() {
+    console.log(this.params);
+  },
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<template>
+  <el-drawer
+    title="我是标题"
+    direction="btt"
+    size="100%"
+    :with-header="false"
+    :visible.sync="visible"
+    :before-close="handleClose"
+  >
+    <el-card
+      :body-style="{
+        padding: '20px',
+        display: 'flex',
+        'flex-wrap': 'wrap',
+      }"
+      style="margin: 10px"
+    >
+      <el-descriptions title="采购任务详情" direction="vertical" :column="3">
+        <el-descriptions-item
+          v-for="(column, index) in columns"
+          :key="index"
+          :label="column.title"
+        >
+          {{ params[column.key] }}
+        </el-descriptions-item>
+      </el-descriptions>
+    </el-card>
+    <el-card
+      :body-style="{
+        'text-align': 'right',
+        padding: '10px 20px',
+      }"
+      style="
+        position: fixed;
+        left: 0;
+        bottom: 0;
+        margin: 10px;
+        width: calc(100% - 20px);
+      "
+    >
+      <el-button size="mini" @click="setVisible(false)">返回</el-button>
+    </el-card>
+  </el-drawer>
+</template>

+ 314 - 0
src/views/purchase/purchase-contract/add-purchase-contract.vue

@@ -0,0 +1,314 @@
+<script>
+import { add } from "@/api/business/purchase/purchase-contract";
+import { arr2obj } from "@/utils/data-transform";
+import {
+  initDicts,
+  initRules,
+  initParams,
+  initComponents,
+} from "@/utils/init-something";
+import { initColumns } from "./config/add";
+
+export default {
+  name: "AddPurchaseContractDrawer",
+  components: initComponents(initColumns()),
+  dicts: initDicts(initColumns()),
+  data() {
+    return {
+      visible: true,
+      columns: initColumns(),
+      rules: initRules(initColumns()),
+      params: initParams(initColumns()),
+      tabColumns: initTabColumns(),
+      tabName: "first",
+      tabTableDatas: {
+        first: [],
+        second: [],
+        third: [],
+        fourth: [],
+        fifth: [],
+      },
+      currentComponent: { name: "", title: "", value: "", row: {} },
+    };
+  },
+  computed: {},
+  watch: {},
+  methods: {
+    beforeOpen() {
+      const { deptName, nickName, orgName } = this.$store.state.user;
+      this.params.puOrg = orgName;
+      this.params.buyer = nickName;
+      this.params.puDept = deptName;
+    },
+    setVisible(prop) {
+      this.visible = prop;
+    },
+    addTableRow() {},
+    cancel() {
+      this.setVisible(false);
+      this.params = arr2obj(this.columns, "key", "value");
+    },
+    sava() {
+      this.setVisible(false);
+    },
+    async submitSava() {
+      console.log(this.params);
+      return;
+      try {
+        const res = await add(this.params);
+        console.log("res", res);
+      } catch (err) {
+        this.$notify.error({ title: "error", message: err });
+      } finally {
+        this.setVisible(false);
+      }
+    },
+    //
+    openAsyncInputDialog(prop, type) {
+      try {
+        const {
+          key,
+          title,
+          config: { componentName },
+        } = prop;
+        this.currentComponent.row = prop;
+        this.currentComponent.title = title;
+        this.currentComponent.name = componentName;
+        if (type === "change") {
+          this.currentComponent.value = this.params[key];
+        }
+        if (type === "click") {
+          this.currentComponent.value = "";
+        }
+        this.$nextTick(() => {
+          const { setVisible } = this.$refs[componentName];
+          setVisible(true);
+        });
+      } catch (err) {
+        this.$notify.error({ title: "error", message: err });
+      } finally {
+      }
+    },
+    updateParams(prop) {
+      const {
+        config: { dataMapping },
+      } = this.currentComponent.row;
+      for (let key in dataMapping) {
+        this.params[key] = prop[dataMapping[key]];
+      }
+    },
+  },
+  created() {
+    // console.log("this,", initComponents(initColumns()));
+  },
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<template>
+  <el-drawer
+    direction="btt"
+    size="100%"
+    :with-header="false"
+    :visible.sync="visible"
+    @open="beforeOpen"
+  >
+    <el-card
+      :body-style="{
+        padding: '20px',
+        display: 'flex',
+        'flex-wrap': 'wrap',
+      }"
+      style="margin: 10px"
+    >
+      <div
+        slot="header"
+        style="
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
+        "
+      >
+        <h3>新增</h3>
+        <div style="text-align: right">
+          <el-button size="mini" @click="cancel">取消</el-button>
+          <el-button size="mini" type="danger" @click="sava">保存</el-button>
+          <el-button size="mini" type="info" @click="submitSava">
+            保存并新增
+          </el-button>
+        </div>
+      </div>
+      <component
+        v-if="currentComponent.name"
+        :is="currentComponent.name"
+        :ref="currentComponent.name"
+        :title="currentComponent.title"
+        :value="currentComponent.value"
+        @confirm="updateParams"
+      ></component>
+      <el-row>
+        <el-form
+          size="mini"
+          label-position="right"
+          label-width="135px"
+          :model="params"
+          :rules="rules"
+        >
+          <el-col
+            v-for="(column, index) in columns"
+            :key="index"
+            :span="column.span || 6"
+          >
+            <el-form-item :prop="column.key" :label="column.title">
+              <el-input
+                v-if="column.type === 'Input'"
+                v-model="params[column.key]"
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
+                :disabled="column.disabled"
+                style="width: 100%"
+              ></el-input>
+              <el-input
+                v-if="column.type === 'InputDialog'"
+                v-model="params[column.key]"
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
+                :disabled="column.disabled"
+                style="width: 100%"
+                @blur="openAsyncInputDialog(column, 'change')"
+                @change="openAsyncInputDialog(column, 'change')"
+              >
+                <template #suffix>
+                  <el-icon
+                    class="el-icon-s-operation"
+                    style="cursor: pointer"
+                    @click.native.stop="openAsyncInputDialog(column, 'click')"
+                  ></el-icon>
+                </template>
+              </el-input>
+              <el-input
+                v-if="column.type === 'Textarea'"
+                v-model="params[column.key]"
+                type="textarea"
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
+                :disabled="column.disabled"
+                style="width: 100%"
+              ></el-input>
+              <el-input-number
+                v-if="column.type === 'InputNumber'"
+                v-model="params[column.key]"
+                :controls-position="column.config.controlsPosition"
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
+                :disabled="column.disabled"
+                style="width: 100%"
+              ></el-input-number>
+              <el-select
+                v-if="column.type === 'Select'"
+                v-model="params[column.key]"
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
+                :disabled="column.disabled"
+                style="width: 100%"
+              >
+                <el-option
+                  v-for="item in dict.type[column.config.optionsName]"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+              <el-select
+                v-if="column.type === 'TagSelect'"
+                v-model="params[column.key]"
+                multiple
+                clearable
+                collapse-tags
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
+                :disabled="column.disabled"
+                style="width: 100%"
+              >
+                <template #prefix>
+                  <el-icon
+                    class="el-icon-s-operation"
+                    style="cursor: pointer"
+                    @click.stop="$message.info(234)"
+                  ></el-icon>
+                </template>
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+              <el-date-picker
+                v-if="column.type === 'DatePicker'"
+                v-model="params[column.key]"
+                :type="column.config.type"
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
+                :disabled="column.disabled"
+                :picker-options="column.pickerOptions"
+                style="width: 100%"
+              >
+              </el-date-picker>
+              <el-upload
+                v-if="column.type === 'Upload'"
+                :file-list="params[column.key]"
+                :disabled="column.disabled"
+                drag
+                action="https://jsonplaceholder.typicode.com/posts/"
+                multiple
+              >
+                <i class="el-icon-upload"></i>
+                <div class="el-upload__text">
+                  将文件拖到此处,或<em>点击上传</em>
+                </div>
+                <div class="el-upload__tip" slot="tip">
+                  只能上传jpg/png文件,且不超过500kb
+                </div>
+              </el-upload>
+            </el-form-item>
+          </el-col>
+        </el-form>
+      </el-row>
+    </el-card>
+    <el-card
+      :body-style="{
+        padding: '20px',
+        display: 'flex',
+        'flex-wrap': 'wrap',
+        position: 'relative',
+      }"
+      style="margin: 10px"
+    >
+      <el-tabs v-model="tabName" @tab-click="handleClick" style="width: 100%">
+        <el-tab-pane
+          v-for="(column, index) in tabColumns"
+          :key="index"
+          :label="column.title"
+          :name="column.key"
+        >
+          <el-table :data="tabTableDatas[column.key]" style="width: 100%">
+            <el-table-column
+              v-for="(cColumn, cIndex) in column.tableColumns"
+              :key="cIndex"
+              :prop="cColumn.key"
+              :label="cColumn.title"
+              :width="cColumn.width"
+            >
+            </el-table-column>
+          </el-table>
+        </el-tab-pane>
+      </el-tabs>
+      <el-row style="position: absolute; top: 20px; right: 20px">
+        <el-button size="mini" @click="addTableRow">增行</el-button>
+      </el-row>
+    </el-card>
+  </el-drawer>
+</template>

+ 401 - 0
src/views/purchase/purchase-contract/config/add.js

@@ -0,0 +1,401 @@
+const columns = [
+  {
+    key: "puOrg",
+    title: "采购组织",
+    type: "InputDialog",
+    config: {
+      componentName: "Organization",
+      dataMapping: { puOrg: "deptName" },
+    },
+    require: true,
+  },
+  { key: "code", title: "合同编码", type: "Input" },
+  {
+    key: "lastPuMoney",
+    title: "上年度采购额",
+    type: "Input",
+    require: true,
+  },
+  {
+    key: "buyer",
+    title: "采购员",
+    type: "InputDialog",
+    config: {
+      componentName: "User",
+      dataMapping: {
+        buyer: "userName",
+        puDept: "deptName",
+      },
+    },
+    require: true,
+  },
+  {
+    key: "supplier",
+    title: "供应商",
+    type: "InputDialog",
+    config: {
+      componentName: "Supplier",
+      dataMapping: { supplier: "name" },
+    },
+    require: true,
+  },
+  {
+    key: "contractType",
+    title: "合同类型",
+    type: "Select",
+    require: true,
+    config: {
+      optionsName: "purchase_contract_contract_type",
+    },
+  },
+  {
+    key: "puMoneyYear",
+    title: "本年度采购额",
+    type: "Input",
+    require: true,
+  },
+  {
+    key: "puDept",
+    title: "采购部门",
+    type: "InputDialog",
+    config: { componentName: "Department" },
+    require: true,
+  },
+  {
+    key: "supplierTier",
+    title: "供应商层级",
+    type: "Select",
+    require: true,
+    config: {
+      optionsName: "purchase_contract_supplier_tier",
+    },
+  },
+  { key: "contractName", title: "合同名称", type: "Input", require: true },
+  {
+    key: "grossRateAverage",
+    title: "平均毛利率",
+    type: "Input",
+    require: true,
+  },
+  {
+    key: "approveFlow",
+    title: "审批流程",
+    type: "Select",
+    require: true,
+    config: {
+      optionsName: "purchase_contract_approve_flow",
+    },
+  },
+  {
+    key: "consumableClass",
+    title: "耗材类别",
+    type: "Select",
+    require: true,
+    config: {
+      optionsName: "purchase_contract_consumable_class",
+    },
+  },
+  {
+    key: "effectiveDate",
+    title: "合同生效日期",
+    type: "DatePicker",
+    require: true,
+    config: { type: "date" },
+  },
+  {
+    key: "brandGrossRate",
+    title: "同类品牌及毛利率",
+    type: "Input",
+    require: true,
+  },
+  {
+    key: "contractFormat",
+    title: "合同格式",
+    type: "Input",
+    require: true,
+  },
+  {
+    key: "productName",
+    title: "产品类别&名称",
+    type: "Input",
+    require: true,
+  },
+  {
+    key: "endDate",
+    title: "合同终止日期",
+    type: "DatePicker",
+    require: true,
+    config: { type: "date" },
+  },
+  {
+    key: "invoiceTax",
+    title: "发票税率",
+    type: "InputDialog",
+    config: {
+      componentName: "Tax",
+      dataMapping: {
+        invoiceTax: "mattaxesname",
+      },
+    },
+    require: true,
+  },
+  {
+    key: "emergencyDegree",
+    title: "紧急程度",
+    type: "Select",
+    require: true,
+    config: {
+      optionsName: "purchase_contract_emergency_degree",
+    },
+  },
+  { key: "project", title: "项目医院", type: "Input", require: true },
+  {
+    key: "signDate",
+    title: "合同签订日期",
+    type: "DatePicker",
+    require: true,
+    config: { type: "date" },
+  },
+  {
+    key: "deliveryType",
+    title: "交货方式",
+    type: "Select",
+    config: {
+      optionsName: "purchase_contract_delivery_type",
+    },
+  },
+  {
+    key: "source",
+    title: "合同来源",
+    type: "Input",
+    value: "自制",
+    disabled: true,
+  },
+  {
+    key: "contractPartyc",
+    title: "合同丙方",
+    type: "InputDialog",
+    config: {
+      componentName: "Supplier",
+      dataMapping: {
+        contractPartyc: "name",
+      },
+    },
+  },
+  {
+    key: "guaranteePeriodEnd",
+    title: "质保期限",
+    type: "Input",
+    require: true,
+  },
+  {
+    key: "freightMethods",
+    title: "运费承担方式",
+    type: "Select",
+    config: {
+      optionsName: "purchase_contract_freight_methods",
+    },
+  },
+  {
+    key: "signDate",
+    title: "合同创建时间",
+    type: "DatePicker",
+    disabled: true,
+    config: { type: "date" },
+  },
+  {
+    key: "isTarget",
+    title: "是否有指标",
+    type: "Select",
+    require: true,
+    config: {
+      optionsName: "purchase_contract_is_target",
+    },
+  },
+  {
+    key: "contractTarget",
+    title: "合同指标",
+    type: "Input",
+    require: true,
+    placeholder: '当【是否有指标】="有"时,必填',
+  },
+  {
+    key: "exemptionPostageCondtion",
+    title: "包邮条件",
+    type: "Input",
+    placeholder:
+      "当运费承担方式为供应商有条件承担时,该字段必填,填写要求,写明什么条件下供应商承担全部,什么条件下我方承担,什么条件下分别承担",
+    span: 12,
+  },
+  {
+    key: "isRebate",
+    title: "是否有返利",
+    type: "Select",
+    require: true,
+    config: {
+      optionsName: "purchase_contract_is_rebate",
+    },
+  },
+  {
+    key: "rebatePolicy",
+    title: "返利政策",
+    type: "Input",
+    placeholder: '当【是否有返利】="有"时,必填',
+    span: 18,
+  },
+  { key: "externalContract", title: "外部合同号", type: "Input" },
+  {
+    key: "rollbackPolicy",
+    title: "退换货政策",
+    type: "Input",
+    require: true,
+  },
+  {
+    key: "contractContent",
+    title: "合同主要内容",
+    type: "Textarea",
+    require: true,
+    span: 24,
+  },
+  { key: "refusalReasons", title: "拒绝理由", type: "Input", span: 24 },
+  { key: "enquiryCode", title: "询价单号", type: "Input" },
+  { key: "externalFile", title: "对外附件", type: "Upload", span: 24 },
+  { key: "puFile", title: "采购商盖章合同附件", type: "Upload", span: 24 },
+  {
+    key: "supplierFile",
+    title: "供应商盖章合同附件",
+    type: "Upload",
+    span: 24,
+  },
+  { key: "projectCode", title: "项目编号", type: "Input" },
+  { key: "projectName", title: "项目名称", type: "Input" },
+  { key: "area", title: "区域", type: "Input" },
+  { key: "consigneePhone", title: "收货人联系方式", type: "Input" },
+  {
+    key: "paymentAgreement",
+    title: "付款协议",
+    type: "InputDialog",
+    config: {
+      componentName: "PaymentPlan",
+      dataMapping: {
+        buyer: "userName",
+        puDept: "deptName",
+      },
+    },
+    require: true,
+  },
+  {
+    key: "taxPrice",
+    title: "价税合计",
+    type: "InputNumber",
+    config: { controlsPosition: "right" },
+  },
+  {
+    key: "currency",
+    title: "币种",
+    type: "InputDialog",
+    config: {
+      componentName: "Currency",
+      dataMapping: {
+        currency: "name",
+      },
+    },
+    require: true,
+  },
+  { key: "guaranteePeriod", title: "质保期", type: "Input" },
+
+  // { key: "buyerName", title: "采购员名称" },
+  // { key: "supplierName", title: "供应商名称" },
+
+  // { key: "puDeptName", title: "采购部门名称" },
+
+  // { key: "contractPartycName", title: "合同丙方名称" },
+
+  // { key: "currencyName", title: "币种名称" },
+  // { key: "tenantId", title: "租户号" },
+  // { key: "revision", title: "乐观锁" },
+  // { key: "createByName", title: "创建人" },
+  // { key: "updateByName", title: "创建人名称" },
+  // { key: "delFlag", title: "删除标记" },
+];
+
+export const initColumns = () => columns;
+
+const tabColumns = [
+  {
+    title: "物料基本信息",
+    key: "first",
+    tableColumns: [
+      { title: "序号", key: "" },
+      { title: "赠品", key: "" },
+      { title: "物料编码", key: "" },
+      { title: "物料名称", key: "" },
+      { title: "规格", key: "" },
+      { title: "生产厂家", key: "" },
+      { title: "收货客户", key: "" },
+      { title: "品牌", key: "" },
+      { title: "采购数量", key: "" },
+      { title: "采购单位", key: "" },
+      { title: "计价数量", key: "" },
+      { title: "税率%", key: "" },
+      { title: "含税单价", key: "" },
+      { title: "含税金额合计", key: "", width: 150 },
+      { title: "价格有效期(起)", key: "", width: 150 },
+      { title: "计划到货日期", key: "", width: 150 },
+      { title: "来源类型", key: "" },
+      { title: "来源单号", key: "" },
+      { title: "需求单号", key: "" },
+      { title: "备注", key: "" },
+    ],
+  },
+  {
+    title: "合同条款",
+    key: "second",
+    tableColumns: [
+      { title: "序号", key: "" },
+      { title: "条款编码", key: "" },
+      { title: "条款名称", key: "" },
+      { title: "条款内容", key: "" },
+      { title: "变量序号", key: "" },
+      { title: "变量内容", key: "" },
+      { title: "备注", key: "" },
+    ],
+  },
+  {
+    title: "合同费用",
+    key: "third",
+    tableColumns: [
+      { title: "序号", key: "" },
+      { title: "费用编码", key: "" },
+      { title: "费用名称", key: "" },
+      { title: "费用金额", key: "" },
+      { title: "备注", key: "" },
+    ],
+  },
+  {
+    title: "付款协议信息",
+    key: "fourth",
+    tableColumns: [
+      { title: "序号", key: "" },
+      { title: "付款阶段", key: "" },
+      { title: "是否预付款", key: "" },
+      { title: "是否质保金", key: "" },
+      { title: "结算方式", key: "" },
+      { title: "付款起点", key: "" },
+      { title: "付款金额", key: "" },
+      { title: "付款比例%", key: "" },
+      { title: "账期天数", key: "" },
+      { title: "备注", key: "" },
+    ],
+  },
+  {
+    title: "合同执行组织范围",
+    key: "fifth",
+    tableColumns: [
+      { title: "序号", key: "" },
+      { title: "组织名称", key: "" },
+      { title: "组织编码", key: "" },
+    ],
+  },
+];
+export const initTabColumns = () => tabColumns;

+ 386 - 0
src/views/purchase/purchase-contract/direct-sourcing.vue

@@ -0,0 +1,386 @@
+<script>
+export default {
+  name: "DirectSourcing",
+  components: {},
+  data() {
+    const tableColumns = [
+      { title: "价格来源", key: "a" },
+      { title: "供应商", key: "b" },
+      { title: "采购组织", key: "c" },
+      { title: "客户", key: "d" },
+      { title: "价格类型", key: "e" },
+      { title: "配送价", key: "f" },
+      { title: "币种", key: "g" },
+      { title: "价格有效期", key: "h" },
+      { title: "税率", key: "i" },
+      { title: "协议单价", key: "j" },
+      {
+        title: "未执行量",
+        key: "k",
+        edit: true,
+        editConfig: { type: "InputNumber", controlsPosition: "right" },
+      },
+      {
+        title: "采购量",
+        key: "l",
+        edit: true,
+        editConfig: { type: "InputNumber", controlsPosition: "right" },
+      },
+      {
+        title: "计划到货",
+        key: "m",
+        edit: true,
+        editConfig: { type: "DatePicker", showType: "date" },
+      },
+      {
+        title: "期望到货",
+        key: "n",
+        edit: true,
+        editConfig: { type: "DatePicker", showType: "date" },
+      },
+      {
+        title: "备注",
+        key: "o",
+        edit: true,
+        editConfig: { type: "Textarea" },
+      },
+    ];
+    const initTableColumns = () => tableColumns;
+    return {
+      tableColumns: initTableColumns(),
+      data: [
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+      ],
+      page: { pageNum: 1, pageSize: 25 },
+      total: 0,
+      pageSizes: [25, 50, 100],
+    };
+  },
+  computed: {},
+  watch: {
+    data: {
+      handler: function (n) {
+        console.log(n);
+      },
+      deep: true,
+    },
+  },
+  methods: {},
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>
+
+<template>
+  <div class="directSourcing" style="height: 50vh">
+    <el-table :data="data" height="calc(50vh)" style="width: 100%">
+      <el-table-column
+        v-for="(column, index) in tableColumns"
+        :key="index"
+        :prop="column.key"
+        :label="column.title"
+        :width="column.width || 180"
+        :show-overflow-tooltip="column.showOverflowTooltip || true"
+      >
+        <template slot-scope="scope">
+          <el-input-number
+            v-if="column.edit && column.editConfig.type === 'InputNumber'"
+            v-model="scope.row[column.key]"
+            :controls-position="column.editConfig.controlsPosition"
+            :min="column.editConfig.min"
+            :max="column.editConfig.max"
+            :size="column.editConfig.size || 'mini'"
+            :placeholder="column.editConfig.placeholder"
+            style="width: 90%"
+          ></el-input-number>
+          <el-date-picker
+            v-else-if="column.edit && column.editConfig.type === 'DatePicker'"
+            v-model="scope.row[column.key]"
+            :type="column.editConfig.showType"
+            :picker-options="column.editConfig.pickerOptions"
+            :size="column.editConfig.size || 'mini'"
+            :placeholder="column.editConfig.placeholder"
+            style="width: 90%"
+          ></el-date-picker>
+          <el-input
+            v-else-if="column.edit && column.editConfig.type === 'Textarea'"
+            v-model="scope.row[column.key]"
+            type="textarea"
+            :autosize="column.editConfig.autosize || true"
+            :size="column.editConfig.size || 'mini'"
+            style="width: 90%"
+          ></el-input>
+          <span v-else>{{ scope.row[column.key] }}</span>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :total="total"
+      :page-sizes="pageSizes"
+      :page-size="page.pageSize"
+      :current-page="page.pageNum"
+      hide-on-single-page
+      layout="total, prev, pager, next, sizes, jumper"
+    >
+    </el-pagination>
+  </div>
+</template>
+
+<style scoped></style>

+ 264 - 0
src/views/purchase/purchase-contract/index.vue

@@ -0,0 +1,264 @@
+<script>
+import { list } from "@/api/business/purchase/purchase-contract";
+import AddPurchaseContractDrawer from "./add-purchase-contract.vue";
+import SeePurchaseContractDrawer from "./see-purchase-contract.vue";
+// import DirectSourcingTable from "./direct-sourcing.vue";
+export default {
+  name: "PuchaseTask",
+  components: {
+    AddPurchaseContractDrawer,
+    SeePurchaseContractDrawer,
+    // DirectSourcingTable,
+  },
+  data() {
+    const arr2Obj = function (data, keyName, valueName) {
+      return Object.fromEntries(
+        data.map((item) => [item[keyName], item[valueName]])
+      );
+    };
+    const searchColumns = [
+      { title: "合同名称", key: "contractName", type: "Input" },
+    ];
+    const initSearchColumns = () => searchColumns;
+    const initSearchParams = () => arr2Obj(initSearchColumns(), "key", "value");
+    const tableColumns = [
+      { key: "id", title: "id" },
+      { key: "puOrg", title: "采购组织" },
+      { key: "puOrgName", title: "采购组织名称" },
+      { key: "code", title: "合同编码" },
+      { key: "lastPuMoney", title: "上年度采购额" },
+      { key: "buyer", title: "采购员" },
+      { key: "buyerName", title: "采购员名称" },
+      { key: "supplier", title: "供应商" },
+      { key: "supplierName", title: "供应商名称" },
+      { key: "contractType", title: "合同类型" },
+      { key: "puMoneyYear", title: "本年度采购额" },
+      { key: "puDept", title: "采购部门" },
+      { key: "puDeptName", title: "采购部门名称" },
+      { key: "supplierTier", title: "供应商层级" },
+      { key: "contractName", title: "合同名称" },
+      { key: "grossRateAverage", title: "平均毛利率" },
+      { key: "approveFlow", title: "审批流程" },
+      { key: "consumableClass", title: "耗材类别" },
+      { key: "effectiveDate", title: "合同生效日期" },
+      { key: "brandGrossRate", title: "同类品牌及毛利率" },
+      { key: "contractFormat", title: "合同格式" },
+      { key: "productName", title: "产品类别&名称" },
+      { key: "endDate", title: "合同终止日期" },
+      { key: "invoiceTax", title: "发票税率" },
+      { key: "emergencyDegree", title: "紧急程度" },
+      { key: "project", title: "项目医院" },
+      { key: "signDate", title: "合同签订日期" },
+      { key: "deliveryType", title: "交货方式" },
+      { key: "source", title: "合同来源" },
+      { key: "contractPartyc", title: "合同丙方" },
+      { key: "contractPartycName", title: "合同丙方名称" },
+      { key: "guaranteePeriodEnd", title: "质保期限" },
+      { key: "freightMethods", title: "运费承担方式" },
+      { key: "isTarget", title: "是否有指标" },
+      { key: "contractTarget", title: "合同指标" },
+      { key: "exemptionPostageCondtion", title: "包邮条件" },
+      { key: "isRebate", title: "是否有返利" },
+      { key: "rebatePolicy", title: "返利政策" },
+      { key: "externalContract", title: "外部合同号" },
+      { key: "rollbackPolicy", title: "退换货政策" },
+      { key: "contractContent", title: "合同主要内容" },
+      { key: "refusalReasons", title: "拒绝理由" },
+      { key: "enquiryCode", title: "询价单号" },
+      { key: "externalFile", title: "对外附件" },
+      { key: "supplierFile", title: "供应商盖章合同附件" },
+      { key: "puFile", title: "采购商盖章合同附件" },
+      { key: "projectCode", title: "项目编号" },
+      { key: "projectName", title: "项目名称" },
+      { key: "area", title: "区域区域" },
+      { key: "consigneePhone", title: "收货人联系方式" },
+      { key: "paymentAgreement", title: "付款协议" },
+      { key: "taxPrice", title: "价税合计" },
+      { key: "currency", title: "币种" },
+      { key: "currencyName", title: "币种名称" },
+      { key: "guaranteePeriod", title: "质保期" },
+      { key: "tenantId", title: "租户号" },
+      { key: "revision", title: "乐观锁" },
+      { key: "createByName", title: "创建人" },
+      { key: "updateByName", title: "创建人名称" },
+      { key: "delFlag", title: "删除标记" },
+    ];
+    const initTableColumns = () => tableColumns;
+    return {
+      loading: false,
+      isSimpleSearch: true,
+      searchColumns: initSearchColumns(),
+      searchParams: {
+        isAsc: "desc",
+        reasonable: "",
+        orderByColumn: "",
+        ...initSearchParams(),
+      },
+      tableColumns: initTableColumns(),
+      tableData: [{ materialName: 1 }],
+      page: { pageNum: 1, pageSize: 25 },
+      total: 0,
+      pageSizes: [25, 50, 100],
+    };
+  },
+  computed: {
+    showSearchColumns() {
+      return this.isSimpleSearch
+        ? this.searchColumns.slice(0, 4)
+        : this.searchColumns;
+    },
+  },
+  //   watch: {
+  //     $route: {
+  //       handler: function (route) {
+  //         this.redirect = route.query && route.query.redirect;
+  //       },
+  //       immediate: true,
+  //     },
+  //   },
+  created() {
+    this.fetchTaskList();
+    console.log("Vue", this);
+  },
+  methods: {
+    async fetchTaskList() {
+      this.loading = true;
+      try {
+        const { code, msg, rows, total } = await list({
+          ...this.page,
+          ...this.searchParams,
+        });
+        if (code === 200) {
+          this.total = total;
+          this.tableData = rows;
+          this.$notify.success({ title: msg });
+        } else {
+          this.$notify.warning({ title: msg });
+        }
+      } catch (err) {
+        this.$notify.error({ title: "error", message: err });
+      } finally {
+        this.loading = false;
+      }
+    },
+    handleSearchChange() {
+      this.isSimpleSearch = !this.isSimpleSearch;
+      this.$notify.info({
+        title: this.isSimpleSearch ? "Simple Search" : "All Search",
+      });
+    },
+    handleSizeChange() {},
+    handleCurrentChange() {},
+    handleOpenAddDrawer() {
+      const { setVisible } = this.$refs.addDrawerFef;
+      setVisible(true);
+      setTimeout(() => {
+        this.$notify.info("Open Add Drawer");
+      }, 250);
+    },
+    handleOpenSeeDrawer() {
+      const { setVisible } = this.$refs.seeDrawerFef;
+      setVisible(true);
+      setTimeout(() => {
+        this.$notify.info("Open See Drawer");
+      }, 250);
+    },
+  },
+};
+</script>
+
+<template>
+  <el-card
+    v-loading="loading"
+    style="width: calc(100% - 24px); height: 100%; margin: 10px"
+    :body-style="{ padding: 0 }"
+  >
+    <AddPurchaseContractDrawer ref="addDrawerFef"></AddPurchaseContractDrawer>
+    <SeePurchaseContractDrawer ref="seeDrawerFef"></SeePurchaseContractDrawer>
+    <el-form
+      size="mini"
+      label-position="right"
+      label-width="85px"
+      :model="searchParams"
+      style="padding: 20px 0 0 0"
+    >
+      <el-row :gutter="24">
+        <el-col :span="20">
+          <el-row :gutter="20">
+            <el-col
+              v-for="column in showSearchColumns"
+              :key="column.title"
+              :xl="6"
+              :lg="6"
+              :md="8"
+              :sm="12"
+              :xs="24"
+            >
+              <el-form-item :prop="column.key" :label="column.title">
+                <el-input
+                  v-model="searchParams[column.key]"
+                  :placeholder="column.placeholder"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-col>
+        <el-col
+          :span="3"
+          :offset="1"
+          style="text-align: right; padding-right: 40px"
+        >
+          <el-button type="primary" size="mini">搜索</el-button>
+          <el-button size="mini">重置</el-button>
+        </el-col>
+      </el-row>
+    </el-form>
+    <el-divider>
+      <i
+        :class="isSimpleSearch ? 'el-icon-arrow-down' : 'el-icon-arrow-up'"
+        style="cursor: pointer"
+        @click="handleSearchChange"
+      ></i>
+    </el-divider>
+    <el-row :gutter="24" style="padding: 0 20px">
+      <el-col :span="6">123</el-col>
+      <el-col :span="18" style="text-align: right">
+        <el-button
+          size="mini"
+          type="danger"
+          style="margin: 0 10px 0 0"
+          @click="handleOpenAddDrawer"
+        >
+          新增
+        </el-button>
+      </el-col>
+    </el-row>
+    <el-table
+      @row-dblclick="handleOpenSeeDrawer"
+      :data="tableData"
+      size="mini"
+      style="width: 100%; margin: 20px 0 0 0"
+    >
+      <el-table-column
+        v-for="(column, index) in tableColumns"
+        :key="index"
+        :prop="column.key"
+        :label="column.title"
+        :width="column.width || 180"
+        :show-overflow-tooltip="column.showOverflowTooltip || true"
+      >
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :total="total"
+      :page-sizes="pageSizes"
+      :page-size="page.pageSize"
+      :current-page="page.pageNum"
+      hide-on-single-page
+      layout="total, prev, pager, next, sizes, jumper"
+    >
+    </el-pagination>
+  </el-card>
+</template>

+ 404 - 0
src/views/purchase/purchase-contract/see-purchase-contract.vue

@@ -0,0 +1,404 @@
+<script>
+export default {
+  name: "SeePurchaseContractDrawer",
+  data() {
+    const arr2Obj = function (data, keyName, valueName) {
+      return Object.fromEntries(
+        data.map((item) => [item[keyName], item[valueName]])
+      );
+    };
+    const columns = [
+      { key: "puOrg", title: "采购组织", type: "TagSelect", require: true },
+      { key: "code", title: "合同编码", type: "Input" },
+      { key: "contractName", title: "合同名称", type: "Input", require: true },
+      { key: "supplier", title: "供应商", type: "TagSelect", require: true },
+      { key: "contractType", title: "合同类型", type: "Select", require: true },
+      { key: "puDept", title: "采购部门", type: "TagSelect", require: true },
+      { key: "buyer", title: "采购员", type: "TagSelect" },
+      { key: "source", title: "合同来源", type: "Select" },
+      {
+        key: "signDate",
+        title: "合同签订日期",
+        type: "DatePicker",
+        require: true,
+      },
+      {
+        key: "effectiveDate",
+        title: "合同生效日期",
+        type: "DatePicker",
+        require: true,
+      },
+      { key: "endDate", title: "合同终止日期", type: "DatePicker" },
+      { key: "externalContract", title: "外部合同号", type: "Input" },
+      { key: "refusalReasons", title: "拒绝理由", type: "Input" },
+      { key: "enquiryCode", title: "询价单号", type: "Input" },
+      { key: "externalFile", title: "对外附件", type: "Upload", span: 24 },
+      { key: "puFile", title: "采购商盖章合同附件", type: "Upload", span: 24 },
+      {
+        key: "supplierFile",
+        title: "供应商盖章合同附件",
+        type: "Upload",
+        span: 24,
+      },
+      { key: "projectName", title: "项目名称", type: "TagSelect" },
+      { key: "projectCode", title: "项目编号", type: "Input" },
+      { key: "area", title: "区域", type: "Input" },
+      { key: "consigneePhone", title: "收货人联系方式", type: "Input" },
+      { key: "paymentAgreement", title: "付款协议", type: "TagSelect" },
+      { key: "currency", title: "币种", type: "TagSelect", require: true },
+      { key: "taxPrice", title: "价税合计", type: "InputNumber" },
+      { key: "guaranteePeriod", title: "质保期", type: "Input" },
+
+      // { key: "lastPuMoney", title: "上年度采购额" },
+      // { key: "buyerName", title: "采购员名称" },
+      // { key: "supplierName", title: "供应商名称" },
+      // { key: "puMoneyYear", title: "本年度采购额" },
+      // { key: "puDeptName", title: "采购部门名称" },
+      // { key: "supplierTier", title: "供应商层级" },
+      // { key: "grossRateAverage", title: "平均毛利率" },
+      // { key: "approveFlow", title: "审批流程" },
+      // { key: "consumableClass", title: "耗材类别" },
+      // { key: "brandGrossRate", title: "同类品牌及毛利率" },
+      // { key: "contractFormat", title: "合同格式" },
+      // { key: "productName", title: "产品类别&名称" },
+      // { key: "invoiceTax", title: "发票税率" },
+      // { key: "emergencyDegree", title: "紧急程度" },
+      // { key: "project", title: "项目医院" },
+      // { key: "deliveryType", title: "交货方式" },
+      // { key: "contractPartyc", title: "合同丙方" },
+      // { key: "contractPartycName", title: "合同丙方名称" },
+      // { key: "guaranteePeriodEnd", title: "质保期限" },
+      // { key: "freightMethods", title: "运费承担方式" },
+      // { key: "isTarget", title: "是否有指标" },
+      // { key: "contractTarget", title: "合同指标" },
+      // { key: "exemptionPostageCondtion", title: "包邮条件" },
+      // { key: "isRebate", title: "是否有返利" },
+      // { key: "rebatePolicy", title: "返利政策" },
+      // { key: "rollbackPolicy", title: "退换货政策" },
+      // { key: "contractContent", title: "合同主要内容" },
+      // { key: "currencyName", title: "币种名称" },
+      // { key: "tenantId", title: "租户号" },
+      // { key: "revision", title: "乐观锁" },
+      // { key: "createByName", title: "创建人" },
+      // { key: "updateByName", title: "创建人名称" },
+      // { key: "delFlag", title: "删除标记" },
+    ];
+    const initColumns = () =>
+      columns.map((column) => {
+        const clearable = column.clearable || true;
+        if (column.type === "InputNumber") {
+          return {
+            ...column,
+            clearable,
+            config: { controlsPosition: "right" },
+          };
+        }
+        if (column.type === "DatePicker") {
+          return {
+            ...column,
+            clearable,
+            config: { type: "date" },
+          };
+        }
+        return {
+          ...column,
+          clearable,
+        };
+      });
+    const initParams = () => arr2Obj(initColumns(), "key", "value");
+    const tabColumns = [
+      {
+        title: "物料基本信息",
+        key: "first",
+        tableColumns: [
+          { title: "序号", key: "" },
+          { title: "赠品", key: "" },
+          { title: "物料编码", key: "" },
+          { title: "物料名称", key: "" },
+          { title: "规格", key: "" },
+          { title: "生产厂家", key: "" },
+          { title: "收货客户", key: "" },
+          { title: "品牌", key: "" },
+          { title: "采购数量", key: "" },
+          { title: "采购单位", key: "" },
+          { title: "计价数量", key: "" },
+          { title: "税率%", key: "" },
+          { title: "含税单价", key: "" },
+          { title: "含税金额合计", key: "" },
+          { title: "价格有效期(起)", key: "" },
+          { title: "计划到货日期", key: "" },
+          { title: "来源类型", key: "" },
+          { title: "来源单号", key: "" },
+          { title: "需求单号", key: "" },
+          { title: "备注", key: "" },
+        ],
+      },
+      {
+        title: "合同条款",
+        key: "second",
+        tableColumns: [
+          { title: "序号", key: "" },
+          { title: "条款编码", key: "" },
+          { title: "条款名称", key: "" },
+          { title: "条款内容", key: "" },
+          { title: "变量序号", key: "" },
+          { title: "变量内容", key: "" },
+          { title: "备注", key: "" },
+        ],
+      },
+      {
+        title: "合同费用",
+        key: "third",
+        tableColumns: [
+          { title: "序号", key: "" },
+          { title: "费用编码", key: "" },
+          { title: "费用名称", key: "" },
+          { title: "费用金额", key: "" },
+          { title: "备注", key: "" },
+        ],
+      },
+      {
+        title: "付款协议信息",
+        key: "fourth",
+        tableColumns: [
+          { title: "序号", key: "" },
+          { title: "付款阶段", key: "" },
+          { title: "是否预付款", key: "" },
+          { title: "是否质保金", key: "" },
+          { title: "结算方式", key: "" },
+          { title: "付款起点", key: "" },
+          { title: "付款金额", key: "" },
+          { title: "付款比例%", key: "" },
+          { title: "账期天数", key: "" },
+          { title: "备注", key: "" },
+        ],
+      },
+      {
+        title: "合同执行组织范围",
+        key: "fifth",
+        tableColumns: [
+          { title: "序号", key: "" },
+          { title: "组织名称", key: "" },
+          { title: "组织编码", key: "" },
+        ],
+      },
+    ];
+    const initTabColumns = () => tabColumns;
+    return {
+      visible: false,
+      columns: initColumns(),
+      params: initParams(),
+      options: [
+        {
+          value: "选项1",
+          label: "黄金糕",
+        },
+        {
+          value: "选项2",
+          label: "双皮奶",
+        },
+        {
+          value: "选项3",
+          label: "蚵仔煎",
+        },
+        {
+          value: "选项4",
+          label: "龙须面",
+        },
+        {
+          value: "选项5",
+          label: "北京烤鸭",
+        },
+      ],
+      tabColumns: initTabColumns(),
+      tabName: "first",
+      tabTableDatas: {
+        first: [],
+        second: [],
+        third: [],
+        fourth: [],
+        fifth: [],
+      },
+    };
+  },
+  computed: {},
+  watch: {},
+  methods: {
+    setVisible(prop) {
+      this.visible = prop;
+    },
+  },
+  created() {
+    console.log(this.params, this.columns);
+  },
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<template>
+  <el-drawer
+    title="我是标题"
+    direction="btt"
+    size="100%"
+    :with-header="false"
+    :visible.sync="visible"
+    :before-close="handleClose"
+  >
+    <el-card
+      :body-style="{
+        padding: '20px',
+        display: 'flex',
+        'flex-wrap': 'wrap',
+      }"
+      style="margin: 10px"
+    >
+      <div
+        slot="header"
+        style="
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
+        "
+      >
+        <h3>查看</h3>
+        <div style="text-align: right">
+          <el-button size="mini" @click="setVisible(false)">取消</el-button>
+          <el-button size="mini" type="info" @click="setVisible(false)"
+            >保存并新增</el-button
+          >
+          <el-button size="mini" type="danger" @click="setVisible(false)"
+            >保存</el-button
+          >
+        </div>
+      </div>
+      <el-row>
+        <el-form
+          size="mini"
+          label-position="right"
+          label-width="150px"
+          :model="params"
+        >
+          <el-col
+            v-for="(column, index) in columns"
+            :key="index"
+            :span="column.span || 8"
+          >
+            <el-form-item
+              :prop="column.key"
+              :label="column.title"
+              :required="column.required"
+            >
+              <el-input
+                v-if="column.type === 'Input'"
+                v-model="params[column.key]"
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
+                style="width: 90%"
+              ></el-input>
+              <el-input-number
+                v-if="column.type === 'InputNumber'"
+                v-model="params[column.key]"
+                :controls-position="column.config.controlsPosition"
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
+                style="width: 90%"
+              ></el-input-number>
+              <el-select
+                v-if="column.type === 'Select'"
+                v-model="params[column.key]"
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
+                style="width: 90%"
+              >
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+              <el-select
+                v-if="column.type === 'TagSelect'"
+                v-model="params[column.key]"
+                multiple
+                clearable
+                collapse-tags
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
+                style="width: 90%"
+              >
+                <template #prefix>
+                  <el-icon
+                    class="el-icon-s-operation"
+                    style="cursor: pointer"
+                    @click.stop="$message.info(234)"
+                  ></el-icon>
+                </template>
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+              <el-date-picker
+                v-if="column.type === 'DatePicker'"
+                v-model="params[column.key]"
+                :type="column.config.type"
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
+                :picker-options="column.pickerOptions"
+                style="width: 90%"
+              >
+              </el-date-picker>
+              <el-upload
+                v-if="column.type === 'Upload'"
+                :file-list="params[column.key]"
+                drag
+                action="https://jsonplaceholder.typicode.com/posts/"
+                multiple
+              >
+                <i class="el-icon-upload"></i>
+                <div class="el-upload__text">
+                  将文件拖到此处,或<em>点击上传</em>
+                </div>
+                <div class="el-upload__tip" slot="tip">
+                  只能上传jpg/png文件,且不超过500kb
+                </div>
+              </el-upload>
+            </el-form-item>
+          </el-col>
+        </el-form>
+      </el-row>
+    </el-card>
+    <el-card
+      :body-style="{
+        padding: '20px',
+        display: 'flex',
+        'flex-wrap': 'wrap',
+      }"
+      style="margin: 10px"
+    >
+      <el-tabs v-model="tabName" @tab-click="handleClick" style="width: 100%">
+        <el-tab-pane
+          v-for="(column, index) in tabColumns"
+          :key="index"
+          :label="column.title"
+          :name="column.key"
+        >
+          <el-table :data="tabTableDatas[column.key]" style="width: 100%">
+            <el-table-column
+              v-for="(cColumn, cIndex) in column.tableColumns"
+              :key="cIndex"
+              :prop="cColumn.key"
+              :label="cColumn.title"
+            >
+            </el-table-column>
+          </el-table>
+        </el-tab-pane>
+      </el-tabs>
+    </el-card>
+  </el-drawer>
+</template>

+ 249 - 0
src/views/purchase/purchase-task/add-purchase-task.vue

@@ -0,0 +1,249 @@
+<script>
+import { add } from "@/api/business/purchase/purchase-contract";
+import { arr2obj } from "@/utils/data-transform";
+import {
+  initDicts,
+  initRules,
+  initParams,
+  initComponents,
+} from "@/utils/init-something";
+import { initColumns } from "./config/add";
+
+export default {
+  name: "AddPurchaseTaskDrawer",
+  // components: initComponents(initColumns()),
+  dicts: initDicts(initColumns()),
+  data() {
+    return {
+      visible: false,
+      columns: initColumns(),
+      rules: initRules(initColumns()),
+      params: initParams(initColumns()),
+      currentComponent: { name: "", title: "", value: "", row: {} },
+    };
+  },
+  computed: {},
+  watch: {},
+  methods: {
+    setVisible(prop) {
+      this.visible = prop;
+    },
+    //
+    openAsyncInputDialog(prop, type) {
+      try {
+        const {
+          key,
+          title,
+          config: { componentName },
+        } = prop;
+        this.currentComponent.row = prop;
+        this.currentComponent.title = title;
+        this.currentComponent.name = componentName;
+        if (type === "change") {
+          this.currentComponent.value = this.params[key];
+        }
+        if (type === "click") {
+          this.currentComponent.value = "";
+        }
+        this.$nextTick(() => {
+          const { setVisible } = this.$refs[componentName];
+          setVisible(true);
+        });
+      } catch (err) {
+        this.$notify.error({ title: "error", message: err });
+      } finally {
+      }
+    },
+    updateParams(prop) {
+      const {
+        config: { dataMapping },
+      } = this.currentComponent.row;
+      for (let key in dataMapping) {
+        this.params[key] = prop[dataMapping[key]];
+      }
+    },
+  },
+  created() {
+    console.log(this.params);
+  },
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<template>
+  <el-drawer
+    direction="btt"
+    size="100%"
+    :with-header="false"
+    :visible.sync="visible"
+    @open="beforeOpen"
+  >
+    <el-card
+      :body-style="{
+        padding: '20px',
+        display: 'flex',
+        'flex-wrap': 'wrap',
+      }"
+      style="margin: 10px"
+    >
+      <div
+        slot="header"
+        style="
+          display: flex;
+          justify-content: space-between;
+          align-items: center;
+        "
+      >
+        <h3>新增</h3>
+        <div style="text-align: right">
+          <el-button size="mini" @click="cancel">取消</el-button>
+          <el-button size="mini" type="danger" @click="sava">保存</el-button>
+          <el-button size="mini" type="info" @click="submitSava">
+            保存并新增
+          </el-button>
+        </div>
+      </div>
+      <component
+        v-if="currentComponent.name"
+        :is="currentComponent.name"
+        :ref="currentComponent.name"
+        :title="currentComponent.title"
+        :value="currentComponent.value"
+        @confirm="updateParams"
+      ></component>
+      <el-row>
+        <el-form
+          size="mini"
+          label-position="right"
+          label-width="135px"
+          :model="params"
+          :rules="rules"
+        >
+          <el-col
+            v-for="(column, index) in columns"
+            :key="index"
+            :span="column.span || 6"
+          >
+            <el-form-item :prop="column.key" :label="column.title">
+              <el-input
+                v-if="column.type === 'Input'"
+                v-model="params[column.key]"
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
+                :disabled="column.disabled"
+                style="width: 100%"
+              ></el-input>
+              <el-input
+                v-if="column.type === 'InputDialog'"
+                v-model="params[column.key]"
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
+                :disabled="column.disabled"
+                style="width: 100%"
+                @blur="openAsyncInputDialog(column, 'change')"
+                @change="openAsyncInputDialog(column, 'change')"
+              >
+                <template #suffix>
+                  <el-icon
+                    class="el-icon-s-operation"
+                    style="cursor: pointer"
+                    @click.native.stop="openAsyncInputDialog(column, 'click')"
+                  ></el-icon>
+                </template>
+              </el-input>
+              <el-input
+                v-if="column.type === 'Textarea'"
+                v-model="params[column.key]"
+                type="textarea"
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
+                :disabled="column.disabled"
+                style="width: 100%"
+              ></el-input>
+              <el-input-number
+                v-if="column.type === 'InputNumber'"
+                v-model="params[column.key]"
+                :controls-position="
+                  column.config && column.config.controlsPosition
+                "
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
+                :disabled="column.disabled"
+                style="width: 100%"
+              ></el-input-number>
+              <el-select
+                v-if="column.type === 'Select'"
+                v-model="params[column.key]"
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
+                :disabled="column.disabled"
+                style="width: 100%"
+              >
+                <el-option
+                  v-for="item in dict.type[column.config.optionsName]"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+              <el-select
+                v-if="column.type === 'TagSelect'"
+                v-model="params[column.key]"
+                multiple
+                clearable
+                collapse-tags
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
+                :disabled="column.disabled"
+                style="width: 100%"
+              >
+                <template #prefix>
+                  <el-icon
+                    class="el-icon-s-operation"
+                    style="cursor: pointer"
+                    @click.stop="$message.info(234)"
+                  ></el-icon>
+                </template>
+                <el-option
+                  v-for="item in options"
+                  :key="item.value"
+                  :label="item.label"
+                  :value="item.value"
+                >
+                </el-option>
+              </el-select>
+              <el-date-picker
+                v-if="column.type === 'DatePicker'"
+                v-model="params[column.key]"
+                :type="column.config.type"
+                :placeholder="column.placeholder"
+                :clearable="column.clearable"
+                :disabled="column.disabled"
+                :picker-options="column.pickerOptions"
+                style="width: 100%"
+              >
+              </el-date-picker>
+              <el-upload
+                v-if="column.type === 'Upload'"
+                :file-list="params[column.key]"
+                :disabled="column.disabled"
+                drag
+                action="https://jsonplaceholder.typicode.com/posts/"
+                multiple
+              >
+                <i class="el-icon-upload"></i>
+                <div class="el-upload__text">
+                  将文件拖到此处,或<em>点击上传</em>
+                </div>
+                <div class="el-upload__tip" slot="tip">
+                  只能上传jpg/png文件,且不超过500kb
+                </div>
+              </el-upload>
+            </el-form-item>
+          </el-col>
+        </el-form>
+      </el-row>
+    </el-card>
+  </el-drawer>
+</template>

+ 105 - 0
src/views/purchase/purchase-task/config/add.js

@@ -0,0 +1,105 @@
+const pickerOptions = {
+  disabledDate(time) {
+    return time.getTime() > Date.now();
+  },
+  shortcuts: [
+    {
+      text: "今天",
+      onClick(picker) {
+        picker.$emit("pick", new Date());
+      },
+    },
+    {
+      text: "昨天",
+      onClick(picker) {
+        const date = new Date();
+        date.setTime(date.getTime() - 3600 * 1000 * 24);
+        picker.$emit("pick", date);
+      },
+    },
+    {
+      text: "一周前",
+      onClick(picker) {
+        const date = new Date();
+        date.setTime(date.getTime() - 3600 * 1000 * 24 * 7);
+        picker.$emit("pick", date);
+      },
+    },
+  ],
+};
+
+const columns = [
+  {
+    title: "采购组织",
+    key: "puOrg",
+    type: "InputDialog",
+    value: [],
+    required: true,
+  },
+  { title: "需求来源", key: "source", type: "Input", value: "采购创建" },
+  { title: "采购员", key: "buyer", value: [], type: "InputDialog" },
+  { title: "交易类型", key: "billYpe", value: [], type: "InputDialog" },
+  { title: "物料编码", key: "material", type: "Input", required: true },
+  {
+    title: "物料名称",
+    key: "materialName",
+    type: "InputDialog",
+    value: [],
+    required: true,
+  },
+  {
+    title: "物料/物料描述",
+    key: "materialDesc",
+    type: "InputDialog",
+    value: [],
+    required: true,
+  },
+  { title: "生产厂家", key: "manufacturer", type: "Input" },
+  { title: "收货客户", key: "customer", type: "InputDialog", value: [] },
+  {
+    title: "采购单位",
+    key: "puUnit",
+    type: "InputDialog",
+    value: [],
+    required: true,
+  },
+  {
+    title: "采购数量",
+    key: "puQty",
+    type: "InputNumber",
+    required: true,
+  },
+  {
+    title: "需求时间",
+    key: "demandDate",
+    type: "DatePicker",
+    config: { type: "date", pickerOptions: pickerOptions },
+  },
+  { title: "项目名称", key: "projectName", type: "InputDialog", value: [] },
+  { title: "需求人", key: "demandPersonal", type: "InputDialog", value: [] },
+  {
+    title: "需求组织",
+    key: "demandOrg",
+    type: "InputDialog",
+    value: [],
+    require: true,
+  },
+  { title: "需求部门", key: "demandDept", type: "InputDialog", value: [] },
+  { title: "建议供应商", key: "supplier", type: "InputDialog", value: [] },
+  { title: "收货人", key: "a", type: "InputDialog", value: [] },
+  { title: "收货组织", key: "b", type: "InputDialog", value: [] },
+  { title: "收货人联系方式", key: "c", type: "Input" },
+  { title: "收货地址", key: "d", type: "Input" },
+  { title: "收货仓库", key: "e", type: "InputDialog", value: [] },
+  {
+    title: "指定供应商",
+    key: "assignSupplier",
+    type: "InputDialog",
+    value: [],
+  },
+  { title: "单位", key: "unit", type: "InputDialog", value: [] },
+  { title: "收货地址", key: "f", type: "InputDialog", value: [] },
+];
+
+export const initColumns = () => columns;
+

+ 386 - 0
src/views/purchase/purchase-task/direct-sourcing.vue

@@ -0,0 +1,386 @@
+<script>
+export default {
+  name: "DirectSourcing",
+  components: {},
+  data() {
+    const tableColumns = [
+      { title: "价格来源", key: "a" },
+      { title: "供应商", key: "b" },
+      { title: "采购组织", key: "c" },
+      { title: "客户", key: "d" },
+      { title: "价格类型", key: "e" },
+      { title: "配送价", key: "f" },
+      { title: "币种", key: "g" },
+      { title: "价格有效期", key: "h" },
+      { title: "税率", key: "i" },
+      { title: "协议单价", key: "j" },
+      {
+        title: "未执行量",
+        key: "k",
+        edit: true,
+        editConfig: { type: "InputNumber", controlsPosition: "right" },
+      },
+      {
+        title: "采购量",
+        key: "l",
+        edit: true,
+        editConfig: { type: "InputNumber", controlsPosition: "right" },
+      },
+      {
+        title: "计划到货",
+        key: "m",
+        edit: true,
+        editConfig: { type: "DatePicker", showType: "date" },
+      },
+      {
+        title: "期望到货",
+        key: "n",
+        edit: true,
+        editConfig: { type: "DatePicker", showType: "date" },
+      },
+      {
+        title: "备注",
+        key: "o",
+        edit: true,
+        editConfig: { type: "Textarea" },
+      },
+    ];
+    const initTableColumns = () => tableColumns;
+    return {
+      tableColumns: initTableColumns(),
+      data: [
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+        {
+          a: 1,
+          b: 1,
+          c: 1,
+          d: 1,
+          e: 1,
+          f: 1,
+          g: 1,
+          h: 1,
+          i: 1,
+          j: 1,
+          k: 1,
+          l: 1,
+          m: 1,
+          n: 1,
+          o: 1,
+        },
+      ],
+      page: { pageNum: 1, pageSize: 25 },
+      total: 0,
+      pageSizes: [25, 50, 100],
+    };
+  },
+  computed: {},
+  watch: {
+    data: {
+      handler: function (n) {
+        console.log(n);
+      },
+      deep: true,
+    },
+  },
+  methods: {},
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>
+
+<template>
+  <div class="directSourcing" style="height: 50vh">
+    <el-table :data="data" height="calc(50vh)" style="width: 100%">
+      <el-table-column
+        v-for="(column, index) in tableColumns"
+        :key="index"
+        :prop="column.key"
+        :label="column.title"
+        :width="column.width || 180"
+        :show-overflow-tooltip="column.showOverflowTooltip || true"
+      >
+        <template slot-scope="scope">
+          <el-input-number
+            v-if="column.edit && column.editConfig.type === 'InputNumber'"
+            v-model="scope.row[column.key]"
+            :controls-position="column.editConfig.controlsPosition"
+            :min="column.editConfig.min"
+            :max="column.editConfig.max"
+            :size="column.editConfig.size || 'mini'"
+            :placeholder="column.editConfig.placeholder"
+            style="width: 90%"
+          ></el-input-number>
+          <el-date-picker
+            v-else-if="column.edit && column.editConfig.type === 'DatePicker'"
+            v-model="scope.row[column.key]"
+            :type="column.editConfig.showType"
+            :picker-options="column.editConfig.pickerOptions"
+            :size="column.editConfig.size || 'mini'"
+            :placeholder="column.editConfig.placeholder"
+            style="width: 90%"
+          ></el-date-picker>
+          <el-input
+            v-else-if="column.edit && column.editConfig.type === 'Textarea'"
+            v-model="scope.row[column.key]"
+            type="textarea"
+            :autosize="column.editConfig.autosize || true"
+            :size="column.editConfig.size || 'mini'"
+            style="width: 90%"
+          ></el-input>
+          <span v-else>{{ scope.row[column.key] }}</span>
+        </template>
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :total="total"
+      :page-sizes="pageSizes"
+      :page-size="page.pageSize"
+      :current-page="page.pageNum"
+      hide-on-single-page
+      layout="total, prev, pager, next, sizes, jumper"
+    >
+    </el-pagination>
+  </div>
+</template>
+
+<style scoped></style>

+ 598 - 0
src/views/purchase/purchase-task/index.vue

@@ -0,0 +1,598 @@
+<script>
+import { taskList } from "@/api/business/purchase/purchase-task";
+import AddPurchaseTaskDrawer from "./add-purchase-task.vue";
+import SeePurchaseTaskDrawer from "./see-purchase-task.vue";
+import DirectSourcingTable from "./direct-sourcing.vue";
+export default {
+  name: "PuchaseTask",
+  components: {
+    AddPurchaseTaskDrawer,
+    SeePurchaseTaskDrawer,
+    DirectSourcingTable,
+  },
+  data() {
+    const arr2Obj = function (data, keyName, valueName) {
+      return Object.fromEntries(
+        data.map((item) => [item[keyName], item[valueName]])
+      );
+    };
+    const searchColumns = [
+      { title: "物料分类", key: "", type: "TagSelect" },
+      { title: "物料", key: "", type: "TagSelect" },
+      { title: "物料编码", key: "material", type: "Input" },
+      { title: "物料描述", key: "materialDesc", type: "Input" },
+      { title: "需求组织", key: "", type: "TagSelect" },
+      { title: "需求日期", key: "", type: "DatePicker" },
+      { title: "计划人员", key: "", type: "TagSelect" },
+      { title: "采购组织", key: "", type: "TagSelect" },
+      { title: "创建时间", key: "", type: "DatePicker" },
+      { title: "采购员", key: "", type: "TagSelect" },
+      { title: "状态", key: "", type: "Select" },
+      {
+        title: "来源单据号",
+        key: "",
+        type: "Input",
+        placeholder: "请输入来源单据号,多个用英文逗号分割",
+      },
+      { title: "收货组织", key: "", type: "TagSelect" },
+      { title: "采购分类", key: "", type: "Input" },
+      // { title: "受理人", key: "", type: "TagSelect" },
+      { title: "项目", key: "", type: "TagSelect" },
+      { title: "需求部门", key: "", type: "TagSelect" },
+      { title: "需求人", key: "", type: "TagSelect" },
+      { title: "ERP信息", key: "", type: "Input" },
+    ];
+    const initSearchColumns = () => searchColumns;
+    const initSearchParams = () => arr2Obj(initSearchColumns(), "key", "value");
+    const tableColumns = [
+      {
+        title: "物料名称",
+        key: "materialName",
+      },
+      {
+        title: "物料编码",
+        key: "material",
+      },
+      {
+        title: "来源单据号",
+        key: "material",
+      },
+      {
+        title: "来源单据行号",
+        key: "material",
+      },
+      {
+        title: "采购数量",
+        key: "material",
+      },
+      {
+        title: "采购单位",
+        key: "material",
+      },
+      {
+        title: "采购换算率",
+        key: "material",
+      },
+      {
+        title: "主数量",
+        key: "material",
+      },
+      {
+        title: "主计量单位",
+        key: "material",
+      },
+      {
+        title: "计价单位",
+        key: "material",
+      },
+      {
+        title: "计价换算率",
+        key: "material",
+      },
+      {
+        title: "计价数量",
+        key: "material",
+      },
+      {
+        title: "未执行数量",
+        key: "material",
+      },
+      {
+        title: "主未执行数量",
+        key: "material",
+      },
+      {
+        title: "计价未执行数量",
+        key: "material",
+      },
+      {
+        title: "已执行数量",
+        key: "material",
+      },
+      {
+        title: "交易类型",
+        key: "material",
+      },
+      {
+        title: "分配日期",
+        key: "material",
+      },
+      {
+        title: "SKU编码",
+        key: "material",
+      },
+      {
+        title: "SKU名称",
+        key: "material",
+      },
+      {
+        title: "SKU规格说明",
+        key: "material",
+      },
+      {
+        title: "SKU型号",
+        key: "material",
+      },
+      {
+        title: "SKU规格",
+        key: "material",
+      },
+      {
+        title: "产品规格",
+        key: "material",
+      },
+      {
+        title: "产品型号",
+        key: "material",
+      },
+      {
+        title: "物料描述",
+        key: "material",
+      },
+      {
+        title: "品牌",
+        key: "material",
+      },
+      {
+        title: "计划价",
+        key: "material",
+      },
+      {
+        title: "需求附件",
+        key: "material",
+      },
+      {
+        title: "物料附件",
+        key: "material",
+      },
+      {
+        title: "项目",
+        key: "material",
+      },
+      {
+        title: "建议供应商",
+        key: "material",
+      },
+      {
+        title: "需求组织",
+        key: "material",
+      },
+      {
+        title: "需求部门",
+        key: "material",
+      },
+      {
+        title: "需求人",
+        key: "material",
+      },
+      {
+        title: "已下单采购数量",
+        key: "material",
+      },
+      {
+        title: "采购组织",
+        key: "material",
+      },
+      {
+        title: "采购员",
+        key: "material",
+      },
+      {
+        title: "计划员",
+        key: "material",
+      },
+      {
+        title: "计划部门",
+        key: "material",
+      },
+      {
+        title: "联系电话",
+        key: "material",
+      },
+      {
+        title: "采购分类",
+        key: "material",
+      },
+      {
+        title: "收货人",
+        key: "material",
+      },
+      {
+        title: "收货地址",
+        key: "material",
+      },
+      {
+        title: "收货人电话",
+        key: "material",
+      },
+      {
+        title: "需求时间",
+        key: "material",
+      },
+      // {
+      //   title: "受理状态",
+      //   key: "material",
+      // },
+      {
+        title: "状态",
+        key: "material",
+      },
+      // {
+      //   title: "受理人",
+      //   key: "material",
+      // },
+      {
+        title: "委托受理人",
+        key: "material",
+      },
+      {
+        title: "弹性分单条件",
+        key: "material",
+      },
+      {
+        title: "备注",
+        key: "material",
+      },
+      {
+        title: "ERP相关信息",
+        key: "material",
+      },
+      {
+        title: "创建时间",
+        key: "material",
+      },
+      {
+        title: "最新价格",
+        key: "material",
+      },
+      {
+        title: "生产厂家",
+        key: "material",
+      },
+      {
+        title: "报价供应商",
+        key: "material",
+      },
+      {
+        title: "历史最低价",
+        key: "material",
+      },
+      {
+        title: "生产订单状态",
+        key: "material",
+      },
+      // {
+      //   title: "寻源退回原因",
+      //   key: "material",
+      // },
+      {
+        title: "收货仓库档案编码",
+        key: "material",
+      },
+      {
+        title: "自定义项16",
+        key: "material",
+      },
+      {
+        title: "收货客户",
+        key: "material",
+      },
+      {
+        title: "入库仓库",
+        key: "material",
+      },
+      {
+        title: "货位",
+        key: "material",
+      },
+      {
+        title: "指定供应商",
+        key: "material",
+      },
+      {
+        title: "单位",
+        key: "material",
+      },
+      {
+        title: "自定义项15",
+        key: "material",
+      },
+      {
+        title: "收货地址",
+        key: "material",
+      },
+      {
+        title: "收货联系人",
+        key: "material",
+      },
+      {
+        title: "需求来源",
+        key: "material",
+      },
+    ];
+    const initTableColumns = () => tableColumns;
+    const initTableData = () => {
+      const data = [];
+      for (let index = 0; index < 25; index++) {
+        data.push({ materialName: index });
+      }
+      return data;
+    };
+    return {
+      loading: false,
+      isSimpleSearch: true,
+      searchColumns: initSearchColumns(),
+      searchParams: {
+        isAsc: "desc",
+        reasonable: "",
+        orderByColumn: "",
+        ...initSearchParams(),
+      },
+      tableColumns: initTableColumns(),
+      tableData: initTableData(),
+      page: { pageNum: 1, pageSize: 25 },
+      total: 0,
+      pageSizes: [25, 50, 100],
+    };
+  },
+  computed: {
+    showSearchColumns() {
+      return this.isSimpleSearch
+        ? this.searchColumns.slice(0, 4)
+        : this.searchColumns;
+    },
+  },
+  //   watch: {
+  //     $route: {
+  //       handler: function (route) {
+  //         this.redirect = route.query && route.query.redirect;
+  //       },
+  //       immediate: true,
+  //     },
+  //   },
+  created() {
+    // this.fetchTaskList();
+    console.log("Vue", this);
+  },
+  methods: {
+    async fetchTaskList() {
+      this.loading = true;
+      try {
+        const { code, msg, rows, total } = await taskList({
+          ...this.page,
+          ...this.searchParams,
+        });
+        if (code === 200) {
+          this.total = total;
+          this.tableData = rows;
+          this.$notify.success({ title: msg });
+        } else {
+          this.$notify.warning({ title: msg });
+        }
+      } catch (err) {
+        this.$notify.error({ title: "error", message: err });
+      } finally {
+        this.loading = false;
+      }
+    },
+    handleSearchChange() {
+      this.isSimpleSearch = !this.isSimpleSearch;
+      this.$notify.info({
+        title: this.isSimpleSearch ? "Simple Search" : "All Search",
+      });
+    },
+    handleSizeChange() {},
+    handleCurrentChange() {},
+    handleOpenAddDrawer() {
+      const { setVisible } = this.$refs.addDrawerFef;
+      setTimeout(() => {
+        setVisible(true);
+        this.$notify.info("Open Add Drawer");
+      }, 250);
+    },
+    handleOpenSeeDrawer() {
+      const { setVisible } = this.$refs.seeDrawerFef;
+      setVisible(true);
+      setTimeout(() => {
+        this.$notify.info("Open See Drawer");
+      }, 250);
+    },
+  },
+};
+</script>
+
+<template>
+  <el-card
+    v-loading="loading"
+    style="width: calc(100% - 24px); height: 100%; margin: 10px"
+    :body-style="{ padding: 0 }"
+  >
+    <AddPurchaseTaskDrawer ref="addDrawerFef"></AddPurchaseTaskDrawer>
+    <SeePurchaseTaskDrawer ref="seeDrawerFef"></SeePurchaseTaskDrawer>
+    <el-form
+      size="mini"
+      label-position="right"
+      label-width="85px"
+      :model="searchParams"
+      style="padding: 20px 0 0 0"
+    >
+      <el-row :gutter="24">
+        <el-col :span="22">
+          <el-row :gutter="20">
+            <el-col
+              v-for="column in showSearchColumns"
+              :key="column.title"
+              :xl="6"
+              :lg="6"
+              :md="8"
+              :sm="12"
+              :xs="24"
+            >
+              <el-form-item :prop="column.key" :label="column.title">
+                <el-input
+                  v-model="searchParams[column.key]"
+                  :placeholder="column.placeholder"
+                ></el-input>
+              </el-form-item>
+            </el-col>
+          </el-row>
+        </el-col>
+        <el-col :span="2">
+          <el-row :gutter="24">
+            <el-col :span="24">
+              <el-button type="primary" size="mini">搜索</el-button>
+            </el-col>
+            <el-col
+              v-show="!isSimpleSearch"
+              :span="24"
+              style="margin: 10px 0 0"
+            >
+              <el-button size="mini">重置</el-button>
+            </el-col>
+          </el-row>
+        </el-col>
+      </el-row>
+    </el-form>
+    <el-divider>
+      <i
+        :class="isSimpleSearch ? 'el-icon-arrow-down' : 'el-icon-arrow-up'"
+        style="cursor: pointer"
+        @click="handleSearchChange"
+      ></i>
+    </el-divider>
+    <el-row :gutter="24" style="padding: 0 20px">
+      <el-col :span="6">123</el-col>
+      <el-col :span="18" style="text-align: right">
+        <el-button
+          size="mini"
+          type="danger"
+          style="margin: 0 10px 0 0"
+          @click="handleOpenAddDrawer"
+        >
+          新增
+        </el-button>
+        <el-dropdown placement="bottom-start">
+          <el-button size="mini" style="margin: 0 10px 0 0">
+            发布
+            <i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item>发布寻源</el-dropdown-item>
+            <el-dropdown-item>发布委托</el-dropdown-item>
+            <el-dropdown-item>采购方案</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+
+        <el-dropdown placement="bottom-start">
+          <el-button
+            size="mini"
+            style="border-right: 0; border-radius: 3px 0 0 3px"
+          >
+            首次协议直采
+            <i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item>首次协议直采</el-dropdown-item>
+            <el-dropdown-item>余量协议直采</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+        <el-dropdown placement="bottom-start">
+          <el-button size="mini" style="border-right: 0; border-radius: 0">
+            跟单采购
+            <i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item>按合同(普通)取价</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+        <el-button size="mini" style="border-right: 0; border-radius: 0">
+          Excel导出
+        </el-button>
+        <el-button
+          size="mini"
+          style="margin: 0; border-right: 0; border-radius: 0"
+        >
+          退回请购
+        </el-button>
+        <el-dropdown placement="bottom-start">
+          <el-button size="mini" style="border-right: 0; border-radius: 0">
+            清单采购
+            <i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item>商超匹配下单</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+        <el-button
+          size="mini"
+          disabled
+          style="margin: 0 10px 0 0; border-radius: 0 3px 3px 0"
+        >
+          一键合同下单
+        </el-button>
+        <el-button size="mini" style="margin: 0 10px 0 0">删除</el-button>
+        <el-dropdown placement="bottom-end">
+          <el-button size="mini">
+            更多
+            <i class="el-icon-arrow-down el-icon--right"></i>
+          </el-button>
+          <el-dropdown-menu slot="dropdown">
+            <el-dropdown-item>抢单</el-dropdown-item>
+            <el-dropdown-item>批量修改收货组织</el-dropdown-item>
+            <el-dropdown-item>批量退回</el-dropdown-item>
+            <el-dropdown-item>退回需求申请</el-dropdown-item>
+            <el-dropdown-item>刷新缓存</el-dropdown-item>
+          </el-dropdown-menu>
+        </el-dropdown>
+      </el-col>
+    </el-row>
+    <el-table
+      @row-dblclick="handleOpenSeeDrawer"
+      :data="tableData"
+      size="mini"
+      style="width: 100%; margin: 20px 0 0 0"
+    >
+      <el-table-column
+        v-for="(column, index) in tableColumns"
+        :key="index"
+        :prop="column.key"
+        :label="column.title"
+        :width="column.width || 180"
+        :show-overflow-tooltip="column.showOverflowTooltip || true"
+      >
+      </el-table-column>
+    </el-table>
+    <el-pagination
+      @size-change="handleSizeChange"
+      @current-change="handleCurrentChange"
+      :total="total"
+      :page-sizes="pageSizes"
+      :page-size="page.pageSize"
+      :current-page="page.pageNum"
+      hide-on-single-page
+      layout="total, prev, pager, next, sizes, jumper"
+    >
+    </el-pagination>
+    <DirectSourcingTable></DirectSourcingTable>
+  </el-card>
+</template>

+ 158 - 0
src/views/purchase/purchase-task/see-purchase-task.vue

@@ -0,0 +1,158 @@
+<script>
+export default {
+  name: "SeePurchaseTaskDrawer",
+  data() {
+    const arr2Obj = function (data, keyName, valueName) {
+      return Object.fromEntries(
+        data.map((item) => [item[keyName], item[valueName]])
+      );
+    };
+    const columns = [
+      {
+        title: "采购组织",
+        key: "puOrg",
+        type: "TagSelect",
+        value: [],
+        required: true,
+      },
+      { title: "需求来源", key: "source", type: "Input", value: "采购创建" },
+      { title: "采购员", key: "buyer", value: [], type: "TagSelect" },
+      { title: "交易类型", key: "billYpe", value: [], type: "TagSelect" },
+      { title: "物料编码", key: "material", type: "Input", required: true },
+      {
+        title: "物料名称",
+        key: "materialName",
+        type: "TagSelect",
+        value: [],
+        required: true,
+      },
+      {
+        title: "物料/物料描述",
+        key: "materialDesc",
+        type: "TagSelect",
+        value: [],
+        required: true,
+      },
+      { title: "生产厂家", key: "manufacturer", type: "Input" },
+      { title: "收货客户", key: "customer", type: "TagSelect", value: [] },
+      {
+        title: "采购单位",
+        key: "puUnit",
+        type: "TagSelect",
+        value: [],
+        required: true,
+      },
+      {
+        title: "采购数量",
+        key: "puQty",
+        type: "InputNumber",
+        required: true,
+      },
+      {
+        title: "需求时间",
+        key: "demandDate",
+        type: "DatePicker",
+        config: { type: "date" },
+      },
+      { title: "项目名称", key: "projectName", type: "TagSelect", value: [] },
+      { title: "需求人", key: "demandPersonal", type: "TagSelect", value: [] },
+      {
+        title: "需求组织",
+        key: "demandOrg",
+        type: "TagSelect",
+        value: [],
+        require: true,
+      },
+      { title: "需求部门", key: "demandDept", type: "TagSelect", value: [] },
+      { title: "建议供应商", key: "supplier", type: "TagSelect", value: [] },
+      { title: "收货人", key: "a", type: "TagSelect", value: [] },
+      { title: "收货组织", key: "b", type: "TagSelect", value: [] },
+      { title: "收货人联系方式", key: "c", type: "Input" },
+      { title: "收货地址", key: "d", type: "Input" },
+      { title: "收货仓库", key: "e", type: "TagSelect", value: [] },
+      {
+        title: "指定供应商",
+        key: "assignSupplier",
+        type: "TagSelect",
+        value: [],
+      },
+      { title: "单位", key: "unit", type: "TagSelect", value: [] },
+      { title: "收货地址", key: "f", type: "TagSelect", value: [] },
+    ];
+    const initColumns = () => columns;
+    const initParams = () => arr2Obj(initColumns(), "key", "value");
+    return {
+      visible: false,
+      loading: false,
+      columns: initColumns(),
+      params: initParams(),
+    };
+  },
+  computed: {},
+  watch: {},
+  methods: {
+    setVisible(prop) {
+      this.visible = prop;
+    },
+    async fetchTaskItem() {
+      this.loading = true;
+      try {
+        // do something
+      } catch (err) {
+        this.$notify.error({ title: "error", message: err });
+      } finally {
+        this.loading = false;
+      }
+    },
+  },
+  created() {
+    console.log(this.params);
+  },
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<template>
+  <el-drawer
+    title="我是标题"
+    direction="btt"
+    size="100%"
+    :with-header="false"
+    :visible.sync="visible"
+    :before-close="handleClose"
+  >
+    <el-card
+      :body-style="{
+        padding: '20px',
+        display: 'flex',
+        'flex-wrap': 'wrap',
+      }"
+      style="margin: 10px"
+    >
+      <el-descriptions title="采购任务详情" direction="vertical" :column="3">
+        <el-descriptions-item
+          v-for="(column, index) in columns"
+          :key="index"
+          :label="column.title"
+        >
+          {{ params[column.key] }}
+        </el-descriptions-item>
+      </el-descriptions>
+    </el-card>
+    <el-card
+      :body-style="{
+        'text-align': 'right',
+        padding: '10px 20px',
+      }"
+      style="
+        position: fixed;
+        left: 0;
+        bottom: 0;
+        margin: 10px;
+        width: calc(100% - 20px);
+      "
+    >
+      <el-button size="mini" @click="setVisible(false)">返回</el-button>
+    </el-card>
+  </el-drawer>
+</template>

+ 638 - 0
src/views/purchase/transferOrder/add.vue

@@ -0,0 +1,638 @@
+<template>
+  <div id="addOder">
+    <el-form :model="basicForm" :rules="basicRules" ref="basic" label-width="auto">
+      <el-row :gutter="10">
+        <el-col :span="1.5">
+            <el-form-item label="订单类型">
+              <el-input
+                v-model="basicForm.billType"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="单据号">
+              <el-input
+                v-model="basicForm.code"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="单据日期">
+              <el-input
+                v-model="basicForm.billDate"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="调拨方式">
+              <el-input
+                v-model="basicForm.allotType"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="调拨出库单号">
+              <el-input
+                v-model="basicForm.deliveryCode"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="调拨入库单号">
+              <el-input
+                v-model="basicForm.storageCode"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="调入库存组织">
+              <el-input
+                v-model="basicForm.storageInventoryOrg"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="调出业务员">
+              <el-input
+                v-model="basicForm.businessPersonal"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="调出部门">
+              <el-input
+                v-model="basicForm.deliveryDept"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="币种">
+              <el-input
+                v-model="basicForm.currency"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="折本汇率">
+              <el-input
+                v-model="basicForm.rate"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="在途归属">
+              <el-input
+                v-model="basicForm.onRouteAffilliation"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="总数量">
+              <el-input
+                v-model="basicForm.qty"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="结算路径">
+              <el-input
+                v-model="basicForm.accountPath"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="客户">
+              <el-input
+                v-model="basicForm.customer"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="调入仓库">
+              <el-input
+                v-model="basicForm.storageWarehouse"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="调出仓库">
+              <el-input
+                v-model="basicForm.deliveryWarehouse"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="物料项目组">
+              <el-input
+                v-model="basicForm.materialProject"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="利润中心">
+              <el-input
+                v-model="basicForm.code"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+        </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="是否已同步WMS">
+              <el-input
+                v-model="basicForm.isSendWms"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+        </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="备注">
+              <el-input
+                v-model="basicForm.remark"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+        </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="单据状态">
+              <el-input
+                v-model="basicForm.code"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+        </el-col>
+      </el-row>
+
+      <el-divider content-position="left">表尾信息</el-divider>
+      <el-row :gutter="10">
+        <el-col :span="1.5">
+            <el-form-item label="制单人">
+              <el-input
+                v-model="basicForm.code"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="制单日期">
+              <el-input
+                v-model="basicForm.code"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="审批人">
+              <el-input
+                v-model="basicForm.code"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="审批日期">
+              <el-input
+                v-model="basicForm.code"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+      </el-row>
+
+      <el-divider content-position="left">审计信息</el-divider>
+      <el-row :gutter="10">
+        <el-col :span="1.5">
+            <el-form-item label="创建人">
+              <el-input
+                v-model="basicForm.createByName"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="创建时间">
+              <el-input
+                v-model="basicForm.code"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="最后修改人">
+              <el-input
+                v-model="basicForm.updateByName"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+        <el-col :span="1.5">
+            <el-form-item label="最后修改时间">
+              <el-input
+                v-model="basicForm.code"
+                size="small"
+                placeholder=""
+                clearable
+                style="width: 200px"
+              />
+            </el-form-item>
+         </el-col>
+      </el-row>
+
+        <el-tabs style="margin-top: 10px;" type="border-card">
+          <el-tab-pane label="物料信息">
+            <el-table
+            :data="materialInfo" 
+            fit
+            max-height="380"
+            >
+            <el-table-column label="行号" align="center" prop="rowno"/>
+            <el-table-column label="物料编码" align="center" prop="material"/>
+            <el-table-column label="物料名称" align="center" prop="materialName"/>
+            <el-table-column label="调拨出库单号" align="center" prop="code"/>
+            <el-table-column label="调拨入库单号" align="center" prop="code"/>
+            <el-table-column label="规格" align="center" prop="code"/>
+            <el-table-column label="生产厂家/代理人" align="center" prop="manufacturer"/>
+            <el-table-column label="产地" align="center" prop="originPlace"/>
+            <el-table-column label="型号" align="center" prop="model"/>
+            <el-table-column label="单位" align="center" prop="unit"/>
+            <el-table-column label="调出仓库" align="center" prop="deliveryWarehouseName"/>
+            <el-table-column label="数量" align="center" prop="qty"/>
+            <el-table-column label="主单位" align="center" prop="mainUnit"/>
+            <el-table-column label="换算率" align="center" prop="equation"/>
+            <el-table-column label="主数量" align="center" prop="mainQty"/>
+            <el-table-column label="税率" align="center" prop="rate"/>
+            <el-table-column label="调入仓库" align="center" prop="storageWarehouseName"/>
+            <el-table-column label="批次号" align="center" prop="patchNo"/>
+            <el-table-column label="产品批号" align="center" prop="producBatch"/>
+            <el-table-column label="生产日期" align="center" prop="manufactureDate"/>
+            <el-table-column label="有效期至/失效日期" align="center" prop="periodEndDate"/>
+            <el-table-column label="批准文号" align="center" prop="ratifyCode"/>
+            <el-table-column label="注册证号" align="center" prop="registration"/>
+            <el-table-column label="商品名" align="center" prop="productCode"/>
+            <el-table-column label="通用名" align="center" prop="commonCode"/>
+            <el-table-column label="剂型" align="center" prop="drug"/>
+            <el-table-column label="调入调出结算规则明细" align="center" prop="ruleDetail"/>
+            <el-table-column label="上市许可持有人" align="center" prop="marketingApprovalPersonal"/>
+            <el-table-column label="生产许可证号/经营许可证号/备案凭证号" align="center" prop="production"/>
+            <el-table-column label="pi码" align="center" prop="pi"/>
+            <!-- <el-table-column label="无税金额" align="center" prop="code"/> -->
+            <!-- <el-table-column label="备注" align="center" prop="code"/> -->
+            <el-table-column label="客户物料码" align="center" prop="customerLogistic"/>
+            <el-table-column label="客户物料名称" align="center" prop="customerLogisticName"/>
+            </el-table>
+          </el-tab-pane>
+
+          <el-tab-pane label="收发货信息">
+            <el-table
+            :data="receiveInfo" 
+            fit
+            max-height="380"
+            >
+            <el-table-column label="行号" align="center" prop="rowno"/>
+            <el-table-column label="调拨出库单号" align="center" prop="deliveryCode"/>
+            <el-table-column label="调拨入库单号" align="center" prop="storageCode"/>
+            <el-table-column label="生产厂家/代理人" align="center" prop="manufacturer"/>
+            <el-table-column label="产地" align="center" prop="originPlace"/>
+            <el-table-column label="类别" align="center" prop="classify"/>
+            <el-table-column label="调出仓库" align="center" prop="deliveryWarehouseName"/>
+            <el-table-column label="调入仓库" align="center" prop="storageWarehouseName"/>
+            <!-- <el-table-column label="收货利润中心" align="center" prop="code"/>
+            <el-table-column label="发货利润中心" align="center" prop="code"/> -->
+            <el-table-column label="调入业务员" align="center" prop="businessPersonalName"/>
+            <el-table-column label="产品批号" align="center" prop="productBatch"/>
+            <el-table-column label="生产日期" align="center" prop="manufactureDate"/>
+            <el-table-column label="有效期至/失效日期" align="center" prop="periodEndDate"/>
+            <el-table-column label="批准文号" align="center" prop="ratifyCode"/>
+            <el-table-column label="注册证号" align="center" prop="registration"/>
+            <el-table-column label="商品名" align="center" prop="productCode"/>
+            <el-table-column label="通用名" align="center" prop="commonCode"/>
+            <el-table-column label="剂型" align="center" prop="drug"/>
+            <el-table-column label="收货客户" align="center" prop="customerName"/>
+            <el-table-column label="收货地址" align="center" prop="addressaddress"/>
+            <el-table-column label="收货地区" align="center" prop="area"/>
+            <el-table-column label="收货地点" align="center" prop="place"/>
+            <el-table-column label="计划发货日期" align="center" prop="deliveryDate"/>
+            <el-table-column label="计划到货日期" align="center" prop="strageDate"/>
+            <el-table-column label="运输方式" align="center" prop="transportation"/>
+            <el-table-column label="备注" align="center" prop="remark"/>
+            <el-table-column label="客户物料编码" align="center" prop="customerLogistic"/>
+            <el-table-column label="客户物料名称" align="center" prop="customerLogisticName"/>
+            </el-table>
+          </el-tab-pane>
+
+          <el-tab-pane label="价格费用">
+            <el-table
+            :data="priceList" 
+            fit
+            max-height="380"
+            >
+            <el-table-column label="行号" align="center" prop="rowno"/>
+            <el-table-column label="调拨出库单号" align="center" prop="deliveryCode"/>
+            <el-table-column label="调拨入库单号" align="center" prop="storageCode"/>
+            <el-table-column label="生产厂家/代理人" align="center" prop="manufacturer"/>
+            <el-table-column label="产地" align="center" prop="originPlace"/>
+            <el-table-column label="类别" align="center" prop="classify"/>
+            <!-- <el-table-column label="税率" align="center" prop="code"/> -->
+            <!-- <el-table-column label="无税单价" align="center" prop="code"/> -->
+            <!-- <el-table-column label="含税单价" align="center" prop="code"/> -->
+            <el-table-column label="产品批号" align="center" prop="productBatch"/>
+            <el-table-column label="生产日期" align="center" prop="manufactureDate"/>
+            <el-table-column label="有效期至/失效日期" align="center" prop="periodEndDate"/>
+            <el-table-column label="批准文号" align="center" prop="ratifyCode"/>
+            <el-table-column label="注册证号" align="center" prop="registration"/>
+            <el-table-column label="商品名" align="center" prop="productCode"/>
+            <el-table-column label="通用名" align="center" prop="commonCode"/>
+            <el-table-column label="剂型" align="center" prop="drug"/>
+            <!-- <el-table-column label="询价无税价" align="center" prop="code"/> -->
+            <!-- <el-table-column label="询价含税价" align="center" prop="code"/> -->
+            <!-- <el-table-column label="税额" align="center" prop="code"/> -->
+            <!-- <el-table-column label="加价率" align="center" prop="code"/> -->
+            <!-- <el-table-column label="无税金额" align="center" prop="code"/> -->
+            <!-- <el-table-column label="价税合计" align="center" prop="code"/> -->
+            <el-table-column label="客户物料码" align="center" prop="customerLogistic"/>
+            <el-table-column label="客户物料名称" align="center" prop="customerLogisticName"/>
+            </el-table>
+          </el-tab-pane>
+
+          <el-tab-pane label="执行结果">
+            <el-table
+            :data="resultList" 
+            fit
+            max-height="380"
+            >
+            <el-table-column label="行号" align="center" prop="rowno"/>
+            <el-table-column label="调拨出库单号" align="center" prop="deliveryCode"/>
+            <el-table-column label="调拨入库单号" align="center" prop="storageCode"/>
+            <el-table-column label="生产厂家/代理人" align="center" prop="manufacturer"/>
+            <el-table-column label="产地" align="center" prop="originPlace"/>
+            <el-table-column label="类别" align="center" prop="classify"/>
+            <el-table-column label="产品批号" align="center" prop="productBatch	"/>
+            <el-table-column label="生产日期" align="center" prop="manufactureDate"/>
+            <el-table-column label="有效期至/失效日期" align="center" prop="periodEndDate"/>
+            <el-table-column label="批准文号" align="center" prop="ratifyCode"/>
+            <el-table-column label="注册证号" align="center" prop="registration"/>
+            <el-table-column label="商品名" align="center" prop="productCode"/>
+            <el-table-column label="通用名" align="center" prop="commonCode"/>
+            <el-table-column label="剂型" align="center" prop="drug"/>
+            <!-- <el-table-column label="已调出主数量" align="center" prop="code"/>
+            <el-table-column label="已调入主数量" align="center" prop="code"/> -->
+            <!-- <el-table-column label="调拨在途主数量" align="center" prop="code"/> -->
+            <!-- <el-table-column label="已发货主数量" align="center" prop="code"/> -->
+            <!-- <el-table-column label="途损主数量" align="center" prop="code"/> -->
+            <!-- <el-table-column label="累计退货主数量" align="center" prop="code"/> -->
+            <!-- <el-table-column label="调出与调入已结算主数量" align="center" prop="code"/> -->
+            <!-- <el-table-column label="调出与调入已结算金额" align="center" prop="code"/> -->
+            <el-table-column label="客户物料码" align="center" prop="customerLogistic"/>
+            <el-table-column label="客户物料名称" align="center" prop="customerLogisticName"/>
+            </el-table>
+          </el-tab-pane>
+        </el-tabs>
+    </el-form>
+
+    <div class="btn_group">
+      <el-col :span="1.5" style="margin: 0 10px;">
+        <el-button type="primary" size="small" plain @click="save" v-if="pageStu == 'add' || pageStu == 'edit'">保存</el-button>
+      </el-col>
+      <!-- <el-col :span="1.5" style="margin: 0 10px;">
+        <el-button type="primary" size="small" plain @click="submit" v-if="pageStu == 'edit'">提交</el-button>
+      </el-col> -->
+      <el-col :span="1.5">
+        <el-button size="small" plain @click="back">返回</el-button>
+      </el-col>
+    </div>
+  </div>
+</template>
+
+<script>
+import {addOrder, getOrderDetail, editOrder} from '@/api/purchase/transferOrder.js'
+export default {
+  name: 'addOder',
+  props: ['pageStu','row', 'disable'],
+  model: {
+    prop: 'isList',
+    event: 'jugislist'
+  },
+  data() {
+    return {
+      basicForm: {},
+      options: [{
+        value: '1', label: '是',
+      }, {
+        value: '0', label: '否'
+      }],
+      basicRules: {
+        billType: '',
+        code: '',
+        billDate	: '',
+        allotType: '',
+        deliveryCode: '',
+        storageCode: '',
+        storageInventoryOrg: '',
+        storageInventoryOrgName: '',
+        businessPersonal: '',
+        businessPersonalName: '',
+        deliveryDept: '',
+        deliveryDeptName: '',
+        currency: '',
+        currencyName: '',
+        rate: '',
+        onRouteAffilliation: '',
+        qty: '',
+        accountPath: '',
+        customer: '',
+        customerName: '',
+        deliveryWarehouse: '',
+        deliveryWarehouseName: '',
+        storageWarehouse: '',
+        storageWarehouseName: '',
+        materialProject: '',
+        sourceIdentification: '',
+        isSendWms: '',
+        status: '',
+        tenantId: '',
+        revision: '',
+        createByName: '',
+        updateByName: '',
+        delFlag: '',
+      },
+      materialInfo: [],
+      receiveInfo: [],
+      priceList: [],
+      resultList: [],
+    }
+  },
+  created() {
+    if(this.pageStu == 'check') {
+      console.log('数据', this.row)
+      this.getDetails(this.row)
+    } else if(this.pageStu == 'edit') {
+      this.getDetails(this.row)
+    }
+  },
+  methods: {
+    save() {
+      if(this.pageStu == 'add') {
+        this.basicForm.stAllotMaterialList = this.materialInfo
+        this.basicForm.stAllotReceiveDeliverList = this.receiveInfo
+        this.basicForm.stAllotReceiveExecuteList = this.priceList
+        this.basicForm.stAllotReceiveExpenseList = this.resultList
+        addOrder(this.basicForm).then(res => {
+          if (res.code === 200) {
+            this.$modal.msgSuccess("保存成功");
+            this.back()
+          }
+        })
+      } else if (this.pageStu == 'edit') {
+        this.basicForm.stAllotMaterialList = this.materialInfo
+        this.basicForm.stAllotReceiveDeliverList = this.receiveInfo
+        this.basicForm.stAllotReceiveExecuteList = this.priceList
+        this.basicForm.stAllotReceiveExpenseList = this.resultList
+        editOrder(this.basicForm).then(res => {
+          if (res.code === 200) {
+            this.$modal.msgSuccess("编辑成功");
+            this.back()
+          }
+        })
+      }
+    },
+    back() {
+      this.$emit('jugislist', true)
+      let queryParams = {
+        pageNum: 1,
+        pageSize: 10
+      }
+      this.$emit('refresh', queryParams)
+    },
+    // 如果需要回显则调用详情接口
+    getDetails(row) {
+      getOrderDetail(row.id).then(res => {
+        if (res.code === 200) {
+          this.basicForm = res.data
+          // this.materialInfo = res.data.stAllotMaterialList
+          // this.receiveInfo = res.data.stAllotReceiveDeliverList
+          // this.priceList = res.data.stAllotReceiveExecuteList
+          // this.resultList = res.data.stAllotReceiveExpenseList
+        }
+      })
+    },
+  }
+}
+</script>
+
+<style lang="scss" scoped>
+.btn_group {
+  width: 100%;
+  margin: 20px 0;
+  display: flex;
+  justify-content: center;
+} 
+.btn_grooup {
+  margin-bottom: 10px;
+  display: flex;
+  justify-content: flex-end;
+}  
+</style>

Энэ ялгаанд хэт олон файл өөрчлөгдсөн тул зарим файлыг харуулаагүй болно