lilei 2 år sedan
förälder
incheckning
807eb133a2

+ 1 - 1
.env.development

@@ -6,6 +6,6 @@ VUE_APP_VERSION=V1.0.1
 VUE_APP_ENVTIPS=开发环境(仅供测试)
 VUE_APP_PRO_NAME=iSCM智慧供应链系统
 VUE_APP_LOGO=@/assets/logo.png
-VUE_APP_THEME_COLOR=#f30f30
+VUE_APP_THEME_COLOR=#ed1c24
 VUE_APP_COM_NAME=陕西山海高科信息技术有限公司
 VUE_APP_ICP=陕ICP备20006268号

+ 86 - 6
package-lock.json

@@ -2046,6 +2046,33 @@
         }
       }
     },
+    "@vue/compiler-sfc": {
+      "version": "2.7.14",
+      "resolved": "https://registry.npmjs.org/@vue/compiler-sfc/-/compiler-sfc-2.7.14.tgz",
+      "integrity": "sha512-aNmNHyLPsw+sVvlQFQ2/8sjNuLtK54TC6cuKnVzAY93ks4ZBrvwQSnkkIh7bsbNhum5hJBS00wSDipQ937f5DA==",
+      "requires": {
+        "@babel/parser": "^7.18.4",
+        "postcss": "^8.4.14",
+        "source-map": "^0.6.1"
+      },
+      "dependencies": {
+        "@babel/parser": {
+          "version": "7.21.2",
+          "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.21.2.tgz",
+          "integrity": "sha512-URpaIJQwEkEC2T9Kn+Ai6Xe/02iNaVCuT/PtoRz3GPVJVDpPd7mLo+VddTbhCRU9TXqW5mSrQfXZyi8kDKOVpQ=="
+        },
+        "postcss": {
+          "version": "8.4.21",
+          "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.21.tgz",
+          "integrity": "sha512-tP7u/Sn/dVxK2NnruI4H9BG+x+Wxz6oeZ1cJ8P6G/PZY0IKk4k/63TDsQf2kQq3+qoJeLm2kIBUNlZe3zgb4Zg==",
+          "requires": {
+            "nanoid": "^3.3.4",
+            "picocolors": "^1.0.0",
+            "source-map-js": "^1.0.2"
+          }
+        }
+      }
+    },
     "@vue/component-compiler-utils": {
       "version": "3.0.0",
       "resolved": "https://registry.npm.taobao.org/@vue/component-compiler-utils/download/@vue/component-compiler-utils-3.0.0.tgz",
@@ -5138,6 +5165,11 @@
         "cssom": "0.3.x"
       }
     },
