浏览代码

Merge remote-tracking branch 'origin/dev' into dev

001295 1 年之前
父节点
当前提交
69674a0c85
共有 71 个文件被更改,包括 4136 次插入2867 次删除
  1. 25 25
      src/api/login.js
  2. 33 2
      src/api/requisition/basic.js
  3. 8 9
      src/assets/styles/element-ui.scss
  4. 10 0
      src/assets/styles/font.scss
  5. 33 20
      src/assets/styles/index.scss
  6. 23 0
      src/assets/styles/margin.scss
  7. 23 0
      src/assets/styles/padding.scss
  8. 3 1
      src/assets/styles/sidebar.scss
  9. 1 1
      src/components/Pagination/index.vue
  10. 56 0
      src/components/popover-select-v2/fetch/index.js
  11. 4 3
      src/components/popover-select-v2/index.vue
  12. 4 3
      src/components/popover-select-v2/multiple.vue
  13. 4 3
      src/components/popover-select/index.vue
  14. 4 3
      src/components/popover-tree-select/index.vue
  15. 4 3
      src/components/popover-tree-select/multiple.vue
  16. 10 55
      src/components/super-search/index.vue
  17. 119 0
      src/components/super-table/freeze.vue
  18. 119 0
      src/components/super-table/hide.vue
  19. 306 162
      src/components/super-table/index.vue
  20. 151 0
      src/components/super-table/once/filter.vue
  21. 53 0
      src/components/super-table/once/freeze.vue
  22. 45 0
      src/components/super-table/once/hide.vue
  23. 53 0
      src/components/super-table/once/sort.vue
  24. 1 1
      src/layout/components/TagsView/index.vue
  25. 85 71
      src/layout/index.vue
  26. 2 1
      src/main.js
  27. 31 29
      src/store/modules/app.js
  28. 4 0
      src/utils/init.js
  29. 3 1
      src/utils/init/index.js
  30. 92 41
      src/views/material/basicFile/details.vue
  31. 54 31
      src/views/material/basicFile/index.vue
  32. 1 1
      src/views/material/basicFile/style/index.scss
  33. 777 677
      src/views/material/requisition/add.vue
  34. 340 235
      src/views/material/requisition/index.vue
  35. 65 56
      src/views/purchase/DemandSummary/add.vue
  36. 53 40
      src/views/purchase/DemandSummary/index.vue
  37. 10 6
      src/views/purchase/MaterialClassDivision/add.vue
  38. 44 24
      src/views/purchase/MaterialClassDivision/index.vue
  39. 227 197
      src/views/purchase/PurchaseDemandList/add.vue
  40. 37 20
      src/views/purchase/PurchaseDemandList/index.vue
  41. 1 1
      src/views/purchase/PurchaseDemandList/reserved.vue
  42. 8 38
      src/views/purchase/apply/add/columns.js
  43. 57 119
      src/views/purchase/apply/add/index.vue
  44. 1 5
      src/views/purchase/apply/columns.js
  45. 20 24
      src/views/purchase/apply/index.vue
  46. 0 27
      src/views/purchase/apply/see/columns.js
  47. 10 2
      src/views/purchase/apply/see/index.vue
  48. 0 1
      src/views/purchase/catalogue/columns.js
  49. 10 15
      src/views/purchase/catalogue/index.vue
  50. 0 1
      src/views/purchase/catalogue/see/columns.js
  51. 9 2
      src/views/purchase/catalogue/see/index.vue
  52. 23 10
      src/views/purchase/contract/add/columns.js
  53. 49 19
      src/views/purchase/contract/add/index.vue
  54. 15 5
      src/views/purchase/contract/edit/columns.js
  55. 32 21
      src/views/purchase/contract/edit/index.vue
  56. 16 9
      src/views/purchase/contract/index.vue
  57. 15 5
      src/views/purchase/contract/see/columns.js
  58. 2 1
      src/views/purchase/contract/see/index.vue
  59. 10 5
      src/views/purchase/deliveryAddress/add.vue
  60. 53 33
      src/views/purchase/deliveryAddress/index.vue
  61. 7 7
      src/views/purchase/purchase-order/add/column.js
  62. 15 10
      src/views/purchase/purchase-order/add/index.vue
  63. 6 6
      src/views/purchase/purchase-order/column.js
  64. 24 10
      src/views/purchase/purchase-order/edit/index.vue
  65. 9 0
      src/views/purchase/purchase-order/edit/initColumn.js
  66. 46 31
      src/views/purchase/purchase-order/index.vue
  67. 1 1
      src/views/purchase/purchase-order/see/index.vue
  68. 1 1
      src/views/purchase/task/columns.js
  69. 29 35
      src/views/purchase/task/index.vue
  70. 613 626
      src/views/purchase/transferOrder/add.vue
  71. 137 76
      src/views/purchase/transferOrder/index.vue

+ 25 - 25
src/api/login.js

@@ -1,4 +1,4 @@
-import request from '@/utils/request'
+import request from "@/utils/request";
 
 // 登录方法
 export function login(username, password, code, uuid) {
@@ -6,54 +6,54 @@ export function login(username, password, code, uuid) {
     username,
     password,
     code,
-    uuid
-  }
+    uuid,
+  };
   return request({
-    url: '/login',
+    url: "/login",
     headers: {
-      isToken: false
+      isToken: false,
     },
-    method: 'post',
-    data: data
-  })
+    method: "post",
+    data: data,
+  });
 }
 
 // 注册方法
 export function register(data) {
   return request({
-    url: '/register',
+    url: "/register",
     headers: {
-      isToken: false
+      isToken: false,
     },
-    method: 'post',
-    data: data
-  })
+    method: "post",
+    data: data,
+  });
 }
 
 // 获取用户详细信息
 export function getInfo() {
   return request({
-    url: '/getInfo',
-    method: 'get'
-  })
+    url: "/getInfo",
+    method: "get",
+  });
 }
 
 // 退出方法
 export function logout() {
   return request({
-    url: '/logout',
-    method: 'post'
-  })
+    url: "/logout",
+    method: "post",
+  });
 }
 
 // 获取验证码
 export function getCodeImg() {
   return request({
-    url: '/captchaImage',
+    url: "/captchaImage",
     headers: {
-      isToken: false
+      isToken: false,
     },
-    method: 'get',
-    timeout: 20000
-  })
-}
+    method: "get",
+    timeout: 20000,
+  });
+}

+ 33 - 2
src/api/requisition/basic.js

@@ -8,14 +8,16 @@ export function getReqList(params) {
     params: params
   })
 }
+
 // 物料申请单-新增
 export function addReq(data) {
   return request({
     url: `/system/apply/material`,
     method: 'post',
-    data: data
+    data: data,
   })
 }
+
 // 获取物料申请单详情
 export function getReqDetail(id) {
   return request({
@@ -23,6 +25,7 @@ export function getReqDetail(id) {
     method: 'get',
   })
 }
+
 // 物料申请单-修改提交
 export function editReq(data) {
   return request({
@@ -31,6 +34,7 @@ export function editReq(data) {
     data: data
   })
 }
+
 // 物料申请单-删除
 export function delReq(id) {
   return request({
@@ -47,6 +51,7 @@ export function getUnit(data) {
     data: data
   })
 }
+
 // 参照-产地
 export function getPlace(data) {
   return request({
@@ -55,6 +60,7 @@ export function getPlace(data) {
     data: data
   })
 }
+
 // 参照-税类
 export function getTax(data) {
   return request({
@@ -63,6 +69,7 @@ export function getTax(data) {
     data: data
   })
 }
+
 // 参照-采购员
 export function getStaff(data) {
   return request({
@@ -71,6 +78,7 @@ export function getStaff(data) {
     data: data
   })
 }
+
 // 参照-业务线
 export function getLine(data) {
   return request({
@@ -79,6 +87,7 @@ export function getLine(data) {
     data: data
   })
 }
+
 // 参照-剂型-树形
 export function getDose(data) {
   return request({
@@ -87,6 +96,7 @@ export function getDose(data) {
     data: data
   })
 }
+
 // 参照-采购组织-树形
 // 查询部门下拉树结构
 export function getOrgs(data) {
@@ -96,6 +106,7 @@ export function getOrgs(data) {
     params: data
   })
 }
+
 // 参照-药品类别(子表)-树形
 export function getDrug(data) {
   return request({
@@ -104,6 +115,7 @@ export function getDrug(data) {
     data: data
   })
 }
+
 // 参照-中包装单位
 export function getMidPack(data) {
   return request({
@@ -111,4 +123,23 @@ export function getMidPack(data) {
     method: 'post',
     data: data
   })
-}
+}
+
+// 导入
+export function importData(data) {
+  return request({
+    url: `/system/apply/material/import`,
+    method: 'post',
+    data: data
+  })
+}
+
+// 下载失败导入文件数据
+export function fileImport(data) {
+  return request({
+    url: `/system/apply/material/downloadFailData`,
+    method: 'post',
+    data: data,
+    responseType: 'blob',
+  })
+}

+ 8 - 9
src/assets/styles/element-ui.scss

@@ -69,7 +69,7 @@
 // dropdown
 .el-dropdown-menu {
   a {
-    display: block
+    display: block;
   }
 }
 
@@ -91,18 +91,17 @@
   display: none;
 }
 
-
-.el-autocomplete-suggestion .el-autocomplete-suggestion__wrap{
+.el-autocomplete-suggestion .el-autocomplete-suggestion__wrap {
   padding: 10px 0 0 0;
-}   
+}
 
- .el-super-table {
+.el-super-table {
   width: 100%;
-  margin: 20px 0 0 0;
 }
- .el-super-table .el-table__cell {
+.el-super-table .el-table__cell {
   height: 50px;
 }
- .el-super-table td.el-table__cell {
+
+.el-super-table td.el-table__cell {
   border-right: 0;
-}
+}

+ 10 - 0
src/assets/styles/font.scss

@@ -0,0 +1,10 @@
+.fe-1 {
+  white-space: nowrap;
+  overflow: hidden;
+  text-overflow: ellipsis;
+}
+@for $i from 3 through 10 {
+  .fs-#{$i} {
+    font-size: 4px * $i;
+  }
+}

+ 33 - 20
src/assets/styles/index.scss

@@ -1,16 +1,20 @@
-@import './variables.scss';
-@import './mixin.scss';
-@import './transition.scss';
-@import './element-ui.scss';
-@import './sidebar.scss';
-@import './btn.scss';
+@import "./variables.scss";
+@import "./mixin.scss";
+@import "./transition.scss";
+@import "./element-ui.scss";
+@import "./sidebar.scss";
+@import "./btn.scss";
+@import "./margin.scss";
+@import "./padding.scss";
+@import "./font.scss";
 
 body {
   height: 100%;
   -moz-osx-font-smoothing: grayscale;
   -webkit-font-smoothing: antialiased;
   text-rendering: optimizeLegibility;
-  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB, Microsoft YaHei, Arial, sans-serif;
+  font-family: Helvetica Neue, Helvetica, PingFang SC, Hiragino Sans GB,
+    Microsoft YaHei, Arial, sans-serif;
 }
 
 label {
@@ -64,7 +68,6 @@ div:focus {
 .fl {
   float: left;
 }
-
 .pr-5 {
   padding-right: 5px;
 }
@@ -104,7 +107,8 @@ aside {
   display: block;
   line-height: 32px;
   font-size: 16px;
-  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
+  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen,
+    Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;
   color: #2c3e50;
   -webkit-font-smoothing: antialiased;
   -moz-osx-font-smoothing: grayscale;
@@ -134,7 +138,7 @@ aside {
 }
 
 .text-center {
-  text-align: center
+  text-align: center;
 }
 
 .sub-navbar {
@@ -145,7 +149,13 @@ aside {
   text-align: right;
   padding-right: 20px;
   transition: 600ms ease position;
-  background: linear-gradient(90deg, rgba(32, 182, 249, 1) 0%, rgba(32, 182, 249, 1) 0%, rgba(33, 120, 241, 1) 100%, rgba(33, 120, 241, 1) 100%);
+  background: linear-gradient(
+    90deg,
+    rgba(32, 182, 249, 1) 0%,
+    rgba(32, 182, 249, 1) 0%,
+    rgba(33, 120, 241, 1) 100%,
+    rgba(33, 120, 241, 1) 100%
+  );
 
   .subtitle {
     font-size: 20px;
@@ -190,22 +200,25 @@ aside {
   z-index: 1000 !important;
 }
 
-
 /**修改全局的滚动条*/
 /**滚动条的宽度*/
 ::-webkit-scrollbar {
-	width: 8px;
+  width: 8px;
 }
 ::-webkit-scrollbar-thumb {
-	background-color: #eaecf1;
-	border-radius: 3px;
+  background-color: #eaecf1;
+  border-radius: 3px;
 }
 /*表格*/
 .el-table__body-wrapper::-webkit-scrollbar {
-	width: 10px;
-	height: 10px;
+  width: 8px;
+  height: 8px;
 }
 .el-table__body-wrapper::-webkit-scrollbar-thumb {
-	background-color: #a1a3a9;
-	border-radius: 3px;
-}
+  background-color: #a1a3a9;
+  border-radius: 3px;
+}
+.el-input__suffix {
+  display: flex;
+  align-items: center;
+}

+ 23 - 0
src/assets/styles/margin.scss

@@ -0,0 +1,23 @@
+@for $i from 0 through 10 {
+  .m-#{$i} {
+    margin: 4px * $i;
+  }
+  .mx-#{$i} {
+    margin: 0 4px * $i;
+  }
+  .my-#{$i} {
+    margin: 4px * $i 0;
+  }
+  .mt-#{$i} {
+    margin-top: 4px * $i;
+  }
+  .mr-#{$i} {
+    margin-right: 4px * $i;
+  }
+  .mb-#{$i} {
+    margin-bottom: 4px * $i;
+  }
+  .ml-#{$i} {
+    margin-left: 4px * $i;
+  }
+}

+ 23 - 0
src/assets/styles/padding.scss

@@ -0,0 +1,23 @@
+@for $i from 0 through 8 {
+  .p-#{$i} {
+    padding: 4px * $i;
+  }
+  .px-#{$i} {
+    padding: 0 4px * $i;
+  }
+  .py-#{$i} {
+    padding: 4px * $i 0;
+  }
+  .pt-#{$i} {
+    padding-top: 4px * $i;
+  }
+  .pr-#{$i} {
+    padding-right: 4px * $i;
+  }
+  .pb-#{$i} {
+    padding-bottom: 4px * $i;
+  }
+  .pl-#{$i} {
+    padding-left: 4px * $i;
+  }
+}

+ 3 - 1
src/assets/styles/sidebar.scss

@@ -4,6 +4,7 @@
     min-height: 100%;
     transition: margin-left .28s;
     margin-left: $base-sidebar-width;
+    margin-left: 0;
     position: relative;
   }
 
@@ -51,7 +52,7 @@
     }
 
     .is-horizontal {
-      display: none;
+
     }
 
     a {
@@ -114,6 +115,7 @@
 
     .main-container {
       margin-left: 54px;
+      // margin-left: 0;
     }
 
     .submenu-title-noDropdown {

+ 1 - 1
src/components/Pagination/index.vue

@@ -36,7 +36,7 @@ export default {
     pageSizes: {
       type: Array,
       default() {
-        return [1, 10, 20, 30, 50];
+        return [1, 10, 20, 50, 100];
       },
     },
     // 移动端页码按钮的数量端默认值5

+ 56 - 0
src/components/popover-select-v2/fetch/index.js

@@ -0,0 +1,56 @@
+import { REFER } from "@/components/popover-select/api";
+
+// 币种
+export const currency = async (prop) => {
+  try {
+    // try
+    const { code, rows } = await REFER({
+      search: prop,
+      type: "CURRENCY_PARAM",
+    });
+    if (code === 200) {
+      return rows[0] || {};
+    }
+  } catch (err) {
+    // catch
+    console.error(err);
+  } finally {
+    // finally
+  }
+};
+// 税率
+export const tax = async (prop) => {
+  try {
+    // try
+    const { code, rows } = await REFER({
+      search: prop,
+      type: "TAX_RATE_PARAM",
+    });
+    if (code === 200) {
+      return rows[0] || {};
+    }
+  } catch (err) {
+    // catch
+    console.error(err);
+  } finally {
+    // finally
+  }
+};
+// 单位
+export const unit = async (prop) => {
+  try {
+    // try
+    const { code, rows } = await REFER({
+      search: prop,
+      type: "UNIT_PARAM",
+    });
+    if (code === 200) {
+      return rows[0] || {};
+    }
+  } catch (err) {
+    // catch
+    console.error(err);
+  } finally {
+    // finally
+  }
+};

+ 4 - 3
src/components/popover-select-v2/index.vue

@@ -213,9 +213,6 @@ export default {
       append-to-body
     >
       <div slot="footer">
-        <el-button :size="$attrs.size" :loading="loading" @click="hide"
-          >取 消</el-button
-        >
         <el-button
           type="primary"
           :size="$attrs.size"
@@ -223,6 +220,10 @@ export default {
           @click="useConfirm(selectData)"
           >确 认</el-button
         >
+        <el-button :size="$attrs.size" :loading="loading" @click="hide"
+          >取 消</el-button
+        >
+        
       </div>
       <el-form
         v-loading="loading"

+ 4 - 3
src/components/popover-select-v2/multiple.vue

@@ -179,9 +179,6 @@ export default {
       append-to-body
     >
       <div slot="footer">
-        <el-button :size="$attrs.size" :loading="loading" @click="hide"
-          >取 消</el-button
-        >
         <el-button
           type="primary"
           :size="$attrs.size"
@@ -189,6 +186,10 @@ export default {
           @click="useConfirm(selectData)"
           >确 认</el-button
         >
+        <el-button :size="$attrs.size" :loading="loading" @click="hide"
+          >取 消</el-button
+        >
+        
       </div>
       <el-form
         v-loading="loading"

+ 4 - 3
src/components/popover-select/index.vue

@@ -331,12 +331,13 @@ export default {
         />
       </el-form>
       <div style="margin-top: 20px; text-align: right">
-        <el-button :size="size" @click="useCancel(lastSelectData)">
-          取 消
-        </el-button>
         <el-button :size="size" @click="useConfirm(selectData)">
           确 定
         </el-button>
+        <el-button :size="size" @click="useCancel(lastSelectData)">
+          取 消
+        </el-button>
+        
       </div>
     </el-dialog>
     <div

+ 4 - 3
src/components/popover-tree-select/index.vue

@@ -210,9 +210,6 @@ export default {
       append-to-body
     >
       <div slot="footer">
-        <el-button :size="$attrs.size" :loading="loading" @click="hide"
-          >取 消</el-button
-        >
         <el-button
           type="primary"
           :size="$attrs.size"
@@ -220,6 +217,10 @@ export default {
           @click="useConfirm(selectData)"
           >确 认</el-button
         >
+        <el-button :size="$attrs.size" :loading="loading" @click="hide"
+          >取 消</el-button
+        >
+        
       </div>
       <el-form
         v-loading="loading"

+ 4 - 3
src/components/popover-tree-select/multiple.vue

@@ -196,9 +196,6 @@ export default {
       append-to-body
     >
       <div slot="footer">
-        <el-button :size="$attrs.size" :loading="loading" @click="hide"
-          >取 消</el-button
-        >
         <el-button
           type="primary"
           :size="$attrs.size"
@@ -206,6 +203,10 @@ export default {
           @click="useConfirm(selectData)"
           >确 认</el-button
         >
+        <el-button :size="$attrs.size" :loading="loading" @click="hide"
+          >取 消</el-button
+        >
+        
       </div>
       <el-form
         v-loading="loading"

+ 10 - 55
src/components/super-search/index.vue

@@ -28,15 +28,13 @@ export default {
   },
   data() {
     const { columns } = this.$props;
-    const stroageKey = (
-      this.$parent.$parent.$options.name + "_search"
-    ).toUpperCase();
-    const loaclColumns = JSON.parse(localStorage.getItem(stroageKey));
-    const innerColumns = !!loaclColumns ? loaclColumns : columns;
+    const innerColumns = columns.map(({ item, attr }) => ({
+      attr,
+      item: { ...item, hidden: true, span: item.span || 6 },
+    }));
     return {
       drawer: false,
       visible: false,
-      stroageKey: stroageKey,
       innerColumns: innerColumns,
     };
   },
@@ -51,17 +49,15 @@ export default {
     },
     showColumns: {
       get() {
-        const columns = this.innerColumns.filter(({ item }) => item.hidden);
-        return this.visible ? columns : columns.slice(0, 4);
+        return this.innerColumns.filter(({ item }) => item.hidden);
       },
       set() {},
     },
   },
   watch: {},
   methods: {
-    changeColumns() {
-      const { stroageKey, innerColumns } = this;
-      localStorage.setItem(stroageKey, JSON.stringify(innerColumns));
+    onVisible() {
+      this.visible = !this.visible;
     },
   },
   created() {},
@@ -169,7 +165,7 @@ export default {
           icon="el-icon-search"
           @click="$emit('submit')"
         >
-          查 询
+          搜 索
         </el-button>
         <el-button
           :size="$attrs.size"
@@ -178,57 +174,16 @@ export default {
         >
           重 置
         </el-button>
-        <!-- <el-button
-          :size="$attrs.size"
-          icon="el-icon-setting"
-          @click="drawer = true"
-        >
-        </el-button> -->
       </el-col>
     </el-row>
-    <el-divider>
+    <el-divider class="m-0">
       <i
         v-if="innerColumns.length > 4"
         :class="visible ? 'el-icon-arrow-up' : 'el-icon-arrow-down'"
         style="cursor: pointer"
-        @click="visible = !visible"
+        @click="onVisible"
       ></i>
     </el-divider>
-    <!-- <el-drawer size="25%" title="操作列" append-to-body :visible.sync="drawer">
-      <el-row :gutter="20" style="margin: 0">
-        <el-draggable
-          v-model="innerColumns"
-          :group="{ item: 'key' }"
-          @change="changeColumns"
-        >
-          <el-col
-            v-for="({ item }, index) in innerColumns"
-            :key="index"
-            :span="24"
-            style="
-              display: flex;
-              justify-content: space-between;
-              padding: 15px 20px;
-            "
-          >
-            <span style="cursor: move">
-              <i class="el-icon-rank"></i>
-              {{ item.title }}
-            </span>
-            <div>
-              <el-radio-group
-                v-model="item.hidden"
-                :size="$attrs.size"
-                @change="changeColumns"
-              >
-                <el-radio-button :label="true">显</el-radio-button>
-                <el-radio-button :label="false">隐</el-radio-button>
-              </el-radio-group>
-            </div>
-          </el-col>
-        </el-draggable>
-      </el-row>
-    </el-drawer> -->
   </el-form>
 </template>
 

+ 119 - 0
src/components/super-table/freeze.vue

@@ -0,0 +1,119 @@
+<template>
+  <el-button size="mini" @click="drawer = true">
+    {{ number ? `冻结列 :${number}` : "冻结列" }}
+    <el-drawer
+      :modal="false"
+      :visible.sync="drawer"
+      size="20%"
+      title="冻结列"
+      append-to-body
+    >
+      <el-input
+        v-model="key"
+        size="mini"
+        placeholder="请输入列名称"
+        style="width: 100%; padding: 0 16px 16px"
+      >
+      </el-input>
+      <el-row :gutter="20" style="margin: 0">
+        <el-draggable
+          v-model="columns"
+          :group="{ item: 'key' }"
+          @end="$emit('freeze')"
+        >
+          <el-col
+            v-for="({ item }, index) in searchColumns"
+            :key="index"
+            :span="24"
+            style="
+              display: flex;
+              justify-content: space-between;
+              padding: 12px 16px;
+            "
+          >
+            <span
+              style="
+                font-size: 13px;
+                flex: 1;
+                cursor: move;
+                padding: 0 12px 0 0;
+                text-overflow: ellipsis;
+                overflow: hidden;
+                word-break: break-all;
+                white-space: nowrap;
+              "
+            >
+              <i
+                class="el-icon-mouse"
+                style="color: #72767b; margin: 0 6px 0 0"
+              ></i>
+              <i
+                class="el-icon-user"
+                style="color: #72767b; margin: 0 6px 0 0"
+              ></i>
+              {{ item.title }}
+            </span>
+            <div>
+              <el-switch
+                v-model="item.fixed"
+                size="mini"
+                @change="$emit('freeze')"
+              ></el-switch>
+            </div>
+          </el-col>
+        </el-draggable>
+      </el-row>
+    </el-drawer>
+  </el-button>
+</template>
+
+<script>
+export default {
+  name: "",
+  components: {
+    ElDraggable: () => import("@/components/draggable/index.vue"),
+  },
+  props: {
+    value: {
+      type: Array,
+      require: true,
+    },
+  },
+  data() {
+    return {
+      drawer: false,
+      key: "",
+    };
+  },
+  computed: {
+    columns: {
+      get() {
+        return this.$props.value;
+      },
+      set(value) {
+        this.$emit("input", value);
+      },
+    },
+    searchColumns: {
+      get() {
+        return this.columns.filter(
+          ({ item }) => item.title.indexOf(this.key) > -1
+        );
+      },
+      set(value) {},
+    },
+    number: {
+      get() {
+        return this.columns.filter(({ item }) => item.fixed).length;
+      },
+      set(value) {},
+    },
+  },
+  watch: {},
+  methods: {},
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<style scoped></style>

+ 119 - 0
src/components/super-table/hide.vue

@@ -0,0 +1,119 @@
+<template>
+  <el-button size="mini" @click="drawer = true">
+    {{ number ? `隐藏列 :${number}` : "隐藏列" }}
+    <el-drawer
+      :modal="false"
+      :visible.sync="drawer"
+      size="20%"
+      title="隐藏列"
+      append-to-body
+    >
+      <el-input
+        v-model="key"
+        size="mini"
+        placeholder="请输入列名称"
+        style="width: 100%; padding: 0 16px 16px"
+      >
+      </el-input>
+      <el-row :gutter="20" style="margin: 0">
+        <el-draggable
+          v-model="columns"
+          :group="{ item: 'key' }"
+          @end="$emit('hide')"
+        >
+          <el-col
+            v-for="({ item }, index) in searchColumns"
+            :key="index"
+            :span="24"
+            style="
+              display: flex;
+              justify-content: space-between;
+              padding: 12px 16px;
+            "
+          >
+            <span
+              style="
+                font-size: 13px;
+                flex: 1;
+                cursor: move;
+                padding: 0 12px 0 0;
+                text-overflow: ellipsis;
+                overflow: hidden;
+                word-break: break-all;
+                white-space: nowrap;
+              "
+            >
+              <i
+                class="el-icon-mouse"
+                style="color: #72767b; margin: 0 6px 0 0"
+              ></i>
+              <i
+                class="el-icon-user"
+                style="color: #72767b; margin: 0 6px 0 0"
+              ></i>
+              {{ item.title }}
+            </span>
+            <div>
+              <el-switch
+                v-model="item.hidden"
+                size="mini"
+                @change="$emit('hide')"
+              ></el-switch>
+            </div>
+          </el-col>
+        </el-draggable>
+      </el-row>
+    </el-drawer>
+  </el-button>
+</template>
+
+<script>
+export default {
+  name: "",
+  components: {
+    ElDraggable: () => import("@/components/draggable/index.vue"),
+  },
+  props: {
+    value: {
+      type: Array,
+      require: true,
+    },
+  },
+  data() {
+    return {
+      drawer: false,
+      key: "",
+    };
+  },
+  computed: {
+    columns: {
+      get() {
+        return this.$props.value;
+      },
+      set(value) {
+        this.$emit("input", value);
+      },
+    },
+    searchColumns: {
+      get() {
+        return this.columns.filter(
+          ({ item }) => item.title.indexOf(this.key) > -1
+        );
+      },
+      set(value) {},
+    },
+    number: {
+      get() {
+        return this.columns.filter(({ item }) => !item.hidden).length;
+      },
+      set(value) {},
+    },
+  },
+  watch: {},
+  methods: {},
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<style scoped></style>

+ 306 - 162
src/components/super-table/index.vue

@@ -2,26 +2,61 @@
 export default {
   name: "SuperTable",
   props: {
+    // 数据
     value: {
       type: [Array],
       require: true,
     },
+    // 字典
     dict: {
       type: [Object],
       require: true,
     },
+    // 分页
+    page: {
+      type: [Object],
+      require: false,
+    },
+    // 模板
     columns: {
       type: [Array],
       require: true,
     },
-    stroage: {
+    // 是否显示序号
+    index: {
+      type: Boolean,
+      default: false,
+    },
+    // 是否显示单选
+    radio: {
       type: Boolean,
       default: false,
     },
-    hideOperationColumns: {
+    // 是否显示多选
+    checkbox: {
       type: Boolean,
       default: false,
     },
+    // 是否显示分页
+    pagination: {
+      type: Boolean,
+      default: false,
+    },
+    // 是否列显示
+    hiddenColumns: {
+      type: Boolean,
+      default: false,
+    },
+    // 是否列过滤
+    filterColumns: {
+      type: Boolean,
+      default: false,
+    },
+    // 是否禁止选择
+    selectable: {
+      type: Function,
+      default: () => {},
+    },
   },
   components: {
     ElDictTag: () => import("@/components/DictTag/index.vue"),
@@ -30,28 +65,40 @@ export default {
     ElComputedInput: () => import("@/components/computed-input/index.vue"),
     ElPopoverSelectV2: () => import("@/components/popover-select-v2/index.vue"),
     ElComputedInputV2: () => import("@/components/computed-input-v2/index.vue"),
+    ButtonHide: () => import("./hide.vue"),
+    ButtonFreeze: () => import("./freeze.vue"),
+    IconHide: () => import("./once/hide.vue"),
+    IconSort: () => import("./once/sort.vue"),
+    IconFilter: () => import("./once/filter.vue"),
+    IconFreeze: () => import("./once/freeze.vue"),
   },
   data() {
-    const { columns, stroage } = this.$props;
-    const stroageKey = (
-      this.$parent.$parent.$options.name + "_table"
-    ).toUpperCase();
-    const loaclColumns = JSON.parse(localStorage.getItem(stroageKey));
-    const innerColumns = stroage && !!loaclColumns ? loaclColumns : columns;
+    const { columns } = this.$props;
+    const innerColumns = columns.map(({ item, attr }) => ({
+      attr,
+      item: { ...item, hidden: true },
+    }));
     return {
-      drawer: false,
-      visible: false,
-      top: 0,
-      left: 0,
-      stroageKey: stroageKey,
       innerColumns: innerColumns,
-      currentData: {},
+      rowKey: "id",
+      // 选择
+      selectData: [],
+      selectState: false,
+      // 过滤
+      filterData: [],
+      filterState: false,
     };
   },
   computed: {
     innerValue: {
       get() {
-        return this.value;
+        if (this.filterState) {
+          return this.filterData;
+        } else if (this.selectState) {
+          return this.selectData;
+        } else {
+          return this.$props.value;
+        }
       },
       set(value) {
         this.$emit("input", value);
@@ -59,77 +106,108 @@ export default {
     },
     showColumns: {
       get() {
-        const { stroage, hideOperationColumns } = this.$props;
-        return stroage && hideOperationColumns
-          ? this.innerColumns.filter(({ item }) => item.hidden)
-          : this.innerColumns;
+        return this.innerColumns.filter(({ item }) => item.hidden);
+      },
+      set() {},
+    },
+    filterRules: {
+      get() {
+        return Object.fromEntries(
+          this.innerColumns
+            .filter(({ item }) => item.filter && !!item.filter.length)
+            .map(({ item }) => [item.key, item.filter])
+        );
       },
+      set() {},
     },
   },
   watch: {
-    visible(value) {
-      if (value) {
-        document.body.addEventListener("click", this.hideContextmenu);
-        document.body.addEventListener("keydown", this.hideContextmenu);
-      } else {
-        document.body.removeEventListener("click", this.hideContextmenu);
-        document.body.removeEventListener("keydown", this.hideContextmenu);
-      }
+    filterRules: {
+      handler: function (newValue) {
+        function multiFilter(array, filters) {
+          const filterKeys = Object.keys(filters);
+          // filters all elements passing the criteria
+          return array.filter((item) => {
+            // dynamically validate all filter criteria
+            return filterKeys.every((key) => {
+              //ignore when the filter is empty Anne
+              if (!filters[key].length) return true;
+              return !!~filters[key].indexOf(item[key]);
+            });
+          });
+        }
+        this.filterState = JSON.stringify(newValue) !== "{}";
+        this.filterData = multiFilter(this.$props.value, newValue);
+      },
     },
   },
   methods: {
-    setColumns() {
-      const { stroageKey, innerColumns } = this;
+    //
+    onSelectionChange(value) {
+      this.selectData = value;
+    },
+    //
+    onRowClick(row, column, event) {
+      const { radio, checkbox } = this.$props;
+      // 单选
+      if (radio) {
+        this.selectData = [row];
+        this.innerValue = this.innerValue.map((item) => ({
+          ...item,
+          isChecked: item.id === row.id ? true : false,
+        }));
+        this.$emit("row-select", this.selectData);
+      }
+      // 多选
+      if (checkbox) {
+        this.$refs.superTable.toggleRowSelection(
+          this.innerValue.find((item) => item.id === row.id)
+        );
+        this.$emit("row-select", this.selectData);
+      }
+    },
+    // 冻结
+    onHide() {
       this.$nextTick(() => {
         this.$refs.superTable.doLayout();
-        localStorage.setItem(stroageKey, JSON.stringify(innerColumns));
       });
     },
-    resetColumns() {
-      const { stroageKey, innerColumns } = this;
-      this.innerColumns = innerColumns.map(({ item, attr }) => ({
-        attr,
-        item: { ...item, hidden: true, fixed: false },
-      }));
+    // 排序
+    onSort(prop) {
+      const { key, sort } = prop;
       this.$nextTick(() => {
+        this.$refs.superTable.sort(key, sort);
         this.$refs.superTable.doLayout();
-        localStorage.removeItem(stroageKey);
       });
     },
-    openContextmenu(row, column, event) {
-      this.visible = true;
-      this.currentData = { row, column };
+    // 冻结
+    onFreeze() {
       this.$nextTick(() => {
-        // 鼠标坐标
-        const { x, y } = event;
-        // 侧边栏宽度
-        const [{ clientWidth: sideWidth }] =
-          document.getElementsByClassName("sidebar-container");
-        // 导航栏宽度
-        const { clientHeight: navHeight } =
-          document.getElementsByClassName("main-container")[0].firstChild;
-        // 菜单宽度
-        const [{ clientWidth: contextmenuWidth }] =
-          document.getElementsByClassName("el-super-table_contextmenu");
-        // 最大Y轴偏差
-        const maxLeft = this.$el.offsetWidth - contextmenuWidth;
-        if (x > maxLeft) {
-          this.left = maxLeft + 10;
-        } else {
-          this.left = x - sideWidth;
-        }
-        this.top = y - navHeight;
+        this.$refs.superTable.doLayout();
       });
     },
-    hideContextmenu(event) {
-      const { type } = event;
-      if (type === "click") {
-        this.visible = false;
-      }
-      if (type === "keydown") {
-        const { keyCode } = event;
-        if (keyCode === 27) this.visible = false;
-      }
+    // 过滤
+    onFilter() {
+      this.$nextTick(() => {
+        this.$refs.superTable.doLayout();
+      });
+    },
+    onFilters(value) {
+      const {
+        item: { key },
+        attr: { dictName },
+      } = value;
+      let dataList = [];
+      const dict = this.dict.type[dictName];
+      dataList = Array.from(
+        new Set(this.innerValue.map((item) => item[key]).filter((item) => item))
+      ).map((item) => ({
+        text: dictName
+          ? (dict.find((dictItem) => dictItem.value == item) || {}).label
+          : item,
+        value: item,
+      }));
+      return dataList;
     },
   },
   created() {},
@@ -139,25 +217,104 @@ export default {
 </script>
 
 <template>
-  <div class="el-super-table" @contextmenu.prevent.stop>
+  <div class="el-super-table">
     <el-table
+      ref="superTable"
+      border
+      :row-key="rowKey"
+      :data="innerValue"
+      @row-click="onRowClick"
+      @selection-change="onSelectionChange"
       v-bind="$attrs"
       v-on="$listeners"
-      :data="innerValue"
-      border
-      ref="superTable"
-      @row-contextmenu="openContextmenu"
     >
-      <slot></slot>
+      <!-- 序号 -->
+      <el-table-column
+        v-if="index"
+        :resizable="false"
+        fixed
+        width="50"
+        label="序号"
+        align="center"
+        class="is-index"
+      >
+        <template slot-scope="scope">
+          {{ scope.$index + 1 }}
+        </template>
+      </el-table-column>
+      <!-- 多选 -->
+      <el-table-column
+        v-if="checkbox"
+        :column-key="rowKey"
+        fixed
+        width="50"
+        align="center"
+        type="selection"
+        reserve-selection
+      >
+      </el-table-column>
       <el-table-column
         v-for="({ item, attr }, index) in showColumns"
         :key="index"
         :prop="item.key"
         :label="item.title"
         :fixed="item.fixed"
-        :width="item.width || 250"
+        :width="item.width || 200"
         show-overflow-tooltip
       >
+        <template slot="header" slot-scope="scope">
+          <template>
+            <span v-if="item.require" style="color: #ff4949">*</span>
+            <span
+              :style="{
+                color:
+                  item.sort ||
+                  item.fixed ||
+                  (item.filter && !!item.filter.length)
+                    ? '#1890ff'
+                    : '',
+              }"
+            >
+              {{ item.title }}
+            </span>
+            <icon-sort
+              v-model="item.sort"
+              class="icon-sort"
+              @sort="onSort(item)"
+              :style="{
+                color: item.sort ? '#1890ff' : '',
+                display: item.sort ? 'inline-block' : '',
+              }"
+            ></icon-sort>
+            <icon-freeze
+              v-model="item.fixed"
+              class="icon-freeze"
+              @freeze="onFreeze"
+              :style="{
+                color: item.fixed ? '#1890ff' : '',
+                display: item.fixed ? 'inline-block' : '',
+              }"
+            ></icon-freeze>
+            <icon-filter
+              v-if="filterColumns"
+              v-model="item.filter"
+              class="icon-filter"
+              :filters="onFilters({ item, attr })"
+              @filter="onFilter"
+              :style="{
+                color: item.filter && item.filter.length ? '#1890ff' : '',
+                display:
+                  item.filter && item.filter.length ? 'inline-block' : '',
+              }"
+            ></icon-filter>
+            <icon-hide
+              v-if="hiddenColumns"
+              v-model="item.hidden"
+              class="icon-hide"
+              @hide="onHide"
+            ></icon-hide>
+          </template>
+        </template>
         <template slot-scope="scope">
           <slot :name="item.key" v-bind="scope" :item="item" :attr="attr">
             <template v-if="attr.is">
@@ -197,6 +354,7 @@ export default {
                 v-bind="attr"
                 v-model="scope.row[item.key]"
                 :size="$attrs.size"
+                style="width: 100%"
               >
               </component
             ></template>
@@ -211,99 +369,85 @@ export default {
           </slot>
         </template>
       </el-table-column>
+      <slot></slot>
     </el-table>
-    <el-drawer :visible.sync="drawer" size="25%" title="操作列" append-to-body>
-      <el-row :gutter="20" style="margin: 0">
-        <el-draggable
-          v-model="innerColumns"
-          :group="{ item: 'key' }"
-          @change="setColumns"
-        >
-          <el-col
-            v-for="({ item }, index) in innerColumns"
-            :key="index"
-            :span="24"
-            style="
-              display: flex;
-              justify-content: space-between;
-              padding: 15px 20px;
-            "
+    <div
+      style="
+        height: auto;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+      "
+    >
+      <div>
+        <template v-if="checkbox">
+          <el-button
+            v-if="selectState"
+            size="mini"
+            @click="selectState = !selectState"
           >
-            <span style="cursor: move">
-              <i class="el-icon-rank"></i>
-              {{ item.title }}
-            </span>
-            <div>
-              <el-radio-group
-                v-model="item.hidden"
-                :size="$attrs.size"
-                style="margin: 0 15px 0 0"
-                @change="setColumns"
-              >
-                <el-radio-button :label="true">显</el-radio-button>
-                <el-radio-button :label="false">隐</el-radio-button>
-              </el-radio-group>
-              <el-radio-group
-                v-model="item.fixed"
-                :size="$attrs.size"
-                @change="setColumns"
-              >
-                <el-radio-button :label="false">不</el-radio-button>
-                <el-radio-button label="left">左</el-radio-button>
-                <el-radio-button label="right">右</el-radio-button>
-              </el-radio-group>
-            </div>
-          </el-col>
-        </el-draggable>
-      </el-row>
-    </el-drawer>
-    <transition name="el-fade-in-linear">
-      <ul
-        v-show="visible"
-        :style="{ left: left + 'px', top: top + 'px' }"
-        class="el-super-table_contextmenu"
-      >
-        <li v-if="hideOperationColumns" @click="drawer = true">
-          <i class="el-icon-setting"></i>
-          <span>设置布局</span>
-        </li>
-        <li v-if="hideOperationColumns" @click="resetColumns">
-          <i class="el-icon-refresh"></i>
-          <span>重置布局</span>
-        </li>
-        <slot name="contextmenu" v-bind="currentData"> </slot>
-      </ul>
-    </transition>
+            所有列
+          </el-button>
+          <el-button
+            v-else
+            :disabled="!selectData.length"
+            size="mini"
+            @click="selectState = !selectState"
+          >
+            选择列
+            {{ selectData.length ? ` :${selectData.length}` : "" }}
+          </el-button>
+        </template>
+        <template v-if="hiddenColumns">
+          <button-hide v-model="innerColumns" @hide="onHide"></button-hide>
+          <button-freeze
+            v-model="showColumns"
+            @freeze="onFreeze"
+          ></button-freeze>
+        </template>
+      </div>
+      <pagination
+        v-if="pagination"
+        v-show="!selectState"
+        :total="page.total"
+        :page.sync="page.pageNum"
+        :limit.sync="page.pageSize"
+        @pagination="$emit('pagination', { ...$event })"
+        style="height: 32px; padding: 0 !important"
+      />
+    </div>
   </div>
 </template>
 
-<style lang="scss">
-.el-super-table .el-table {
-  overflow: hidden;
-  border-radius: 5px;
+<style lang="scss" scoped>
+.el-super-table {
+  position: relative;
 }
-.el-super-table_contextmenu {
-  margin: 0;
-  background: #fff;
-  z-index: 3000;
-  position: absolute;
-  list-style-type: none;
-  padding: 5px 0;
-  border-radius: 4px;
-  font-size: 12px;
-  font-weight: 400;
-  color: #333;
-  box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
-  li {
-    margin: 0;
-    padding: 7px 16px;
-    cursor: pointer;
-    &:hover {
-      background: #ddd;
-    }
-    span {
-      margin: 0 0 0 5px;
-    }
+.el-super-table .el-table__header .cell {
+  display: flex;
+  .icon-sort {
+    display: none;
+  }
+  &:hover .icon-sort {
+    display: inline-block;
+  }
+  .icon-freeze {
+    display: none;
+  }
+  &:hover .icon-freeze {
+    display: inline-block;
+  }
+  .icon-filter {
+    display: none;
+  }
+  &:hover .icon-filter {
+    display: inline-block;
+  }
+  .icon-hide {
+    display: none;
+  }
+  &:hover .icon-hide {
+    display: inline-block;
   }
 }
 </style>

+ 151 - 0
src/components/super-table/once/filter.vue

@@ -0,0 +1,151 @@
+<template>
+  <el-popover
+    v-if="filterData.length"
+    :visible-arrow="false"
+    width="auto"
+    trigger="hover"
+    placement="bottom"
+    popper-class="p-0"
+  >
+    <template>
+      <el-checkbox-group
+        v-model="selectData"
+        class="pt-3 px-3"
+        @change="onCheck"
+      >
+        <el-checkbox
+          v-for="item in filterData"
+          :key="item.value"
+          :label="item.value"
+          class="mr-0 mb-3"
+          style="display: block"
+        >
+          {{ item.text }}
+        </el-checkbox>
+      </el-checkbox-group>
+      <el-divider class="m-0"></el-divider>
+      <div
+        class="p-3"
+        style="min-width: 175px; display: flex; justify-content: space-between"
+      >
+        <el-checkbox
+          v-model="checkAll"
+          :indeterminate="indeterminate"
+          @change="onCheckAll"
+        >
+          全选
+        </el-checkbox>
+        <div>
+          <el-button type="text" class="p-0" @click="onReset">重置</el-button>
+          <el-button type="text" class="p-0" @click="onFilter">筛选</el-button>
+        </div>
+      </div>
+    </template>
+    <!-- <el-tooltip
+      slot="reference"
+      :disabled="disabled"
+      effect="dark"
+      content="筛选"
+      placement="top"
+    > -->
+    <i
+      slot="reference"
+      class="el-icon-search pl-1"
+      style="cursor: pointer; font-weight: 600; transition: 500ms"
+      :style="{ color: color }"
+      @click="onOpen"
+    ></i>
+    <!-- </el-tooltip> -->
+  </el-popover>
+</template>
+
+<script>
+export default {
+  name: "IconFilter",
+  components: {},
+  data() {
+    return {
+      disabled: false,
+      selectData: [],
+    };
+  },
+  props: {
+    value: {
+      type: Array,
+      require: true,
+    },
+    filters: {
+      type: Array,
+      require: true,
+    },
+  },
+  computed: {
+    innerValue: {
+      get() {
+        return this.$props.value;
+      },
+      set(value) {
+        this.$emit("input", value);
+      },
+    },
+    filterData: {
+      get() {
+        return this.$props.filters;
+      },
+      set() {},
+    },
+    indeterminate: {
+      get() {
+        const count = this.filterData.length;
+        const selectCount = this.selectData.length;
+        return selectCount > 0 && selectCount < count;
+      },
+      set() {},
+    },
+    checkAll: {
+      get() {
+        const count = this.filterData.length;
+        const selectCount = this.selectData.length;
+        return count === selectCount;
+      },
+      set() {},
+    },
+    color: {
+      get() {
+        return this.$props.value && this.$props.value.length ? "#1890ff" : "";
+      },
+      set() {},
+    },
+  },
+  watch: {},
+  methods: {
+    // 打开
+    onOpen() {
+      this.disabled = !this.disabled;
+    },
+    // 选中
+    onCheck() {
+      // const count = this.filterData.length;
+      // const selectCount = this.selectData.length;
+      // this.checkAll = count === selectCount;
+    },
+    // 全选
+    onCheckAll(value) {
+      this.selectData = value ? this.filterData.map((item) => item.value) : [];
+    },
+    // 重置
+    onReset() {
+      this.selectData = [];
+      this.innerValue = this.selectData;
+    },
+    // 筛选
+    onFilter() {
+      this.innerValue = this.selectData;
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<style scoped></style>

+ 53 - 0
src/components/super-table/once/freeze.vue

@@ -0,0 +1,53 @@
+<template>
+  <!-- <el-tooltip effect="dark" content="冻结" placement="top"> -->
+  <i
+    v-if="innerValue"
+    class="el-icon-lock pl-1"
+    style="color: #1890ff; cursor: pointer; font-weight: 600; transition: 500ms"
+    @click="onFreeze"
+  ></i>
+  <i
+    v-else
+    class="el-icon-unlock pl-1"
+    style="cursor: pointer; font-weight: 600; transition: 500ms"
+    @click="onFreeze"
+  ></i>
+  <!-- </el-tooltip> -->
+</template>
+
+<script>
+export default {
+  name: "IconFreeze",
+  components: {},
+  data() {
+    return {};
+  },
+  props: {
+    value: {
+      type: Boolean,
+      require: true,
+    },
+  },
+  computed: {
+    innerValue: {
+      get() {
+        return this.$props.value;
+      },
+      set(value) {
+        this.$emit("input", value);
+      },
+    },
+  },
+  watch: {},
+  methods: {
+    onFreeze() {
+      this.innerValue = !this.innerValue;
+      this.$emit("freeze");
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<style scoped></style>

+ 45 - 0
src/components/super-table/once/hide.vue

@@ -0,0 +1,45 @@
+<template>
+  <i
+    v-if="innerValue"
+    class="el-icon-circle-close pl-1"
+    style="cursor: pointer; font-weight: 600; transition: 500ms"
+    @click="onHide"
+  ></i>
+</template>
+
+<script>
+export default {
+  name: "IconHide",
+  components: {},
+  props: {
+    value: {
+      type: Boolean,
+      require: true,
+    },
+  },
+  data() {
+    return {};
+  },
+  computed: {
+    innerValue: {
+      get() {
+        return this.$props.value;
+      },
+      set(value) {
+        this.$emit("input", value);
+      },
+    },
+  },
+  watch: {},
+  methods: {
+    onHide() {
+      this.innerValue = !this.innerValue;
+      this.$emit("hide");
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<style scoped></style>

+ 53 - 0
src/components/super-table/once/sort.vue

@@ -0,0 +1,53 @@
+<template>
+  <!-- <el-tooltip effect="dark" content="排序" placement="top"> -->
+  <i
+    v-if="innerValue === 'descending'"
+    class="el-icon-bottom pl-1"
+    style="color: #1890ff; cursor: pointer; font-weight: 600; transition: 500ms"
+    @click="onSort(null)"
+  ></i>
+  <i
+    v-else
+    class="el-icon-top pl-1"
+    style="cursor: pointer; font-weight: 600; transition: 500ms"
+    @click="onSort('descending')"
+  ></i>
+  <!-- </el-tooltip> -->
+</template>
+
+<script>
+export default {
+  name: "IconSort",
+  components: {},
+  data() {
+    return {};
+  },
+  props: {
+    value: {
+      type: String,
+      require: true,
+    },
+  },
+  computed: {
+    innerValue: {
+      get() {
+        return this.$props.value;
+      },
+      set(value) {
+        this.$emit("input", value);
+      },
+    },
+  },
+  watch: {},
+  methods: {
+    onSort(value) {
+      this.innerValue = value;
+      this.$emit("sort");
+    },
+  },
+  created() {},
+  mounted() {},
+  destroyed() {},
+};
+</script>
+<style scoped></style>

+ 1 - 1
src/layout/components/TagsView/index.vue

@@ -243,7 +243,7 @@ export default {
   width: 100%;
   background: #fff;
   border-bottom: 1px solid #d8dce5;
-  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04);
+  box-shadow: 0 1px 3px 0 rgba(0, 0, 0, .12), 0 0 3px 0 rgba(0, 0, 0, .04);  
   .tags-view-wrapper {
     .tags-view-item {
       display: inline-block;

+ 85 - 71
src/layout/index.vue

@@ -1,16 +1,27 @@
 <template>
-  <div :class="classObj" class="app-wrapper" :style="{'--current-color': theme}">
+  <div
+    :class="classObj"
+    class="app-wrapper"
+    :style="{ '--current-color': theme }"
+  >
     <el-scrollbar>
-      <div v-if="device==='mobile'&&sidebar.opened" class="drawer-bg" @click="handleClickOutside"/>
-      <sidebar v-if="!sidebar.hide" class="sidebar-container"/>
-      <div :class="{hasTagsView:needTagsView,sidebarHide:sidebar.hide}" class="main-container">
-        <div :class="{'fixed-header':fixedHeader}">
-          <navbar/>
-          <tags-view v-if="needTagsView"/>
+      <div
+        v-if="device === 'mobile' && sidebar.opened"
+        class="drawer-bg"
+        @click="handleClickOutside"
+      />
+      <sidebar v-if="!sidebar.hide" class="sidebar-container" />
+      <div
+        :class="{ hasTagsView: needTagsView, sidebarHide: sidebar.hide }"
+        class="main-container"
+      >
+        <div :class="{ 'fixed-header': fixedHeader }">
+          <!-- <navbar /> -->
+          <!-- <tags-view v-if="needTagsView" /> -->
         </div>
-        <app-main/>
-        <right-panel>
-          <settings/>
+        <app-main />
+        <right-panel v-if="dev">
+          <settings />
         </right-panel>
       </div>
     </el-scrollbar>
@@ -18,104 +29,107 @@
 </template>
 
 <script>
-import RightPanel from '@/components/RightPanel'
-import { AppMain, Navbar, Settings, Sidebar, TagsView } from './components'
-import ResizeMixin from './mixin/ResizeHandler'
-import { mapState } from 'vuex'
-import variables from '@/assets/styles/variables.scss'
+import RightPanel from "@/components/RightPanel";
+import { AppMain, Navbar, Settings, Sidebar, TagsView } from "./components";
+import ResizeMixin from "./mixin/ResizeHandler";
+import { mapState } from "vuex";
+import variables from "@/assets/styles/variables.scss";
 
 export default {
-  name: 'Layout',
+  name: "Layout",
   components: {
     AppMain,
     Navbar,
     RightPanel,
     Settings,
     Sidebar,
-    TagsView
+    TagsView,
   },
   mixins: [ResizeMixin],
   computed: {
     ...mapState({
-      theme: state => state.settings.theme,
-      sideTheme: state => state.settings.sideTheme,
-      sidebar: state => state.app.sidebar,
-      device: state => state.app.device,
-      needTagsView: state => state.settings.tagsView,
-      fixedHeader: state => state.settings.fixedHeader
+      theme: (state) => state.settings.theme,
+      sideTheme: (state) => state.settings.sideTheme,
+      sidebar: (state) => state.app.sidebar,
+      device: (state) => state.app.device,
+      needTagsView: (state) => state.settings.tagsView,
+      fixedHeader: (state) => state.settings.fixedHeader,
     }),
     classObj() {
       return {
         hideSidebar: !this.sidebar.opened,
         openSidebar: this.sidebar.opened,
         withoutAnimation: this.sidebar.withoutAnimation,
-        mobile: this.device === 'mobile'
-      }
+        mobile: this.device === "mobile",
+      };
     },
     variables() {
       return variables;
-    }
+    },
+    dev() {
+      return process.env.NODE_ENV === "development";
+    },
   },
   methods: {
     handleClickOutside() {
-      this.$store.dispatch('app/closeSideBar', { withoutAnimation: false })
-    }
-  }
-}
+      this.$store.dispatch("app/closeSideBar", { withoutAnimation: false });
+    },
+  },
+};
 </script>
 
 <style lang="scss" scoped>
-  @import "~@/assets/styles/mixin.scss";
-  @import "~@/assets/styles/variables.scss";
+@import "~@/assets/styles/mixin.scss";
+@import "~@/assets/styles/variables.scss";
 
-  .app-wrapper {
-    @include clearfix;
-    position: relative;
-    height: 100%;
-    width: 100%;
-
-    .el-scrollbar{
-      height: 100%;
-    }
-
-    ::v-deep .el-scrollbar__wrap {
-      overflow-x: hidden;
-    }
+.app-wrapper {
+  @include clearfix;
+  position: relative;
+  height: 100%;
+  width: 100%;
 
-    &.mobile.openSidebar {
-      position: fixed;
-      top: 0;
-    }
+  .el-scrollbar {
+    height: 100%;
   }
 
-  .drawer-bg {
-    background: #000;
-    opacity: 0.3;
-    width: 100%;
-    top: 0;
-    height: 100%;
-    position: absolute;
-    z-index: 999;
+  ::v-deep .el-scrollbar__wrap {
+    overflow-x: hidden;
   }
 
-  .fixed-header {
+  &.mobile.openSidebar {
     position: fixed;
     top: 0;
-    right: 0;
-    z-index: 9;
-    width: calc(100% - #{$base-sidebar-width});
-    transition: width 0.28s;
   }
+}
 
-  .hideSidebar .fixed-header {
-    width: calc(100% - 54px);
-  }
+.drawer-bg {
+  background: #000;
+  opacity: 0.3;
+  width: 100%;
+  top: 0;
+  height: 100%;
+  position: absolute;
+  z-index: 999;
+}
 
-  .sidebarHide .fixed-header {
-    width: 100%;
-  }
+.fixed-header {
+  position: fixed;
+  top: 0;
+  right: 0;
+  z-index: 9;
+  width: calc(100% - #{$base-sidebar-width});
+  transition: width 0.28s;
+}
 
-  .mobile .fixed-header {
-    width: 100%;
-  }
+.hideSidebar .fixed-header {
+  width: calc(100% - 54px);
+}
+
+.sidebarHide .fixed-header {
+  width: 100%;
+}
+
+.mobile .fixed-header {
+  width: 100%;
+}
 </style>

+ 2 - 1
src/main.js

@@ -29,7 +29,7 @@ import {
   selectDictLabels,
   handleTree,
 } from "@/utils/ruoyi";
-import { initParams, initRules, initDicts } from "@/utils/init.js";
+import { initParams, initRules, initDicts, initPage } from "@/utils/init.js";
 // 分页组件
 import Pagination from "@/components/Pagination";
 // 自定义表格工具组件
@@ -73,6 +73,7 @@ Vue.prototype.$init = {
   params: initParams,
   dicts: initDicts,
   rules: initRules,
+  page: initPage,
 };
 
 // 全局组件挂载

+ 31 - 29
src/store/modules/app.js

@@ -1,66 +1,68 @@
-import Cookies from 'js-cookie'
+import Cookies from "js-cookie";
 
 const state = {
   sidebar: {
-    opened: Cookies.get('sidebarStatus') ? !!+Cookies.get('sidebarStatus') : true,
+    opened: Cookies.get("sidebarStatus")
+      ? !!+Cookies.get("sidebarStatus")
+      : false,
     withoutAnimation: false,
-    hide: false
+    hide: false,
   },
-  device: 'desktop',
-  size: Cookies.get('size') || 'medium'
-}
+  device: "desktop",
+  size: Cookies.get("size") || "medium",
+};
 
 const mutations = {
-  TOGGLE_SIDEBAR: state => {
+  TOGGLE_SIDEBAR: (state) => {
     if (state.sidebar.hide) {
       return false;
     }
-    state.sidebar.opened = !state.sidebar.opened
-    state.sidebar.withoutAnimation = false
+    state.sidebar.opened = !state.sidebar.opened;
+    state.sidebar.withoutAnimation = false;
     if (state.sidebar.opened) {
-      Cookies.set('sidebarStatus', 1)
+      Cookies.set("sidebarStatus", 1);
     } else {
-      Cookies.set('sidebarStatus', 0)
+      Cookies.set("sidebarStatus", 0);
     }
   },
   CLOSE_SIDEBAR: (state, withoutAnimation) => {
-    Cookies.set('sidebarStatus', 0)
-    state.sidebar.opened = false
-    state.sidebar.withoutAnimation = withoutAnimation
+    Cookies.set("sidebarStatus", 0);
+    state.sidebar.opened = false;
+    state.sidebar.withoutAnimation = withoutAnimation;
   },
   TOGGLE_DEVICE: (state, device) => {
-    state.device = device
+    state.device = device;
   },
   SET_SIZE: (state, size) => {
-    state.size = size
-    Cookies.set('size', size)
+    state.size = size;
+    Cookies.set("size", size);
   },
   SET_SIDEBAR_HIDE: (state, status) => {
-    state.sidebar.hide = status
-  }
-}
+    state.sidebar.hide = status;
+  },
+};
 
 const actions = {
   toggleSideBar({ commit }) {
-    commit('TOGGLE_SIDEBAR')
+    commit("TOGGLE_SIDEBAR");
   },
   closeSideBar({ commit }, { withoutAnimation }) {
-    commit('CLOSE_SIDEBAR', withoutAnimation)
+    commit("CLOSE_SIDEBAR", withoutAnimation);
   },
   toggleDevice({ commit }, device) {
-    commit('TOGGLE_DEVICE', device)
+    commit("TOGGLE_DEVICE", device);
   },
   setSize({ commit }, size) {
-    commit('SET_SIZE', size)
+    commit("SET_SIZE", size);
   },
   toggleSideBarHide({ commit }, status) {
-    commit('SET_SIDEBAR_HIDE', status)
-  }
-}
+    commit("SET_SIDEBAR_HIDE", status);
+  },
+};
 
 export default {
   namespaced: true,
   state,
   mutations,
-  actions
-}
+  actions,
+};

+ 4 - 0
src/utils/init.js

@@ -48,3 +48,7 @@ export const initDicts = (prop) => {
     )
   );
 };
+
+export const initPage = () => {
+  return { pageNum: 1, pageSize: 20, total: 0 };
+};

+ 3 - 1
src/utils/init/index.js

@@ -33,4 +33,6 @@ export const initRules = (prop) => {
   return rules;
 };
 
-export const initPage = () => ({ pageNum: 1, pageSize: 10, total: 0, });
+export const initPage = () => {
+  return { pageNum: 1, pageSize: 20, total: 0 };
+};

+ 92 - 41
src/views/material/basicFile/details.vue

@@ -251,6 +251,7 @@
 
                 <!-- 其他展示为列表 -->
                 <el-table v-else 
+                  border
                   :data="mainMsg.value" 
                   @cell-dblclick="handleMaindbClick"
                   @selection-change="handleMainChange"
@@ -366,7 +367,7 @@
                     <!-- 其他展示为列表 -->
 
                     <!-- 辅计量 -->
-                    <el-table v-else-if="activeViceTab == 'material_unit'" :data="unitDetails.value"
+                    <el-table border v-else-if="activeViceTab == 'material_unit'" :data="unitDetails.value"
                               class="material-table">
                       <el-table-column type="index" v-if="unitDetails.form.length" label="序号" width="55"
                                        align="center"/>
@@ -383,7 +384,7 @@
                     </el-table>
 
                     <!-- 辅助属性 -->
-                    <el-table v-else-if="activeViceTab == 'material_property'" :data="propertyDetail.value"
+                    <el-table border v-else-if="activeViceTab == 'material_property'" :data="propertyDetail.value"
                               class="material-table">
                       <el-table-column type="index" v-if="propertyDetail.form.length" label="序号" width="55"
                                        align="center"/>
@@ -471,6 +472,7 @@
       </el-row>
       <!-- 表格数据 -->
       <el-table 
+        border
         :data="materialType.value" 
         stripe 
         style="width: 100%" 
@@ -658,8 +660,15 @@
     </el-dialog>
 
     <!-- 参照弹窗 -->
-    <el-dialog :title="MoreDataDialog.msg.name" :visible.sync="MoreDataDialog.show" width="70%" class="MoreDataDialog"
-               :close-on-press-escape="false" :close-on-click-modal="false" :before-close="handleCloseRefer">
+    <el-dialog 
+      :title="MoreDataDialog.msg.name" 
+      :visible.sync="MoreDataDialog.show" 
+      width="70%" 
+      class="MoreDataDialog"
+      :close-on-press-escape="false" 
+      :close-on-click-modal="false" 
+      :before-close="handleCloseRefer"
+    >
       <div>
         <el-row>
           <el-col :span="1.5">
@@ -667,22 +676,40 @@
           </el-col>
         </el-row>
         <!-- 树形 -->
-        <el-tree class="referTree" v-loading="MoreDataDialog.loading" v-if="MoreDataDialog.type == 'tree'"
-                 :data="MoreDataDialog.list" @node-click="handleNodeClick" :key="refer"
-                 :props="MoreDataDialog.msg.apiUrl == 'queryMedcineItemDrug' ? drugProps : defaultProps" node-key="id">
+        <el-tree 
+          class="referTree" 
+          v-loading="MoreDataDialog.loading" 
+          v-if="MoreDataDialog.type == 'tree'"
+          :data="MoreDataDialog.list" 
+          @node-click="handleNodeClick" 
+          :key="refer"
+          :props="MoreDataDialog.msg.apiUrl == 'queryMedcineItemDrug' ? drugProps : defaultProps" 
+          node-key="id"
+        >
         </el-tree>
         <!-- queryMedcineItemDrug -->
         <!-- 列表 -->
         <div v-else>
-          <el-table :data="MoreDataDialog.list" v-loading="MoreDataDialog.loading" style="width: 100%"
-                    @row-click="handleCurentRow" highlight-current-row>
+          <el-table  
+            border 
+            :data="MoreDataDialog.list"
+            v-loading="MoreDataDialog.loading" 
+            style="width: 100%"
+            @row-click="handleCurentRow" 
+            highlight-current-row
+          >
             <el-table-column type="index" label="序号" width="55" align="center"/>
             <el-table-column v-for="m in MoreDataDialog.form" v-if="m.show" :prop="m.prop" :label="m.name"/>
           </el-table>
 
-          <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
-                         :current-page="queryParams.pageNum" :page-sizes="[10, 20, 50, 100]"
-                         layout="total, sizes, prev, pager, next, jumper" :total="queryParams.total">
+          <el-pagination 
+            @size-change="handleSizeChange" 
+            @current-change="handleCurrentChange"
+            :current-page="queryParams.pageNum" 
+            :page-sizes="[10, 20, 50, 100]"
+            layout="total, sizes, prev, pager, next, jumper" 
+            :total="queryParams.total"
+          >
           </el-pagination>
         </div>
 
@@ -1507,7 +1534,8 @@
 
       // 新增
       handleInster() {
-        this.$message({
+        this.$notify({
+          title: '警告',
           message: '物料只能通过申请审批增加,不能在节点直接录入!',
           type: 'warning'
         });
@@ -1527,7 +1555,8 @@
             // 查询其他标签页列表详情
             this.getOtherListDetails(activeTab.code, this.otherDeatils.queryKey);
           } else {
-            this.$message({
+            this.$notify({
+              title: '警告',
               message: '修改请选择单个数据!',
               type: 'warning'
             });
@@ -1581,10 +1610,11 @@
               break;
           }
         } else {
-          this.$message({
-            message: '请选择需要删除的数据!',
-            type: 'warning'
-          });
+          this.$notify({
+              title: '警告',
+              message: '请选择需要删除的数据!',
+              type: 'warning'
+            });
         }
       },
       // 其他标签页刷新
@@ -1726,7 +1756,8 @@
             _this.maintainNewVersion = res.data.result;
             // 维护版本消息展示 by shiy 2023/05/31
             if (!res.data.result) {
-              this.$message({
+              this.$notify({
+                title: '警告',
                 message: res.data.msg,
                 type: 'warning'
               });
@@ -1780,7 +1811,11 @@
               this.handleRefresh();
             })
           } else {
-            this.$message.error('存在必填项未填写');
+            this.$notify.error({
+              title: '错误',
+              message: '存在必填项未填写!'
+            });
+            
             console.log('error submit!!');
             return false;
           }
@@ -1826,10 +1861,12 @@
                 })
               })
             } else {
-              this.$message({
+              this.$notify({
+                title: '警告',
                 message: '请选择需要删除的信息!',
                 type: 'warning'
               });
+              
             }
             break;
           // 取消
@@ -1859,10 +1896,12 @@
                 })
                 // 保存
               } else {
-                this.$message({
-                  message: '不能保存空数据或存在数据为空!',
-                  type: 'warning'
-                });
+                this.$notify({
+                title: '警告',
+                message: '不能保存空数据或存在数据为空!',
+                type: 'warning'
+              });
+                
               }
             } else {
               // 非编辑状态
@@ -1874,10 +1913,11 @@
           default:
             console.log('物料类别刷新');
             if (this.materialType.isEdit) {
-              this.$message({
+              this.$notify({
+                title: '警告',
                 message: '请先保存数据!',
                 type: 'warning'
-              })
+              });
             } else {
               this.materialType.loading = true;
               this.getTagList('material_medcine_item', (form) => {
@@ -1893,10 +1933,11 @@
       handleCloseTypeDetails(done) {
 
         console.log('物料类别弹窗关闭前');
-        this.materialType.isEdit ? this.$message({
-          message: '请先保存数据!',
-          type: 'warning'
-        }) : done();
+        this.materialType.isEdit ? this.$notify({
+                title: '警告',
+                message: '请先保存数据!',
+                type: 'warning'
+              }): done();
 
       },
       // 保存修改并新增
@@ -1949,7 +1990,8 @@
         console.log('其他页签详情弹窗关闭事件');
         // 处于编辑状态
         if (this.otherDeatils.isEdit) {
-          this.$message({
+          this.$notify({
+            title: '警告',
             message: '请先退出编辑操作',
             type: 'warning'
           });
@@ -2080,7 +2122,8 @@
               let drug = _this.materialType.value.filter(d => d.drugId == _this.MoreDataDialog.value['id'])
               console.log(drug, 'drug------------------------------------');
               if (drug.length) {
-                _this.$message({
+                _this.$notify({
+                  title: '警告',
                   message: '不能维护相同的物料类别!',
                   type: 'warning'
                 });
@@ -2206,7 +2249,8 @@
           if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
-            this.$message({
+            this.$notify({
+              title: '成功',
               message: msg,
               type: 'success'
             });
@@ -2238,7 +2282,8 @@
           if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
-            this.$message({
+            this.$notify({
+              title: '成功',
               message: msg,
               type: 'success'
             });
@@ -2267,7 +2312,8 @@
           if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
-            this.$message({
+            this.$notify({
+              title: '成功',
               message: msg,
               type: 'success'
             });
@@ -2296,7 +2342,8 @@
           if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
-            this.$message({
+            this.$notify({
+              title: '成功',
               message: msg,
               type: 'success'
             });
@@ -2326,7 +2373,8 @@
           if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
-            this.$message({
+            this.$notify({
+              title: '成功',
               message: msg,
               type: 'success'
             });
@@ -2355,7 +2403,8 @@
           if (code == 200) {
             this.otherDeatils.isEdit = false;
             this.handleOtherRefresh();
-            this.$message({
+            this.$notify({
+              title: '成功',
               message: msg,
               type: 'success'
             });
@@ -2536,11 +2585,13 @@
 <style lang="scss">
   .material-details {
     padding: 12px;
-    height: calc(100vh - 158px);
+    height: 100%;
+    // height: calc(100vh - 158px);
     box-sizing: border-box;
 
     .el-card__body {
-      height: calc(100vh - 160px);
+      height: calc(100vh - 80px);
+      // height: 100%;
       box-sizing: border-box;
       padding: 12px;
       overflow-y: auto;

+ 54 - 31
src/views/material/basicFile/index.vue

@@ -32,14 +32,19 @@
             </el-form-item>
 
             <el-form-item>
-              <el-button size="small" type="primary" @click="handleQuery">搜索</el-button>
-              <el-button size="small" @click="handleResetQuery">重置</el-button>
+              <el-button size="small" type="primary" @click="handleQuery">搜 索</el-button>
+              <el-button size="small" @click="handleResetQuery">重 置</el-button>
             </el-form-item>
           </el-form>
         </el-col>
 
       </el-row>
 
+     
+    </div>
+
+    <!-- 主体列表 -->
+    <el-card class="material-list" v-loading="loading">
       <el-row 
         :gutter="10" 
         class="mb10"
@@ -97,17 +102,27 @@
 
 
       </el-row>
-    </div>
 
-    <!-- 主体列表 -->
-    <el-card class="material-list" v-loading="loading">
-      <el-table :data="taskList" ref="materialTable" @cell-dblclick="handledbClick" :row-key="getRowKey"
-                @selection-change="handleSelectionChange" @select="handleSelect" @select-all="handleSelectAll">
+      <el-table 
+        border 
+        :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="selection" width="45" :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>
+        <el-table-column 
+          width="150" 
+          v-for="h in  tableHeader" v-if="h.show" 
+          :label="h.name" 
+          align="center"
+          show-overflow-tooltip
+        >
           <!-- :prop="h.attribute == 'select' ? `${h.prop}Name` : h.prop" -->
           <template slot-scope="scope">
             {{ h.attribute == 'select' ? scope.row[`${h.prop}Name`] :
@@ -119,9 +134,14 @@
         </el-table-column>
       </el-table>
 
-      <el-pagination @size-change="handleSizeChange" @current-change="handleCurrentChange"
-                     :current-page="queryParams.pageNum" :page-sizes="[10, 20, 50, 100]"
-                     layout="total, sizes, prev, pager, next, jumper" :total="total">
+      <el-pagination 
+        @size-change="handleSizeChange" 
+        @current-change="handleCurrentChange"
+        :current-page="queryParams.pageNum" 
+        :page-sizes="[10, 20, 50, 100]"
+        layout="total, sizes, prev, pager, next, jumper" 
+        :total="total"
+      >
       </el-pagination>
     </el-card>
 
@@ -216,7 +236,8 @@
       },
       // 新增
       handleInster() {
-        this.$message({
+        this.$notify({
+          title: '警告',
           message: '物料只能通过申请审批增加,不能在节点直接录入!',
           type: 'warning'
         });
@@ -231,7 +252,8 @@
             }
           });
         } else {
-          this.$message({
+          this.$notify({
+            title: '警告',
             message: `${this.checkedList.length > 1 ? '修改只能选择单个数据!' : '请选择需要修改的信息!'}`,
             type: 'warning'
           });
@@ -252,8 +274,9 @@
             }
           })
         } else {
-          this.$message({
-            message: '请选择需要删除的数据!',
+          this.$notify({
+            title: '警告',
+            message: `请选择需要删除的数据!`,
             type: 'warning'
           });
         }
@@ -364,21 +387,23 @@
                       })
                     }
                   }
-                  this.$message({
+                  this.$notify({
                     message: res.data.msg,
                     type: res.data.flag ? 'warning' : 'success'
                   });
+                  
                 } else {
-                  this.$message({
+                  this.$notify({
                     message: res.msg,
                     type: res.code == 200 ? 'success' : 'warning'
                   });
                 }
               })
             } else {
-              this.$message({
+              this.$notify({
+                title:'警告',
                 message: '请上传文件之后在确认!',
-                type: 'warning'
+                type: 'warning',
               });
             }
             break;
@@ -407,10 +432,11 @@
           }
           this.download('/system/material/export', params, `物料基本信息${new Date().getTime()}.xlsx`);
         } else {
-          this.$message({
-            message: '请选择需要导出的数据!',
-            type: 'warning'
-          });
+          this.$notify({
+                title:'警告',
+                message: '请选择需要导出的数据!',
+                type: 'warning'
+              });
         }
 
       },
@@ -543,7 +569,7 @@
 <style lang="scss">
   .material-list {
     // height: calc(100% - 100px);
-    height: calc(100% - 70px);
+    // height: calc(100% - 70px);
 
 
     .el-card__body {
@@ -551,17 +577,14 @@
       box-sizing: border-box;
 
       .el-table {
-        height: calc(100% - 35px);
+        // height: calc(100% - 35px);
         overflow: auto;
 
         .el-table__body-wrapper {
           // height: calc(100% - 150px);
-          height: calc(100% - 70px);
+          // height: calc(100% - 70px);
           overflow-y: auto !important;
           overflow-x: auto !important;
-          // .el-table__body {
-          //   height: 100%;
-          // }
         }
       }
     }

+ 1 - 1
src/views/material/basicFile/style/index.scss

@@ -1,6 +1,6 @@
 // 物料信息基础档案
 .material-basic {
-  height: calc(100vh - 84px);
+  // height: calc(100vh - 84px);
   padding: 12px;
   box-sizing: border-box;
 

文件差异内容过多而无法显示
+ 777 - 677
src/views/material/requisition/add.vue


+ 340 - 235
src/views/material/requisition/index.vue

@@ -1,32 +1,32 @@
 <template>
-  <div class="requisition">
+  <div class="requisition" v-loading="failLoad">
     <div class="applyList" v-if="isList">
-    <el-row :gutter="10" class="mb10">
-      <el-col :span="1.5">
-        <span style="font-size: 14px;margin-right: 5px;">单据编码</span>
-        <el-input
-          v-model="queryParams.billCode"
-          size="small"
-          placeholder="请输入单据编码查询"
-          clearable
-          style="width: 240px"
-        />
-      </el-col>
+      <el-row :gutter="10" class="mb10">
+        <el-col :span="1.5">
+          <span style="font-size: 14px;margin-right: 5px;">单据编码</span>
+          <el-input
+            v-model="queryParams.billCode"
+            size="small"
+            placeholder="请输入单据编码查询"
+            clearable
+            style="width: 240px"
+          />
+        </el-col>
 
-      <el-col :span="1.5">
-        <span style="font-size: 14px;margin-right: 5px;">物料名称</span>
-        <el-input
-          v-model="queryParams.name"
-          size="small"
-          placeholder="请输入物料名称查询"
-          clearable
-          style="width: 240px"
-        />
-      </el-col>
+        <el-col :span="1.5">
+          <span style="font-size: 14px;margin-right: 5px;">物料名称</span>
+          <el-input
+            v-model="queryParams.name"
+            size="small"
+            placeholder="请输入物料名称查询"
+            clearable
+            style="width: 240px"
+          />
+        </el-col>
 
-      <el-col :span="1.5">
+        <el-col :span="1.5">
           <span style="font-size: 14px;margin-right: 5px;">单据状态</span>
-          <el-select 
+          <el-select
             v-model="queryParams.status"
             size="small"
             placeholder="请选择单据状态"
@@ -41,223 +41,327 @@
           </el-select>
         </el-col>
 
-      <el-col :span="1.5">
-        <el-button type="primary" size="small" plain @click="getList(queryParams)">查询</el-button>
-      </el-col>
-      <!-- <el-col :span="1.5">
-        <el-button type="primary" size="small" plain>高级查询</el-button>
-      </el-col> -->
-      <el-col :span="1.5">
-        <el-button type="primary" size="small" plain @click="reset">重置</el-button>
-      </el-col>
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain @click="getList(queryParams)">查询</el-button>
+        </el-col>
+        <!-- <el-col :span="1.5">
+          <el-button type="primary" size="small" plain>高级查询</el-button>
+        </el-col> -->
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain @click="reset">重置</el-button>
+        </el-col>
 
-    </el-row>
+      </el-row>
 
-    <el-row :gutter="10" class="mb10">
-      <el-col :span="1.5">
-        <el-button type="primary" size="small" plain @click="newAdd">新增</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button size="small" :disabled="checkedList.length != 1" @click="handleCopy">复制</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button type="primary" size="small" plain @click="download('/system/apply/material/download',{},'申请单模板.xlsx')">模板下载</el-button>
-      </el-col>
-      <!-- <el-col :span="1.5">
-        <el-button type="primary" size="small" plain>导入</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button type="primary" size="small" plain>导出</el-button>
-      </el-col> -->
-      <!-- <el-col :span="1.5">
-        <el-button type="primary" size="small" plain>批量提交</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button type="primary" size="small" plain>批量删除</el-button>
-      </el-col> -->
-    </el-row>
+      <el-row :gutter="10" class="mb10">
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain @click="newAdd">新增</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button size="small" :disabled="checkedList.length != 1" @click="handleCopy">复制</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain
+                     @click="download('/system/apply/material/download',{},'申请单模板.xlsx')">模板下载
+          </el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button size="small" @click="handleImport">批量导入</el-button>
+        </el-col>
+        <!-- 导入弹窗 -->
+        <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" 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>
+
+          </div>
+          <span slot="footer">
+        <el-button @click="handleImportData('cancal')">取 消</el-button>
+        <el-button type="primary" @click="handleImportData('confirm')">确 定</el-button>
+      </span>
+        </el-dialog>
+        <!-- <el-col :span="1.5">
+          <el-button type="primary" size="small" plain>导入</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain>导出</el-button>
+        </el-col> -->
+        <!-- <el-col :span="1.5">
+          <el-button type="primary" size="small" plain>批量提交</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button type="primary" size="small" plain>批量删除</el-button>
+        </el-col> -->
+      </el-row>
 
-    <el-card>
-      <el-table 
-        :data="tableList" 
-        class="request-table"
-        fit
-        max-height="680"
-        @selection-change="handleSelectionChange"
-        @select="handleSelect"
-      >
-      <el-table-column type="selection" width="45" ></el-table-column>
-        <el-table-column label="序号" align="center" type="index" width="50"/>
-        <el-table-column label="所属组织" align="center" width="200" prop="orgName" />
-        <el-table-column label="单据编码" align="center" width="200" prop="billCode" />
-        <el-table-column label="申请人" align="center" prop="createName" />
-        <el-table-column label="申请时间" align="center" width="150" prop="createTime" />
-        <el-table-column label="单据状态" align="center" prop="status" :formatter="statusJug" />
-        <!-- <el-table-column label="物料编码" align="center" width="150" prop="materialCode" /> -->
-        <el-table-column label="物料名称" align="center" width="150" prop="name" />
-        <el-table-column label="创建人" align="center" prop="createName"/>
-        <el-table-column label="创建时间" align="center" width="150" prop="createTime" />
-        <el-table-column label="最后修改人" align="center" width="120" prop="updateName" />
-        <el-table-column label="最后修改时间" align="center" width="150" prop="updateTime" />
-        <el-table-column
-          fixed="right"
-          label="操作"
-          align="center"
-          width="180"
+      <el-card>
+        <el-table
+          :data="tableList"
+          class="request-table"
+          fit
+          max-height="680"
+          @selection-change="handleSelectionChange"
+          @select="handleSelect"
+        >
+          <el-table-column type="selection" width="45"></el-table-column>
+          <el-table-column label="序号" align="center" type="index" width="50"/>
+          <el-table-column label="所属组织" align="center" width="200" prop="orgName"/>
+          <el-table-column label="单据编码" align="center" width="200" prop="billCode"/>
+          <el-table-column label="申请人" align="center" prop="createName"/>
+          <el-table-column label="申请时间" align="center" width="150" prop="createTime"/>
+          <el-table-column label="单据状态" align="center" prop="status" :formatter="statusJug"/>
+          <!-- <el-table-column label="物料编码" align="center" width="150" prop="materialCode" /> -->
+          <el-table-column label="物料名称" align="center" width="150" prop="name"/>
+          <el-table-column label="创建人" align="center" prop="createName"/>
+          <el-table-column label="创建时间" align="center" width="150" prop="createTime"/>
+          <el-table-column label="最后修改人" align="center" width="120" prop="updateName"/>
+          <el-table-column label="最后修改时间" align="center" width="150" prop="updateTime"/>
+          <el-table-column
+            fixed="right"
+            label="操作"
+            align="center"
+            width="180"
           >
-          <template slot-scope="scope">
-            <el-button type="text" size="small" @click="check(scope.row)">查看</el-button>
-            <el-button @click="edit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text" size="small">编辑</el-button>
-            <!-- <el-button @click="commit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text" size="small">提交</el-button> -->
-            <el-button type="text" size="small" @click="deleteRow(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3">删除</el-button>
-          </template>
-        </el-table-column>
-      </el-table>
+            <template slot-scope="scope">
+              <el-button type="text" size="small" @click="check(scope.row)">查看</el-button>
+              <el-button @click="edit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text"
+                         size="small">编辑
+              </el-button>
+              <!-- <el-button @click="commit(scope.row)" v-if="scope.row.status == 0 || scope.row.status == 3" type="text" size="small">提交</el-button> -->
+              <el-button type="text" size="small" @click="deleteRow(scope.row)"
+                         v-if="scope.row.status == 0 || scope.row.status == 3">删除
+              </el-button>
+            </template>
+          </el-table-column>
+        </el-table>
 
-      <el-pagination
-        @size-change="handleSizeChange"
-        @current-change="handleCurrentChange"
-        :page-sizes="[5, 10, 15, 20]"
-        :page-size=queryParams.pageSize
-        layout="total, sizes, prev, pager, next, jumper"
-        :total="total"
-        style="text-align: center;">
-      </el-pagination>
-    </el-card>
+        <el-pagination
+          @size-change="handleSizeChange"
+          @current-change="handleCurrentChange"
+          :page-sizes="[5, 10, 15, 20]"
+          :page-size=queryParams.pageSize
+          layout="total, sizes, prev, pager, next, jumper"
+          :total="total"
+          style="text-align: center;">
+        </el-pagination>
+      </el-card>
     </div>
 
-    <component :is="isComponent" v-model="isList" :pageStu="page" :disable="disable" :row="rowDetail" @refresh="getList" v-if="!isList"/>
+    <component :is="isComponent" v-model="isList" :pageStu="page" :disable="disable" :row="rowDetail" @refresh="getList"
+               v-if="!isList"/>
   </div>
 </template>
 
 <script>
-import addReq from './add.vue';
-import { getReqList, delReq } from '@/api/requisition/basic'
-export default {
-  name: 'requisition',
-  components: {
-    addReq
-  },
-  data() {
-    return{
-      // 
-      tableList: [],
-      queryParams: {
-        billCode: '',
-        name: '',
-        status: '',
-        pageNum: 1,
-        pageSize: 10
-      },
-      options: [{
-        value: 0, label: '未提交'
-      },{
-        value: 1, label: '审批中'
-      },{
-        value: 2, label: '已完成'
-      },{
-        value: 3, label: '已驳回'
-      },],
-      total:0,
-      // isComponent
-      isComponent:'addReq',
-      isList: true,
-      // 页面状态
-      page: '',
-      rowDetail: {},
-      disable: false,
-      checkedList:[],
-    }
-  },
-  created() {
-    
-  },
-  mounted() {
-    this.getList(this.queryParams)
-  },
-  methods: {
-    reset() {
-      this.queryParams.billCode = ''
-      this.queryParams.name = ''
-      this.queryParams.status = ''
-      this.queryParams.pageNum = 1
-      this.getList(this.queryParams)
+  import addReq from './add.vue';
+  import {getReqList, delReq, importData, fileImport} from '@/api/requisition/basic';
+  import {saveAs} from "file-saver";
+  import { blobValidate } from "@/utils/ruoyi";
+
+  export default {
+    name: 'requisition',
+    components: {
+      addReq
     },
-    newAdd() {
-      this.isList = false
-      this.isComponent = 'addReq'
-      this.page = 'add'
-      this.disable = false
+    data() {
+      return {
+        failLoad: false,
+        tableList: [],
+        queryParams: {
+          billCode: '',
+          name: '',
+          status: '',
+          pageNum: 1,
+          pageSize: 10
+        },
+        options: [{
+          value: 0, label: '未提交'
+        }, {
+          value: 1, label: '审批中'
+        }, {
+          value: 2, label: '已完成'
+        }, {
+          value: 3, label: '已驳回'
+        },],
+        total: 0,
+        // isComponent
+        isComponent: 'addReq',
+        isList: true,
+        // 页面状态
+        page: '',
+        rowDetail: {},
+        disable: false,
+        checkedList: [],
+        importData: {
+          show: false,
+          list: []
+        },
+      }
+    },
+    created() {
+
     },
-    // 复制
-    handleCopy(){
-      this.isList = false;
-      this.isComponent = 'addReq';
-      this.page = 'copy';
-      this.rowDetail =  this.checkedList[0];
-      this.disable = false;
+    mounted() {
+      this.getList(this.queryParams)
     },
-    // Select框
-    handleSelect(selection, row) {
+    methods: {
+      reset() {
+        this.queryParams.billCode = ''
+        this.queryParams.name = ''
+        this.queryParams.status = ''
+        this.queryParams.pageNum = 1
+        this.getList(this.queryParams)
+      },
+      newAdd() {
+        this.isList = false
+        this.isComponent = 'addReq'
+        this.page = 'add'
+        this.disable = false
+      },
+      // 复制
+      handleCopy() {
+        this.isList = false;
+        this.isComponent = 'addReq';
+        this.page = 'copy';
+        this.rowDetail = this.checkedList[0];
+        this.disable = false;
+      },
+      // 导入
+      handleImport() {
+        this.importData.show = true
+      },
+      // 删除文件
+      handleFileRemove(file, fileList) {
+        console.log('删除文件', file, 'file', fileList, 'fileList');
+        this.importData.list = fileList;
+      },
+      // 文件发生改变
+      handleChangeFile(file, fileList) {
+        this.importData.list = fileList;
+      },
+      // 导入弹窗操作
+      handleImportData(type) {
+        switch (type) {
+          // 取消
+          case 'cancal':
+            this.importData.list = [];
+            this.importData.show = false;
+            break;
+          // 确认
+          case 'confirm':
+            if (this.importData.list.length) {
 
-      this.checkedList = selection;
+              let formData = new FormData();
 
-      console.log(this.checkedList, 'this.checkedList');
+              formData.append('file', this.importData.list[0].raw);
+              importData(formData).then(res => {
+                if (res.code == 200) {
+                  this.importData.show = false;
+                  this.importData.list = [];
+                  if (res.data.flag) {
+                    this.failLoad = true;
+                    console.log(res.data.datas)
+                    let param = {failDatas: res.data.datas}
+                    if (null != param) {
 
-    },
-    getList(val) {
-      console.log('val',val)
-      getReqList(val).then(res => {
-        if (res.code === 200) {
-          this.tableList = res.rows
-          this.total = res.total
+                      fileImport(param).then(res => {
+                        console.log('res',res)
+                        const isBlob = blobValidate(res);
+                        if (isBlob) {
+                          const blob = new Blob([res]);
+                          saveAs(blob, '导入失败的物料申请单数据.xlsx');
+                        }
+                        this.failLoad = false;
+                      })
+                    }
+                  }
+                  this.$message({
+                    message: res.data.msg,
+                    type: res.data.flag ? 'warning' : 'success'
+                  });
+                } else {
+                  this.$message({
+                    message: res.msg,
+                    type: res.code == 200 ? 'success' : 'warning'
+                  });
+                }
+              })
+            } else {
+              this.$message({
+                message: '请上传文件之后在确认!',
+                type: 'warning'
+              });
+            }
+            break;
         }
-      })
-      this.checkedList = [];
-    },
-    // 表格内状态栏判断值
-    statusJug(row) {
-      if (row.status == 0) {
-        return '未提交'
-      } else if (row.status == 1) {
-        return '审批中'
-      } else if (row.status == 2) {
-        return '已完成'
-      } else if (row.status == 3) {
-        return '已驳回'
-      }
-    },
-    // 
-    handleSelectionChange () {
+      },
+      // Select框
+      handleSelect(selection, row) {
 
-    },
-    check(row) {
-      console.log('查看详情', row)
-      this.isList = false
-      this.isComponent = 'addReq'
-      this.page = 'check'
-      this.rowDetail = row
-      this.disable = true
-    },
-    edit(row) {
-      console.log('修改先加载详情', row)
-      this.isList = false
-      this.isComponent = 'addReq'
-      this.page = 'edit'
-      this.rowDetail = row
-      this.disable = false
-    },
-    commit(row) {
-      console.log('row', row)
-    },
-    deleteRow(row) {
-      this.$confirm('是否删除此条数据?', '提示', {
+        this.checkedList = selection;
+
+        console.log(this.checkedList, 'this.checkedList');
+
+      },
+      getList(val) {
+        console.log('val', val)
+        getReqList(val).then(res => {
+          if (res.code === 200) {
+            this.tableList = res.rows
+            this.total = res.total
+          }
+        })
+        this.checkedList = [];
+      },
+      // 表格内状态栏判断值
+      statusJug(row) {
+        if (row.status == 0) {
+          return '未提交'
+        } else if (row.status == 1) {
+          return '审批中'
+        } else if (row.status == 2) {
+          return '已完成'
+        } else if (row.status == 3) {
+          return '已驳回'
+        }
+      },
+      //
+      handleSelectionChange() {
+
+      },
+      check(row) {
+        console.log('查看详情', row)
+        this.isList = false
+        this.isComponent = 'addReq'
+        this.page = 'check'
+        this.rowDetail = row
+        this.disable = true
+      },
+      edit(row) {
+        console.log('修改先加载详情', row)
+        this.isList = false
+        this.isComponent = 'addReq'
+        this.page = 'edit'
+        this.rowDetail = row
+        this.disable = false
+      },
+      commit(row) {
+        console.log('row', row)
+      },
+      deleteRow(row) {
+        this.$confirm('是否删除此条数据?', '提示', {
           confirmButtonText: '确定',
           cancelButtonText: '取消',
           type: 'warning'
         }).then(() => {
           delReq(row.id).then(res => {
-            if(res.code === 200) {
+            if (res.code === 200) {
               this.$message({
                 message: res.msg,
                 type: 'success'
@@ -265,26 +369,27 @@ export default {
               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)
+        }).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)
+      }
     }
   }
-}
 </script>
 
 <style scoped lang="scss">
-.requisition {
-  height: calc(100vh - 84px);
-  padding: 12px;
-  box-sizing: border-box;
-}
-</style>
+  .requisition {
+    height: calc(100vh - 84px);
+    padding: 12px;
+    box-sizing: border-box;
+  }
+</style>

+ 65 - 56
src/views/purchase/DemandSummary/add.vue

@@ -1,6 +1,6 @@
 <template>
   <div id="checkDemandSummary">
-    <el-card>
+    <el-card style="height: calc(100vh - 15vh);position: relative;overflow: scroll;">
       <span>采购需求处理详情</span>
       <div class="btn_grooup">
         <el-button type="primary" size="mini" @click="editLine">编辑</el-button>
@@ -13,38 +13,41 @@
       <el-table 
           :data="tableList" 
           fit
+          :cell-style="{ borderColor: '#c0c0c0' }"
+          :header-cell-style="{ borderColor: '#c0c0c0' }"
+          class="exporttable"
           border
           max-height="680"
           style="font-size: 12px;"
           @selection-change="handleSelectionChange"
         >
-        <el-table-column show-overflow-tooltip type="selection" width="55" />
-        <el-table-column show-overflow-tooltip label="序号" align="center" type="index"/>
+        <el-table-column show-overflow-tooltip type="selection"/>
+        <el-table-column show-overflow-tooltip label="序号" align="center" type="index" width="55"/>
         <el-table-column show-overflow-tooltip label="行号" align="center" prop="rowNo">
           <template slot-scope="scope">
             {{ scope.$index + 1 + '0' }}
           </template>
         </el-table-column>
-        <el-table-column show-overflow-tooltip label="行状态" align="center" prop="status" width="120px" :formatter="hangStatus"/>
-        <el-table-column show-overflow-tooltip label="物料编码" align="center" prop="materialCode" width="150px"/>
+        <el-table-column show-overflow-tooltip label="行状态" align="center" prop="status" width="100px" :formatter="hangStatus"/>
+        <el-table-column show-overflow-tooltip label="物料编码" align="center" prop="materialCode" width="120px"/>
         <el-table-column show-overflow-tooltip label="品名" align="center" prop="materialName" width="180"/>
         <el-table-column show-overflow-tooltip label="规格" align="center" prop="specification"/>
         <el-table-column show-overflow-tooltip label="单位" align="center" prop="unit"/>
-        <el-table-column show-overflow-tooltip label="生产厂家/代理人" align="center" prop="manufacturerName" width="150"/>
+        <el-table-column show-overflow-tooltip label="生产厂家/代理人" align="center" prop="manufacturerName" width="230"/>
         <el-table-column show-overflow-tooltip label="末级供应仓库存量" align="center" prop="lastWarehouseQty" width="150"/>
         <el-table-column show-overflow-tooltip label="月销量" align="center" prop="totalMonthlySales"/>
         <el-table-column show-overflow-tooltip label="采购周期" align="center" prop="puPeriod"/>
-        <el-table-column show-overflow-tooltip label="最终净需求量" align="center" prop="resDemandQty" width="150"/>
-        <el-table-column show-overflow-tooltip label="最终采购量" align="center" prop="puQtyRes" width="150"/>
-        <el-table-column show-overflow-tooltip label="需求客户" align="center" prop="customerName"/>
-        <el-table-column show-overflow-tooltip label="最小订货量" align="center" prop="minOrderQty" width="150"/>
-        <el-table-column show-overflow-tooltip label="最小包装量" align="center" prop="minPackage" width="150"/>
-        <el-table-column show-overflow-tooltip label="最小批量" align="center" prop="minBatch" width="150"/>
-        <el-table-column show-overflow-tooltip label="修改人" align="center" prop="updateByName" width="150"/>
+        <el-table-column show-overflow-tooltip label="最终净需求量" align="center" prop="resDemandQty" width="120"/>
+        <el-table-column show-overflow-tooltip label="最终采购量" align="center" prop="puQtyRes" width="120"/>
+        <el-table-column show-overflow-tooltip label="需求客户" align="center" prop="customerName" width="150"/>
+        <el-table-column show-overflow-tooltip label="最小订货量" align="center" prop="minOrderQty" width="100"/>
+        <el-table-column show-overflow-tooltip label="最小包装量" align="center" prop="minPackage" width="100"/>
+        <el-table-column show-overflow-tooltip label="最小批量" align="center" prop="minBatch" width="100"/>
+        <el-table-column show-overflow-tooltip label="修改人" align="center" prop="updateByName" width="100"/>
         <el-table-column show-overflow-tooltip label="修改原因" align="center" prop="updateCause" width="150"/>
         <el-table-column show-overflow-tooltip label="业务备注" align="center" prop="remark" width="150"/>
         <el-table-column show-overflow-tooltip label="有效期" align="center" prop="expiry" width="150"/>
-        <el-table-column show-overflow-tooltip label="要求交货日期" align="center" prop="deliveryDate" width="150"/>
+        <el-table-column show-overflow-tooltip label="要求交货日期" align="center" prop="deliveryDate" width="120"/>
         <el-table-column show-overflow-tooltip label="紧急标识" align="center" prop="isUrgency">
           <template slot-scope="scope">
             <el-switch
@@ -78,16 +81,16 @@
           </template>
         </el-table-column>
         <el-table-column show-overflow-tooltip label="需求单单号" align="center" prop="code" width="150"/>
-        <el-table-column show-overflow-tooltip label="供应仓库" align="center" prop="lastWarehouseName" width="150"/>
-        <el-table-column show-overflow-tooltip label="供应货位" align="center" prop="lastAllocationName" width="150"/>
-        <el-table-column show-overflow-tooltip label="默认采购组织" align="center" prop="orgName" width="280px">
+        <el-table-column show-overflow-tooltip label="供应仓库" align="center" prop="lastWarehouseName" width="100"/>
+        <el-table-column show-overflow-tooltip label="供应货位" align="center" prop="lastAllocationName" width="120"/>
+        <el-table-column show-overflow-tooltip label="默认采购组织" align="center" prop="orgName" width="250px">
           <template slot-scope="scope">
               <el-input :disabled="scope.row.status !== '1' || lineDisable" size="mini" v-model="scope.row.orgName" @clear="clean(scope.row, '默认采购组织')" @focus="chooseMxHW(scope.$index, 'ORG_PARAM', true, '默认采购组织')">
                 <el-button size="mini" :disabled="scope.row.status !== '1' || lineDisable" slot="append" icon="el-icon-more" @click="chooseMxHW(scope.$index, 'ORG_PARAM', true, '默认采购组织')"></el-button>
               </el-input>
           </template>
         </el-table-column>
-        <el-table-column show-overflow-tooltip label="业务类型" align="center" prop="billType" width="150" :formatter="formatterBillType"/>
+        <el-table-column show-overflow-tooltip label="业务类型" align="center" prop="billType" width="120" :formatter="formatterBillType"/>
         <el-table-column show-overflow-tooltip label="收货仓库" align="center" prop="deliveryWarehouseName" width="200">
             <template slot-scope="scope">
               <el-input clearable :disabled="scope.row.status !== '1' || lineDisable" size="mini" v-model="scope.row.deliveryWarehouseName" @clear="clean(scope.row, '收货仓库')" @focus="chooseMxCK(scope.$index, 'WAREHOUSE_PARAM', true, '收货仓库', scope.row.org)">
@@ -102,20 +105,20 @@
             </el-input>
           </template>
         </el-table-column>
-        <el-table-column show-overflow-tooltip label="采购员" align="center" prop="buyerName" width="150"/>
-        <el-table-column show-overflow-tooltip label="制单人" align="center" prop="billMaker" width="150"/>
-        <el-table-column show-overflow-tooltip label="审核人员" align="center" prop="approver" width="150"/>
+        <el-table-column show-overflow-tooltip label="采购员" align="center" prop="buyerName" width="100"/>
+        <el-table-column show-overflow-tooltip label="制单人" align="center" prop="billMaker" width="100"/>
+        <el-table-column show-overflow-tooltip label="审核人员" align="center" prop="approver" width="100"/>
         <!-- <el-table-column show-overflow-tooltip label="请购单号" align="center" prop="code"/> -->
-        <el-table-column show-overflow-tooltip label="品类" align="center" prop="materialCategory" width="150"/>
-        <el-table-column show-overflow-tooltip label="注册人" align="center" prop="registrant" width="150"/>
-        <el-table-column show-overflow-tooltip label="集团预测分类" align="center" prop="forecastClassify" width="150"/>
-        <el-table-column show-overflow-tooltip label="修改时间" align="center" prop="updateTime" width="150"/>
-        <el-table-column show-overflow-tooltip label="采购员编码" align="center" prop="buyer" width="150"/>
+        <el-table-column show-overflow-tooltip label="品类" align="center" prop="materialCategory" width="100"/>
+        <el-table-column show-overflow-tooltip label="注册人" align="center" prop="registrant" width="100"/>
+        <el-table-column show-overflow-tooltip label="集团预测分类" align="center" prop="forecastClassify" width="120"/>
+        <el-table-column show-overflow-tooltip label="修改时间" align="center" prop="updateTime" width="140"/>
+        <el-table-column show-overflow-tooltip label="采购员编码" align="center" prop="buyer" width="100"/>
         <!-- <el-table-column show-overflow-tooltip label="采购组织" align="center" prop="orgName" width="150"/> -->
-        <el-table-column show-overflow-tooltip label="有效期单位" align="center" prop="expiryUnit" width="150"/>
+        <el-table-column show-overflow-tooltip label="有效期单位" align="center" prop="expiryUnit" width="100"/>
         <!-- <el-table-column show-overflow-tooltip label="业务部门" align="center" prop="businessDeptName"/> -->
         <el-table-column show-overflow-tooltip label="需求部门" align="center" prop="demandDeptName" width="150"/>
-        <el-table-column show-overflow-tooltip label="批号锁定标识" align="center" prop="isBatchLock" width="150">
+        <el-table-column show-overflow-tooltip label="批号锁定标识" align="center" prop="isBatchLock" width="120">
           <template slot-scope="scope">
             <el-switch
               v-model="scope.row.isBatchLock"
@@ -127,25 +130,25 @@
             </el-switch>
           </template>
         </el-table-column>
-        <el-table-column show-overflow-tooltip label="采购需求单审批人" align="center" prop="approveName" width="150"/>
-        <el-table-column show-overflow-tooltip label="需求单审批时间" align="center" prop="approverFinishTime" width="150"/>
-        <el-table-column show-overflow-tooltip label="需求单提交时间" align="center" prop="createTime" width="150"/>
-        <el-table-column show-overflow-tooltip label="需求单提交人" align="center" prop="createByName" width="150"/>
+        <el-table-column show-overflow-tooltip label="采购需求单审批人" align="center" prop="approveName" width="140"/>
+        <el-table-column show-overflow-tooltip label="需求单审批时间" align="center" prop="approverFinishTime" width="120"/>
+        <el-table-column show-overflow-tooltip label="需求单提交时间" align="center" prop="createTime" width="120"/>
+        <el-table-column show-overflow-tooltip label="需求单提交人" align="center" prop="createByName" width="120"/>
         <!-- <el-table-column show-overflow-tooltip label="处理需求时间" align="center" prop="processTime"/> -->
         <!-- <el-table-column show-overflow-tooltip label="处理需求人员" align="center" prop="processPersonal"/> -->
-        <el-table-column show-overflow-tooltip label="处理确认人" align="center" prop="affirmerName" width="150"/>
-        <el-table-column show-overflow-tooltip label="处理确认时间" align="center" prop="affirmerTime" width="150"/>
+        <el-table-column show-overflow-tooltip label="处理确认人" align="center" prop="affirmerName" width="100"/>
+        <el-table-column show-overflow-tooltip label="处理确认时间" align="center" prop="affirmerTime" width="120"/>
         <!-- <el-table-column show-overflow-tooltip label="转请购时间" align="center" prop="code"/>
         <el-table-column show-overflow-tooltip label="转请购人员" align="center" prop="code"/> -->
-        <el-table-column show-overflow-tooltip label="价格类型" align="center" prop="priceType" width="150" :formatter="priceClass"/>
+        <el-table-column show-overflow-tooltip label="价格类型" align="center" prop="priceType" width="100" :formatter="priceClass"/>
       </el-table>
-    </el-card>
 
-    <div class="btn_group">
-      <el-col :span="1.5">
-        <el-button size="mini" plain @click="back" v-if="lineDisable">返回</el-button>
-      </el-col>
-    </div>
+      <div class="btn_group">
+        <el-col :span="1.5">
+          <el-button size="mini" plain @click="back" v-if="lineDisable">返回</el-button>
+        </el-col>
+      </div>
+    </el-card>
 
     <Refers ref="refer" @doSubmit="selectionsToInput" :single="true"/>
   </div>
@@ -272,7 +275,7 @@ export default {
     saveLine() {
       editSummaryMx(this.tableList).then(res => {
         if (res.code === 200) {
-          this.$modal.msgSuccess("保存成功");
+          this.$modal.notifySuccess("保存成功");
           this.lineDisable = true
           let param = JSON.parse(JSON.stringify(this.query))
           param.sumFlag = this.row.sumFlag
@@ -283,17 +286,20 @@ export default {
     // 行关闭
     closeLine() {
       if (this.ids.length == 0) {
-        this.$modal.msgWarning("请选中至少一条数据");
+        this.$modal.notifyWarning("请选中至少一条数据");
       } else {
-        let param = this.ids.join()
-        shutDownSummary(param).then(res => {
-          if (res.code === 200) {
-            this.$modal.msgSuccess("操作成功");
-            let param = JSON.parse(JSON.stringify(this.query))
-            param.sumFlag = this.row.sumFlag
-            this.getDetails(param)
-          }
-        })
+        this.$modal.confirm('是否确定关闭?').then(function () {
+        }).then(() => {
+          let param = this.ids.join()
+          shutDownSummary(param).then(res => {
+            if (res.code === 200) {
+              this.$modal.notifySuccess("操作成功");
+              let param = JSON.parse(JSON.stringify(this.query))
+              param.sumFlag = this.row.sumFlag
+              this.getDetails(param)
+            }
+          })
+        }).catch(() => {})
       }
     },
     // 重取批量
@@ -302,7 +308,7 @@ export default {
         let param = this.tableList.map(item => { return item.demandItemId })
         reloadBatch(param).then(res => {
           if (res.code === 200) {
-            this.$modal.msgSuccess("操作成功");
+            this.$modal.notifySuccess("操作成功");
             let param = JSON.parse(JSON.stringify(this.query))
             param.sumFlag = this.row.sumFlag
             this.getDetails(param)
@@ -384,12 +390,15 @@ export default {
 
 <style lang="scss" scoped>
  .btn_group {
-  width: 100%;
-  margin: 20px 0;
+  // width: 100%;
+  // margin: 20px 0;
   display: flex;
-  justify-content: center;
+  // justify-content: center;
+  position: absolute;
+  top: 10px;right: 20px;
 } 
 .btn_grooup {
+  margin-top: 10px;
   margin-bottom: 10px;
   display: flex;
   justify-content: flex-end;

+ 53 - 40
src/views/purchase/DemandSummary/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div id="demandSummary">
     <div v-if="isList">
-      <el-card>
+      <el-card style="position: relative;">
         <el-form class="search_area" label-width="100px">
           <el-row :gutter="10">
             <el-col :span="1.5">
@@ -42,12 +42,14 @@
                 />
               </el-form-item>
             </el-col>
-            <el-col :span="1.5">
-              <el-form-item label="" label-width="20px">
-                <el-button type="primary" size="mini" icon="el-icon-search" plain @click="search">搜索</el-button>
-                <el-button size="mini" icon="el-icon-refresh" plain @click="reset">重置</el-button>
-              </el-form-item>
-            </el-col>
+            <!-- <el-col :span="1.5"> -->
+              <!-- <el-form-item label="" label-width="20px"> -->
+                <div style="position: absolute;top: 3px;right: 10px;">
+                  <el-button type="primary" size="mini" icon="el-icon-search" @click="search">搜索</el-button>
+                  <el-button size="mini" icon="el-icon-refresh" plain @click="reset">重置</el-button>
+                </div>
+              <!-- </el-form-item> -->
+            <!-- </el-col> -->
           </el-row>
 
           <CollapseTransition>
@@ -220,6 +222,9 @@
         <el-table 
           :data="tableList" 
           fit
+          :cell-style="{ borderColor: '#c0c0c0' }"
+          :header-cell-style="{ borderColor: '#c0c0c0' }"
+          class="exporttable"
           border
           show-summary
           :summary-method="getSummaries"
@@ -230,24 +235,24 @@
         >
           <el-table-column type="selection" width="60" />
           <!-- <el-table-column show-overflow-tooltip label="行号" align="center" prop="rowNo"/> -->
-          <el-table-column show-overflow-tooltip label="行状态" align="center" prop="status" width="120px" :formatter="hangStatus"/>
-          <el-table-column show-overflow-tooltip label="一级品类" align="center" prop="materialClassifyOneName" width="120px"/>
-          <el-table-column show-overflow-tooltip label="物料编码" align="center" prop="materialCode" width="180px"/>
-          <el-table-column show-overflow-tooltip label="品名" align="center" prop="materialName" width="180px"/>
-          <el-table-column show-overflow-tooltip label="规格" align="center" prop="specification" width="200px"/>
+          <el-table-column show-overflow-tooltip label="行状态" align="center" prop="status" width="100px" :formatter="hangStatus"/>
+          <el-table-column show-overflow-tooltip label="一级品类" align="center" prop="materialClassifyOneName" width="100px"/>
+          <el-table-column show-overflow-tooltip label="物料编码" align="center" prop="materialCode" width="150px"/>
+          <el-table-column show-overflow-tooltip label="品名" align="center" prop="materialName" width="150px"/>
+          <el-table-column show-overflow-tooltip label="规格" align="center" prop="specification" width="150px"/>
           <el-table-column show-overflow-tooltip label="单位" align="center" prop="unit"/>
-          <el-table-column show-overflow-tooltip label="生产厂家/代理人" align="center" prop="manufacturer" width="180px"/>
-          <el-table-column show-overflow-tooltip label="需求单位数" align="center" prop="demandNum" width="120px"/>
+          <el-table-column show-overflow-tooltip label="生产厂家/代理人" align="center" prop="manufacturer" width="200px"/>
+          <el-table-column show-overflow-tooltip label="需求单位数" align="center" prop="demandNum" width="100px"/>
           <el-table-column show-overflow-tooltip label="近1月月均需求" align="center" prop="evensalesforyear" width="120px"/>
           <el-table-column show-overflow-tooltip label="近3月月均需求" align="center" prop="evensalesforthrmonth" width="120px"/>
           <el-table-column show-overflow-tooltip label="总最终净需求量" align="center" prop="netDemandNum" width="120px"/>
           <el-table-column show-overflow-tooltip label="总月销量" align="center" prop="totalMonthlySales"/>
-          <el-table-column show-overflow-tooltip label="需求可用周期" align="center" prop="demandCycle" width="180px"/>
+          <el-table-column show-overflow-tooltip label="需求可用周期" align="center" prop="demandCycle" width="120px"/>
           <el-table-column show-overflow-tooltip label="呆滞量" align="center" prop="dullQut"/>
           <el-table-column show-overflow-tooltip label="采购周期" align="center" prop="buyPeriod"/>
           <el-table-column show-overflow-tooltip label="中心公共库存" align="center" prop="centralPublicStock" width="120px"/>
           <el-table-column show-overflow-tooltip label="中心仓专属货位" align="center" prop="centralWarehouse" width="120px"/>
-          <el-table-column show-overflow-tooltip label="区域分仓公共库存" align="center" prop="regionPublicStock" width="130px"/>
+          <el-table-column show-overflow-tooltip label="区域分仓公共库存" align="center" prop="regionPublicStock" width="150px"/>
           <el-table-column show-overflow-tooltip label="各项目仓库存" align="center" prop="eachWarehouseStock" width="120px"/>
           <el-table-column show-overflow-tooltip label="电商仓库" align="center" prop="commerceWarehouse"/>
           <el-table-column show-overflow-tooltip label="采购在途" align="center" prop="buyTransit"/>
@@ -265,14 +270,14 @@
           </el-table-column>
           <el-table-column show-overflow-tooltip label="建议采购量" align="center" prop="suggestionPurchase" width="100px"/>
           <!-- <el-table-column show-overflow-tooltip label="建议净采购量" align="center" prop="suggestBuyQty" width="100px"/> -->
-          <el-table-column show-overflow-tooltip label="最终采购量" align="center" prop="finalBuyQty" width="150">
+          <el-table-column show-overflow-tooltip label="最终采购量" align="center" prop="finalBuyQty" width="100">
             <template slot-scope="scope">
                 <el-input :disabled="scope.row.status !== '1' || lineDisable" v-model="scope.row.finalBuyQty"/>
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="二级品类" align="center" prop="materialClassifyTwoName" width="150px"/>
-          <el-table-column show-overflow-tooltip label="三级品类" align="center" prop="materialClassifyThreeName" width="150px"/>
-          <el-table-column show-overflow-tooltip label="四级品类" align="center" prop="materialClassifyFourName" width="150px"/>
+          <el-table-column show-overflow-tooltip label="二级品类" align="center" prop="materialClassifyTwoName" width="120px"/>
+          <el-table-column show-overflow-tooltip label="三级品类" align="center" prop="materialClassifyThreeName" width="120px"/>
+          <el-table-column show-overflow-tooltip label="四级品类" align="center" prop="materialClassifyFourName" width="120px"/>
           <el-table-column show-overflow-tooltip label="采购员" align="center" prop="buyerName" width="150px">
             <template slot-scope="scope">
                 <el-input readonly :disabled="scope.row.status !== '1' || lineDisable" size="mini" v-model="scope.row.buyerName">
@@ -280,7 +285,7 @@
                 </el-input>
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="默认采购组织" align="center" prop="purchaseOrgName" width="280px">
+          <el-table-column show-overflow-tooltip label="默认采购组织" align="center" prop="purchaseOrgName" width="230px">
             <!-- <template slot-scope="scope">
                 <el-input readonly :disabled="scope.row.status !== '1' || lineDisable" size="mini" v-model="scope.row.purchaseOrgName">
                   <el-button size="mini" :disabled="scope.row.status !== '1' || lineDisable" slot="append" icon="el-icon-more" @click="chooseSon(scope.$index, 'ORG_PARAM', true, '明细默认采购组织')"></el-button>
@@ -292,12 +297,12 @@
           <el-table-column show-overflow-tooltip label="业务类型" align="center" prop="businessType" :formatter="formatterBusinessType"/>
           <el-table-column show-overflow-tooltip label="安全库存量" align="center" prop="safetyStock" width="100px"/>
           <el-table-column show-overflow-tooltip label="单据来源" align="center" prop="billSource" :formatter="formatterSource"/>
-          <el-table-column show-overflow-tooltip label="注册人" align="center" prop="registrant"/>
+          <el-table-column show-overflow-tooltip label="注册人" align="center" prop="registrant" width="120px"/>
           <!-- <el-table-column label="可用量" align="center" prop="qty"/> -->
           <el-table-column show-overflow-tooltip label="总需与终采差异" align="center" prop="buyDiscrepancy" width="120px"/>
-          <el-table-column show-overflow-tooltip label="集团预测分类" align="center" prop="forecastClassification" width="100px"/>
-          <el-table-column show-overflow-tooltip label="中心仓占有量" align="center" prop="centerBinPossession" width="100px"/>
-          <el-table-column show-overflow-tooltip label="中心仓可用量" align="center" prop="centralWarehouseAvailable" width="100px"/>
+          <el-table-column show-overflow-tooltip label="集团预测分类" align="center" prop="forecastClassification" width="120px"/>
+          <el-table-column show-overflow-tooltip label="中心仓占有量" align="center" prop="centerBinPossession" width="120px"/>
+          <el-table-column show-overflow-tooltip label="中心仓可用量" align="center" prop="centralWarehouseAvailable" width="120px"/>
           <!-- <el-table-column label="物料类别" align="center" prop="materialCategory" width="150px"/> -->
           <!-- <el-table-column label="业务部门" align="center" prop="departmentName" width="150px"/> -->
           <!-- <el-table-column show-overflow-tooltip label="需求单位" align="center" prop="demandUnit"/> -->
@@ -319,8 +324,8 @@
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
           :current-page="queryParams.pageNum"
-          :page-sizes="[10, 15, 20]"
-          :page-size="100"
+          :page-sizes="[10, 20, 50, 100]"
+          :page-size="10"
           layout="total, sizes, prev, pager, next, jumper"
           :total=total>
         </el-pagination>
@@ -409,7 +414,7 @@ export default {
       // 页面状态
       page: '',
       queryParams: {
-        rowStatus: [],
+        rowStatus: ['1'],
         buyer: '',
         buyerName: '',
         materialClassifyFourName: '',
@@ -503,7 +508,7 @@ export default {
     },
     reset() {
       this.queryParams = {
-        rowStatus: [],
+        rowStatus: ['1'],
         buyer: '',
         buyerName: '',
         materialClassifyFourName: '',
@@ -547,7 +552,7 @@ export default {
     handleCommand(command) {
       if(command == 'Excel导出') {
         if(this.allSelection.length == 0) {
-          this.$modal.msgWarning("请选中至少一条数据");
+          this.$modal.notifyWarning("请选中至少一条数据");
         } else {
           exportList(this.allSelection).then(res => {
             const blob = new Blob([res], {
@@ -570,7 +575,7 @@ export default {
 
       if (command == '导出明细') {
         if (this.allSelection.length == 0 || this.allSelection.length > 1) {
-          this.$modal.msgWarning("明细只能进行单条导出!");
+          this.$modal.notifyWarning("明细只能进行单条导出!");
         } else {
           let param = this.queryParams
           param.sumFlag = this.allSelection[0].sumFlag
@@ -623,7 +628,7 @@ export default {
     saveList() {
       editSummaryList(this.tableList).then(res => {
         if (res.code === 200) {
-          this.$modal.msgSuccess("保存成功");
+          this.$modal.notifySuccess("保存成功");
           this.lineDisable = true
           this.getList(this.queryParams)
         }
@@ -631,11 +636,11 @@ export default {
     },
     confirms() {
       if (this.ids.length == 0) {
-        this.$modal.msgWarning("请选中至少一条数据");
+        this.$modal.notifyWarning("请选中至少一条数据");
       } else {
         confirmSummary(this.allSelection).then(res => {
           if (res.code === 200) {
-            this.$modal.msgSuccess("确认成功");
+            this.$modal.notifySuccess("确认成功");
             this.getList(this.queryParams)
           }
         })
@@ -643,12 +648,12 @@ export default {
     },
     cancels() {
       if (this.ids.length == 0) {
-        this.$modal.msgWarning("请选中至少一条数据");
+        this.$modal.notifyWarning("请选中至少一条数据");
       } else {
         let param = this.ids.join()
         cancelSummary(param).then(res => {
           if (res.code === 200) {
-            this.$modal.msgSuccess("取消成功");
+            this.$modal.notifySuccess("取消成功");
             this.getList(this.queryParams)
           }
         })
@@ -656,12 +661,12 @@ export default {
     },
     audits() {
       if(this.ids.length == 0) {
-        this.$modal.msgWarning("请选中至少一条数据");
+        this.$modal.notifyWarning("请选中至少一条数据");
       } else {
         let param = this.ids.join()
         auditSummary(param).then(res => {
           if (res.code === 200) {
-            this.$modal.msgSuccess("审核成功");
+            this.$modal.notifySuccess("审核成功");
             this.getList(this.queryParams)
           }
         })
@@ -672,14 +677,14 @@ export default {
       let param = this.ids.join()
       shutDownSummary(param).then(res => {
         if (res.code === 200) {
-          this.$modal.msgSuccess("操作成功");
+          this.$modal.notifySuccess("操作成功");
           this.getList(this.queryParams)
         }
       })
     },
     closeLine() {
       if (this.ids.length == 0) {
-        this.$modal.msgWarning("请选中至少一条数据");
+        this.$modal.notifyWarning("请选中至少一条数据");
       } else {
         console.log('选中数组', this.allSelection)
         let item = this.allSelection.some(item => {
@@ -803,4 +808,12 @@ export default {
 ::v-deep .el-table__row > td {
   border: none;
 }
+ ::v-deep .el-card .el-form-item {
+  margin-bottom: 10px;
+}
+</style>
+<style>
+.exporttable {
+  border: solid 1px #c0c0c0;
+ }
 </style>

+ 10 - 6
src/views/purchase/MaterialClassDivision/add.vue

@@ -1,5 +1,7 @@
 <template>
   <div id="addDivision">
+    <el-card style="height: calc(100vh - 15vh);position: relative;overflow: scroll;">
+    <span>基本信息</span>
     <el-form :model="basicForm" :rules="basicRules" ref="basic" label-width="auto">
       <el-row :gutter="10">
         <el-col :span="1.5">
@@ -240,7 +242,7 @@
         <el-button size="mini" plain @click="back">返回</el-button>
       </el-col>
     </div>
-
+    </el-card>
     <fourClass
       ref="fourClass"
       @doSubmit="acceptFourClass"
@@ -340,7 +342,7 @@ export default {
         this.$modal.loading("保存中...");
         addDivision(this.basicForm).then(res => {
           if (res.code === 200) {
-            this.$modal.msgSuccess("保存成功");
+            this.$modal.notifySuccess("保存成功");
             this.$modal.closeLoading();
             this.back()
           }
@@ -350,7 +352,7 @@ export default {
       } else if(this.pageStu == 'edit') {
         this.$modal.loading("保存中...");
         editDivision(this.basicForm).then(res => {
-          this.$modal.msgSuccess("编辑成功");
+          this.$modal.notifySuccess("编辑成功");
           this.$modal.closeLoading();
           this.back()
         }).catch(err => {
@@ -470,9 +472,11 @@ export default {
 
 <style lang="scss" scoped>
 .btn_group {
-  width: 100%;
-  margin: 20px 0;
+  // width: 100%;
+  // margin: 20px 0;
   display: flex;
-  justify-content: center;
+  // justify-content: center;
+  position: absolute;
+  top: 10px;right: 20px;
 } 
 </style>

+ 44 - 24
src/views/purchase/MaterialClassDivision/index.vue

@@ -1,6 +1,7 @@
 <template>
   <div id="MaterialClassDivision">
     <div v-if="isList">
+      <el-card style="height: calc(100vh - 15vh);position: relative;overflow: scroll;">
       <el-form class="search_area" label-width="130px">
         <el-row :gutter="10">
           <el-col :span="1.5">
@@ -43,12 +44,14 @@
               />
             </el-form-item>
           </el-col>
-          <el-col :span="1.5">
-            <el-form-item label="" label-width="20px">
-              <el-button type="primary" size="mini" icon="el-icon-search" plain @click="searchList">搜索</el-button>
+          <!-- <el-col :span="1.5"> -->
+            <!-- <el-form-item label="" label-width="20px"> -->
+            <div style="position: absolute;top: 3px;right: 10px;">
+              <el-button type="primary" size="mini" icon="el-icon-search" @click="searchList">搜索</el-button>
               <el-button size="mini" icon="el-icon-refresh" plain @click="resetList">重置</el-button>
-            </el-form-item>
-          </el-col>
+            </div>
+            <!-- </el-form-item> -->
+          <!-- </el-col> -->
         </el-row>
 
         <CollapseTransition>
@@ -180,7 +183,6 @@
       </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="mini" @click="addDivision">新增</el-button>
 
@@ -209,28 +211,32 @@
         <el-table 
           :data="tableList" 
           fit
+          :cell-style="{ borderColor: '#c0c0c0' }"
+          :header-cell-style="{ borderColor: '#c0c0c0' }"
+          class="exporttable"
+          border
           max-height="480"
           style="font-size: 12px;"
           @selection-change="handleSelectionChange"
         >
           <el-table-column show-overflow-tooltip type="selection" width="55" />
-          <el-table-column show-overflow-tooltip label="物料分类编码" align="center" width="150" prop="materialClassify"/>
-          <el-table-column show-overflow-tooltip label="物料分类名称" align="center" width="200" prop="materialClassifyName" />
-          <el-table-column show-overflow-tooltip label="一级分类名称" align="center" width="150" prop="materialClassifyOneName" />
-          <el-table-column show-overflow-tooltip label="二级分类名称" align="center" width="150" prop="materialClassifyTwoName" />
-          <el-table-column show-overflow-tooltip label="三级分类名称" align="center" width="150" prop="materialClassifyThreeName"/>
-          <el-table-column show-overflow-tooltip label="四级分类名称" align="center" width="150" prop="materialClassifyFourName" />
-          <el-table-column show-overflow-tooltip label="物料编码" align="center" width="150" prop="materialCode" />
-          <el-table-column show-overflow-tooltip label="物料名称" align="center" prop="materialName" />
+          <el-table-column show-overflow-tooltip label="物料分类编码" align="center" width="120" prop="materialClassify"/>
+          <!-- <el-table-column show-overflow-tooltip label="物料分类名称" align="center" width="200" prop="materialClassifyName" /> -->
+          <el-table-column show-overflow-tooltip label="一级分类名称" align="center" width="120" prop="materialClassifyOneName" />
+          <el-table-column show-overflow-tooltip label="二级分类名称" align="center" width="120" prop="materialClassifyTwoName" />
+          <el-table-column show-overflow-tooltip label="三级分类名称" align="center" width="120" prop="materialClassifyThreeName"/>
+          <el-table-column show-overflow-tooltip label="四级分类名称" align="center" width="120" prop="materialClassifyFourName" />
+          <el-table-column show-overflow-tooltip label="物料编码" align="center" width="120" prop="materialCode" />
+          <el-table-column show-overflow-tooltip label="物料名称" align="center" width="150" prop="materialName" />
           <el-table-column show-overflow-tooltip label="生产厂商" align="center" width="150" prop="manufacturer" />
-          <el-table-column show-overflow-tooltip label="所属组织" align="center" width="120" prop="orgName"/>
-          <el-table-column show-overflow-tooltip label="订单员" align="center" width="150" prop="orderPersonalName" />
-          <el-table-column show-overflow-tooltip label="采购员" align="center" width="150" prop="buyerName" />
+          <el-table-column show-overflow-tooltip label="所属组织" align="center" width="200" prop="orgName"/>
+          <el-table-column show-overflow-tooltip label="订单员" align="center" width="100" prop="orderPersonalName" />
+          <el-table-column show-overflow-tooltip label="采购员" align="center" width="100" prop="buyerName" />
           <el-table-column show-overflow-tooltip label="订单部门" align="center" width="150" prop="orderDeptName" />
           <el-table-column show-overflow-tooltip label="部门" align="center" width="150" prop="puDeptName" />
-          <el-table-column show-overflow-tooltip label="创建人" align="center" width="150" prop="createByName" />
+          <el-table-column show-overflow-tooltip label="创建人" align="center" width="100" prop="createByName" />
           <el-table-column show-overflow-tooltip label="创建时间" align="center" width="150" prop="createTime" />
-          <el-table-column show-overflow-tooltip label="修改人" align="center" width="150" prop="updateByName" />
+          <el-table-column show-overflow-tooltip label="修改人" align="center" width="100" prop="updateByName" />
           <el-table-column show-overflow-tooltip label="修改时间" align="center" width="150" prop="updateTime" />
           <el-table-column
           fixed="right"
@@ -251,8 +257,8 @@
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
           :current-page="queryParams.pageNum"
-          :page-sizes="[10, 15, 20]"
-          :page-size="100"
+          :page-sizes="[10, 20, 50, 100]"
+          :page-size="10"
           layout="total, sizes, prev, pager, next, jumper"
           :total=total>
         </el-pagination>
@@ -377,14 +383,14 @@ export default {
     },
     deletes() {
       if (this.allSelection.length == 0) {
-        this.$modal.msgWarning("请至少选择一条数据!");
+        this.$modal.notifyWarning("请至少选择一条数据!");
       } else {
         let param = this.allSelection.map(item => item.id)
         let rows = param.join()
         this.$modal.confirm('确认删除选择数据?').then(() => {
           delDivision(rows).then(res => {
             if (res.code === 200) {
-              this.$modal.msgSuccess("删除成功");
+              this.$modal.notifySuccess("删除成功");
               this.getList(this.queryParams)
             }
           })
@@ -420,7 +426,7 @@ export default {
       this.$modal.confirm('确认信息').then(() => {
         delDivision(row.id).then(res => {
           if (res.code === 200) {
-            this.$modal.msgSuccess("删除成功");
+            this.$modal.notifySuccess("删除成功");
             this.getList(this.queryParams)
           }
         })
@@ -491,8 +497,22 @@ export default {
 .lines {
   margin-top: 0;
 }
+::v-deep .el-table__row > td {
+  border: none;
+}
+ ::v-deep .el-card .el-form-item {
+  margin-bottom: 10px;
+}
 .el-pagination {
   margin-top: 10px;
   text-align: right;
 }
+</style>
+<style>
+.exporttable {
+  border: solid 1px #c0c0c0;
+}
+.el-table .el-table__header-wrapper th {
+  font-size: 14px;
+}
 </style>

+ 227 - 197
src/views/purchase/PurchaseDemandList/add.vue

@@ -1,6 +1,6 @@
 <template>
   <div id="addDemandList">
-  <el-card style="height: calc(100vh - 180px);">
+  <el-card style="height: calc(100vh - 15vh);position: relative;overflow: scroll;">
     <span>基本信息</span>
     <el-form :model="basicForm" :rules="basicRules" ref="basic" label-width="auto">
       <el-row :gutter="10">
@@ -15,13 +15,13 @@
             </el-form-item>
          </el-col>
 
-        <el-col :span="1.5">
+        <!-- <el-col :span="1.5">
             <el-form-item label="组织" prop="org" :rules="{ required: true, message: '请选择组织', trigger: 'blur' }">
               <el-select clearable size="mini" v-model="basicForm.org" :disabled="sonDisable" @focus="chooseOrg('ORG_PARAM', true, '选择组织')" 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> -->
 
          <el-col :span="1.5">
             <el-form-item label="单据状态">
@@ -147,38 +147,40 @@
       </el-row>
 
 
-    <span>明细信息</span>
+    
       <div class="btn_grooup">
+        <span>明细信息</span>
+        <div>
         <el-button type="primary" size="mini" @click="addLine" v-if="!sonDisable">增行</el-button>
         <el-button type="primary" size="mini" v-if="!sonDisable" @click="adjustPl">批量调整</el-button>
         <el-button type="primary" size="mini" v-if="sonPageStu == 'check' || sonPageStu == 'edit'" @click="showReserved">货权预留单</el-button>
+        </div>
       </div>
 
       <el-table
           :data="basicForm.puDemandItemList"
           fit
           border
-          max-height="350"
+          :cell-style="{ borderColor: '#c0c0c0' }"
+          :header-cell-style="{ borderColor: '#c0c0c0' }"
+          class="exporttable"
+          height="290"
+          max-height="290"
           style="font-size: 12px;"
           @selection-change="handleSelectionChange"
           :cell-class-name="cellClassName"
         >
           <el-table-column show-overflow-tooltip type="selection"/>
-          <el-table-column show-overflow-tooltip label="序号" type="index" align="center"/>
-          <el-table-column show-overflow-tooltip label="行状态" align="center" prop="status" :formatter="hangStatus" width="150px"/>
+          <el-table-column show-overflow-tooltip label="序号" type="index" align="center" width="50px"/>
           <el-table-column show-overflow-tooltip label="行号" align="center" prop="rowNo">
             <template slot-scope="scope">
-              {{scope.$index + 1 + '0'}}
+              {{ scope.$index + 1 + '0' }}
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="需求客户" align="center"  prop="demandCustomerName" width="200px"/>
-          <el-table-column show-overflow-tooltip label="一级品类" align="center" prop="materialClassifyOneName" width="180px"/>
-          <el-table-column show-overflow-tooltip label="二级品类" align="center" prop="materialClassifyTwoName" width="180px"/>
-          <el-table-column show-overflow-tooltip label="三级品类" align="center" prop="materialClassifyThreeName" width="180px"/>
-          <el-table-column show-overflow-tooltip label="四级品类" align="center" prop="materialClassifyFourName" width="180px"/>
-          <el-table-column show-overflow-tooltip label="采购员名称" align="center" prop="buyerName" width="120px"/>
-          <el-table-column show-overflow-tooltip label="采购员" align="center"  prop="buyer"/>
-          <el-table-column show-overflow-tooltip label="物料编码" align="center" prop="materialCode" width="230px">
+          <el-table-column show-overflow-tooltip label="默认采购组织" align="center"  prop="purOrgName" width="200px"/>
+          <el-table-column show-overflow-tooltip label="需求客户" align="center"  prop="demandCustomerName" width="180px"/>
+          <el-table-column show-overflow-tooltip label="行状态" align="center" prop="status" :formatter="hangStatus" width="100px"/>
+          <el-table-column show-overflow-tooltip label="物料编码" align="center" prop="materialCode" width="220px" :render-header="addRedStar">
             <template slot-scope="scope">
               <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'materialCode'" :rules="{ required: true, message: '请选择物料编码', trigger: 'blur' }">
                 <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.materialCode" @paste.native="pasteMe($event, scope, scope.$index)">
@@ -187,90 +189,25 @@
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="物料名称" align="center"  prop="materialName" width="230px" />
+          <el-table-column show-overflow-tooltip label="物料名称" align="center"  prop="materialName" width="200px" />
           <el-table-column show-overflow-tooltip label="规格" align="center"  prop="specification" />
           <el-table-column show-overflow-tooltip label="型号" align="center"  prop="model"/>
           <el-table-column show-overflow-tooltip label="单位" align="center"  prop="unitName"/>
           <el-table-column show-overflow-tooltip label="生产厂家/代理人" align="center"  prop="manufacturerName" width="230px"/>
-          <el-table-column show-overflow-tooltip label="注册人" align="center"  prop="registrant" width="150px"/>
-          <el-table-column show-overflow-tooltip label="采购周期" align="center"  prop="puPeriod" width="150px">
-            <template slot-scope="scope">
-              <el-form-item class="hang">
-                <el-input type="number" min="0" clearable :readonly="sonDisable" size="mini" v-model="scope.row.puPeriod"></el-input>
-              </el-form-item>
-            </template>
-          </el-table-column>
-          <el-table-column show-overflow-tooltip label="有效期" align="center"  prop="expiry" width="120px"/>
-          <el-table-column show-overflow-tooltip label="有效期单位" align="center"  prop="expiryUnit" width="120px"/>
-          <el-table-column show-overflow-tooltip label="最小包装" align="center"  prop="minPackage" width="120px"/>
-          <el-table-column show-overflow-tooltip label="最小订货量" align="center"  prop="minOrderQty" width="120px"/>
-          <el-table-column show-overflow-tooltip label="最小批量" align="center"  prop="minBatch" width="120px"/>
-          <el-table-column show-overflow-tooltip label="安全库存" align="center"  prop="safeStock" width="120px">
-            <template slot-scope="scope">
-              <el-form-item class="hang">
-                <el-input clearable :readonly="sonDisable" size="mini" v-model="scope.row.safeStock"/>
-              </el-form-item>
-            </template>
-          </el-table-column>
-            <el-table-column show-overflow-tooltip label="预留比例" align="center" prop="reservedProportion" width="150px">
-              <template slot-scope="scope">
-                <el-form-item class="hang">
-                  <el-select clearable :disabled="sonDisable" size="mini" v-model="scope.row.reservedProportion" @change="getYLSL(scope)" @clear="cleanYLSL(scope)">
-                    <el-option v-for=" dict in dict.type.sys_reserve_ratio" :key="dict.value" :label="dict.label" :value="dict.value">
-                    </el-option>
-                  </el-select>
-                </el-form-item>
-              </template>
-            </el-table-column>
-            <el-table-column show-overflow-tooltip label="预留周期" align="center" prop="reservedPeriod" width="150px">
-              <template slot-scope="scope">
-                <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'reservedPeriod'" :rules="{ required: scope.row.reservedProportion && scope.row.reservedProportion !== '' , message: '请填写预留周期', trigger: 'blur' }">
-                  <el-input type="number" min="0" clearable :readonly="sonDisable" size="mini" v-model="scope.row.reservedPeriod"></el-input>
-                </el-form-item>
-              </template>
-            </el-table-column>
-            <el-table-column show-overflow-tooltip label="预留数量" align="center"  prop="reservedQty" width="150px">
-              <template slot-scope="scope">
-                <el-form-item class="hang">
-                  <el-input type="number" min="0" readonly size="mini" v-model="scope.row.reservedQty"></el-input>
-                </el-form-item>
-              </template>
-            </el-table-column>
-          <el-table-column show-overflow-tooltip label="月均销量" align="center"  prop="averageQtyMonth" width="120px"/>
-          <el-table-column show-overflow-tooltip label="实际(业务)需求量" align="center"  prop="qty" width="150px">
+          <el-table-column show-overflow-tooltip label="最小包装" align="center"  prop="minPackage" width="100px"/>
+          <el-table-column show-overflow-tooltip label="实际(业务)需求量" align="center"  prop="qty" width="150px" :render-header="addRedStar">
             <template slot-scope="scope">
               <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'qty'" :rules="{ required: true, message: '请填写实际(业务)需求量', trigger: 'blur' }">
-                <el-input type="number" min="0" clearable :readonly="sonDisable" size="mini" v-model="scope.row.qty" @input="getYLSL(scope)"/>
-              </el-form-item>
-            </template>
-          </el-table-column>
-          <el-table-column show-overflow-tooltip label="需求可用周期" align="center"  prop="demandPeriod" width="120px"/>
-          <el-table-column show-overflow-tooltip label="集团预测分类" align="center"  prop="forecastClassify" width="120px"/>
-          <el-table-column show-overflow-tooltip label="近一月需求" align="center"  prop="onemonthAvgVolume" width="120px"/>
-          <el-table-column show-overflow-tooltip label="近三月需求" align="center"  prop="threemonthAvgVolume" width="120px"/>
-          <el-table-column show-overflow-tooltip label="采购在途" align="center"  prop="puFreight" width="120px"/>
-          <el-table-column show-overflow-tooltip label="交货日期" align="center"  prop="deliveryDate" width="230px">
-            <template slot-scope="scope">
-              <el-form-item class="hang">
-                <el-date-picker
-                  v-model="scope.row.deliveryDate"
-                  :readonly="sonDisable"
-                  clearable
-                  type="date"
-                  size="mini"
-                  value-format="yyyy-MM-dd"
-                  :picker-options="pickerOptionsEnd"
-                  placeholder="选择日期">
-                </el-date-picker>
+                <el-input type="number" min="0" clearable :disabled="sonDisable" size="mini" v-model="scope.row.qty" @input="getYLSL(scope)"/>
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="是否客户指定" align="center"  prop="isSpeical" width="100px">
+          <el-table-column show-overflow-tooltip label="紧急标识" align="center" prop="isUrgency" width="100px">
             <template slot-scope="scope">
               <el-form-item class="hang">
                 <el-switch
-                  v-model="scope.row.isSpeical"
-                  disabled
+                  v-model="scope.row.isUrgency"
+                  :disabled="sonDisable"
                   active-value="Y"
                   inactive-value="N"
                   active-color="#13ce66"
@@ -279,81 +216,90 @@
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="补单标识" align="center"  prop="isReplenishment" width="100px">
+          <el-table-column show-overflow-tooltip label="收货仓库" align="center"  prop="deliveryWarehouseName" width="200px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-switch
-                  v-model="scope.row.isReplenishment"
-                  disabled
-                  active-value="Y"
-                  inactive-value="N"
-                  active-color="#13ce66"
-                  inactive-color="#a1a3a9">
-                </el-switch>
+                <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.deliveryWarehouseName" @clear="clearHang(scope.$index, '选择收货仓库')" @focus="chooseDept(scope.$index, 'WAREHOUSE_PARAM', true, '选择收货仓库')">
+                  <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'WAREHOUSE_PARAM', true, '选择收货仓库')"></el-button>
+                </el-input>
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="批号锁定标识" align="center" prop="isBatchLock" width="100px">
+          <el-table-column show-overflow-tooltip label="收货货位" align="center"  prop="deliveryAllocationName" width="200px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                  <el-switch
-                    v-model="scope.row.isBatchLock"
-                    :disabled="sonDisable"
-                    active-value="Y"
-                    inactive-value="N"
-                    active-color="#13ce66"
-                    inactive-color="#a1a3a9">
-                  </el-switch>
+                <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.deliveryAllocationName" @clear="clearHang(scope.$index, '选择收货货位')" @focus="choosehuoWei(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)">
+                  <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="choosehuoWei(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)"></el-button>
+                </el-input>
               </el-form-item>
             </template>
           </el-table-column>
+          <el-table-column show-overflow-tooltip label="月均销量" align="center"  prop="averageQtyMonth" width="100px"/>
+          <el-table-column show-overflow-tooltip label="需求可用周期" align="center"  prop="demandPeriod" width="120px"/>
           <el-table-column show-overflow-tooltip label="业务备注" align="center"  prop="remark" width="150px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-input clearable :readonly="sonDisable" size="mini" v-model="scope.row.remark"/>
+                <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.remark"/>
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="采购备注" align="center"  prop="updateCause" width="150px"/>
-          <el-table-column show-overflow-tooltip label="调拨占有量" align="center"  prop="allotQty" width="150px"/>
-          <el-table-column show-overflow-tooltip label="最终净需求量" align="center"  prop="resDemandQty" width="150px">
+          <el-table-column show-overflow-tooltip label="物料一级分类" align="center" prop="materialClassifyOneName" width="150px"/>
+          <el-table-column show-overflow-tooltip label="物料二级分类" align="center" prop="materialClassifyTwoName" width="150px"/>
+          <el-table-column show-overflow-tooltip label="物料三级分类" align="center" prop="materialClassifyThreeName" width="150px"/>
+          <el-table-column show-overflow-tooltip label="物料四级分类" align="center" prop="materialClassifyFourName" width="150px"/>
+          <el-table-column show-overflow-tooltip label="最小批量" align="center"  prop="minBatch" width="100px"/>
+          <el-table-column show-overflow-tooltip label="最小订货量" align="center"  prop="minOrderQty" width="120px"/>
+          <el-table-column show-overflow-tooltip label="采购员" align="center" prop="buyerName" width="100px"/>
+          <!-- <el-table-column show-overflow-tooltip label="采购员" align="center"  prop="buyer"/> -->
+          <el-table-column show-overflow-tooltip label="采购周期" align="center"  prop="puPeriod" width="120px"/>
+          <el-table-column show-overflow-tooltip label="交货日期" align="center"  prop="deliveryDate" width="230px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-input type="number" min="0" clearable :readonly="sonDisable" size="mini" v-model="scope.row.resDemandQty"/>
+                <el-date-picker
+                  v-model="scope.row.deliveryDate"
+                  :disabled="sonDisable"
+                  clearable
+                  type="date"
+                  size="mini"
+                  value-format="yyyy-MM-dd"
+                  :picker-options="pickerOptionsEnd"
+                  placeholder="选择日期">
+                </el-date-picker>
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="最终采购执行数量" align="center"  prop="executeQty" width="150px">
-            <template slot-scope="scope">
-              {{scope.row.executeQty ? scope.row.executeQty : 0 }}
-            </template>
-          </el-table-column>
-          <el-table-column show-overflow-tooltip label="收货仓库" align="center"  prop="deliveryWarehouseName" width="200px">
+          <el-table-column show-overflow-tooltip label="有效期" align="center"  prop="expiry" width="100px"/>
+          <el-table-column show-overflow-tooltip label="有效期单位" align="center"  prop="expiryUnit" width="100px"/>
+          <el-table-column show-overflow-tooltip label="安全库存" align="center"  prop="safeStock" width="100px"/>
+          <el-table-column show-overflow-tooltip label="注册人" align="center"  prop="registrant" width="100px"/>
+          <el-table-column show-overflow-tooltip label="预留比例" align="center" prop="reservedProportion" width="120px">
             <template slot-scope="scope">
               <el-form-item class="hang">
-                <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.deliveryWarehouseName" @clear="clearHang(scope.$index, '选择收货仓库')" @focus="chooseDept(scope.$index, 'WAREHOUSE_PARAM', true, '选择收货仓库')">
-                  <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'WAREHOUSE_PARAM', true, '选择收货仓库')"></el-button>
-                </el-input>
+                <el-select clearable :disabled="sonDisable" size="mini" v-model="scope.row.reservedProportion" @change="getYLSL(scope)" @clear="cleanYLSL(scope)">
+                  <el-option v-for=" dict in dict.type.sys_reserve_ratio" :key="dict.value" :label="dict.label" :value="dict.value">
+                  </el-option>
+                </el-select>
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="收货货位" align="center"  prop="deliveryAllocationName" width="200px">
+          <el-table-column show-overflow-tooltip label="预留周期" align="center" prop="reservedPeriod" width="120px">
             <template slot-scope="scope">
-              <el-form-item class="hang">
-                <el-input clearable :disabled="sonDisable" size="mini" v-model="scope.row.deliveryAllocationName" @clear="clearHang(scope.$index, '选择收货货位')" @focus="choosehuoWei(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)">
-                  <el-button size="mini" :disabled="sonDisable" slot="append" icon="el-icon-more" @click="choosehuoWei(scope.$index, 'ALLOCATION_PARAM', true, '选择收货货位', scope.row.deliveryWarehouse)"></el-button>
-                </el-input>
+              <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'reservedPeriod'" :rules="{ required: scope.row.reservedProportion && scope.row.reservedProportion !== '' , message: '请填写预留周期', trigger: 'blur' }">
+                <el-input type="number" min="0" clearable :disabled="sonDisable" size="mini" v-model="scope.row.reservedPeriod"></el-input>
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="末级供应仓库" align="center"  prop="lastWarehouseName" width="200px"/>
-          <el-table-column show-overflow-tooltip label="末级供应货位" align="center"  prop="lastAllocationName" width="200px"/>
-          <el-table-column show-overflow-tooltip label="紧急标识" align="center" prop="isUrgency" width="100px">
+          <el-table-column show-overflow-tooltip label="预留数量" align="center"  prop="reservedQty" width="120px"/>
+          <el-table-column show-overflow-tooltip label="集团预测分类" align="center"  prop="forecastClassify" width="120px"/>
+          <el-table-column show-overflow-tooltip label="近一月需求" align="center"  prop="onemonthAvgVolume" width="100px"/>
+          <el-table-column show-overflow-tooltip label="近三月需求" align="center"  prop="threemonthAvgVolume" width="100px"/>
+          <el-table-column show-overflow-tooltip label="采购在途" align="center"  prop="puFreight" width="100px"/>
+          <el-table-column show-overflow-tooltip label="补单标识" align="center"  prop="isReplenishment" width="100px">
             <template slot-scope="scope">
               <el-form-item class="hang">
                 <el-switch
-                  v-model="scope.row.isUrgency"
-                  :disabled="sonDisable"
+                  v-model="scope.row.isReplenishment"
+                  disabled
                   active-value="Y"
                   inactive-value="N"
                   active-color="#13ce66"
@@ -362,8 +308,19 @@
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="默认采购组织" align="center"  prop="purOrgName" width="200px"/>
-          <el-table-column show-overflow-tooltip label="可用量" align="center"  prop="availableQty"/>
+          <el-table-column show-overflow-tooltip label="补单供应商" align="center"  prop="additionalSupplierName" width="200px" :render-header="anotherRedStar">
+            <template slot-scope="scope">
+              <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'additionalSupplierName'" :rules="{ required: isBDXQ, message: '请选择补单供应商', trigger: 'blur' }">
+                <el-input clearable :disabled="sonDisable || BDZT" size="mini" v-model="scope.row.additionalSupplierName" @clear="clearHang(scope.$index, '选择补单供应商')" @focus="chooseDept(scope.$index, 'SUPPLIER_PARAM', true, '选择补单供应商')">
+                  <el-button size="mini" :disabled="sonDisable || BDZT" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'SUPPLIER_PARAM', true, '选择补单供应商')"></el-button>
+                </el-input>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <el-table-column show-overflow-tooltip label="末级供应库存组织" align="center" prop="lastStockOrgName" width="180px"></el-table-column>
+          <el-table-column show-overflow-tooltip label="末级供应仓库" align="center"  prop="lastWarehouseName" width="150px"/>
+          <el-table-column show-overflow-tooltip label="末级供应货位" align="center"  prop="lastAllocationName" width="150px"/>
+          <el-table-column show-overflow-tooltip label="中心仓可用量" align="center"  prop="centralWarehouseQty" width="120px"/>
           <el-table-column show-overflow-tooltip label="调拨状态" align="center"  prop="statusAllot" width="100px">
             <template slot-scope="scope">
               <el-form-item class="hang">
@@ -378,18 +335,14 @@
               </el-form-item>
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="补单供应商" align="center"  prop="additionalSupplierName" width="200px">
+          <el-table-column show-overflow-tooltip label="调拨单号" align="center"  prop="allotCode"></el-table-column>
+          <el-table-column show-overflow-tooltip label="调拨占有量" align="center"  prop="allotQty" width="100px"/>
+          <el-table-column show-overflow-tooltip label="最终净需求量" align="center"  prop="resDemandQty" width="120px"/>
+          <el-table-column show-overflow-tooltip label="最终采购执行数量" align="center"  prop="executeQty" width="150px">
             <template slot-scope="scope">
-              <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'additionalSupplierName'" :rules="{ required: isBDXQ, message: '请选择补单供应商', trigger: 'blur' }">
-                <el-input clearable :disabled="sonDisable || BDZT" size="mini" v-model="scope.row.additionalSupplierName" @clear="clearHang(scope.$index, '选择补单供应商')" @focus="chooseDept(scope.$index, 'SUPPLIER_PARAM', true, '选择补单供应商')">
-                  <el-button size="mini" :disabled="sonDisable || BDZT" slot="append" icon="el-icon-more" @click="chooseDept(scope.$index, 'SUPPLIER_PARAM', true, '选择补单供应商')"></el-button>
-                </el-input>
-              </el-form-item>
+              {{ scope.row.executeQty ? scope.row.executeQty : 0 }}
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="末级供应库存组织" align="center" prop="lastStockOrgName" width="200px"></el-table-column>
-          <el-table-column show-overflow-tooltip label="中心仓可用量" align="center"  prop="centralWarehouseQty" width="200px"/>
-          <el-table-column show-overflow-tooltip label="调拨单号" align="center"  prop="allotCode"></el-table-column>
           <el-table-column show-overflow-tooltip label="收货地址" align="center"  prop="deliveryAddressName" width="200px">
             <template slot-scope="scope">
               <el-form-item class="hang">
@@ -400,9 +353,9 @@
             </template>
           </el-table-column>
           <el-table-column show-overflow-tooltip label="联系人" align="center"  prop="contacts"/>
-          <el-table-column show-overflow-tooltip label="联系人电话" align="center"  prop="contactsPhone" width="200px"/>
+          <el-table-column show-overflow-tooltip label="联系人电话" align="center"  prop="contactsPhone" width="150px"/>
           <el-table-column show-overflow-tooltip label="详细地址" align="center"  prop="address" width="200px"/>
-          <el-table-column show-overflow-tooltip label="价格类型" align="center"  prop="priceType" width="150px">
+          <el-table-column show-overflow-tooltip label="价格类型" align="center"  prop="priceType" width="120px">
             <template slot-scope="scope">
               <el-form-item class="hang" :prop="'puDemandItemList.' + scope.$index + '.' + 'priceType'" :rules="{ required: true, message: '请选择价格类型', trigger: 'blur' }">
                 <el-select clearable :disabled="sonDisable" size="mini" v-model="scope.row.priceType">
@@ -412,6 +365,37 @@
               </el-form-item>
             </template>
           </el-table-column>
+          <el-table-column show-overflow-tooltip label="是否客户指定" align="center"  prop="isSpeical" width="120px">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                <el-switch
+                  v-model="scope.row.isSpeical"
+                  disabled
+                  active-value="Y"
+                  inactive-value="N"
+                  active-color="#13ce66"
+                  inactive-color="#a1a3a9">
+                </el-switch>
+              </el-form-item>
+            </template>
+          </el-table-column>
+          <!-- <el-table-column show-overflow-tooltip label="批号锁定标识" align="center" prop="isBatchLock" width="100px">
+            <template slot-scope="scope">
+              <el-form-item class="hang">
+                  <el-switch
+                    v-model="scope.row.isBatchLock"
+                    :disabled="sonDisable"
+                    active-value="Y"
+                    inactive-value="N"
+                    active-color="#13ce66"
+                    inactive-color="#a1a3a9">
+                  </el-switch>
+              </el-form-item>
+            </template>
+          </el-table-column> -->
+          <el-table-column show-overflow-tooltip label="采购备注" align="center"  prop="updateCause" width="150px"/>
+          <el-table-column show-overflow-tooltip label="可用量" align="center"  prop="availableQty"/>
+
           <el-table-column
             fixed="right"
             label="操作"
@@ -422,102 +406,101 @@
           </template>
         </el-table-column>
       </el-table>
-  </el-form>
+    </el-form>
+      <div class="btn_group">
+        <el-col :span="1.5">
+          <el-button type="primary" size="mini"  @click="copy" v-if="sonPageStu == 'check'">复制</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button type="primary" size="mini"  @click="save" v-if="sonPageStu == 'add' || sonPageStu == 'edit'">保存</el-button>
+        </el-col>
+        <el-col :span="1.5" style="margin: 0 10px;">
+          <el-button type="primary" size="mini"  @click="submit" v-if="sonPageStu == 'check' && (row.status == '0' || row.status == '3')">提交</el-button>
+        </el-col>
+        <el-col :span="1.5">
+          <el-button size="mini" plain @click="back">返回</el-button>
+        </el-col>
+      </div>
   </el-card>
 
-    <div class="btn_group">
-      <el-col :span="1.5">
-        <el-button type="primary" size="mini" plain @click="copy" v-if="sonPageStu == 'check'">复制</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button type="primary" size="mini" plain @click="save" v-if="sonPageStu == 'add' || sonPageStu == 'edit'">保存</el-button>
-      </el-col>
-      <el-col :span="1.5" style="margin: 0 10px;">
-        <el-button type="primary" size="mini" plain @click="submit" v-if="sonPageStu == 'check' && (row.status == '0' || row.status == '3')">提交</el-button>
-      </el-col>
-      <el-col :span="1.5">
-        <el-button size="mini" 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"/>
 
       <popDialog ref="materialRefer" @doSubmit="selectMaterial" :single="true" />
 
-    </div>
 
     <!-- 批量调整参数 -->
-    <el-dialog title="批量调整" :visible.sync="adjust.open" @close="closeEvent" width="400px">
+    <el-dialog title="批量调整" :visible.sync="adjust.open" @close="closeEvent" width="38%">
       <el-row style="margin-bottom: 10px;">
-        <el-col :span="6">价格类型</el-col>
+        <el-col :span="6" class="pltzTxt">价格类型</el-col>
         <el-col :span="14">
-        <el-select clearable size="mini" v-model="adjust.priceType">
+        <el-select class="pltzIpt" clearable size="mini" v-model="adjust.priceType">
           <el-option v-for=" dict in dict.type.sys_price_type" :key="dict.value" :label="dict.label" :value="dict.value">
           </el-option>
         </el-select>
         </el-col>
       </el-row>
       <el-row style="margin-bottom: 10px;">
-        <el-col :span="6">采购员</el-col>
+        <el-col :span="6" class="pltzTxt">采购员</el-col>
         <el-col :span="14">
-        <el-select clearable size="mini" v-model="adjust.purchaseMan" @focus="chooseOrg('CONTACTS_PARAM', true, '采购员')">
+        <el-select class="pltzIpt" clearable size="mini" v-model="adjust.purchaseMan" @focus="chooseOrg('CONTACTS_PARAM', true, '采购员')">
           <el-option v-for="item in purchaseManOptions" :key="item.id" :label="item.name" :value="item.code" />
         </el-select>
         </el-col>
       </el-row>
       <el-row style="margin-bottom: 10px;">
-        <el-col :span="6">收货仓库</el-col>
+        <el-col :span="6" class="pltzTxt">收货仓库</el-col>
         <el-col :span="14">
-        <el-input clearable size="mini" v-model="adjust.warehouseName" @focus="chooseOrg('WAREHOUSE_PARAM', true, '收货仓库')">
+        <el-input class="pltzIpt" clearable size="mini" v-model="adjust.warehouseName" @focus="chooseOrg('WAREHOUSE_PARAM', true, '收货仓库')">
           <el-button size="mini" slot="append" icon="el-icon-more" @click="chooseOrg('WAREHOUSE_PARAM', true, '收货仓库')"></el-button>
         </el-input>
         </el-col>
       </el-row>
       <el-row style="margin-bottom: 10px;">
-        <el-col :span="6">收货货位</el-col>
+        <el-col :span="6" class="pltzTxt">收货货位</el-col>
         <el-col :span="14">
-        <el-input clearable size="mini" v-model="adjust.allocationName" @focus="adjustHuoWei('ALLOCATION_PARAM', true, '收货货位', adjust.warehouse)">
+        <el-input class="pltzIpt" clearable size="mini" v-model="adjust.allocationName" @focus="adjustHuoWei('ALLOCATION_PARAM', true, '收货货位', adjust.warehouse)">
           <el-button size="mini" slot="append" icon="el-icon-more" @click="adjustHuoWei('ALLOCATION_PARAM', true, '收货货位', adjust.warehouse)"></el-button>
         </el-input>
         </el-col>
       </el-row>
       <el-row style="margin-bottom: 10px;">
-        <el-col :span="6">业务备注</el-col>
+        <el-col :span="6" class="pltzTxt">业务备注</el-col>
         <el-col :span="14">
-          <el-input clearable size="mini" v-model="adjust.remark"/>
+          <el-input class="pltzIpt" clearable size="mini" v-model="adjust.remark"/>
         </el-col>
       </el-row>
       <el-row style="margin-bottom: 10px;">
-        <el-col :span="6">收货地址</el-col>
+        <el-col :span="6" class="pltzTxt">收货地址</el-col>
         <el-col :span="14">
-          <el-input clearable size="mini" v-model="adjust.deliveryAddressName" @focus="chooseOrg('ADDRESS_PARAM', true, '收货地址')">
+          <el-input class="pltzIpt" clearable size="mini" v-model="adjust.deliveryAddressName" @focus="chooseOrg('ADDRESS_PARAM', true, '收货地址')">
             <el-button size="mini" slot="append" icon="el-icon-more" @click="chooseOrg('ADDRESS_PARAM', true, '收货地址')"></el-button>
           </el-input>
         </el-col>
       </el-row>
       <el-row style="margin-bottom: 10px;">
-        <el-col :span="6">收货地址编码</el-col>
+        <el-col :span="6" class="pltzTxt">收货地址编码</el-col>
         <el-col :span="14">
-          <el-input disabled clearable size="mini" v-model="adjust.deliveryAddress"/>
+          <el-input class="pltzIpt" disabled clearable size="mini" v-model="adjust.deliveryAddress"/>
         </el-col>
       </el-row>
       <el-row style="margin-bottom: 10px;">
-        <el-col :span="6">联系人</el-col>
+        <el-col :span="6" class="pltzTxt">联系人</el-col>
         <el-col :span="14">
-          <el-input disabled clearable size="mini" v-model="adjust.contacts"/>
+          <el-input class="pltzIpt" disabled clearable size="mini" v-model="adjust.contacts"/>
         </el-col>
       </el-row>
       <el-row style="margin-bottom: 10px;">
-        <el-col :span="6">联系人电话</el-col>
+        <el-col :span="6" class="pltzTxt">联系人电话</el-col>
         <el-col :span="14">
-          <el-input disabled clearable size="mini" v-model="adjust.contactsPhone"/>
+          <el-input class="pltzIpt" disabled clearable size="mini" v-model="adjust.contactsPhone"/>
         </el-col>
       </el-row>
       <el-row style="margin-bottom: 10px;">
-        <el-col :span="6">详细地址</el-col>
+        <el-col :span="6" class="pltzTxt">详细地址</el-col>
         <el-col :span="14">
-          <el-input disabled clearable size="mini" v-model="adjust.address"/>
+          <el-input class="pltzIpt" disabled clearable size="mini" v-model="adjust.address"/>
         </el-col>
       </el-row>
       <div slot="footer">
@@ -569,8 +552,8 @@ export default {
         customerName: '',
         customerCode: '',
         customerPrincipal: '',
-        demandPersonal: '',
-        demandDept: '',
+        demandPersonal: this.$store.state.user.name,
+        demandDept: this.$store.state.user.deptId,
         demandDate: '',
         createTime: '',
         source: '4',
@@ -640,6 +623,9 @@ export default {
       this.getDetails(this.row)
     } else if(this.pageStu == 'edit') {
       this.getDetails(this.row)
+    } else if (this.pageStu == 'add') {
+      if (this.basicForm.demandPersonal) { this.reBackRefer('CONTACTS_PARAM', this.basicForm.demandPersonal, '需求人员') }
+      if (this.basicForm.demandDept) { this.reBackRefer('DEPT_PARAM', this.basicForm.demandDept) }
     }
   },
   methods: {
@@ -654,10 +640,12 @@ export default {
       if (this.basicForm.billType == 'BDXQ' && this.basicForm.puDemandItemList.length != 0) {
         this.isBDXQ = true
         this.BDZT = false
+        this.anotherRedStar()
         this.basicForm.puDemandItemList.forEach(item => {item.isReplenishment = 'Y'})
       } else {
         this.isBDXQ = false
         this.BDZT = true
+        this.anotherRedStar()
         this.basicForm.puDemandItemList.forEach(item => {
           item.isReplenishment = 'N'
           item.additionalSupplier = null
@@ -704,7 +692,7 @@ export default {
       scope.row.reservedPeriod = ''
     },
     copy() {
-      this.$modal.msgSuccess("复制成功");
+      this.$modal.notifySuccess("复制成功");
       this.sonPageStu = 'add'
       this.sonDisable = false
       // this.getDetails(this.row)
@@ -712,6 +700,7 @@ export default {
       this.basicForm.code = ''
       this.basicForm.createBy = ''
       this.basicForm.source = '4'
+      this.basicForm.isSpeical = 'N'
       this.basicForm.puDemandItemList.forEach(item => {
         item.status = ''
         item.buyerName = ''
@@ -770,7 +759,7 @@ export default {
     },
     async save() {
       if(this.basicForm.puDemandItemList.length !== 0) {
-        this.$refs['basic'].validate((valid) => {
+        this.$refs['basic'].validate((valid, obj) => {
           if(valid) {
             this.$modal.loading("保存中...");
             if(this.sonPageStu == 'add') {
@@ -778,7 +767,7 @@ export default {
               addDemand(this.basicForm).then(res => {
                 console.log(333)
                 if (res.code === 200) {
-                  this.$modal.msgSuccess("保存成功");
+                  this.$modal.notifySuccess("保存成功");
                   this.$modal.closeLoading();
                   this.back()
                 }
@@ -795,7 +784,7 @@ export default {
               // this.basicForm.puDemandItemList.push(...this.delDemandItemList)
               editDemand(param).then(res => {
                 if (res.code === 200) {
-                  this.$modal.msgSuccess("编辑成功");
+                  this.$modal.notifySuccess("编辑成功");
                   this.$modal.closeLoading();
                   this.back()
                 }
@@ -803,17 +792,25 @@ export default {
                 this.$modal.closeLoading();
               })
             }
+          } else {
+            // 校验加弹窗
+            const jiaoyan = []
+            for(let key in obj) {
+              jiaoyan.push(obj[key][0].message);
+            }
+            this.$modal.notifyWarning(jiaoyan[0]);
+            return false
           }
         })
       } else {
-        this.$modal.msgWarning("明细信息不能为空!");
+        this.$modal.notifyWarning("明细信息不能为空!");
       }
     },
     submit() {
       this.$modal.loading("提交中...");
       submitDemand(this.basicForm).then(res => {
         if (res.code === 200) {
-          this.$modal.msgSuccess("提交成功");
+          this.$modal.notifySuccess("提交成功");
           this.$modal.closeLoading();
           this.back()
         }
@@ -956,6 +953,7 @@ export default {
       console.log('删除的数组',this.delDemandItemList)
     },
     back() {
+      console.log('打印人员信息看看', this.$store.state)
       this.$emit('jugislist', true)
       this.$emit('refresh')
     },
@@ -981,9 +979,11 @@ export default {
               if(this.basicForm.billType == 'BDXQ') {
                  this.BDZT = false
                  this.isBDXQ = true
+                 this.anotherRedStar()
               } else {
                  this.BDZT = true
                  this.isBDXQ = false
+                 this.anotherRedStar()
               }
             }
           })
@@ -1298,7 +1298,7 @@ export default {
               this.basicForm.puDemandItemList.push(line)
               // console.log('临时数组', line)
             }
-            this.$modal.msgSuccess("共粘贴" + rowList.length + '条数据');
+            this.$modal.notifySuccess("共粘贴" + rowList.length + '条数据');
           }
         }).catch(err => {
           this.$modal.closeLoading();
@@ -1306,7 +1306,7 @@ export default {
         this.$modal.closeLoading();
       console.log('列表', this.basicForm.puDemandItemList)
       } else {
-        this.$modal.msgWarning("复制长度不能超过1000!");
+        this.$modal.notifyWarning("复制长度不能超过1000!");
       }
     },
     // 明细行选择物料编码带出数据
@@ -1409,7 +1409,7 @@ export default {
         this.referCondition.stordocId = stordocId
         this.$refs.refer.init(this.referCondition)
       } else {
-        this.$modal.msgWarning("请先选择收货仓库");
+        this.$modal.notifyWarning("请先选择收货仓库");
       }
     },
     // 明细行清空收货仓库,货位,收货地址档案等
@@ -1481,7 +1481,7 @@ export default {
     // 批量调整
     adjustPl() {
       if(this.ids.length == 0) {
-        this.$modal.msgWarning('请至少选择一项数据进行操作!')
+        this.$modal.notifyWarning('请至少选择一项数据进行操作!')
       } else {
         this.adjust.open = true
       }
@@ -1534,7 +1534,7 @@ export default {
         this.referCondition.stordocId = stordocId
         this.$refs.refer.init(this.referCondition)
       } else {
-        this.$modal.msgWarning("请先选择收货仓库");
+        this.$modal.notifyWarning("请先选择收货仓库");
       }
     },
     // 关闭清空批量调整数据
@@ -1556,21 +1556,43 @@ export default {
         address: ''
       }
     },
+    // 必选标识
+    addRedStar(h, { column }) {
+      return [
+        h('span', { style: 'color: #F56C6C' }, '*'),
+        h('span', ' ' + column.label)
+      ];
+    },
+    anotherRedStar(h, { column }) {
+      if(this.isBDXQ) {
+      return [
+        h('span', { style: 'color: #F56C6C' }, '*'),
+        h('span', ' ' + column.label)
+      ];
+      } else {
+       return [
+          h('span', ' ' + column.label)
+        ]; 
+      }
+    },
   }
 }
 </script>
 
 <style lang="scss" scoped>
 .btn_group {
-  width: 100%;
-  margin: 20px 0;
+  // width: 100%;
+  // margin: 20px 0;
   display: flex;
-  justify-content: center;
+  // justify-content: center;
+  position: absolute;
+  top: 10px;right: 20px;
+
 }
 .btn_grooup {
   margin-bottom: 10px;
   display: flex;
-  justify-content: flex-end;
+  justify-content: space-between;
 }
 .hang {
   margin: auto;
@@ -1588,4 +1610,12 @@ export default {
 ::v-deep .el-table__row > td {
   border: none;
 }
+.pltzTxt{
+  text-align: right;
+  font-size: medium;
+  padding-right: 2%;
+}
+.pltzIpt{
+  width: 90%;
+}
 </style>

+ 37 - 20
src/views/purchase/PurchaseDemandList/index.vue

@@ -1,7 +1,7 @@
 <template>
   <div id="PurchaseDemandList">
     <div v-if="isList">
-      <el-card>
+      <el-card style="height: calc(100vh - 15vh);position: relative;overflow: scroll;">
         <el-form class="search_area" label-width="100px">
           <el-row :gutter="10">
             <el-col :span="1.5">
@@ -40,12 +40,14 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="1.5">
-              <el-form-item label="" label-width="20px">
-                <el-button type="primary" size="mini" icon="el-icon-search" plain @click="searchList">搜索</el-button>
-                <el-button size="mini" icon="el-icon-refresh" plain @click="resetList">重置</el-button>
-              </el-form-item>
-            </el-col>
+            <!-- <el-col :span="1.5"> -->
+              <!-- <el-form-item label="" label-width="20px"> -->
+                <div style="position: absolute;top: 3px;right: 10px;">
+                  <el-button type="primary" size="mini" icon="el-icon-search" @click="searchList">搜索</el-button>
+                  <el-button size="mini" icon="el-icon-refresh" plain @click="resetList">重置</el-button>
+                </div>
+              <!-- </el-form-item> -->
+            <!-- </el-col> -->
           </el-row>
         <CollapseTransition>
           <div v-show="expanded">
@@ -156,21 +158,25 @@
           <el-button type="primary" size="mini" @click="delItems">删除</el-button>
           <!-- <el-button type="primary" size="mini">打印</el-button> -->
         </div>
+        
         <el-table 
           :data="tableList" 
           fit
+          :cell-style="{ borderColor: '#c0c0c0' }"
+          :header-cell-style="{ borderColor: '#c0c0c0' }"
+          class="exporttable"
           border
-          max-height="550"
+          height="430"
+          max-height="430"
           style="font-size: 12px;"
           @selection-change="handleSelectionChange"
         >
           <el-table-column show-overflow-tooltip type="selection" width="55" />
-          <el-table-column show-overflow-tooltip label="编码" align="center" width="200" prop="code"/>
+          <el-table-column show-overflow-tooltip label="编码" align="center" width="170" prop="code"/>
           <el-table-column show-overflow-tooltip label="需求日期" align="center" width="120" prop="demandDate"/>
-          <el-table-column show-overflow-tooltip label="审批结束日期" align="center" width="150" prop="approverFinishTime"/>
+          <el-table-column show-overflow-tooltip label="审批结束日期" align="center" width="120" prop="approverFinishTime"/>
           <el-table-column show-overflow-tooltip label="单据状态" align="center" prop="satus" :formatter="formatterStatus"/>
-          <!-- <el-table-column show-overflow-tooltip label="是否已处理需求" align="center" width="150" prop="isProcess" /> -->
-          <el-table-column show-overflow-tooltip label="业务类型" align="center" prop="billType" :formatter="formatterBillType"/>
+          <el-table-column show-overflow-tooltip label="业务类型" align="center" width="120" prop="billType" :formatter="formatterBillType"/>
           <!-- <el-table-column show-overflow-tooltip label="是否特殊需求" align="center" width="150" prop="isSpeical" /> -->
           <el-table-column show-overflow-tooltip label="需求人员" align="center" prop="demandPersonalName" />
           <el-table-column show-overflow-tooltip label="需求客户" align="center" prop="customerName" width="150"/>
@@ -200,8 +206,8 @@
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
           :current-page="queryParams.pageNum"
-          :page-sizes="[10, 20 ,50 ,100 ,300]"
-          :page-size="100"
+          :page-sizes="[10, 20 ,50 ,100]"
+          :page-size="10"
           layout="total, sizes, prev, pager, next, jumper"
           :total=total>
         </el-pagination>
@@ -521,7 +527,7 @@ export default {
     handleExport(command) {
       if(command == '选中导出') {
         if (this.ids.length == 0) {
-          this.$modal.msgWarning("请选中至少一条数据");
+          this.$modal.notifyWarning("请选中至少一条数据");
         } else {
           let param = {all: false, ids: this.ids}
           exportDemand(param).then(res => {
@@ -583,7 +589,7 @@ export default {
       this.$modal.loading("提交中...");
       submitDemand(row).then(res => {
         if (res.code === 200) {
-          this.$modal.msgSuccess("提交成功");
+          this.$modal.notifySuccess("提交成功");
           this.$modal.closeLoading();
           this.getList(this.queryParams)
         }
@@ -597,7 +603,7 @@ export default {
       this.$modal.confirm('确定删除选择数据?').then(() => {
         delDemand(row.id).then(res => {
           if (res.code === 200) {
-            this.$modal.msgSuccess("删除成功");
+            this.$modal.notifySuccess("删除成功");
             this.getList(this.queryParams)
           }
         })
@@ -606,13 +612,13 @@ export default {
     // 批量删除按钮
     delItems() {
       if(this.ids.length == 0) {
-        this.$modal.msgWarning("请选中至少一条数据");
+        this.$modal.notifyWarning("请选中至少一条数据");
       } else {
         let param = this.ids.join()
         this.$modal.confirm('确认信息').then(() => {
         delDemand(param).then(res => {
           if (res.code === 200) {
-            this.$modal.msgSuccess("删除成功");
+            this.$modal.notifySuccess("删除成功");
             this.getList(this.queryParams)
           }
         })
@@ -679,7 +685,7 @@ export default {
         this.referCondition.stordocId = stordocId
         this.$refs.refer.init(this.referCondition)
       } else {
-        this.$modal.msgWarning("请先选择仓库")
+        this.$modal.notifyWarning("请先选择仓库")
       }
     },
     cleanMb() {
@@ -723,4 +729,15 @@ export default {
 ::v-deep .el-table__row > td {
   border: none;
 }
+ ::v-deep .el-card .el-form-item {
+  margin-bottom: 10px;
+}
+</style>
+<style>
+.exporttable {
+  border: solid 1px #c0c0c0;
+}
+.el-table .el-table__header-wrapper th {
+  font-size: 14px;
+}
 </style>

+ 1 - 1
src/views/purchase/PurchaseDemandList/reserved.vue

@@ -151,4 +151,4 @@ export default {
     }
   }
 }
-</script>
+</script>

+ 8 - 38
src/views/purchase/apply/add/columns.js

@@ -3,10 +3,6 @@ import CONFIG from "@/config";
 export default function useColumns() {
   const TableColumns = [
     {
-      item: { key: "priceName", title: "价格名称" },
-      attr: { is: "el-input", value: "价格申报单" },
-    },
-    {
       item: { key: "priceCode", title: "价格编码" },
       attr: { is: "el-input", disabled: true, readonly: true },
     },
@@ -80,6 +76,7 @@ export default function useColumns() {
       attr: {
         is: "el-select",
         dictName: "is_effective",
+        value: "N",
       },
     },
     {
@@ -138,7 +135,10 @@ export default function useColumns() {
             },
           },
         },
-        { item: { key: "materialCode", title: "物料编码" }, attr: {} },
+        {
+          item: { key: "materialCode", title: "物料编码", require: true },
+          attr: {},
+        },
         { item: { key: "manufacturerName", title: "生产厂家" }, attr: {} },
         { item: { key: "specification", title: "规格" }, attr: {} },
         { item: { key: "model", title: "型号" }, attr: {} },
@@ -267,10 +267,11 @@ export default function useColumns() {
           },
         },
         {
-          item: { key: "priceType", title: "价格类型" },
+          item: { key: "priceType", title: "价格类型", require: true },
           attr: {
             is: "el-select",
             dictName: "sys_price_type",
+            value: "order",
           },
         },
         {
@@ -278,44 +279,13 @@ export default function useColumns() {
           attr: {
             is: "el-select",
             dictName: "is_effective",
+            value: "N",
           },
         },
         { item: { key: "createByName", title: "创建人名称" }, attr: {} },
         { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
       ],
     },
-    {
-      item: {
-        title: "合同执行组织范围",
-        key: "priceApplyOrgs",
-      },
-      attr: {
-        value: [],
-      },
-      TableColumns: [
-        {
-          item: { key: "orgName", title: "组织", require: true, width: "auto" },
-          attr: {
-            is: "el-popover-select-v2",
-            valueKey: "name",
-            referName: "ORG_PARAM",
-            dataMapping: {
-              org: "id",
-              orgCode: "code",
-              orgName: "name",
-            },
-          },
-        },
-        {
-          item: { key: "createByName", title: "创建人名称", width: "auto" },
-          attr: {},
-        },
-        {
-          item: { key: "updateByName", title: "更新人名称", width: "auto" },
-          attr: {},
-        },
-      ],
-    },
   ];
 
   return { TableColumns, TabColumns };

+ 57 - 119
src/views/purchase/apply/add/index.vue

@@ -1,44 +1,8 @@
 <script>
 import useColumns from "./columns";
-import { REFER } from "@/components/popover-select/api";
 import { EXIST } from "@/api/business/purchase/catalogue";
 import { ITEM, SAVE } from "@/api/business/purchase/apply";
-
-const fetchTax = async (prop) => {
-  try {
-    // try
-    const { code, rows } = await REFER({
-      search: prop,
-      type: "TAX_RATE_PARAM",
-    });
-    if (code === 200) {
-      return rows[0] || {};
-    }
-  } catch (err) {
-    // catch
-    console.error(err);
-  } finally {
-    // finally
-  }
-};
-
-const fetchUnit = async (prop) => {
-  try {
-    // try
-    const { code, rows } = await REFER({
-      search: prop,
-      type: "UNIT_PARAM",
-    });
-    if (code === 200) {
-      return rows[0] || {};
-    }
-  } catch (err) {
-    // catch
-    console.error(err);
-  } finally {
-    // finally
-  }
-};
+import { tax, unit, currency } from "@/components/popover-select-v2/fetch";
 
 const fetchExist = async (prop) => {
   try {
@@ -143,21 +107,13 @@ export default {
     },
     priceApply: {
       get() {
-        const {
-          params: { priceApplyOrgs, priceApplyItems },
-        } = this;
-        this.params.priceApplyOrgs = priceApplyOrgs.map((item, index) => ({
-          ...item,
-          $index: index,
-        }));
-        this.params.priceApplyItems = priceApplyItems.map((item, index) => ({
-          ...item,
-          $index: index,
-        }));
+        this.params.priceApplyItems = this.params.priceApplyItems.map(
+          (item, index) => ({
+            ...item,
+            $index: index,
+          })
+        );
         return {
-          priceApplyOrgs: this.params.priceApplyOrgs.filter(
-            ({ delFlag }) => delFlag !== "2"
-          ),
           priceApplyItems: this.params.priceApplyItems.filter(
             ({ delFlag }) => delFlag !== "2"
           ),
@@ -169,35 +125,17 @@ export default {
   watch: {},
   methods: {
     //
-    changePuOrgName(prop) {
-      const {
-        select: { id: org, code: orgCode, name: orgName },
-      } = prop;
-      const index = this.params.priceApplyOrgs.findIndex(
-        (item) => item.org === org
-      );
-      if (index === -1) {
-        this.params.priceApplyOrgs.push({
-          org,
-          orgCode,
-          orgName,
-          createByName: undefined,
-          updateByName: undefined,
-        });
-      }
-    },
-    //
     changeMaterialName(prop) {
       const { row } = prop;
       const { puOrg, customer, supplier } = this.params;
       const { rateCode, unitIdName, code: materialCode } = row;
       // task 1
-      fetchTax(rateCode).then((res) => {
+      tax(rateCode).then((res) => {
         const { ntaxrate } = res;
         row.tax = ntaxrate === "0E-8" ? "0.000000" : (ntaxrate * 1).toFixed(6);
       });
       // task 2
-      fetchUnit(unitIdName).then((res) => {
+      unit(unitIdName).then((res) => {
         const { id, code, name } = res;
         row.unit = id;
         row.unitCode = code;
@@ -236,10 +174,28 @@ export default {
       }
     },
     //
-    async open() {
+    async onOpen() {
       const { addType, selectData } = this.$props;
       if (addType === "add") {
         this.visible = true;
+        const {
+          deptId: puDept,
+          deptName: puDeptName,
+          name: buyer,
+          nickName: buyerName,
+          orgId: puOrg,
+          orgName: puOrgName,
+        } = this.$store.state.user;
+        const { id, code, name } = await currency("人民币");
+        this.params.currency = id;
+        this.params.currencyCode = code;
+        this.params.currencyName = name;
+        this.params.puOrg = puOrg;
+        this.params.puOrgName = puOrgName;
+        this.params.buyer = buyer;
+        this.params.buyerName = buyerName;
+        this.params.puDept = puDept;
+        this.params.puDeptName = puDeptName;
       }
       if (addType === "copy") {
         const [{ id }] = selectData;
@@ -258,13 +214,6 @@ export default {
             updateByName: null,
           })
         );
-        this.params.priceApplyOrgs = this.params.priceApplyOrgs.map((item) => ({
-          ...item,
-          id: null,
-          applyId: null,
-          createByName: null,
-          updateByName: null,
-        }));
       }
       if (addType === "edit") {
         const [{ id }] = selectData;
@@ -274,13 +223,10 @@ export default {
             ...item,
           })
         );
-        this.params.priceApplyOrgs = this.params.priceApplyOrgs.map((item) => ({
-          ...item,
-        }));
       }
     },
     //
-    async hide() {
+    async onHide() {
       const {
         TabColumns,
         TableColumns,
@@ -295,7 +241,7 @@ export default {
       this.params = this.$init.params([...TabColumns, ...TableColumns]);
     },
     //
-    async useRowAdd(prop) {
+    async onRowAdd(prop) {
       const {
         $notify,
         TabColumns,
@@ -316,7 +262,7 @@ export default {
       });
     },
     //
-    async useRowRemove(prop, scope) {
+    async onRowRemove(prop, scope) {
       const { addType } = this.$props;
       const {
         row: { $index },
@@ -338,24 +284,18 @@ export default {
     //
     async useSubmit(prop) {
       this.$refs[prop].$refs[prop].validate(async (valid) => {
+        console.log(this.params);
         if (valid) {
           try {
             this.loading = true;
-            const {
-              params,
-              params: { priceApplyOrgs, priceApplyItems },
-            } = this;
             if (this.addType === "edit") {
-              params.priceApplyOrgs = priceApplyOrgs.filter(
-                (item) => item.orgName
-              );
-              params.priceApplyItems = priceApplyItems.filter(
+              this.params.priceApplyItems = this.params.priceApplyItems.filter(
                 (item) => item.materialName
               );
             }
-            const { msg, code } = await SAVE(params);
+            const { msg, code } = await SAVE(this.params);
             if (code === 200) {
-              this.hide();
+              this.onHide();
               this.$emit("success");
               this.$notify.success(msg);
             }
@@ -382,17 +322,32 @@ export default {
     v-bind="$attrs"
     v-on="$listeners"
     :disabled="disabled"
-    @click="open"
+    @click="onOpen"
   >
     {{ title }}
     <el-drawer
+      :show-close="false"
       :size="width"
       :title="title"
       :visible.sync="visible"
       append-to-body
       destroy-on-close
-      @close="hide"
+      @close="onHide"
     >
+      <template slot="title">
+        <span>{{ title }}</span>
+        <el-button
+          type="primary"
+          :size="$attrs.size"
+          :loading="loading"
+          @click="useSubmit('superForm')"
+        >
+          确 认
+        </el-button>
+        <el-button :size="$attrs.size" :loading="loading" @click="onHide">
+          取 消
+        </el-button>
+      </template>
       <el-super-form
         v-model="params"
         :dict="dict"
@@ -440,41 +395,24 @@ export default {
               >
               </component>
             </template>
-            <el-table-column fixed="right" label="操作" width="75">
+            <el-table-column fixed="right" label="操作" width="100">
               <template slot="header" slot-scope="scope">
-                <el-button
-                  circle
-                  icon="el-icon-plus"
-                  :size="$attrs.size"
-                  @click="useRowAdd(tabName)"
-                >
+                <el-button :size="$attrs.size" @click="onRowAdd(tabName)">
+                  新增
                 </el-button>
               </template>
               <template slot-scope="scope">
                 <el-button
-                  circle
-                  icon="el-icon-minus"
                   :size="$attrs.size"
-                  @click.native.prevent="useRowRemove(tabName, scope)"
+                  @click.native.prevent="onRowRemove(tabName, scope)"
                 >
+                  删除
                 </el-button>
               </template>
             </el-table-column>
           </el-super-table>
         </el-tab-pane>
       </el-tabs>
-      <div style="padding: 20px; text-align: right">
-        <el-button :size="$attrs.size" :loading="loading" @click="hide"
-          >取 消</el-button
-        >
-        <el-button
-          type="primary"
-          :size="$attrs.size"
-          :loading="loading"
-          @click="useSubmit('superForm')"
-          >确 认</el-button
-        >
-      </div>
     </el-drawer>
   </el-button>
 </template>

+ 1 - 5
src/views/purchase/apply/columns.js

@@ -2,7 +2,6 @@ import CONFIG from "@/config";
 
 export default function useColumns() {
   const TableColumns = [
-    { item: { key: "priceName", title: "价格名称" }, attr: {} },
     { item: { key: "priceCode", title: "价格编码" }, attr: {} },
     {
       item: { key: "status", title: "状态" },
@@ -100,10 +99,7 @@ export default function useColumns() {
         clearable: true,
       },
     },
-  ].map(({ item, attr }) => ({
-    attr,
-    item: { ...item, hidden: true, span: item.span || 6 },
-  }));
+  ];
 
   return { TableColumns, SearchColumns };
 }

+ 20 - 24
src/views/purchase/apply/index.vue

@@ -16,16 +16,17 @@ export default {
   },
   data() {
     const { TableColumns, SearchColumns } = useColumns();
+    const page = this.$init.page();
     const params = this.$init.params(SearchColumns);
     return {
       size: "mini",
       loading: false,
       params: params,
+      page: page,
       tableData: [],
       selectData: [],
       SearchColumns: SearchColumns,
       TableColumns: TableColumns,
-      page: { pageNum: 1, pageSize: 10, total: 0 },
     };
   },
   computed: {},
@@ -64,13 +65,13 @@ export default {
     },
     // 重 置
     useReset() {
-      this.page.pageNum = 1;
-      this.page.pageSize = 10;
+      this.page = this.$init.page();
       this.params = this.$init.params(this.SearchColumns);
       this.useQuery(this.params, this.page);
     },
     // 选 择
     useSelect(prop) {
+      console.log("prop", prop);
       this.selectData = prop;
     },
     // 明 细
@@ -92,7 +93,7 @@ export default {
       @reset="useReset"
       @submit="useQuery(params, page)"
     ></el-super-search>
-    <div style="margin: 0 0 20px 0; text-align: right">
+    <el-row class="my-4" style="text-align: right">
       <el-button-group>
         <add-button
           :size="size"
@@ -140,39 +141,34 @@ export default {
           @success="useQuery(params, page)"
         ></subm-button>
       </el-button-group>
-    </div>
+    </el-row>
     <el-super-table
       v-model="tableData"
       :size="size"
       :dict="dict"
+      :page="page"
       :columns="TableColumns"
-      stroage
-      hideOperationColumns
+      index
+      checkbox
+      pagination
+      hiddenColumns
+      filterColumns
+      height="600"
       @row-dblclick="useSee"
-      @selection-change="useSelect"
+      @row-select="useSelect"
+      @pagination="useQuery(params, page)"
     >
-      <el-table-column fixed width="55" align="center" label="#" prop="$index">
-      </el-table-column>
-      <el-table-column fixed width="55" align="center" type="selection">
-      </el-table-column>
     </el-super-table>
-    <pagination
-      :total="page.total"
-      :page.sync="page.pageNum"
-      :limit.sync="page.pageSize"
-      @pagination="useQuery(params, page)"
-      style="height: 32px; margin: 20px 0 0 0; padding: 0 !important"
-    />
   </el-card>
 </template>
 <style scoped lang="scss">
 .el-card {
-  width: calc(100% - 20px);
-  height: 100%;
-  margin: 10px;
-  padding: 20px;
+  width: calc(100% - 32px);
+  margin: 16px;
+  padding: 16px;
+  border-radius: 8px;
 }
 .el-button-group + .el-button-group {
-  margin: 0 0 0 10px;
+  margin: 0 0 0 8px;
 }
 </style>

+ 0 - 27
src/views/purchase/apply/see/columns.js

@@ -3,10 +3,6 @@ import CONFIG from "@/config";
 export default function useColumns() {
   const TableColumns = [
     {
-      item: { key: "priceName", title: "价格名称" },
-      attr: {},
-    },
-    {
       item: { key: "priceCode", title: "价格编码" },
       attr: {},
     },
@@ -181,29 +177,6 @@ export default function useColumns() {
         { item: { key: "updateByName", title: "更新人名称" }, attr: {} },
       ],
     },
-    {
-      item: {
-        title: "合同执行组织范围",
-        key: "priceApplyOrgs",
-      },
-      attr: {
-        value: [],
-      },
-      TableColumns: [
-        {
-          item: { key: "orgName", title: "组织", width: "auto" },
-          attr: {},
-        },
-        {
-          item: { key: "createByName", title: "创建人名称", width: "auto" },
-          attr: {},
-        },
-        {
-          item: { key: "updateByName", title: "更新人名称", width: "auto" },
-          attr: {},
-        },
-      ],
-    },
   ];
 
   return { TableColumns, TabColumns };

+ 10 - 2
src/views/purchase/apply/see/index.vue

@@ -20,8 +20,8 @@ export default {
       ],
     } = useColumns();
     return {
-      width: "50%",
-      column: 2,
+      width: "100%",
+      column: 3,
       title: "明 细",
       visible: false,
       loading: false,
@@ -115,12 +115,19 @@ export default {
   >
     {{ title }}
     <el-drawer
+      :show-close="false"
       :size="width"
       :title="title"
       :visible.sync="visible"
       append-to-body
       @close="hide(selectData)"
     >
+      <template slot="title">
+        <span>{{ title }}</span>
+        <el-button :size="$attrs.size" :loading="loading" @click="hide">
+          取 消
+        </el-button>
+      </template>
       <div
         style="
           z-index: 6666;
@@ -170,6 +177,7 @@ export default {
             :size="$attrs.size"
             :dict="dict"
             :columns="columns"
+            :cell-style="{ height: '30px' }"
           >
           </el-super-table>
         </el-tab-pane>

+ 0 - 1
src/views/purchase/catalogue/columns.js

@@ -60,7 +60,6 @@ export default function useColumns() {
       item: { key: "priceType", title: "价格类型" },
       attr: { is: "el-dict-tag", dictName: "sys_price_type" },
     },
-    { item: { key: "demandCode", title: "采购需求单号" }, attr: {} },
     { item: { key: "expiryEarly", title: "效期预警" }, attr: {} },
     { item: { key: "priority", title: "含税/无税优先" }, attr: {} },
     { item: { key: "createByName", title: "创建人" }, attr: {} },

+ 10 - 15
src/views/purchase/catalogue/index.vue

@@ -25,7 +25,7 @@ export default {
       selectData: [],
       TableColumns: TableColumns,
       SearchColumns: SearchColumns,
-      page: { pageNum: 1, pageSize: 10, total: 0 },
+      page: { pageNum: 1, pageSize: 20, total: 0 },
     };
   },
   computed: {},
@@ -91,7 +91,7 @@ export default {
       @reset="useReset"
       @submit="useQuery(params, page)"
     ></el-super-search>
-    <div style="margin: 0 0 20px 0; text-align: right">
+    <div class="my-4" style="text-align: right">
       <el-button-group>
         <ena-button
           :size="size"
@@ -135,24 +135,19 @@ export default {
       v-model="tableData"
       :size="size"
       :dict="dict"
+      :page="page"
       :columns="TableColumns"
-      stroage
-      hideOperationColumns
+      index
+      checkbox
+      pagination
+      hiddenColumns
+      filterColumns
+      height="600"
       @row-dblclick="useSee"
       @selection-change="useSelect"
+      @pagination="useQuery(params, page)"
     >
-      <el-table-column fixed width="55" align="center" label="#" prop="$index">
-      </el-table-column>
-      <el-table-column fixed width="55" align="center" type="selection">
-      </el-table-column>
     </el-super-table>
-    <pagination
-      :total="page.total"
-      :page.sync="page.pageNum"
-      :limit.sync="page.pageSize"
-      @pagination="useQuery(params, page)"
-      style="height: 32px; margin: 20px 0 0 0; padding: 0 !important"
-    />
   </el-card>
 </template>
 <style scoped lang="scss">

+ 0 - 1
src/views/purchase/catalogue/see/columns.js

@@ -60,7 +60,6 @@ export default function useColumns() {
       item: { key: "priceType", title: "价格类型" },
       attr: { is: "el-dict-tag", dictName: "sys_price_type" },
     },
-    { item: { key: "demandCode", title: "采购需求单号" }, attr: {} },
     { item: { key: "expiryEarly", title: "效期预警" }, attr: {} },
     { item: { key: "priority", title: "含税/无税优先" }, attr: {} },
     { item: { key: "createByName", title: "创建人" }, attr: {} },

+ 9 - 2
src/views/purchase/catalogue/see/index.vue

@@ -11,9 +11,9 @@ export default {
   data() {
     const { TableColumns } = useColumns();
     return {
-      column: 1,
+      column: 3,
       title: "明 细",
-      width: "25%",
+      width: "100%",
       visible: false,
       loading: false,
       params: {},
@@ -93,11 +93,18 @@ export default {
   >
     {{ title }}
     <el-drawer
+      :show-close="false"
       :size="width"
       :title="title"
       :visible.sync="visible"
       append-to-body
     >
+      <template slot="title">
+        <span>{{ title }}</span>
+        <el-button :size="$attrs.size" :loading="loading" @click="hide">
+          取 消
+        </el-button>
+      </template>
       <div
         style="
           z-index: 6666;

+ 23 - 10
src/views/purchase/contract/add/columns.js

@@ -92,7 +92,7 @@ export default function useColumns() {
       item: { key: "grossRateAverage", title: "平均毛利率 (%)", require: true },
       attr: {
         is: "el-input-number",
-        precision: CONFIG.precision,
+        precision: 2,
       },
     },
     {
@@ -121,7 +121,7 @@ export default function useColumns() {
       },
       attr: {
         is: "el-input-number",
-        precision: CONFIG.precision,
+        precision: 2,
       },
     },
     {
@@ -183,7 +183,7 @@ export default function useColumns() {
     },
     {
       item: { key: "guaranteePeriodEnd", title: "质保期限", require: true },
-      attr: { is: "el-input-number", precision: CONFIG.precision },
+      attr: { is: "el-input-number", precision: 2 },
     },
     {
       item: { key: "freightMethods", title: "运费承担方式" },
@@ -333,6 +333,7 @@ export default function useColumns() {
           item: {
             title: "物料名称",
             key: "materialName",
+            require: true 
           },
           attr: {
             is: "el-popover-select-v2",
@@ -383,7 +384,7 @@ export default function useColumns() {
           },
         },
         {
-          item: { title: "税率%", key: "tax" },
+          item: { title: "税率%", key: "tax" ,require: true },
           attr: {
             is: "el-popover-select-v2",
             valueKey: "ntaxrate",
@@ -400,7 +401,7 @@ export default function useColumns() {
           },
         },
         {
-          item: { title: "含税单价", key: "taxPrice" },
+          item: { title: "含税单价", key: "taxPrice", require: true  },
           attr: {
             is: "el-input-number",
             precision: CONFIG.precision,
@@ -417,7 +418,7 @@ export default function useColumns() {
           },
         },
         {
-          item: { title: "无税单价", key: "taxFreePrice" },
+          item: { title: "无税单价", key: "taxFreePrice",require: true  },
           attr: {
             formatter: (prop) => {
               const { tax = 0, taxPrice = 0 } = prop;
@@ -524,6 +525,7 @@ export default function useColumns() {
           item: {
             title: "付款起点",
             key: "origin",
+            require: true 
           },
           attr: {
             is: "el-select",
@@ -531,14 +533,14 @@ export default function useColumns() {
           },
         },
         {
-          item: { title: "账期天数", key: "paymetDays" },
+          item: { title: "账期天数", key: "paymetDays" , require: true },
           attr: {
             is: "el-input-number",
-            precision: CONFIG.precision,
+            precision: 2,
           },
         },
         {
-          item: { title: "付款比例%", key: "ratio" },
+          item: { title: "付款比例%", key: "ratio" , require: true },
           attr: {
             is: "el-input-number",
             precision: CONFIG.precision,
@@ -575,6 +577,7 @@ export default function useColumns() {
           item: {
             title: "结算方式",
             key: "paymentMeans",
+            require: true 
           },
           attr: {
             is: "el-popover-select-v2",
@@ -620,6 +623,16 @@ export default function useColumns() {
         { item: { title: "组织编码", key: "org", width: "auto" }, attr: {} },
       ],
     },
-  ];
+  ].map(({item,attr,TableColumns}) =>({
+    attr,
+    item,
+    TableColumns:TableColumns.map(({item, attr}) =>({
+      attr,
+      item: { ...item, hidden: true, span: item.span || 6 },
+  
+    }))
+
+  }))
+  ;
   return { TableColumns, TabColumns };
 }

+ 49 - 19
src/views/purchase/contract/add/index.vue

@@ -126,8 +126,28 @@ export default {
       this.params.buyerName = buyerName;
       this.params.puDept = puDept;
       this.params.puDeptName = puDeptName;
+      const  {id,code, name } =  await this.getCurrency("人民币");
+      this.params.currency = id;
+      this.params.currencyCode = code;
+      this .params.currencyName = name;
       this.visible = await this.fetchCode();
     },
+    async getCurrency(search){
+
+      let page = {pageNum: 1, pageSize:10,}
+
+      const { code, rows } = await REFER(
+          {
+            isPage:true,
+            search,
+            type: 'CURRENCY_PARAM',
+          },
+          page
+      );
+      if(code == 200){
+        return rows[0];
+      }
+    },
     //
     async hide() {
       const {
@@ -182,7 +202,8 @@ export default {
       });
     },
   },
-  created() {},
+  created() {
+  },
   mounted() {},
   destroyed() {},
 };
@@ -196,8 +217,29 @@ export default {
       :visible.sync="visible"
       append-to-body
       destroy-on-close
+      :show-close="false"
       @close="hide"
     >
+      <div slot="title" 
+          style="
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+          ">
+        <h3>{{title}}</h3>
+        <div style="text-align: right">
+          <el-button
+            type="primary"
+            :size="$attrs.size"
+            :loading="loading"
+            @click="useSubmit('superForm')"
+            >确 认</el-button>
+          <el-button :size="$attrs.size" :loading="loading" @click="hide"
+            >取 消</el-button>
+        </div>
+        
+      </div>
+
       <el-super-form
         v-model="params"
         :dict="dict"
@@ -223,6 +265,7 @@ export default {
             :dict="dict"
             :ref="tabName"
             :columns="columns"
+            :iconOperation="false"
             :size="$attrs.size"
           >
             <template slot="materialName" slot-scope="scope">
@@ -238,38 +281,25 @@ export default {
             <el-table-column fixed="right" label="操作" width="75">
               <template slot="header" slot-scope="scope">
                 <el-button
-                  circle
-                  icon="el-icon-plus"
+                  type="text"
                   :size="$attrs.size"
                   @click="useRowAdd(tabName)"
-                >
+                >增行
                 </el-button>
               </template>
               <template slot-scope="scope">
                 <el-button
-                  circle
-                  icon="el-icon-minus"
+                  type="text"
                   :size="$attrs.size"
                   @click.native.prevent="useRowRemove(tabName, scope)"
-                >
+                >删行
                 </el-button>
               </template>
             </el-table-column>
           </el-super-table>
         </el-tab-pane>
       </el-tabs>
-      <div style="padding: 20px; text-align: right">
-        <el-button :size="$attrs.size" :loading="loading" @click="hide"
-          >取 消</el-button
-        >
-        <el-button
-          type="primary"
-          :size="$attrs.size"
-          :loading="loading"
-          @click="useSubmit('superForm')"
-          >确 认</el-button
-        >
-      </div>
+      
     </el-drawer>
   </el-button>
 </template>

+ 15 - 5
src/views/purchase/contract/edit/columns.js

@@ -92,7 +92,7 @@ export default function useColumns() {
       item: { key: "grossRateAverage", title: "平均毛利率 (%)", require: true },
       attr: {
         is: "el-input-number",
-        precision: CONFIG.precision,
+        precision: 2,
       },
     },
     {
@@ -121,7 +121,7 @@ export default function useColumns() {
       },
       attr: {
         is: "el-input-number",
-        precision: CONFIG.precision,
+        precision: 2,
       },
     },
     {
@@ -183,7 +183,7 @@ export default function useColumns() {
     },
     {
       item: { key: "guaranteePeriodEnd", title: "质保期限", require: true },
-      attr: { is: "el-input-number", precision: CONFIG.precision },
+      attr: { is: "el-input-number", precision: 2 },
     },
     {
       item: { key: "freightMethods", title: "运费承担方式" },
@@ -534,7 +534,7 @@ export default function useColumns() {
           item: { title: "账期天数", key: "paymetDays" },
           attr: {
             is: "el-input-number",
-            precision: CONFIG.precision,
+            precision: 2,
           },
         },
         {
@@ -620,6 +620,16 @@ export default function useColumns() {
         { item: { title: "组织编码", key: "org", width: "auto" }, attr: {} },
       ],
     },
-  ];
+  ].map(({item,attr,TableColumns}) =>({
+    attr,
+    item,
+    TableColumns:TableColumns.map(({item, attr}) =>({
+      attr,
+      item: { ...item, hidden: true, span: item.span || 6 },
+  
+    }))
+
+  }))
+  ;
   return { TableColumns, TabColumns };
 }

+ 32 - 21
src/views/purchase/contract/edit/index.vue

@@ -234,9 +234,32 @@ export default {
       :title="title"
       :visible.sync="visible"
       append-to-body
+      :show-close="false"
       destroy-on-close
       @close="hide"
     >
+
+    <div slot="title" 
+          style="
+            display: flex;
+            justify-content: space-between;
+            align-items: center;
+          ">
+        <h3>{{title}}</h3>
+        <div style="text-align: right">
+          <el-button
+          type="primary"
+          :size="$attrs.size"
+          :loading="loading"
+          @click="useSubmit('superForm')"
+          >确 认</el-button
+        >
+          <el-button :size="$attrs.size" :loading="loading" @click="hide"
+          >取 消</el-button
+        >
+        </div>
+        
+      </div>
       <el-super-form
         v-model="params"
         :dict="dict"
@@ -249,6 +272,7 @@ export default {
         style="padding: 20px"
       ></el-super-form>
       <el-tabs v-model="tabName" style="margin: 0 20px">
+        
         <el-tab-pane
           v-for="{ item, TableColumns: columns } in TabColumns"
           :key="item.key"
@@ -262,6 +286,7 @@ export default {
             :ref="tabName"
             :columns="columns"
             :size="$attrs.size"
+            :iconOperation="false"
           >
             <template slot="materialName" slot-scope="scope">
               <component
@@ -276,45 +301,31 @@ export default {
             <el-table-column fixed="right" label="操作" width="100">
               <template slot="header" slot-scope="scope">
                 <el-button
-                  circle
-                  icon="el-icon-plus"
+                  type="text"
                   :size="$attrs.size"
                   @click="useRowAdd(tabName)"
-                >
+                >增行
                 </el-button>
               </template>
               <template slot-scope="scope">
                 <el-button
-                  circle
-                  icon="el-icon-check"
+                  type="text"
                   :size="$attrs.size"
                   @click.native.prevent="useRowSubmit(tabName, scope)"
-                >
+                >更新
                 </el-button>
                 <el-button
-                  circle
-                  icon="el-icon-minus"
+                  type="text"
                   :size="$attrs.size"
                   @click.native.prevent="useRowRemove(tabName, scope)"
-                >
+                >删行
                 </el-button>
               </template>
             </el-table-column>
           </el-super-table>
         </el-tab-pane>
       </el-tabs>
-      <div style="padding: 20px; text-align: right">
-        <el-button :size="$attrs.size" :loading="loading" @click="hide"
-          >取 消</el-button
-        >
-        <el-button
-          type="primary"
-          :size="$attrs.size"
-          :loading="loading"
-          @click="useSubmit('superForm')"
-          >确 认</el-button
-        >
-      </div>
+      
     </el-drawer>
   </el-button>
 </template>

+ 16 - 9
src/views/purchase/contract/index.vue

@@ -36,6 +36,9 @@ export default {
     this.useQuery(this.params, this.page);
   },
   methods: {
+    setSelectable(){
+      return true
+    },
     //
     async fetchList(prop, page) {
       try {
@@ -98,7 +101,7 @@ export default {
       @reset="useReset"
       @submit="useQuery(params, page)"
     ></el-super-search>
-    <div style="margin: 0 0 20px 0; text-align: right">
+    <div style="margin: 20px 0 ; text-align: right">
       <el-button-group>
         <add-button
           :size="size"
@@ -165,24 +168,28 @@ export default {
       v-model="tableData"
       :size="size"
       :dict="dict"
+      max-height="600"
       :columns="TableColumns"
-      stroage
-      hideOperationColumns
+      :selectable="setSelectable"
+      checkbox
+      pagination
       @row-dblclick="useSee"
       @selection-change="useSelect"
+      :page="page"
+      @pagination="useQuery(params, page)"
     >
-      <el-table-column fixed width="55" align="center" label="#" prop="$index">
-      </el-table-column>
-      <el-table-column fixed width="55" align="center" type="selection">
-      </el-table-column>
+      <!-- <el-table-column fixed width="55" align="center" label="#" prop="$index">
+      </el-table-column> -->
+      <!-- <el-table-column fixed width="55" align="center" type="selection">
+      </el-table-column> -->
     </el-super-table>
-    <pagination
+    <!-- <pagination
       :total="page.total"
       :page.sync="page.pageNum"
       :limit.sync="page.pageSize"
       @pagination="useQuery(params, page)"
       style="height: 32px; margin: 20px 0 0 0; padding: 0 !important"
-    />
+    /> -->
   </el-card>
 </template>
 <style scoped lang="scss">

+ 15 - 5
src/views/purchase/contract/see/columns.js

@@ -92,7 +92,7 @@ export default function useColumns() {
       item: { key: "grossRateAverage", title: "平均毛利率 (%)", require: true },
       attr: {
         is: "el-input-number",
-        precision: CONFIG.precision,
+        precision: 2,
       },
     },
     {
@@ -121,7 +121,7 @@ export default function useColumns() {
       },
       attr: {
         is: "el-input-number",
-        precision: CONFIG.precision,
+        precision: 2,
       },
     },
     {
@@ -183,7 +183,7 @@ export default function useColumns() {
     },
     {
       item: { key: "guaranteePeriodEnd", title: "质保期限", require: true },
-      attr: { is: "el-input-number", precision: CONFIG.precision },
+      attr: { is: "el-input-number", precision: 2 },
     },
     {
       item: { key: "freightMethods", title: "运费承担方式" },
@@ -534,7 +534,7 @@ export default function useColumns() {
           item: { title: "账期天数", key: "paymetDays" },
           attr: {
             is: "el-input-number",
-            precision: CONFIG.precision,
+            precision: 2,
           },
         },
         {
@@ -620,6 +620,16 @@ export default function useColumns() {
         { item: { title: "组织编码", key: "org", width: "auto" }, attr: {} },
       ],
     },
-  ];
+  ].map(({item,attr,TableColumns}) =>({
+    attr,
+    item,
+    TableColumns:TableColumns.map(({item, attr}) =>({
+      attr,
+      item: { ...item, hidden: true, span: item.span || 6 },
+  
+    }))
+
+  }))
+  ;
   return { TableColumns, TabColumns };
 }

+ 2 - 1
src/views/purchase/contract/see/index.vue

@@ -30,7 +30,7 @@ export default {
     } = useColumns();
     return {
       column: 2,
-      width: "50%",
+      width: "100%",
       title: "明 细",
       visible: false,
       loading: false,
@@ -129,6 +129,7 @@ export default {
             :size="$attrs.size"
             :dict="dict"
             :columns="columns"
+            :iconOperation="false"
           >
           </el-super-table>
         </el-tab-pane>

+ 10 - 5
src/views/purchase/deliveryAddress/add.vue

@@ -1,5 +1,7 @@
 <template>
   <div id="addAddress">
+    <el-card style="height: calc(100vh - 15vh);position: relative;overflow: scroll;">
+    <span>基本信息</span>
     <el-form :model="basicForm" :rules="basicRules" ref="basic" label-width="auto">
       <el-row :gutter="10">
         <el-col :span="1.5">
@@ -142,6 +144,7 @@
         <el-button size="mini" plain @click="back">返回</el-button>
       </el-col>
     </div>
+    </el-card>
 
     <Refers ref="refer" @doSubmit="selectionsToInput" :single="true"/>
 
@@ -220,7 +223,7 @@ export default {
         this.$modal.loading("保存中...");
         addAddress(this.basicForm).then(res => {
           if (res.code === 200) {
-            this.$modal.msgSuccess("保存成功");
+            this.$modal.notifySuccess("保存成功");
             this.$modal.closeLoading();
             this.back()
           }
@@ -231,7 +234,7 @@ export default {
         this.$modal.loading("保存中...");
         editAddress(this.basicForm).then(res => {
           if (res.code === 200) {
-            this.$modal.msgSuccess("编辑成功");
+            this.$modal.notifySuccess("编辑成功");
             this.$modal.closeLoading();
             this.back()
           }
@@ -310,9 +313,11 @@ export default {
 
 <style lang="scss" scoped>
 .btn_group {
-  width: 100%;
-  margin: 20px 0;
+  // width: 100%;
+  // margin: 20px 0;
   display: flex;
-  justify-content: center;
+  // justify-content: center;
+  position: absolute;
+  top: 10px;right: 20px;
 } 
 </style>

+ 53 - 33
src/views/purchase/deliveryAddress/index.vue

@@ -1,7 +1,8 @@
 <template>
   <div id="deliveryAddressList">
     <div v-if="isList">
-      <el-form class="search_area" label-width="120px">
+      <el-card style="height: calc(100vh - 15vh);position: relative;overflow: scroll;">
+      <el-form class="search_area" label-width="100px">
         <el-row :gutter="10">
           <el-col :span="1.5">
             <el-form-item label="仓库属性">
@@ -38,12 +39,14 @@
             />
             </el-form-item>
           </el-col>
-          <el-col :span="1.5">
-            <el-form-item label="" label-width="20px">
-              <el-button type="primary" size="mini" icon="el-icon-search" plain @click="searchList">搜索</el-button>
+          <!-- <el-col :span="1.5"> -->
+            <!-- <el-form-item label="" label-width="20px"> -->
+            <div style="position: absolute;top: 3px;right: 10px;">
+              <el-button type="primary" size="mini" icon="el-icon-search" @click="searchList">搜索</el-button>
               <el-button size="mini" icon="el-icon-refresh" plain @click="resetList">重置</el-button>
-            </el-form-item>
-          </el-col>
+            </div>
+            <!-- </el-form-item> -->
+          <!-- </el-col> -->
         </el-row>
 
         <CollapseTransition>
@@ -77,7 +80,7 @@
 
           <el-col :span="1.5">
             <el-form-item label="联系人">
-            <el-select clearable size="mini" v-model="queryParams.contactsName" clearable @focus="chooseRefer('CONTACTS_PARAM', true, '联系人')" style="width: 200px">
+            <el-select clearable size="mini" v-model="queryParams.contactsName" @focus="chooseRefer('CONTACTS_PARAM', true, '联系人')" style="width: 200px">
               <el-option v-for="item in contactsOptions" :key="item.id" :label="item.name" :value="item.name" />
             </el-select>
             </el-form-item>
@@ -138,7 +141,6 @@
       </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="mini" @click="addAddress">新增</el-button>
 
@@ -170,31 +172,35 @@
         <el-table 
           :data="tableList" 
           fit
+          :cell-style="{ borderColor: '#c0c0c0' }"
+          :header-cell-style="{ borderColor: '#c0c0c0' }"
+          class="exporttable"
+          border
           max-height="480"
           style="font-size: 12px;"
           @selection-change="handleSelectionChange"
         >
           <el-table-column show-overflow-tooltip type="selection" width="55" />
-          <el-table-column show-overflow-tooltip label="仓库属性" align="center" width="200" prop="warehouseProperty" :formatter="formatterWarehouseProperty"/>
-          <el-table-column show-overflow-tooltip label="仓库档案名称" align="center" width="200" prop="warehouseName"/>
-          <el-table-column show-overflow-tooltip label="收货仓库编码" align="center" prop="code" width="200"/>
-          <el-table-column show-overflow-tooltip label="收货仓库名称" align="center" width="200" prop="name"/>
+          <el-table-column show-overflow-tooltip label="仓库属性" align="center" width="120" prop="warehouseProperty" :formatter="formatterWarehouseProperty"/>
+          <el-table-column show-overflow-tooltip label="仓库档案名称" align="center" width="180" prop="warehouseName"/>
+          <el-table-column show-overflow-tooltip label="收货仓库编码" align="center" prop="code" width="150"/>
+          <el-table-column show-overflow-tooltip label="收货仓库名称" align="center" width="180" prop="name"/>
           <el-table-column show-overflow-tooltip label="详细地址" align="center" width="200" prop="address"/>
-          <el-table-column show-overflow-tooltip label="物料分类" align="center" width="200" prop="materialClassifyName" />
-          <el-table-column show-overflow-tooltip label="联系人" align="center" width="200" prop="contactsName" />
-          <el-table-column show-overflow-tooltip label="联系人电话" align="center" prop="contactsPhone" width="200" />
-          <el-table-column show-overflow-tooltip label="NC档案ID" align="center" width="200" prop="createTime" />
+          <el-table-column show-overflow-tooltip label="物料分类" align="center" width="120" prop="materialClassifyName" />
+          <el-table-column show-overflow-tooltip label="联系人" align="center" width="100" prop="contactsName" />
+          <el-table-column show-overflow-tooltip label="联系人电话" align="center" prop="contactsPhone" width="120" />
+          <el-table-column show-overflow-tooltip label="NC档案ID" align="center" width="150" prop="createTime" />
           <el-table-column show-overflow-tooltip label="备注" align="center" width="120" prop="remark" />
-          <el-table-column show-overflow-tooltip label="创建人" align="center" width="200" prop="createByName" />
-          <el-table-column show-overflow-tooltip label="创建时间" align="center" width="200" prop="createTime" />
-          <el-table-column show-overflow-tooltip label="修改人" align="center" width="200" prop="updateByName" />
-          <el-table-column show-overflow-tooltip label="修改时间" align="center" width="200" prop="updateTime" />
-          <el-table-column show-overflow-tooltip label="同步状态" align="center" width="200" prop="sendStatus">
+          <el-table-column show-overflow-tooltip label="创建人" align="center" width="100" prop="createByName" />
+          <el-table-column show-overflow-tooltip label="创建时间" align="center" width="150" prop="createTime" />
+          <el-table-column show-overflow-tooltip label="修改人" align="center" width="100" prop="updateByName" />
+          <el-table-column show-overflow-tooltip label="修改时间" align="center" width="150" prop="updateTime" />
+          <el-table-column show-overflow-tooltip label="同步状态" align="center" width="100" prop="sendStatus">
             <template slot-scope="scope">
               {{ scope.row.sendStatus == 'Y' ? '已同步' : '未同步'}}
             </template>
           </el-table-column>
-          <el-table-column show-overflow-tooltip label="启用" align="center" width="200" prop="status">
+          <el-table-column show-overflow-tooltip label="启用" align="center" prop="status">
             <template slot-scope="scope">
               {{ scope.row.status == 'Y' ? '启用' : '停用' }}
             </template>
@@ -218,8 +224,8 @@
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
           :current-page="queryParams.pageNum"
-          :page-sizes="[10, 15, 20]"
-          :page-size="100"
+          :page-sizes="[10, 20, 50, 100]"
+          :page-size="10"
           layout="total, sizes, prev, pager, next, jumper"
           :total=total>
         </el-pagination>
@@ -354,12 +360,12 @@ export default {
     },
     toNC() {
       if (this.allSelection.length == 0 || this.allSelection.length > 1) {
-        this.$modal.msgWarning("同步NC只能进行单条操作!");
+        this.$modal.notifyWarning("同步NC只能进行单条操作!");
       } else {
         console.log('参数', this.allSelection)
         toNc(this.allSelection[0]).then(res => {
           if (res.code === 200) {
-            this.$modal.msgSuccess("操作成功!");
+            this.$modal.notifySuccess("操作成功!");
             this.getList(this.queryParams)
           }
         })
@@ -367,13 +373,13 @@ export default {
     },
     startUse() {
       if (this.allSelection.length == 0 || this.allSelection.length > 1) {
-        this.$modal.msgWarning("启用停用只能进行单条操作!");
+        this.$modal.notifyWarning("启用停用只能进行单条操作!");
       } else {
         console.log('参数', this.allSelection)
         let param = {id: this.allSelection[0].id, status: 'Y' }
         enable(param).then(res => {
           if (res.code === 200) {
-            this.$modal.msgSuccess("操作成功!");
+            this.$modal.notifySuccess("操作成功!");
             this.getList(this.queryParams)
           }
         })
@@ -381,13 +387,13 @@ export default {
     },
     stopUse() {
       if (this.allSelection.length == 0 || this.allSelection.length > 1) {
-        this.$modal.msgWarning("启用停用只能进行单条操作!");
+        this.$modal.notifyWarning("启用停用只能进行单条操作!");
       } else {
         console.log('参数', this.allSelection)
         let param = { id: this.allSelection[0].id, status: 'N' }
         enable(param).then(res => {
           if (res.code === 200) {
-            this.$modal.msgSuccess("操作成功!");
+            this.$modal.notifySuccess("操作成功!");
             this.getList(this.queryParams)
           }
         })
@@ -395,14 +401,14 @@ export default {
     },
     deletes() {
       if (this.allSelection.length == 0) {
-        this.$modal.msgWarning("请至少选择一条数据!");
+        this.$modal.notifyWarning("请至少选择一条数据!");
       } else {
         let param = this.allSelection.map(item => item.id)
         let rows = param.join()
         this.$modal.confirm('确认删除选择数据?').then(() => {
           delAddress(rows).then(res => {
             if (res.code === 200) {
-              this.$modal.msgSuccess("删除成功");
+              this.$modal.notifySuccess("删除成功");
               this.getList(this.queryParams)
             }
           })
@@ -438,7 +444,7 @@ export default {
       this.$modal.confirm('确认删除选择数据').then(() => {
         delAddress(row.id).then(res => {
           if (res.code === 200) {
-            this.$modal.msgSuccess("删除成功");
+            this.$modal.notifySuccess("删除成功");
             this.getList(this.queryParams)
           }
         })
@@ -509,4 +515,18 @@ export default {
   margin-top: 10px;
   text-align: right;
 }
+::v-deep .el-table__row > td {
+  border: none;
+}
+ ::v-deep .el-card .el-form-item {
+  margin-bottom: 10px;
+}
+</style>
+<style>
+.exporttable {
+  border: solid 1px #c0c0c0;
+}
+.el-table .el-table__header-wrapper th {
+  font-size: 14px;
+}
 </style>

+ 7 - 7
src/views/purchase/purchase-order/add/column.js

@@ -21,12 +21,12 @@ export const Columns = [
     isShow:true,
     require: true,
   },
-  { 
-    key: "oaDemandNo", 
-    title: "OA需求单号", 
-    inputType: "Input",  
-    isShow:true,
-  },
+  // { 
+  //   key: "oaDemandNo", 
+  //   title: "OA需求单号", 
+  //   inputType: "Input",  
+  //   isShow:true,
+  // },
   { 
     key: "erpOrderCode", 
     title: "erp订单编号", 
@@ -465,7 +465,7 @@ export const Columns = [
 
   },
   { key: "isArrivalReson", title: "到货超期原因", inputType: "Input", isShow:true, },
-  { key: "midOrderNo", title: "中台采购订单号", inputType: "Input", isShow:true, },
+  // { key: "midOrderNo", title: "中台采购订单号", inputType: "Input", isShow:true, },
   { key: "marketingCode", title: "销售订单号", inputType: "Input", isShow:true, },
   { key: "isArrival", title: "到货超期", inputType: "Checkbox",  isShow:true,},
   { key: "createByName", title: "创建人", inputType: "Input", isShow:false, },

+ 15 - 10
src/views/purchase/purchase-order/add/index.vue

@@ -248,8 +248,10 @@ export default {
         if (valid) {
 
           if(!this.params['puOrderItemList'].length || !this.params['puOrderExecuteList'].length){
-
-            this.$message.error('请填写订单行!');
+            this.$notify.error({
+              title: '错误',
+              message: '请填写订单行!'
+            });
             return false;
           }
 
@@ -258,14 +260,20 @@ export default {
 
          if(isPrice.length){
 
-            this.$message.error('询价失败!');
+            this.$notify.error({
+              title: '错误',
+              message: '询价失败!'
+            });
             return false
 
          }
          console.log(isPrice,'isPrice');
           cb();
         } else {
-          this.$message.error('存在必填项未填写');
+          this.$notify.error({
+              title: '错误',
+              message: '存在必填项未填写'
+            });
           console.log('error submit!!');
           return false;
         }
@@ -534,15 +542,12 @@ export default {
         >
           <h3>新增</h3>
           <div style="text-align: right">
-            <el-button size="mini" @click="handleCancel">取消</el-button>
             <el-button 
               size="mini" 
-              type="danger"
+              type="primary"
               @click="handleSava"
             >保存</el-button>
-            <!-- <el-button size="mini" type="info" @click="handleSubmit">
-              保存并新增
-            </el-button> -->
+            <el-button size="mini" @click="handleCancel">取消</el-button>
           </div>
         </div>
         <el-row style="display: flex; flex-wrap: wrap">
@@ -690,11 +695,11 @@ export default {
               :data="params[column.key]" 
               style="width: 100%"
               :height="params[column.key].length ? 300 : 100"
+              border
             >
               <el-table-column
                 v-for="(cColumn, cIndex) in column.tableColumns"
                 :key="cIndex"
-                
                 :label="cColumn.title"
                 :width="cColumn.width || 80"
               >

+ 6 - 6
src/views/purchase/purchase-order/column.js

@@ -303,12 +303,12 @@ export const TableColumns = [
     },
   },
   // { item:{key: "flowId", title: "OA流程ID" },
-  { 
-    item:{ key: "oaDemandNo", title: "OA需求单号" ,},
-    attr:{
-      isHidden:true,
-    },
-  },
+  // { 
+  //   item:{ key: "oaDemandNo", title: "OA需求单号" ,},
+  //   attr:{
+  //     isHidden:true,
+  //   },
+  // },
   { 
     item:{
       key: "erpOrderCode", 

+ 24 - 10
src/views/purchase/purchase-order/edit/index.vue

@@ -69,13 +69,15 @@ export default {
     handleSynchronousMaterial(tableOne, tableTwo) {
       let _this = this;
       // this.params[tableOne]-- -> this.params[tableTwo]
-      this.params[tableOne] &&
+      this.params[tableOne] && this.params[tableOne].length &&
 
         this.params[tableOne].forEach((item, index) => {
 
           for (const key in item) {
 
-            if (key in _this.params[tableTwo][index]) {
+            if ( _this.params[tableTwo][index] &&
+              ( key in _this.params[tableTwo][index])
+            ) {
 
                 _this.params[tableTwo][index].material = item.material;
 
@@ -178,21 +180,29 @@ export default {
     },
     // 判断保存条件
     judgeSaveCondition(cb){
+      const _this = this;
       this.$refs['orderEditForm'].validate(async (valid) => {
         if (valid) {
 
-          // 执行结果在审批之后出现 !this.params['puOrderExecuteList'].length
-          if(!this.params['puOrderItemList'].length ){
-
-            this.$message.error('请填写订单行!');
+          // 执行结果在审批之后出现 
+          let validList = _this.params['puOrderItemList'].filter(item => item.delFlag === '0');
+          if(!validList.length ){
+            _this.$notify.error({
+              title: '错误',
+              message: '请填写订单行!'
+            });
+            
             return false;
           }
 
-          let isPrice =  this.params.puOrderItemList.filter(item => !item.whetherCompleteInquiry);
+          let isPrice =  _this.params.puOrderItemList.filter(item => !item.whetherCompleteInquiry);
 
          if(isPrice.length){
 
-            this.$message.error('询价失败!');
+          _this.$notify.error({
+              title: '错误',
+              message: '询价失败!'
+            });
             return false
 
          }
@@ -200,7 +210,10 @@ export default {
           cb();
 
         } else {
-          this.$message.error('存在必填项未填写');
+          _this.$notify.error({
+              title: '错误',
+              message: '存在必填项未填写'
+            });
           console.log('error submit!!');
           return false;
         }
@@ -487,8 +500,8 @@ export default {
           ">
           <h3>{{ handleIsRevise() ? '修订' : '编辑' }}</h3>
           <div style="text-align: right">
+            <el-button :size="size" type="primary" @click="handleSava">更 新</el-button>
             <el-button :size="size" @click="handleCancel">取 消</el-button>
-            <el-button :size="size" type="danger" @click="handleSava">更 新</el-button>
           </div>
         </div>
         <el-row style="display:flex; flex-wrap: wrap;">
@@ -611,6 +624,7 @@ export default {
             :name="column.key"
             >
             <el-table 
+              border
               :data="params[column.key].filter(item => item.delFlag === '0')" 
               style="width: 100%"
               :height="params[column.key].filter(item => item.delFlag === '0').length ? 300 : 100"

+ 9 - 0
src/views/purchase/purchase-order/edit/initColumn.js

@@ -49,6 +49,15 @@ export const forbidden = (isEdit,source) => {
 
       })
     }
+
+    updateColumns.forEach(item => {
+
+      if (item.key == 'paymentMoney' || item.key == 'invoiceMoney') {
+        item.disabled = true;
+      }
+    })
+
+
   }
   else{  
 

+ 46 - 31
src/views/purchase/purchase-order/index.vue

@@ -33,12 +33,9 @@ export default {
     return {
       loading: false,
       tabLoading:false,
-      isSimpleSearch: true,
-      pageSizes: [10, 20, 50, 100],
-      page: initPage(),
+      page: { pageNum: 1, pageSize: 10, total: 0 },
       searchColumns: SearchColumns,
       params: initParams(SearchColumns),
-
       tableColumns: TableColumns,
       tableData: [],
       tabColumns: initTabColumns(),
@@ -99,14 +96,25 @@ export default {
         }
       }
     },
-    handleSearchChange() {
-      this.isSimpleSearch = !this.isSimpleSearch;
+    setSelectable(){
+      return true
+    },
+    setTabSelectable(){
+
+      if(this.tabName === 'puOrderItemList'){
+        return true
+      }
+
+      return false
+
     },
 
     // 刷新操作
     handleRefreshList() {
 
-      this.page = initPage();
+      this.page.pageNum = 1;
+
+      this.page.pageSize = 10;
 
       this.checkedList = [];
               
@@ -131,7 +139,9 @@ export default {
     // 重置操作
     handleResetList() {
 
-      this.page = initPage();
+      this.page.pageNum = 1;
+      
+      this.page.pageSize = 10;
 
       this.params = initParams(SearchColumns);
 
@@ -224,12 +234,7 @@ export default {
 
           success();
 
-        }).catch(() => {
-
-          this.$message({
-            type: 'info',
-            message: '已取消操作!'
-          });          
+        }).catch(() => {        
         });
     },
 
@@ -269,7 +274,8 @@ export default {
         this.fetchSubmit(puOrderIds);
       
       }else{
-        this.$message({
+        this.$notify({
+          title: '警告',
           message: '当前选中存在不满足提交条件的数据!',
           type: 'warning'
         });
@@ -499,6 +505,9 @@ export default {
       }
     },
     judgeIsOption(type,source){
+      // status: 0=自由态,1=审批中,2=已审核,3=已驳回 4=提交中
+      // source: 1=自动协议直采,2=协议直采,3=手工
+      // isEnd:整单关闭标识
       switch(type){
         case 'edit':
           return (source.status == '0' || source.status == '3') && source.isEnd === 'N';
@@ -542,8 +551,8 @@ export default {
     ></el-super-search>
   
     <!-- 操作 -->
-    <el-row :gutter="24" style="padding: 0 20px">
-      <el-col :span="24" style="text-align: right;margin: 0 10px 0 0">
+    <el-row :gutter="24" type="flex" justify="end" style="margin: 20px 0;">
+      <el-col :span="24" style="text-align: right;">
         <el-button size="mini" type="primary" @click="handleOpenAddDrawer"
           v-hasPermi="['material:order:add']">新增</el-button>
        
@@ -573,21 +582,25 @@ export default {
 
     <el-super-table
       v-model="tableData"
-      size="mini"
+      max-height="480"
       :dict="dict"
       :columns="tableColumns"
-      hideOperationColumns
-      stroage
+      :selectable="setSelectable"
+      checkbox
+      pagination
+      :page="page"
+      :iconOperation="false"
+      @pagination="fetchList(params, page)"
       @row-dblclick="handleOpenSeeDrawer" 
       @row-click="handleDetailsData" 
       @select="handleSelect"
     >
 
-      <el-table-column type="selection" width="45" ></el-table-column>
-      <el-table-column type="index" width="50" label="序号"></el-table-column>
+      <!-- <el-table-column type="selection" width="45" fixed></el-table-column>
+      <el-table-column type="index" width="50" label="序号"></el-table-column> -->
+      
       <el-table-column fixed="right" label="操作" width="120">
           <template slot-scope="scope">
-          <!-- <template #operation="{scope}"> -->
             <el-button 
               v-if="judgeIsOption('revise',scope.row)"
               type="text" 
@@ -624,14 +637,15 @@ export default {
     
     </el-super-table>
 
-    <pagination
+    <!-- <pagination
       v-show="page.total>0"
       :total="page.total"
       :page.sync="page.pageNum"
       :limit.sync="page.pageSize"
+      :page-sizes="[10,20,50,100,500,1000]"
       @pagination="fetchList(params, page)"
     />
-   
+    -->
     <div style="position: relative; padding-top: 10px;" v-loading="tabLoading">
       <el-row style="position: absolute; top: 30px; right: 20px;z-index: 10;">
         <el-button 
@@ -650,19 +664,20 @@ export default {
         >
           <el-super-table
             v-model="tabTableDatas[column.key]"
-            size="mini"
+            max-height="200"
             :dict="dict"
-            hideOperationColumns
-            stroage
             :columns="column.tableColumns"
+            :selectable="setTabSelectable"
+            :checkbox="setTabSelectable()"
+            :iconOperation="false"
             @select="handleTabSelect"
           >
-            <el-table-column
+            <!-- <el-table-column
               v-if=" tabName === 'puOrderItemList'" 
               type="selection" 
               width="45"
-            ></el-table-column>
-            <el-table-column type="index" width="50" label="序号"></el-table-column>
+            ></el-table-column> -->
+            <!-- <el-table-column type="index" width="50" label="序号"></el-table-column> -->
           </el-super-table>
          
         </el-tab-pane>

+ 1 - 1
src/views/purchase/purchase-order/see/index.vue

@@ -296,7 +296,7 @@ export default {
             :label="column.title" 
             :name="column.key"
           >
-            <el-table :data="params[column.key]" style="width: 100%">
+            <el-table :data="params[column.key]" style="width: 100%"  border>
               <el-table-column 
                 v-for="(cColumn, cIndex) in column.tableColumns" 
                 :key="cIndex" 

+ 1 - 1
src/views/purchase/task/columns.js

@@ -75,7 +75,7 @@ export default function useColumns() {
     { item: { key: "unitName", title: "单位" }, attr: {} },
   ].map(({ item, attr }) => ({
     attr,
-    item: { ...item, hidden: true, fixed: false },
+    item: { ...item, hidden: true, width: 200 },
   }));
 
   const SearchColumns = [

+ 29 - 35
src/views/purchase/task/index.vue

@@ -19,6 +19,7 @@ export default {
     const { TableColumns, SearchColumns } = useColumns();
     const params = this.$init.params(SearchColumns);
     return {
+      key: 0,
       size: "mini",
       loading: false,
       params: params,
@@ -26,7 +27,7 @@ export default {
       selectData: [],
       TableColumns: TableColumns,
       SearchColumns: SearchColumns,
-      page: { pageNum: 1, pageSize: 10, total: 0 },
+      page: { pageNum: 1, pageSize: 20, total: 0 },
     };
   },
   computed: {},
@@ -49,13 +50,11 @@ export default {
     async fetchList(prop, page) {
       try {
         this.loading = true;
+        this.tableData = [];
         const { pageNum, pageSize } = page;
         const { code, rows, total } = await LIST(prop, { pageNum, pageSize });
         if (code === 200) {
-          this.tableData = rows.map((item, index) => ({
-            ...item,
-            $index: (pageNum - 1) * pageSize + index + 1,
-          }));
+          this.tableData = rows;
           this.page.total = total;
         }
       } catch (err) {
@@ -93,12 +92,12 @@ export default {
     // 重 置
     useReset() {
       this.page.pageNum = 1;
-      this.page.pageSize = 10;
+      this.page.pageSize = 20;
       this.params = this.$init.params(this.SearchColumns);
       this.useQuery(this.params, this.page);
     },
     // 选 择
-    useSelect(prop) {
+    useSelect(prop, value) {
       this.selectData = prop;
     },
     // 明 细
@@ -116,7 +115,13 @@ export default {
 </script>
 
 <template>
-  <el-card v-loading="loading" :body-style="{ padding: 0 }">
+  <el-card
+    v-loading="loading"
+    :body-style="{
+      height: '100%',
+      padding: 0,
+    }"
+  >
     <el-super-search
       v-model="params"
       :size="size"
@@ -124,8 +129,9 @@ export default {
       :columns="SearchColumns"
       @reset="useReset"
       @submit="useQuery(params, page)"
+      @aaa="useQuery(params, page)"
     ></el-super-search>
-    <div style="margin: 0 0 20px 0; text-align: right">
+    <div class="my-4" style="text-align: right">
       <el-button-group>
         <thxq-button
           :size="size"
@@ -167,40 +173,28 @@ export default {
       v-model="tableData"
       :size="size"
       :dict="dict"
+      :page="page"
       :columns="TableColumns"
-      stroage
-      hideOperationColumns
-      @row-dblclick="useSee"
-      @selection-change="useSelect"
+      :selectable="setSelectable"
+      index
+      checkbox
+      hiddenColumns
+      height="600"
+      @row-select="useSelect"
+      @pagination="useQuery(params, page)"
     >
-      <el-table-column fixed width="55" align="center" label="#" prop="$index">
-      </el-table-column>
-      <el-table-column
-        fixed
-        width="55"
-        align="center"
-        type="selection"
-        :selectable="setSelectable"
-      >
-      </el-table-column>
     </el-super-table>
-    <pagination
-      :total="page.total"
-      :page.sync="page.pageNum"
-      :limit.sync="page.pageSize"
-      @pagination="useQuery(params, page)"
-      style="height: 32px; margin: 20px 0 0 0; padding: 0 !important"
-    />
   </el-card>
 </template>
 <style scoped lang="scss">
 .el-card {
-  width: calc(100% - 20px);
-  height: 100%;
-  margin: 10px;
-  padding: 20px;
+  width: calc(100% - 32px);
+  // height: calc(100vh - 32px);
+  margin: 16px;
+  padding: 16px;
+  border-radius: 8px;
 }
 .el-button-group + .el-button-group {
-  margin: 0 0 0 10px;
+  margin: 0 0 0 8px;
 }
 </style>

文件差异内容过多而无法显示
+ 613 - 626
src/views/purchase/transferOrder/add.vue


+ 137 - 76
src/views/purchase/transferOrder/index.vue

@@ -1,8 +1,8 @@
 <template>
   <div id="transferOrder">
     <div v-if="isList">
-      <el-card>
-        <el-form class="search_area" label-width="120px">
+      <el-card style="position: relative;">
+        <el-form class="search_area" label-width="100px">
           <el-row :gutter="10">
             <el-col :span="1.5">
               <el-form-item label="调出库存组织">
@@ -38,54 +38,30 @@
                 </el-select>
               </el-form-item>
             </el-col>
-            <el-col :span="1.5">
-              <el-form-item label="单据号">
-                <el-input
-                  v-model.trim="queryParams.code"
-                  size="mini"
-                  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="mini" icon="el-icon-search" plain @click="searchList">搜索</el-button>
-                <el-button size="mini" icon="el-icon-refresh" plain @click="resetList">重置</el-button>
-              </el-form-item>
-            </el-col>
+            <div style="position: absolute;top: 3px;right: 10px;">
+              <el-button type="primary" size="mini" icon="el-icon-search" @click="searchList">搜索</el-button>
+              <el-button size="mini" icon="el-icon-refresh" plain @click="resetList">重置</el-button>
+            </div>
           </el-row>
 
-          <!-- <CollapseTransition>
+          <CollapseTransition>
           <div v-show="expanded">
             <el-row :gutter="10">
               <el-col :span="1.5">
-                <el-form-item label="物料编码">
+                <el-form-item label="单据号">
                   <el-input
-                  v-model="queryParams.code"
-                  size="mini"
-                  placeholder=""
-                  clearable
-                  style="width: 200px"
-                  />
-                </el-form-item>
-              </el-col>
-              <el-col :span="1.5">
-                <el-form-item label="调入库存组织">
-                  <el-input
-                  v-model="queryParams.storageInventoryOrg"
-                  size="mini"
-                  placeholder=""
-                  clearable
-                  style="width: 200px"
+                    v-model.trim="queryParams.code"
+                    size="mini"
+                    clearable
+                    style="width: 200px"
                   />
                 </el-form-item>
               </el-col>
             </el-row>
           </div>
-          </CollapseTransition> -->
+          </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-divider class="lines"><i style="cursor: pointer;" :class="expanded?'el-icon-arrow-up':'el-icon-arrow-down'" @click="drop"></i></el-divider>
 
       
         <div class="btn_grooup">
@@ -95,46 +71,50 @@
         <el-table 
           :data="tableList" 
           fit
+          :cell-style="{ borderColor: '#c0c0c0' }"
+          :header-cell-style="{ borderColor: '#c0c0c0' }"
+          class="exporttable"
           border
           show-summary
+          :summary-method="getSummaries"
           highlight-current-row
           max-height="680"
           style="font-size: 12px;"
           ref="multipleTable"
           @row-click="select"
         >
-          <el-table-column show-overflow-tooltip label="调出库存" align="center" prop="deliveryInventoryOrgName" width="150px"/>
-          <el-table-column show-overflow-tooltip label="订单类型" align="center" prop="billType" width="150px"/>
-          <el-table-column show-overflow-tooltip label="单据号" align="center" prop="code" width="180px"/>
-          <el-table-column show-overflow-tooltip label="单据日期" align="center" prop="billDate" width="150px"/>
-          <el-table-column show-overflow-tooltip label="调拨方式" align="center" prop="allotType" width="150px">
+          <el-table-column show-overflow-tooltip label="单据号" align="center" prop="code" width="150px"/>
+          <el-table-column show-overflow-tooltip label="单据状态" align="center" prop="status" width="100px" :formatter="formatterStatus"/>
+          <el-table-column show-overflow-tooltip label="调出库存组织" align="center" prop="deliveryInventoryOrgName" width="200px"/>
+          <el-table-column show-overflow-tooltip label="订单类型" align="center" prop="billType" width="220px" :formatter="formatterBillType"/>
+          <el-table-column show-overflow-tooltip label="单据日期" align="center" prop="billDate" width="100px"/>
+          <el-table-column show-overflow-tooltip label="调拨方式" align="center" prop="allotType" width="180px">
             <template slot-scope="scope">
               <span>{{ scope.row.allotType == '2' ? '财务组织间调拨' : '财务组织内库存组织内调拨' }}</span>
             </template>
           </el-table-column>
           <el-table-column show-overflow-tooltip label="调拨出库单号" align="center" prop="deliveryCode" width="150px"/>
           <el-table-column show-overflow-tooltip label="调拨入库单号" align="center" prop="storageCode" width="150px"/>
-          <el-table-column show-overflow-tooltip label="调拨入库组织" align="center" prop="storageInventoryOrgName" width="150px"/>
-          <el-table-column show-overflow-tooltip label="调出业务员" align="center" prop="businessPersonalName" width="150px"/>
-          <el-table-column show-overflow-tooltip label="调出部门" align="center" prop="deliveryDeptName" width="150px"/>
+          <el-table-column show-overflow-tooltip label="调拨入库组织" align="center" prop="storageInventoryOrgName" width="200px"/>
+          <el-table-column show-overflow-tooltip label="调出业务员" align="center" prop="businessPersonalName" width="100px"/>
+          <el-table-column show-overflow-tooltip label="调出部门" align="center" prop="deliveryDeptName" width="120px"/>
           <el-table-column show-overflow-tooltip label="币种" align="center" prop="currencyName"/>
           <el-table-column show-overflow-tooltip label="折本汇率" align="center" prop="rate"/>
-          <el-table-column show-overflow-tooltip label="在途归属" align="center" prop="onRouteAffilliation" width="150px"/>
+          <el-table-column show-overflow-tooltip label="在途归属" align="center" prop="onRouteAffilliation" width="200px"/>
           <el-table-column show-overflow-tooltip label="总数量" align="center" prop="qty"/>
-          <el-table-column show-overflow-tooltip label="结算路径" align="center" prop="accountPath" width="150px"/>
+          <el-table-column show-overflow-tooltip label="结算路径" align="center" prop="accountPath" width="100px"/>
           <el-table-column show-overflow-tooltip label="客户" align="center" prop="customerName" width="150px"/>
           <el-table-column show-overflow-tooltip label="调出仓库" align="center" prop="deliveryWarehouseName" width="180px"/>
-          <el-table-column show-overflow-tooltip label="调入仓库" align="center" prop="storageWarehouseName" width="150px"/>
-          <el-table-column show-overflow-tooltip label="物流项目组" align="center" prop="materialProject" width="150px"/>
+          <el-table-column show-overflow-tooltip label="调入仓库" align="center" prop="storageWarehouseName" width="180px"/>
+          <el-table-column show-overflow-tooltip label="物流项目组" align="center" prop="materialProject" width="120px"/>
           <el-table-column show-overflow-tooltip label="利润中心" align="center" prop="liacenterName" width="150px"/>
           <!-- <el-table-column show-overflow-tooltip label="已同步WMS" align="center" prop="isSendWms" width="150px"/> -->
           <el-table-column show-overflow-tooltip label="备注" align="center" prop="remark" width="150px"/>
-          <el-table-column show-overflow-tooltip label="单据状态" align="center" prop="status" width="150px"/>
-          <el-table-column show-overflow-tooltip label="制单人" align="center" prop="createByName" width="150px"/>
+          <el-table-column show-overflow-tooltip label="制单人" align="center" prop="createByName" width="100px"/>
           <el-table-column show-overflow-tooltip label="制单日期" align="center" prop="createTime" width="150px"/>
           <!-- <el-table-column show-overflow-tooltip label="审批人" align="center" prop="code" width="150px"/> -->
           <!-- <el-table-column show-overflow-tooltip label="审批日期" align="center" prop="code" width="150px"/> -->
-          <el-table-column show-overflow-tooltip label="最后修改人" align="center" prop="updateByName" width="150px"/>
+          <el-table-column show-overflow-tooltip label="最后修改人" align="center" prop="updateByName" width="100px"/>
           <el-table-column show-overflow-tooltip label="最后修改时间" align="center" prop="updateTime" width="150px"/>
           <el-table-column
           fixed="right"
@@ -155,8 +135,8 @@
           @size-change="handleSizeChange"
           @current-change="handleCurrentChange"
           :current-page="queryParams.pageNum"
-          :page-sizes="[5, 10, 15, 20]"
-          :page-size="100"
+          :page-sizes="[10, 20, 50, 100]"
+          :page-size="10"
           layout="total, sizes, prev, pager, next, jumper"
           :total=total>
         </el-pagination>
@@ -166,6 +146,9 @@
             <el-table
             :data="materialInfo" 
             fit
+            :cell-style="{ borderColor: '#c0c0c0' }"
+            :header-cell-style="{ borderColor: '#c0c0c0' }"
+            class="exporttable"
             border
             max-height="380"
             style="font-size: 12px;"
@@ -178,31 +161,31 @@
             <el-table-column show-overflow-tooltip label="规格" align="center" prop="specification"/>
             <el-table-column show-overflow-tooltip label="生产厂家/代理人" align="center" prop="manufacturer" width="150px"/>
             <el-table-column show-overflow-tooltip label="产地" align="center" prop="originPlace" width="150px"/>
-            <el-table-column show-overflow-tooltip label="型号" align="center" prop="model" width="150px"/>
-            <el-table-column show-overflow-tooltip label="单位" align="center" prop="unitName" width="150px"/>
+            <el-table-column show-overflow-tooltip label="型号" align="center" prop="model"/>
+            <el-table-column show-overflow-tooltip label="单位" align="center" prop="unitName"/>
             <!-- <el-table-column show-overflow-tooltip label="调出仓库" align="center" prop="deliveryWarehouseName"/> -->
-            <el-table-column show-overflow-tooltip label="数量" align="center" prop="qty" width="150px"/>
-            <el-table-column show-overflow-tooltip label="主单位" align="center" prop="mainUnit" width="150px"/>
-            <el-table-column show-overflow-tooltip label="换算率" align="center" prop="equation" width="150px"/>
-            <el-table-column show-overflow-tooltip label="主数量" align="center" prop="mainQty" width="150px"/>
-            <el-table-column show-overflow-tooltip label="税率" align="center" prop="rate" width="150px"/>
+            <el-table-column show-overflow-tooltip label="数量" align="center" prop="qty"/>
+            <el-table-column show-overflow-tooltip label="主单位" align="center" prop="mainUnit"/>
+            <el-table-column show-overflow-tooltip label="换算率" align="center" prop="equation"/>
+            <el-table-column show-overflow-tooltip label="主数量" align="center" prop="mainQty"/>
+            <el-table-column show-overflow-tooltip label="税率" align="center" prop="rate"/>
             <!-- <el-table-column show-overflow-tooltip label="调入仓库" align="center" prop="storageWarehouseName"/> -->
-            <el-table-column show-overflow-tooltip label="批次号" align="center" prop="patchNo" width="150px"/>
-            <el-table-column show-overflow-tooltip label="产品批号" align="center" prop="producBatch" width="150px"/>
-            <el-table-column show-overflow-tooltip label="生产日期" align="center" prop="manufactureDate" width="150px"/>
+            <el-table-column show-overflow-tooltip label="批次号" align="center" prop="patchNo"/>
+            <el-table-column show-overflow-tooltip label="产品批号" align="center" prop="producBatch"/>
+            <el-table-column show-overflow-tooltip label="生产日期" align="center" prop="manufactureDate"/>
             <el-table-column show-overflow-tooltip label="有效期至/失效日期" align="center" prop="periodEndDate" width="150px"/>
-            <el-table-column show-overflow-tooltip label="批准文号" align="center" prop="ratifyCode" width="150px"/>
-            <el-table-column show-overflow-tooltip label="注册证号" align="center" prop="registration" width="150px"/>
-            <el-table-column show-overflow-tooltip label="商品名" align="center" prop="productCode" width="150px"/>
+            <el-table-column show-overflow-tooltip label="批准文号" align="center" prop="ratifyCode"/>
+            <el-table-column show-overflow-tooltip label="注册证号" align="center" prop="registration"/>
+            <el-table-column show-overflow-tooltip label="商品名" align="center" prop="productCode"/>
             <el-table-column show-overflow-tooltip label="通用名" align="center" prop="commonCode" width="150px"/>
-            <el-table-column show-overflow-tooltip label="剂型" align="center" prop="drug" width="150px"/>
+            <el-table-column show-overflow-tooltip label="剂型" align="center" prop="drug"/>
             <el-table-column show-overflow-tooltip label="调入调出结算规则明细" align="center" prop="ruleDetail" width="180px"/>
-            <el-table-column show-overflow-tooltip label="上市许可持有人" align="center" prop="marketingApprovalPersonal" width="150px"/>
+            <el-table-column show-overflow-tooltip label="上市许可持有人" align="center" prop="marketingApprovalPersonal" width="120px"/>
             <el-table-column show-overflow-tooltip label="生产许可证号/经营许可证号/备案凭证号" align="center" prop="production" width="260px"/>
-            <el-table-column show-overflow-tooltip label="pi码" align="center" prop="pi" width="150px"/>
+            <el-table-column show-overflow-tooltip label="pi码" align="center" prop="pi"/>
             <!-- <el-table-column show-overflow-tooltip label="无税金额" align="center" prop="code"/> -->
             <!-- <el-table-column show-overflow-tooltip label="备注" align="center" prop="code"/> -->
-            <el-table-column show-overflow-tooltip label="类别" align="center" prop="classify" width="150px"/>
+            <el-table-column show-overflow-tooltip label="类别" align="center" prop="classify"/>
             <el-table-column show-overflow-tooltip label="客户物料码" align="center" prop="customerLogistic" width="150px"/>
             <el-table-column show-overflow-tooltip label="客户物料名称" align="center" prop="customerLogisticName" width="150px"/>
             </el-table>
@@ -212,6 +195,9 @@
             <el-table
             :data="receiveInfo" 
             fit
+            :cell-style="{ borderColor: '#c0c0c0' }"
+            :header-cell-style="{ borderColor: '#c0c0c0' }"
+            class="exporttable"
             border
             max-height="380"
             style="font-size: 12px;"
@@ -252,6 +238,9 @@
             <el-table
             :data="priceList" 
             fit
+            :cell-style="{ borderColor: '#c0c0c0' }"
+            :header-cell-style="{ borderColor: '#c0c0c0' }"
+            class="exporttable"
             border
             max-height="380"
             style="font-size: 12px;"
@@ -288,6 +277,9 @@
             <el-table
             :data="resultList" 
             fit
+            :cell-style="{ borderColor: '#c0c0c0' }"
+            :header-cell-style="{ borderColor: '#c0c0c0' }"
+            class="exporttable"
             border
             max-height="380"
             style="font-size: 12px;"
@@ -354,7 +346,7 @@ export default {
         storageInventoryOrg: '',
         code: '',
         pageNum: 1,
-        pageSize: 5
+        pageSize: 10
       },
       referCondition: {
         type: '',
@@ -383,6 +375,67 @@ export default {
     this.getList(this.queryParams)
   },
   methods: {
+    // 指定列合计
+    getSummaries(param) {
+      const { columns, data } = param;
+      const sums = [];
+      columns.forEach((column, index) => {
+        if (index === 0) {
+          sums[index] = '合计';
+          return;
+        }
+        const values = data.map(item => Number(item[column.property]));
+        if (column.property === 'qty') {
+          sums[index] = values.reduce((prev, curr) => {
+            const value = Number(curr);
+            if (!isNaN(value)) {
+              return prev + curr;
+            } else {
+              return prev;
+            }
+          }, 0);
+          sums[index];
+        }
+      });
+      return sums
+    },
+    formatterBillType(row) {
+      switch (row.billType) {
+        case '5X-01':
+          return '普通+不传wms+外仓互调(同组织)'
+        case '5X-Cxx-01':
+          return '普通+传wms+外仓调中心仓'
+        case '5X-Cxx-02':
+          return '普通+传wms+中心仓调中心仓(跨组织)'
+        case '5X-Cxx-03':
+          return '普通+传wms+中心仓调外仓'
+        case '5X-Cxx-04':
+          return '普通+传wms+中心仓中心分仓互调'
+        case '5X-Cxx-05':
+          return 'GH+不传WMS+外仓互调(同组织)'
+        case '5X-Cxx-06':
+          return 'GH+传WMS+中心仓调外仓'
+        case '5X-Cxx-07':
+          return 'GH+传WMS+外仓调中心仓'
+        case '5X-Cxx-08':
+          return 'GH+传WMS+中心仓调中心仓'
+        case '5X-Cxx-09':
+          return 'GH+传WMS+中心仓中心分仓互调'
+      }
+    },
+    // 格式化表格内容
+    formatterStatus(row) {
+      switch (row.status) {
+        case '0':
+          return '未提交'
+        case '1':
+          return '审批中'
+        case '2':
+          return '已完成'
+        case '3':
+          return '已驳回'
+      }
+    },
     searchList() {
       this.getList(this.queryParams)
     },
@@ -394,7 +447,7 @@ export default {
         storageInventoryOrg: '',
         code: '',
         pageNum: 1,
-        pageSize: 5
+        pageSize: 10
       }
       this.getList(this.queryParams)
     },
@@ -429,7 +482,7 @@ export default {
       submitOrder(row).then(res => {
         if (res.code === 200) {
           this.$modal.closeLoading();
-          this.$modal.msgSuccess("提交成功");
+          this.$modal.notifySuccess("提交成功");
           this.getList(this.queryParams)
         }
       }).catch(err => {
@@ -447,7 +500,7 @@ export default {
       this.$modal.confirm('确认信息').then(() => {
         delOrder(row.id).then(res => {
           if (res.code === 200) {
-            this.$modal.msgSuccess("删除成功");
+            this.$modal.notifySuccess("删除成功");
             this.getList(this.queryParams)
           }
         })
@@ -509,4 +562,12 @@ export default {
 ::v-deep .el-table__row > td {
   border: none;
 }
+ ::v-deep .el-card .el-form-item {
+  margin-bottom: 10px;
+}
+</style>
+<style>
+.exporttable {
+  border: solid 1px #c0c0c0;
+ }
 </style>

部分文件因为文件数量过多而无法显示