+    "csstype": {
+      "version": "3.1.1",
+      "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.1.tgz",
+      "integrity": "sha512-DJR/VvkAvSZW9bTouZue2sSxDwdTN92uHjqeKVm+0dAqdfNykRzQ95tay8aXMBAAPpUiq4Qcug2L7neoRh2Egw=="
+    },
     "current-script-polyfill": {
       "version": "1.0.0",
       "resolved": "https://registry.npmjs.org/current-script-polyfill/-/current-script-polyfill-1.0.0.tgz",
@@ -5192,8 +5224,7 @@
     "de-indent": {
       "version": "1.0.2",
       "resolved": "https://registry.npmjs.org/de-indent/-/de-indent-1.0.2.tgz",
-      "integrity": "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0=",
-      "dev": true
+      "integrity": "sha1-sgOOhG3DO6pXlhKNCAS0VbjB4h0="
     },
     "debug": {
       "version": "3.1.0",
@@ -7807,8 +7838,7 @@
     "he": {
       "version": "1.2.0",
       "resolved": "https://registry.npmjs.org/he/-/he-1.2.0.tgz",
-      "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw==",
-      "dev": true
+      "integrity": "sha512-F/1DnUGPopORZi0ni+CvrCgHQ5FyEAHRLSApuYWMmrbSwoN2Mn/7k+Gl38gJnR7yyDZk6WLXwiGod1JOWNDKGw=="
     },
     "hex-color-regex": {
       "version": "1.1.0",
@@ -11595,6 +11625,11 @@
       "resolved": "https://registry.npmjs.org/nan/-/nan-2.15.0.tgz",
       "integrity": "sha512-8ZtvEnA2c5aYCZYd1cvgdnU6cqwixRoYg70xPLWUws5ORTa/lnw+u4amixRS/Ac5U5mQVgp9pnlSUnbNWFaWZQ=="
     },
+    "nanoid": {
+      "version": "3.3.4",
+      "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.4.tgz",
+      "integrity": "sha512-MqBkQh/OHTS2egovRtLk45wEyNXwF+cokD+1YPf9u5VfJiRdAiRwB2froX5Co9Rh20xs4siNPm8naNotSD6RBw=="
+    },
     "nanomatch": {
       "version": "1.2.13",
       "resolved": "https://registry.npmjs.org/nanomatch/-/nanomatch-1.2.13.tgz",
@@ -12536,6 +12571,11 @@
       "resolved": "https://registry.npmjs.org/performance-now/-/performance-now-2.1.0.tgz",
       "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns="
     },
+    "picocolors": {
+      "version": "1.0.0",
+      "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz",
+      "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ=="
+    },
     "pify": {
       "version": "4.0.1",
       "resolved": "https://registry.npmjs.org/pify/-/pify-4.0.1.tgz",
@@ -14813,8 +14853,12 @@
     "source-map": {
       "version": "0.6.1",
       "resolved": "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz",
-      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==",
-      "dev": true
+      "integrity": "sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g=="
+    },
+    "source-map-js": {
+      "version": "1.0.2",
+      "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz",
+      "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw=="
     },
     "source-map-resolve": {
       "version": "0.5.2",
@@ -16572,6 +16616,42 @@
       "resolved": "https://registry.npm.taobao.org/vue-cropper/download/vue-cropper-0.4.9.tgz",
       "integrity": "sha1-/mUPMlFuzykBS71KkHkZHI3Fpa4="
     },
+    "vue-easytable": {
+      "version": "2.24.0",
+      "resolved": "https://registry.npmjs.org/vue-easytable/-/vue-easytable-2.24.0.tgz",
+      "integrity": "sha512-5OcCw3EMLEb/cBLV/pMqRIhAmwt3FadXpoZvWhdE+SynthdNtTrQhxFKyjgpAmX6OPEMb9/XFNX86gDuIVnlxg==",
+      "requires": {
+        "lodash": "^4.17.20",
+        "resize-observer-polyfill": "^1.5.1",
+        "vue": "^2.6.12",
+        "vue-template-compiler": "^2.6.11"
+      },
+      "dependencies": {
+        "lodash": {
+          "version": "4.17.21",
+          "resolved": "https://registry.npmjs.org/lodash/-/lodash-4.17.21.tgz",
+          "integrity": "sha512-v2kDEe57lecTulaDIuNTPy3Ry4gLGJ6Z1O3vE1krgXZNrsQ+LFTGHVxVjcXPs17LhbZVGedAJv8XZ1tvj5FvSg=="
+        },
+        "vue": {
+          "version": "2.7.14",
+          "resolved": "https://registry.npmjs.org/vue/-/vue-2.7.14.tgz",
+          "integrity": "sha512-b2qkFyOM0kwqWFuQmgd4o+uHGU7T+2z3T+WQp8UBjADfEv2n4FEMffzBmCKNP0IGzOEEfYjvtcC62xaSKeQDrQ==",
+          "requires": {
+            "@vue/compiler-sfc": "2.7.14",
+            "csstype": "^3.1.0"
+          }
+        },
+        "vue-template-compiler": {
+          "version": "2.7.14",
+          "resolved": "https://registry.npmjs.org/vue-template-compiler/-/vue-template-compiler-2.7.14.tgz",
+          "integrity": "sha512-zyA5Y3ArvVG0NacJDkkzJuPQDF8RFeRlzV2vLeSnhSpieO6LK2OVbdLPi5MPPs09Ii+gMO8nY4S3iKQxBxDmWQ==",
+          "requires": {
+            "de-indent": "^1.0.2",
+            "he": "^1.2.0"
+          }
+        }
+      }
+    },
     "vue-eslint-parser": {
       "version": "2.0.3",
       "resolved": "https://registry.npmjs.org/vue-eslint-parser/-/vue-eslint-parser-2.0.3.tgz",

+ 1 - 0
package.json

@@ -33,6 +33,7 @@
     "vue-clipboard2": "^0.2.1",
     "vue-cookies": "^1.6.1",
     "vue-cropper": "0.4.9",
+    "vue-easytable": "^2.24.0",
     "vue-ls": "^3.2.1",
     "vue-pdf-signature": "^4.2.6",
     "vue-qr": "^3.2.2",

+ 1 - 1
public/version.json

@@ -1,5 +1,5 @@
 {
   "message": "发现有新版本发布,确定更新系统?",
   "vendorJsVersion": "",
-  "version": 1677044099770
+  "version": 1677233973324
 }

+ 6 - 49
src/components/NoticeIcon/NoticeIcon.vue

@@ -1,56 +1,13 @@
 <template>
-  <!-- <a-popover
-    v-model="visible"
-    trigger="click"
-    placement="bottomRight"
-    overlayClassName="header-notice-wrapper"
-    :getPopupContainer="() => $refs.noticeRef.parentElement"
-    :autoAdjustOverflow="true"
-    :arrowPointAtCenter="true"
-    :overlayStyle="{ width: '300px', top: '50px' }"
-  >
-    <template slot="content">
-      <a-spin :spinning="loading">
-        <a-tabs>
-          <a-tab-pane tab="消息" key="1">
-            <a-list>
-              <a-list-item>
-                <a-list-item-meta title="你收到了 14 份新周报" description="一年前">
-                  <a-avatar style="background-color: white" slot="avatar" src="https://gw.alipayobjects.com/zos/rmsportal/ThXAXghbEsBCCSDihZxY.png"/>
-                </a-list-item-meta>
-              </a-list-item>
-              <a-list-item>
-                <a-list-item-meta title="你推荐的 曲妮妮 已通过第三轮面试" description="一年前">
-                  <a-avatar style="background-color: white" slot="avatar" src="https://gw.alipayobjects.com/zos/rmsportal/OKJXDXrmkNshAMvwtvhu.png"/>
-                </a-list-item-meta>
-              </a-list-item>
-              <a-list-item>
-                <a-list-item-meta title="这种模板可以区分多种通知类型" description="一年前">
-                  <a-avatar style="background-color: white" slot="avatar" src="https://gw.alipayobjects.com/zos/rmsportal/kISTdvpyTAhtGxpovNWd.png"/>
-                </a-list-item-meta>
-              </a-list-item>
-            </a-list>
-          </a-tab-pane>
-          <a-tab-pane tab="消息" key="2">
-            123
-          </a-tab-pane>
-          <a-tab-pane tab="待办" key="3">
-            123
-          </a-tab-pane>
-        </a-tabs>
-      </a-spin>
-    </template>
-    <span @click="fetchNotice" class="header-notice" ref="noticeRef">
-      <a-badge count="12">
-        <a-icon style="font-size: 16px; padding: 4px" type="bell" />
-      </a-badge>
-    </span>
-  </a-popover> -->
   <span @click="fetchNotice" class="header-notice" ref="noticeRef">
-    <a-badge :count="unreadCount">
-      <a-icon style="font-size: 16px; padding: 0 5px 0 0" type="bell" />
+    <a-popover placement="bottom">
+    <template slot="content">
       <span>消息</span>
+    </template>
+    <a-badge :dot="unreadCount>0">
+      <a-icon style="font-size: 15px; margin: 0 5px;color: #666;" type="bell" />
     </a-badge>
+  </a-popover>
   </span>
 </template>
 

+ 1 - 1
src/components/Table/index.js

@@ -356,7 +356,7 @@ export default {
         // 自定义属性,也就是官方文档中的props,可通过条件来控制样式
         style: {
           //  设置行背景色
-          'background-color': record[this.rowKeyName] == this.leftAlignId ? '#fff1c5' : ''
+          'background-color': record[this.rowKeyName] == this.leftAlignId ? '#ffedeb' : ''
         },
         on: {
           // 鼠标单击行

+ 1 - 1
src/components/global.less

@@ -516,7 +516,7 @@ body {
       }
     }
     .ant-menu:not(.ant-menu-horizontal) .ant-menu-item-selected{
-      background-color: #eef5ff;
+      background-color: #ffedee;
     }
     .ant-menu-light {
       border-right-color: transparent;

+ 15 - 8
src/components/index.less

@@ -1,10 +1,6 @@
 @import '~ant-design-vue/dist/antd.less'; // 引入官方提供的 less 样式入口文件
-// @import "~ant-design-vue/lib/style/index";
+@import '~vue-easytable/packages/theme-default/index.less';
 @import './newThem.less'; // 用于覆盖上面定义的变量
-// The prefix to use on all css classes from ant-pro.
-@ant-pro-prefix             : ant-pro;
-@ant-global-sider-zindex    : 106;
-@ant-global-header-zindex   : 105;
 
 .text-overflow{
     overflow: hidden;    
@@ -22,8 +18,8 @@
 }
 /* 扩展ant design pro按钮组件颜色 */
 .ant-btn-primary.button-primary {
-  background-color: #39f;
-  border-color: #39f;
+  background-color: #3399ff;
+  border-color: #3399ff;
   margin: 0 5px;
   font-size: 12px;
   &:hover, &:focus {
@@ -160,7 +156,7 @@
   }
 }
 .ant-btn-link.button-primary {
-  color: #39f;
+  color: #3399ff;
   &:hover, &:focus {
     color: #52a6fb;
   }
@@ -309,6 +305,17 @@
       margin-right: 8px;
       margin-left: 0;
     }
+    .alert-message{
+      strong{
+        color: #f12929;
+      }
+    }
+    .action-buttons{
+      button {
+        margin-right: 8px;
+        margin-left: 0;
+      }
+    }
   }
   .table-operator-nobor{
     padding: 0 0 10px 0;

+ 27 - 2
src/components/newThem.less

@@ -1,5 +1,9 @@
+// The prefix to use on all css classes from ant-pro.
+@ant-pro-prefix             : ant-pro;
+@ant-global-sider-zindex    : 106;
+@ant-global-header-zindex   : 105;
 @font-size-base: 12px;
-@table-row-hover-bg: color(~`colorPalette('@{warning-color}', 3) `);
+@table-row-hover-bg: color(~`colorPalette('@{primary-color}', 0.5) `);
 @text-color: fade(@black, 100%);
 @disabled-bg: #fafafa;
 @modal-body-padding: 15px;
@@ -9,4 +13,25 @@
 @table-padding-horizontal: 5px;
 @border-color-base: #dedede;
 @border-color-split: #dedede;
-@input-disabled-bg: #dedede;
+@input-disabled-bg: #dedede;
+
+// vue-easytable new style
+@ve-default-font-size: 12px;
+@ve-table-head-row-height: 30px;
+@ve-table-body-row-height: 30px;
+@ve-table-foot-row-height: 30px;
+@ve-table-head-row-td-padding: 5px;
+@ve-table-body-row-td-padding: 5px;
+@ve-table-body-row-expand-content-padding: 0 5px;
+@ve-table-foot-row-td-padding: 5px;
+@ve-table-border-color: #ddd;
+@ve-table-column-fixed-border-color: #aaa;
+@ve-table-body-row-hover-background-color: color(~`colorPalette('@{primary-color}', 0.5) `);
+@ve-table-body-row-highlight-background-color: color(~`colorPalette('@{primary-color}', 1) `);
+
+.ve-table .ve-table-container .ve-table-content-wrapper table.ve-table-content{
+    border-bottom: 1px solid #ddd;
+}
+.ve-table .ve-table-container .ve-table-content-wrapper table.ve-table-content thead.ve-table-header tr.ve-table-header-tr th.ve-table-header-th{
+    font-weight: 900;
+}

+ 25 - 20
src/components/tools/UserMenu.vue

@@ -2,19 +2,24 @@
   <div class="user-wrapper">
     <div class="content-box">
       <p class="help-cont" v-if="showHelp" @click="showVideo">
-        <img style="width: 22px;height: 22px;vertical-align: middle;margin: 0 5px;" src="../../assets/icon_movie.png"/>
-        <span style="vertical-align: middle;">帮助</span>
+        <img style="width: 18px;height: 18px;vertical-align: middle;margin: 0 5px;" src="../../assets/icon_movie.png"/>
+        <span style="vertical-align: middle;color: #666;">帮助</span>
       </p>
+      
       <p class="help-cont" @click="showShopCar" v-if="$hasPermissions('M_shoppingCart')">
-        <a-badge :count="cartCount" :overflow-count="999">
-          <a-icon type="shopping-cart" style="font-size:16px;margin: 0 5px;"/>
+        <a-popover placement="bottom">
+        <template slot="content">
           <span>购物车</span>
+        </template>
+        <a-badge :count="cartCount" :overflow-count="999">
+          <a-icon type="shopping-cart" style="font-size:16px;margin: 0 5px;color: #666;"/>
         </a-badge>
+      </a-popover>
       </p>
       <!-- 通知 -->
       <notice-icon class="action"/>
       <!-- 皮肤设置 -->
-      <a-popover trigger="click">
+      <a-popover trigger="click" title="系统设置">
         <div slot="content" :style="{width: fontSize == 'large' ? '340px' : '300px'}">
           <a-form-model :label-col="{ span: 9 }" :wrapper-col="{ span: 15 }">
             <a-form-model-item label="主题">
@@ -47,35 +52,36 @@
                   <a-button type="danger" ghost @click="changePrintType('NEEDLE')" size="small">{{ printName ? '点击修改' : '选择打印机' }}</a-button>
                 </div>
               </div>
-              <!-- <a-radio-group @change="changePrintType">
-                <a-radio-button value="NEEDLE">
-                  选择针式打印机
-                </a-radio-button>
-                <a-radio-button value="INK">
-                  选择喷墨打印机
-                </a-radio-button>
-              </a-radio-group> -->
             </a-form-model-item>
           </a-form-model>
         </div>
         <span class="skin">
-          <a-icon style="font-size: 15px; padding: 0 3px 0 0" type="setting" />
-          设置
+          <a-icon style="font-size: 14px; padding: 0 5px;color: #666;" type="setting" />
         </span>
       </a-popover>
+
+      <p class="help-cont" @click="showShopCar">
+        <a-popover placement="bottom">
+        <template slot="content">
+          <span>全屏</span>
+        </template>
+        <a-icon type="fullscreen" @click="screen" style="font-size:14px;margin: 0 5px;color: #666;"/>
+      </a-popover>
+      </p>
+
       <a-dropdown>
         <span class="action ant-dropdown-link user-dropdown-menu">
           <!-- <a-avatar class="avatar" size="small" :src="avatar==''?defaultAvatar:avatar"/> -->
-          <a-icon type="user" />
-          <span style="margin: 0 5px;">{{ nickname }} - 【{{ userInfo.orgName || '--' }}】</span>
-          <a-icon type="down" />
+          <a-icon type="user" style="font-size:14px;color: #666;"/>
+          <span style="margin: 0 5px;color: #666;">{{ nickname }} - 【{{ userInfo.orgName || '--' }}】</span>
+          <a-icon type="down" style="font-size:14px;color: #666;"/>
         </span>
         <a-menu slot="overlay" class="user-dropdown-menu-wrapper">
           <a-menu-item v-for="(item, index) in authOrgsList" :key="index" @click="changeRoles(item.orgSn)">
             <a-icon type="link" style="vertical-align: super;"/>
             <span style="display: inline-block;white-space: nowrap;width: 100%;overflow: hidden;text-overflow:ellipsis;">{{ item.orgName }}</span>
           </a-menu-item>
-          <a-menu-divider/>
+          <a-menu-divider v-if="authOrgsList.length"/>
           <a-menu-item key="5">
             <router-link :to="{ name: 'changePwd' }">
               <a-icon type="user"/>
@@ -90,7 +96,6 @@
           </a-menu-item>
         </a-menu>
       </a-dropdown>
-      <a-icon type="fullscreen" title="全屏" :style="{ fontSize: '20px', color: '#08c', marginLeft: '5px' }" @click="screen" />
     </div>
   </div>
 </template>

+ 4 - 0
src/main.js

@@ -8,6 +8,10 @@ import { VueAxios } from './utils/request'
 import Viewer from 'v-viewer'
 import 'viewerjs/dist/viewer.css'
 
+// 引入组件库
+import VueEasytable from "vue-easytable";
+Vue.use(VueEasytable);
+
 import { ConfigProvider } from 'ant-design-vue'
 Vue.use(ConfigProvider)
 

+ 86 - 0
src/views/common/printPanel.vue

@@ -0,0 +1,86 @@
+<template>
+    <div class="print-page-header">
+        <a-popover placement="bottom">
+            <template slot="content">
+                <div style="padding:10px;">
+                    <span>打印方式:</span>
+                    <a-radio-group key="4" id="print-printerType" v-model="printerType">
+                        <a-radio value="NEEDLE">针式</a-radio>
+                        <a-radio value="INK">喷墨</a-radio>
+                    </a-radio-group>
+                </div>
+                <div style="padding:10px;">
+                    <a-button 
+                    key="3" 
+                    size="small"
+                    id="print-preview-btn" 
+                    type="info"
+                    :loading="$store.state.app.printLoading" 
+                    :disabled="disabled" 
+                    @click="handlePrint('preview')">
+                        打印预览
+                    </a-button>
+                    <a-button
+                        key="2"
+                        size="small"
+                        type="primary"
+                        style="margin-left: 5px;"
+                        id="print-print-btn"
+                        :disabled="disabled"
+                        :loading="$store.state.app.printLoading"
+                        @click="handlePrint('print')">
+                        {{ $store.state.app.printLoading?'打印中...':'快捷打印' }}
+                    </a-button>
+                    <a-button
+                        key="1"
+                        size="small"
+                        type="primary"
+                        :loading="$store.state.app.printLoading"
+                        class="button-warning"
+                        id="print-export-btn"
+                        v-if="showExport"
+                        :disabled="disabled"
+                        @click="handlePrint('export')">导出Excel</a-button>         
+                </div>
+            </template>
+            <a-button type="link" class="button-default"><a-icon type="printer" /> 打印 </a-button>
+        </a-popover>
+
+      <!-- 打印 -->
+      <div id="print"></div>
+    </div>
+  </template>
+  
+  <script>
+  export default {
+    name: 'PrintPanel',
+    props: {
+      disabled: {
+        type: Boolean,
+        default: false
+      },
+      showExport: {
+        type: Boolean,
+        default: true
+      }
+    },
+    data () {
+      return {
+        printerType: 'NEEDLE' // 打印机类型
+      }
+    },
+    methods: {
+      handlePrint (type) {
+        this.$store.dispatch('TogglePrintSettingType', this.printerType)
+        this.$emit('handlePrint', type, this.printerType)
+      }
+    }
+  }
+  </script>
+  
+  <style lang="less">
+    .print-page-header{
+      display: inline-block;
+    }
+  </style>
+  

+ 10 - 4
src/views/common/rangeDate.vue

@@ -1,6 +1,7 @@
 <template>
-  <div style="display: flex;align-items: center;">
-    <a-date-picker
+  <div style="display: flex;align-items: center;justify-content: space-between;">
+    <div style="flex:1">
+      <a-date-picker
       :size="size"
       :locale="locale"
       v-model="startValue"
@@ -14,6 +15,7 @@
       @openChange="handleStartOpenChange"
       @panelChange="handleStartPanelChange"
       :showToday="false"
+      style="width:100%"
     >
       <div slot="renderExtraFooter">
         <a-button @click="setVal('date1')" type="link" size="small">今天</a-button>
@@ -23,8 +25,10 @@
         <a-button @click="setVal('date5')" type="link" size="small">近一年</a-button>
       </div>
     </a-date-picker>
-    <span>&nbsp;&nbsp;至&nbsp;&nbsp;</span>
-    <a-date-picker
+    </div>
+    <span style="width: 20px;text-align: center;">至</span>
+    <div style="flex:1">
+      <a-date-picker
       :size="size"
       :locale="locale"
       v-model="endValue"
@@ -38,6 +42,7 @@
       @openChange="handleEndOpenChange"
       @panelChange="handleEndPanelChange"
       :showToday="false"
+      style="width:100%"
     >
       <div slot="renderExtraFooter">
         <a-button @click="setVal('date1')" type="link" size="small">今天</a-button>
@@ -47,6 +52,7 @@
         <a-button @click="setVal('date5')" type="link" size="small">近一年</a-button>
       </div>
     </a-date-picker>
+    </div>
   </div>
 </template>
 <script>

+ 15 - 2
src/views/common/shopingCatModal.vue

@@ -10,7 +10,7 @@
     wrapClassName="shopingCat-drawer">
      <div slot="title">
        <strong>{{title}}</strong>
-       <span style="color:red;margin-left:10px;">注意:仅可添加本供应商有经销权且总部已上线的产品</span>
+       <span style="color: #ed1c24;;margin-left:10px;font-size: 12px;">注意:仅可添加本供应商有经销权且总部已上线的产品</span>
      </div>
      <shopingCat ref="shopingCat" modes="modals" @ok="handleok"></shopingCat>
   </a-drawer>
@@ -36,7 +36,7 @@ export default {
     },
     zIndex: {
       type: Number,
-      default: 1050
+      default: 100
     },
     paramsData: {
       type: Object
@@ -84,5 +84,18 @@ export default {
       height: 100%;
     }
   }
+  .table-page-search-wrapper{
+    .ant-form.ant-form-inline .ant-form-item .ant-input, .ant-form.ant-form-inline .ant-form-item .ant-select-selection{
+      border:0;
+    }
+    .ant-form.ant-form-inline .ant-form-item{
+      border:1px solid #dadada;
+      border-radius: 3px;
+      .ant-form-item-label{
+        padding-left: 11px;
+        padding-right: 0!important;
+      }
+    }
+  }
 }
 </style>

+ 16 - 2
src/views/purchasingManagement/purchaseOrderNew/chooseProductModal.vue

@@ -148,7 +148,7 @@ export default {
     },
     zIndex: {
       type: Number,
-      default: 1050
+      default: 100
     },
     isDealerUp: {
       type: Boolean
@@ -204,6 +204,7 @@ export default {
             data.list[i].qtyBackups = data.list[i].qty
           }
           this.disabled = false
+          this.setTableH()
           return data
         })
       },
@@ -293,7 +294,7 @@ export default {
     setTableH () {
       this.$nextTick(() => {
         const searchBoxH = this.$refs.searchBox.offsetHeight
-        this.tableHeight = window.innerHeight - searchBoxH - 285
+        this.tableHeight = window.innerHeight - searchBoxH - 225
       })
     }
   }
@@ -322,5 +323,18 @@ export default {
       text-align: center;
     }
   }
+  .table-page-search-wrapper{
+      .ant-form.ant-form-inline .ant-form-item .ant-input, .ant-form.ant-form-inline .ant-form-item .ant-select-selection{
+        border:0;
+      }
+      .ant-form.ant-form-inline .ant-form-item{
+        border:1px solid #dadada;
+        border-radius: 3px;
+        .ant-form-item-label{
+          padding-left: 11px;
+          padding-right: 0!important;
+        }
+      }
+    }
 }
 </style>

+ 191 - 119
src/views/purchasingManagement/purchaseOrderNew/edit.vue

@@ -3,23 +3,46 @@
     <a-page-header :ghost="false" :backIcon="false" class="purchaseNewOrderEdit-cont">
       <!-- 自定义的二级文字标题 -->
       <template slot="subTitle">
-        <a id="purchaseNewOrderEdit-back-btn" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
         <p class="billno">单号:{{ detail&&detail.purchaseBillNo }}</p>
-        <a-button type="danger" ghost @click="isShowBisiceInfo=!isShowBisiceInfo" style="margin-left:30px;vertical-align:middle;">
-          基础信息
-          <a-icon :type="isShowBisiceInfo ? 'up' : 'down'"/>
+        <a-button type="link" class="button-default" @click="isShowBisiceInfo=!isShowBisiceInfo" style="margin-left:10px;vertical-align:middle;">
+          <a-icon :type="isShowBisiceInfo ? 'eye-invisible' : 'eye'"/>
+          查看信息
         </a-button>
+        <a-button id="purchaseNewOrderEdit-back-btn" type="link" @click="handleBack" class="button-default"> <a-icon type="rollback" /> 返回列表</a-button>
       </template>
       <!-- 操作区,位于 title 行的行尾 -->
-      <template slot="extra" v-if="$hasPermissions('B_purchasePrint')">
-        <Print :disabled="localDataSource.length==0" @handlePrint="handlePrint"></Print>
+      <template slot="extra">
+        <div style="margin-top: 5px;">
+          <PrintPanel v-if="$hasPermissions('B_purchasePrint')" :disabled="localDataSource.length==0" @handlePrint="handlePrint"></PrintPanel>
+          <a-divider type="vertical" v-if="detail&&detail.totalCategory" />
+          <a-button type="link" v-if="detail&&detail.totalCategory" @click="showSearch=!showSearch" class="button-default"> <a-icon type="search" /> 筛选</a-button>
+          <a-divider type="vertical" v-if="detail&&detail.totalCategory" />
+          <a-button v-if="detail&&detail.totalCategory" id="purchaseNewOrderEdit-add-btn" type="link" @click="openChooseProduct=true"><a-icon type="plus" />添加产品</a-button>
+          <a-divider type="vertical" />
+          <a-dropdown>
+            <a-menu slot="overlay" @click="handleActions">
+              <a-menu-item key="1">
+                <a-icon type="import" />产品导入
+              </a-menu-item>
+              <a-menu-item key="2">
+                <a-icon type="funnel-plot" />上次缺货
+              </a-menu-item>
+              <a-menu-item key="3" v-if="$hasPermissions('M_shoppingCart')">
+                <a-icon type="shopping" /> 购物车
+              </a-menu-item>
+            </a-menu>
+            <a-button type="link" class="button-default"> <a-icon type="down" />  更多操作</a-button>
+          </a-dropdown> 
+        </div>
       </template>
     </a-page-header>
+
     <!-- 产品列表 -->
     <div ref="tableSearch" class="choosedList-cont">
       <!-- 基础信息 -->
-      <div style="padding:10px 10px 0 10px;border-bottom:8px solid #f3f3f3;" v-if="isShowBisiceInfo">
-        <a-descriptions title="基础信息" size="small">
+      <div style="padding:10px 10px 0 10px;border-bottom:6px solid #f0f0f0;" v-if="isShowBisiceInfo">
+        <a-descriptions size="small">
+          <div slot="title">基础信息</div>
           <a-descriptions-item label="供应商">
             {{ detail&&detail.purchaseTargetName || '--' }}
           </a-descriptions-item>
@@ -41,56 +64,30 @@
           </a-descriptions-item>
         </a-descriptions>
       </div>
-
-      <!-- 添加产品 -->
-      <chooseProductModal
-        ref="chooseProduct"
-        :isDealerUp="isDealerUp"
-        :purchaseBillSn="$route.params.sn"
-        :showModal="openChooseProduct"
-        @close="openChooseProduct=false"
-        @add="handleAdd"
-      ></chooseProductModal>
-      <!-- 上次缺货 -->
-      <outStockModal :openModal="openOutStockModal" :paramsData="paramsData" @close="openOutStockModal=false" @ok="hanldeOkOutStock" />
-      <!-- 购物车 -->
-      <shopingCatModal :showModal="openShopCatModal" :paramsData="paramsData" @close="openShopCatModal=false" @ok="getOrderDetail(false, true)"></shopingCatModal>
       <!-- 已选产品 -->
-      <div>
-        <div class="chooseBox-title">
-          <div class="sub-title" style="display: flex;">
-            已选产品
-            <p class="tag-txt">注意:仅限采购【箭冠】产品。自建产品的采购入库请使用“散件入库”功能</p>
-          </div>
-          <div class="actions-button">
-            <a-button v-if="detail&&detail.totalCategory" id="purchaseNewOrderEdit-add-btn" type="danger" @click="openChooseProduct=true"><a-icon type="plus-circle" />添加产品</a-button>
-            <a-button id="purchaseNewOrderEdit-import-btn" type="danger" ghost @click="openGuideModal=true"><a-icon type="import" />产品导入</a-button>
-            <a-button id="purchaseNewOrderEdit-outStock-btn" type="danger" ghost @click="handleOutStock"><a-icon type="funnel-plot" />上次缺货</a-button>
-            <a-button id="purchaseNewOrderEdit-cart-btn" v-if="$hasPermissions('M_shoppingCart')" type="danger" ghost @click="hanldCart"><a-icon type="shopping" />购物车</a-button>
-          </div>
-        </div>
+      <div id="purchaseTable">
         <div class="choosed-table" v-if="detail&&detail.totalCategory">
           <!-- 搜索条件 -->
-          <div class="table-page-search-wrapper">
+          <div class="table-page-search-wrapper" v-if="showSearch">
             <a-row :gutter="15">
               <a-col :span="24">
-                <a-form-model :model="productForm" layout="inline" @keyup.enter.native="$refs.purchaseTable.refresh(true)" >
+                <a-form-model :model="productForm" layout="inline" @keyup.enter.native="getTableData()" >
                   <a-row :gutter="15">
-                    <a-col :md="6" :sm="24">
+                    <a-col :md="5" :sm="24">
                       <a-form-model-item label="产品编码">
                         <a-input v-model.trim="productForm.productCode" allowClear placeholder="输入产品编码" />
                       </a-form-model-item>
                     </a-col>
-                    <a-col :md="6" :sm="24">
+                    <a-col :md="5" :sm="24">
                       <a-form-model-item label="产品名称">
                         <a-input v-model.trim="productForm.productName" allowClear placeholder="输入产品名称" />
                       </a-form-model-item>
                     </a-col>
                     <a-col :md="8" :sm="24">
-                      <a-form-model-item style="margin-bottom: 10px;">
-                        <a-button type="primary" @click="$refs.purchaseTable.refresh(true)" :disabled="purchaseDisabled" id="purchaseNewOrderEdit-refresh">查询</a-button>
+                      <div style="margin-bottom: 10px;">
+                        <a-button type="primary" @click="getTableData()" :disabled="purchaseDisabled" id="purchaseNewOrderEdit-refresh">查询</a-button>
                         <a-button style="margin-left: 5px" @click="resetPurchaseForm" id="purchaseNewOrderEdit-reset">重置</a-button>
-                      </a-form-model-item>
+                      </div>
                     </a-col>
                   </a-row>
                 </a-form-model>
@@ -98,44 +95,21 @@
             </a-row>
           </div>
           <!-- 列表 -->
-          <s-table
-            class="sTable"
-            ref="purchaseTable"
-            :style="{ height: tableHeight +'px', overflow: 'auto' }"
-            size="small"
-            :rowKey="(record) => record.id"
+          <a-spin :spinning="spinning" tip="Loading...">
+          <ve-table
+            border-y
+            :border-around="false"
+            :max-height="tableHeight"
+            :row-style-option="{clickHighlight: true}"
+            :cellSelectionOption="{enable: false}"
+            :virtual-scroll-option="{enable: true}"
             :columns="chooseColumns"
-            :data="chooseLoadData"
-            :defaultLoadData="false"
-            :showPagination="false"
-            :pageSize="5000"
-            bordered>
-            <!-- 采购数量 -->
-            <template slot="storageQuantity" slot-scope="text, record">
-              <a-input-number
-                size="small"
-                id="purchaseNewOrderEdit-qty"
-                v-model="record.qty"
-                :precision="0"
-                :min="1"
-                :max="999999"
-                @blur="e => qtyBlur(e.target.value, record)"
-                style="width: 100%;"
-                placeholder="请输入" />
-            </template>
-            <!-- 操作 -->
-            <template slot="action" slot-scope="text, record">
-              <a-button
-                size="small"
-                type="link"
-                class="button-error"
-                :loading="delLoading"
-                @click="handleDel(record)"
-                id="purchaseNewOrderEdit-del-btn">删除</a-button>
-            </template>
-          </s-table>
+            :table-data="localDataSource"
+            row-key-field-name="id"
+          />
+        </a-spin>
         </div>
-        <div v-else>
+        <div class="choosed-table" v-else>
           <div v-if="!spinning&&localDataSource.length==0">
             <a-empty
               :image="simpleImage"
@@ -153,7 +127,7 @@
         </div>
       </div>
       <!-- 底部栏 -->
-      <div class="footer-cont">
+      <div class="footer-cont" v-if="detail&&detail.totalCategory">
         <!-- 总计 -->
         <div>
           <span style="color:#666;">
@@ -180,6 +154,20 @@
     <importGuideModal :openModal="openGuideModal" :params="{purchaseBillSn: $route.params.sn}" @close="openGuideModal=false" @ok="hanldeOks" />
     <!-- 选择地址 -->
     <choose-address-modal :openModal="openAddrModal" @ok="handleAddrOk" @close="openAddrModal=false" />
+    <!-- 添加产品 -->
+    <chooseProductModal
+      ref="chooseProduct"
+      :isDealerUp="isDealerUp"
+      :purchaseBillSn="$route.params.sn"
+      :showModal="openChooseProduct"
+      @close="openChooseProduct=false"
+      @add="handleAdd"
+    ></chooseProductModal>
+    <!-- 上次缺货 -->
+    <outStockModal :openModal="openOutStockModal" :paramsData="paramsData" @close="openOutStockModal=false" @ok="hanldeOkOutStock" />
+    <!-- 购物车 -->
+    <shopingCatModal :showModal="openShopCatModal" :paramsData="paramsData" @close="openShopCatModal=false" @ok="getOrderDetail(false, true)"></shopingCatModal>
+    
   </div>
 </template>
 
@@ -195,12 +183,51 @@ import { purchaseDetailList, purchaseDetailSave, purchaseDetailDel, purchaseDeta
 // 选择产品
 import chooseProductModal from './chooseProductModal.vue'
 // 打印
-import Print from '@/views/common/print.vue'
+import PrintPanel from '@/views/common/printPanel.vue'
 import { hdPrint } from '@/libs/JGPrint'
 const shopingCatModal = () => import(/* webpackChunkName: "shopingCatModal" */ '@/views/common/shopingCatModal.vue')
+const qtyComp = {
+        name: "qtyComp",
+        template: `
+        <a-input-number
+              size="small"
+              v-model="row.qty"
+              :precision="0"
+              :min="1"
+              :max="999999"
+              @blur="e => that.qtyBlur(e.target.value, row)"
+              style="width: 100%;"
+              placeholder="请输入" />
+    `,
+        props: {
+            row: Object,
+            column: Object,
+            rowIndex: Number,
+            that: Object
+        },
+    };
+const actionComp = {
+        name: "actionComp",
+        template: `
+        <a-button
+          size="small"
+          type="link"
+          class="button-error"
+          :loading="row.delLoading"
+          @click="that.handleDel(row)"
+          >删除</a-button>
+    `,
+        props: {
+            row: Object,
+            column: Object,
+            rowIndex: Number,
+            that: Object
+        },
+    };
+
 export default {
   name: 'PurchaseEdit',
-  components: { STable, VSelect, ImportGuideModal, outStockModal, Print, chooseAddressModal, chooseProductModal, shopingCatModal },
+  components: { STable, VSelect, ImportGuideModal, outStockModal, PrintPanel, chooseAddressModal, chooseProductModal, shopingCatModal },
   mixins: [commonMixin],
   data () {
     return {
@@ -216,31 +243,13 @@ export default {
       subLoading: false,
       orderCountData: null,
       delLoading: false,
+      showSearch: false,
       productForm: {
         productName: '',
         productCode: '',
         orderBy: 'purchase_bill_detail.CREATE_DATE desc'
       },
       purchaseDisabled: false, //  查询、重置按钮是否可操作
-      // 加载数据方法 必须为 Promise 对象
-      chooseLoadData: parameter => {
-        this.disabled = true
-        this.spinning = true
-        // 查询总计
-        const params = Object.assign({ pageNo: 1, pageSize: 5000 }, this.productForm, { purchaseBillSn: this.$route.params.sn })
-        return purchaseDetailList(params).then(res => {
-          const data = res.data
-          const no = (data.pageNo - 1) * data.pageSize
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = no + i + 1
-            data.list[i].qtyBackups = data.list[i].qty
-          }
-          this.localDataSource = data.list
-          this.disabled = false
-          this.spinning = false
-          return data
-        })
-      },
       localDataSource: [],
       openGuideModal: false, //  导入产品引导
       openOutStockModal: false,
@@ -255,21 +264,61 @@ export default {
     chooseColumns () {
       const _this = this
       const arr = [
-        { title: '序号', dataIndex: 'no', width: '5%', align: 'center' },
-        { title: '产品编码', dataIndex: 'dealerProductEntity.code', width: '20%', align: 'center' },
-        { title: '产品名称', dataIndex: 'dealerProductEntity.name', width: '35%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '采购数量', scopedSlots: { customRender: 'storageQuantity' }, width: '8%', align: 'center' },
-        { title: '单位', dataIndex: 'dealerProductEntity.unit', width: '8%', align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: '8%', align: 'center' }
+        { title: '序号', key: "a", field: 'no', width: '5%', align: 'center', operationColumn: false },
+        { title: '产品编码',key: "b", field: 'productCode', width: '10%', align: 'center', operationColumn: false},
+        { title: '产品名称',key: "c", field: 'productName', width: '35%', align: 'center', operationColumn: false,ellipsis: {showTitle: true} },
+        { title: '采购数量',key: "d", width: '10%', align: 'center', operationColumn: false, 
+        renderBodyCell: ({ row, column, rowIndex }, h) => {
+            return <qtyComp row={row} column={column} rowIndex={rowIndex} that={_this} />
+        }},
+        { title: '单位',key: "e", field: 'productUnit', width: '10%', align: 'center', operationColumn: false },
+        { title: '操作',key: "f", width: '10%', align: 'center', operationColumn: false,
+        renderBodyCell: ({ row, column, rowIndex }, h) => {
+            return <actionComp row={row} column={column} rowIndex={rowIndex} that={_this} />
+        }}
       ]
       if (this.$hasPermissions('M_ShowAllCost')) {
-        arr.splice(3, 0, { title: '采购单价', dataIndex: 'discountedPrice', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
-        arr.splice(6, 0, { title: '采购金额', dataIndex: 'discountedAmount', width: '8%', align: 'right', customRender: function (text) { return ((text || text == 0) ? _this.toThousands(text, 2) : '--') } })
+        arr.splice(3, 0, { title: '采购单价',key: "h", field: 'discountedPrice', width: '10%', align: 'right', operationColumn: false})
+        arr.splice(6, 0, { title: '采购金额',key: "i", field: 'discountedAmount', width: '10%', align: 'right', operationColumn: false})
       }
       return arr
     }
   },
   methods: {
+    handleActions(e){
+      if(e.key == 1){
+        this.openGuideModal=true
+      }
+      if(e.key == 2){
+        this.handleOutStock()
+      }
+      if(e.key == 3){
+        this.hanldCart()
+      }
+    },
+    getTableData(){
+        this.disabled = true
+        this.spinning = true
+        // 查询总计
+        const params = Object.assign({ pageNo: 1, pageSize: 10000 }, this.productForm, { purchaseBillSn: this.$route.params.sn })
+        purchaseDetailList(params).then(res => {
+          const data = res.data
+          const no = (data.pageNo - 1) * data.pageSize
+          for (var i = 0; i < data.list.length; i++) {
+            const row = data.list[i]
+            row.no = no + i + 1
+            row.qtyBackups = row.qty
+            row.productCode = row.dealerProductEntity.code || '--'
+            row.productName = row.dealerProductEntity.name || '--'
+            row.productUnit = row.dealerProductEntity.unit || '--'
+            row.discountedPrice = (row.discountedPrice||row.discountedPrice==0)?this.toThousands(row.discountedPrice, 2):'--'
+            row.discountedAmount = (row.discountedAmount||row.discountedAmount==0)?this.toThousands(row.discountedAmount, 2):'--'
+          }
+          this.localDataSource = data.list
+          this.disabled = false
+          this.spinning = false
+        })
+    },
     // 获取采购单基本信息
     getOrderDetail (noRefashTable, isReset, flag) {
       this.spinning = true
@@ -281,7 +330,7 @@ export default {
               if (isReset) {
                 this.resetPurchaseForm()
               } else {
-                this.$refs.purchaseTable.refresh(!!flag)
+                this.getTableData()
               }
             } else {
               this.localDataSource = []
@@ -304,14 +353,14 @@ export default {
         centered: true,
         closable: true,
         onOk () {
-          _this.delLoading = true
+          row.delLoading = true
           purchaseDetailDel({ id: row.id }).then(res => {
             if (res.status == 200) {
               _this.getOrderDetail(false, false, true)
               _this.$message.success(res.message)
-              _this.delLoading = false
+              row.delLoading = false
             } else {
-              _this.delLoading = false
+              row.delLoading = false
             }
           })
         }
@@ -329,7 +378,7 @@ export default {
       this.productForm.productName = ''
       this.productForm.productCode = ''
       this.$nextTick(() => {
-        this.$refs.purchaseTable.refresh(true)
+        this.getTableData()
       })
     },
     //  添加或修改
@@ -462,7 +511,7 @@ export default {
       this.$router.push({ name: 'purchaseOrderNewList' })
     },
     setTableH () {
-      this.tableHeight = window.innerHeight - (this.isShowBisiceInfo ? 440 : 310)
+      this.tableHeight = window.innerHeight - (this.isShowBisiceInfo ? 127 : 0) - (this.showSearch ? 42 : 0) - 210
     },
     pageInit () {
       this.$nextTick(() => {
@@ -474,6 +523,13 @@ export default {
   watch: {
     isShowBisiceInfo (newValue, oldValue) {
       this.setTableH()
+    },
+    showSearch(newValue, oldValue){
+      if(this.isShowBisiceInfo){
+        this.isShowBisiceInfo = false
+      }else{
+        this.setTableH()
+      }
     }
   },
   mounted () {
@@ -500,13 +556,16 @@ export default {
     position: relative;
     height: 100%;
     box-sizing: border-box;
+    .ant-descriptions-title{
+      margin-bottom: 10px;
+    }
     .billno{
-      margin: 0 0 0 30px;
-      font-size: 18px;
+      margin: 0;
+      font-size: 16px;
       font-weight: 600;
       display: inline-block;
       vertical-align: middle;
-      color: #666;
+      color: #333;
     }
     .choosedList-cont{
       position: relative;
@@ -556,7 +615,7 @@ export default {
           &:first-child{
             padding: 0 15px;
             strong{
-              color: #ff8d00;
+              color: #ed1c24;
               font-size: 18px;
             }
           }
@@ -567,12 +626,25 @@ export default {
       }
     }
     .purchaseNewOrderEdit-cont{
-      margin-bottom: 8px;
+      margin-bottom: 6px;
       .sub-title{
         font-size: 12px;
         color: #808695;
         margin-left: 10px;
       }
     }
+    .table-page-search-wrapper{
+      .ant-form.ant-form-inline .ant-form-item .ant-input, .ant-form.ant-form-inline .ant-form-item .ant-select-selection{
+        border:0;
+      }
+      .ant-form.ant-form-inline .ant-form-item{
+        border:1px solid #dadada;
+        border-radius: 3px;
+        .ant-form-item-label{
+          padding-left: 11px;
+          padding-right: 0!important;
+        }
+      }
+    }
   }
 </style>

+ 101 - 87
src/views/purchasingManagement/purchaseOrderNew/list.vue

@@ -1,21 +1,21 @@
 <template>
-  <a-card size="small" :bordered="false" class="purchaseOrderList-wrap">
-    <a-spin :spinning="spinning" tip="Loading...">
-      <!-- 搜索条件 -->
+  <div class="purchaseNewOrderList-wrap">
+    <a-card size="small" :bordered="false" style="margin-bottom: 6px;">
+        <!-- 搜索条件 -->
       <div ref="tableSearch" class="table-page-search-wrapper">
         <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-          <a-row type="flex" :gutter="15">
-            <a-col flex="400px">
+          <a-row type="flex" justify="start" :gutter="15">
+            <a-col flex="350px">
               <a-form-item label="创建时间">
-                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
+                <rangeDate style="width:100%" ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col flex="300px">
               <a-form-item label="采购单号">
                 <a-input id="purchaseOrderList-purchaseBillNo" v-model.trim="queryParam.purchaseBillNo" allowClear placeholder="请输入采购单号"/>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col flex="300px">
               <a-form-item label="供应商">
                 <a-select
                   id="purchaseOrderList-purchaseTargetSn"
@@ -30,7 +30,7 @@
                 </a-select>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24" v-show="advanced">
+            <a-col flex="200px">
               <a-form-item label="业务状态">
                 <a-select id="purchaseOrderList-billStatus" allowClear v-model="queryParam.billStatus" placeholder="请选择业务状态">
                   <a-select-option value="">全部</a-select-option>
@@ -39,7 +39,7 @@
                 </a-select>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24" v-show="advanced">
+            <a-col flex="200px">
               <a-form-item label="财务状态">
                 <v-select
                   v-model="queryParam.financialStatus"
@@ -50,7 +50,7 @@
                   allowClear></v-select>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24" v-show="advanced">
+            <a-col flex="200px">
               <a-form-item label="单据来源">
                 <v-select
                   v-model="queryParam.purchaseBillSource"
@@ -61,86 +61,83 @@
                   allowClear></v-select>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
-              <span class="table-page-search-submitButtons">
-                <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseOrderList-refresh">查询</a-button>
-                <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="purchaseOrderList-reset">重置</a-button>
-                <a @click="advanced=!advanced" style="margin-left: 8px">
-                  {{ advanced ? '收起' : '展开' }}
-                  <a-icon :type="advanced ? 'up' : 'down'"/>
-                </a>
-              </span>
+            <a-col :span="24" style="display:flex;justify-content: center;align-items: center;">
+              <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="purchaseOrderList-refresh">查询</a-button>
+              <a-button style="margin-left: 8px" @click="resetSearchForm()" :disabled="disabled" id="purchaseOrderList-reset">重置</a-button>
             </a-col>
           </a-row>
         </a-form>
       </div>
-      <!-- 操作按钮 -->
-      <div class="table-operator">
-        <a-button id="purchaseOrderList-add" type="primary" v-if="$hasPermissions('B_purchaseNew')&&($hasPermissions('B_SUPPLIER_SJ')||$hasPermissions('B_SUPPLIER_ZB'))" class="button-error" @click="handleAdd">新增</a-button>
-      </div>
-      <!-- alert -->
-      <a-alert type="info" style="margin-bottom:10px">
-        <div slot="message">
-          共 <strong>{{ totalData&&(totalData.totalRecord || totalData.totalRecord==0) ? totalData.totalRecord : '--' }}</strong> 条记录,
-          采购数量合计 <strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong> ,
-          采购金额合计 <strong>{{ totalData&&(totalData.totalAmount || totalData.totalAmount==0) ? toThousands(totalData.totalAmount,2) : '--' }}</strong>,
-          审核金额合计 <strong>{{ totalData&&(totalData.totalAuthAmount || totalData.totalAuthAmount==0) ? toThousands(totalData.totalAuthAmount,2) : '--' }}</strong>
+    </a-card>
+
+    <a-card size="small" :bordered="false">
+      <a-spin :spinning="spinning" tip="Loading...">
+        <!-- 操作按钮 -->
+        <div class="table-operator" style="display:flex;align-items:center;justify-content: space-between;">
+          <div class="alert-message">
+            共 <strong>{{ totalData&&(totalData.totalRecord || totalData.totalRecord==0) ? totalData.totalRecord : '--' }}</strong> 条记录,
+            采购数量合计 <strong>{{ totalData&&(totalData.totalQty || totalData.totalQty==0) ? totalData.totalQty : '--' }}</strong> ,
+            采购金额合计 <strong>{{ totalData&&(totalData.totalAmount || totalData.totalAmount==0) ? toThousands(totalData.totalAmount,2) : '--' }}</strong>,
+            审核金额合计 <strong>{{ totalData&&(totalData.totalAuthAmount || totalData.totalAuthAmount==0) ? toThousands(totalData.totalAuthAmount,2) : '--' }}</strong>
+          </div>
+          <div class="action-buttons">
+            <a-button id="purchaseOrderList-add" type="primary" v-if="$hasPermissions('B_purchaseNew')&&($hasPermissions('B_SUPPLIER_SJ')||$hasPermissions('B_SUPPLIER_ZB'))" @click="handleAdd"><a-icon type="plus" />新增</a-button>
+          </div>
         </div>
-      </a-alert>
-      <!-- 列表 -->
-      <s-table
-        class="sTable fixPagination"
-        ref="table"
-        :style="{ height: tableHeight+84.5+'px' }"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ y: tableHeight }"
-        :defaultLoadData="false"
-        bordered>
-        <!-- 采购单号 -->
-        <template slot="purchaseBillNo" slot-scope="text, record">
-          <span class="table-td-link" v-if="$hasPermissions('B_purchaseDetail')" @click="handleDetail(record)">{{ record.purchaseBillNo }}</span>
-          <span v-else>{{ record.purchaseBillNo }}</span>
-          <a-badge count="改" :offset="[10,0]" v-if="record.billStatus=='HQ_CHANGE'||record.billStatus=='SUPERIOR_CHANGE'"></a-badge>
-        </template>
-        <!-- 审核 -->
-        <template slot="audit" slot-scope="text, record">
-          <stateIcon :title="record.billStatusDictValue" v-if="record.billStatus!='AUDIT_REJECT'" :state="record.billStatus == 'WAIT_PUT_WAREHOUSE'||record.billStatus=='AUDIT_PASS'||record.billStatus == 'FINISH'?'1':'2'"></stateIcon>
-          <stateIcon :title="record.billStatusDictValue" v-else :state="0"></stateIcon>
-        </template>
-        <!-- 付款 -->
-        <template slot="financial" slot-scope="text, record">
-          <stateIcon :title="record.financialStatusDictValue" :state="record.financialStatus == 'FINISH'?'1':'2'"></stateIcon>
-        </template>
-        <!-- 入库 -->
-        <template slot="waitOut" slot-scope="text, record">
-          <stateIcon :state="record.billStatus == 'FINISH'?'1':'2'"></stateIcon>
-        </template>
-        <!-- 操作 -->
-        <template slot="action" slot-scope="text, record">
-          <a-button
-            size="small"
-            type="link"
-            class="button-primary"
-            v-if="(record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'AUDIT_REJECT') && $hasPermissions('B_purchaseEdit')"
-            @click="handleEdit(record)"
-          >编辑</a-button>
-          <a-button
-            size="small"
-            type="link"
-            class="button-error"
-            v-if="(record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'AUDIT_REJECT') &&$hasPermissions('B_purchaseDel')"
-            @click="handleDel(record)"
-          >删除</a-button>
-          <span v-if="!((record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'AUDIT_REJECT') && $hasPermissions('B_purchaseEdit')) && !((record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'AUDIT_REJECT') &&$hasPermissions('B_purchaseDel'))">--</span>
-        </template>
-      </s-table>
-    </a-spin>
-    <!-- 选择基本信息弹框 -->
-    <basic-info-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
+        <!-- 列表 -->
+        <s-table
+          class="sTable fixPagination"
+          ref="table"
+          :style="{ height: tableHeight+72+'px' }"
+          size="small"
+          :rowKey="(record) => record.id"
+          :columns="columns"
+          :data="loadData"
+          :scroll="{ y: tableHeight }"
+          :defaultLoadData="false"
+          bordered>
+          <!-- 采购单号 -->
+          <template slot="purchaseBillNo" slot-scope="text, record">
+            <span class="table-td-link" v-if="$hasPermissions('B_purchaseDetail')" @click="handleDetail(record)">{{ record.purchaseBillNo }}</span>
+            <span v-else>{{ record.purchaseBillNo }}</span>
+            <a-badge count="改" :offset="[10,0]" v-if="record.billStatus=='HQ_CHANGE'||record.billStatus=='SUPERIOR_CHANGE'"></a-badge>
+          </template>
+          <!-- 审核 -->
+          <template slot="audit" slot-scope="text, record">
+            <stateIcon :title="record.billStatusDictValue" v-if="record.billStatus!='AUDIT_REJECT'" :state="record.billStatus == 'WAIT_PUT_WAREHOUSE'||record.billStatus=='AUDIT_PASS'||record.billStatus == 'FINISH'?'1':'2'"></stateIcon>
+            <stateIcon :title="record.billStatusDictValue" v-else :state="0"></stateIcon>
+          </template>
+          <!-- 付款 -->
+          <template slot="financial" slot-scope="text, record">
+            <stateIcon :title="record.financialStatusDictValue" :state="record.financialStatus == 'FINISH'?'1':'2'"></stateIcon>
+          </template>
+          <!-- 入库 -->
+          <template slot="waitOut" slot-scope="text, record">
+            <stateIcon :state="record.billStatus == 'FINISH'?'1':'2'"></stateIcon>
+          </template>
+          <!-- 操作 -->
+          <template slot="action" slot-scope="text, record">
+            <a-button
+              size="small"
+              type="link"
+              class="button-primary"
+              v-if="(record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'AUDIT_REJECT') && $hasPermissions('B_purchaseEdit')"
+              @click="handleEdit(record)">编辑</a-button>
+            <a-button
+              size="small"
+              type="link"
+              class="button-error"
+              v-if="(record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'AUDIT_REJECT') &&$hasPermissions('B_purchaseDel')"
+              @click="handleDel(record)">删除</a-button>
+            <span v-if="!((record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'AUDIT_REJECT') && $hasPermissions('B_purchaseEdit')) && !((record.billStatus == 'WAIT_SUBMIT'||record.billStatus == 'AUDIT_REJECT') &&$hasPermissions('B_purchaseDel'))">--</span>
+          </template>
+        </s-table>
+      </a-spin>
   </a-card>
+      <!-- 选择基本信息弹框 -->
+      <basic-info-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
+  </div>
+ 
 </template>
 
 <script>
@@ -160,7 +157,7 @@ export default {
     const _this = this
     return {
       spinning: false,
-      advanced: true, //  高级搜索 展开/关闭
+      advanced: false, //  高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
       openModal: false, // 基本信息弹框是否显示
       supplierList: [],
@@ -365,7 +362,7 @@ export default {
     },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
-      this.tableHeight = window.innerHeight - tableSearchH - 275
+      this.tableHeight = window.innerHeight - tableSearchH - 255
     }
   },
   watch: {
@@ -388,3 +385,20 @@ export default {
   }
 }
 </script>
+<style lang="less">
+  .purchaseNewOrderList-wrap{
+    .table-page-search-wrapper{
+      .ant-form.ant-form-inline .ant-form-item .ant-input, .ant-form.ant-form-inline .ant-form-item .ant-select-selection{
+        border:0;
+      }
+      .ant-form.ant-form-inline .ant-form-item{
+        border:1px solid #dadada;
+        border-radius: 3px;
+        .ant-form-item-label{
+          padding-left: 11px;
+          padding-right: 0!important;
+        }
+      }
+    }
+  }
+</style>

+ 14 - 1
src/views/purchasingManagement/purchaseOrderNew/outStockModal.vue

@@ -109,7 +109,7 @@ export default {
     },
     zIndex: {
       type: Number,
-      default: 1050
+      default: 100
     }
   },
   data () {
@@ -308,5 +308,18 @@ export default {
         padding: 10px 0;
       }
     }
+    .table-page-search-wrapper{
+      .ant-form.ant-form-inline .ant-form-item .ant-input, .ant-form.ant-form-inline .ant-form-item .ant-select-selection{
+        border:0;
+      }
+      .ant-form.ant-form-inline .ant-form-item{
+        border:1px solid #dadada;
+        border-radius: 3px;
+        .ant-form-item-label{
+          padding-left: 11px;
+          padding-right: 0!important;
+        }
+      }
+    }
   }
 </style>