Sfoglia il codice sorgente

【发运明细】查询、新增接口调用 +routeView文件修改 + 其他小玩意

liangyan0105 3 anni fa
parent
commit
cbe1b680e5

+ 93 - 0
field/shipmentDetail.md

@@ -0,0 +1,93 @@
+发运明细
+
+# 2022-05-06 By ZengTianXiang
+
+#### 【发运明细】--【参照订单数据】接口
+
+/jeecg-boot/shippingDetails/syShippingDetails/queryOrderData
+
+#### 主表字段
+
+id '主键',
+documentNo '单据号',
+documentDate '单据日期',
+syOrderDataId '订单数据主表 id',
+syOrderDataItemId '订单数据子表 id',
+customer '客户',
+preDeliveryDate '预发货日期',
+preCompletionDate '预完工日期',
+u8Remarks 'U8 备注',
+createBy` '创建人',
+createTime '创建日期',
+updateBy '更新人',
+updateTime '更新日期',
+pkOrg '组织',
+delFlag '删除状态',
+memo '备注',
+declarationName '报关品名',
+hsCode 'HScode',
+englishProductName '英文品名',
+syShippingDetailsItemList 发运明细子表集合;
+
+#### 子表字段
+
+id '主键 id',
+shippingDetailsId '发运主表 ID',
+syOrderDataId '订单数据主表 id',
+syOrderDataItemId '订单数据子表 id',
+acSetNo '账套',
+orderNumber '订单号',
+orderDate '订单日期',
+businessTypeValue '业务类型',
+businessTypeText '业务类型文本',
+customerOrder '客户订单',
+smallPo '小 po',
+packId 'packId',
+orderQuantity '订单数量',
+orderRemainingQuantity '订单剩余数量',
+shipmentQuantity '发货数量',
+isTc ' 是否 tc 功能 0 否 1 是',
+materialComposition '物料成分',
+salesTypeValue '销售类型',
+salesTypeText '销售类型文本',
+customerAbbreviation '客户简称',
+customerName '客户名称',
+exchangeRate '汇率',
+wholeOrderTota '整单合计',
+salesDepartment '销售部门',
+salesman '业务员',
+currencyValue '币种',
+currencyText '币种文本',
+brandSide '品牌方',
+thirdParty '第三方',
+depositRatio '定金比例',
+deposit '定金',
+collaborativeRoute '协同路线',
+termOfPayment '付款条件',
+endCustomer '最终客户',
+priceRemarks '价格备注',
+orderRemarks '订单备注',
+orderChangeDescription '订单说明',
+customsDeclarationUnitPrice '报关单价',
+u8Remarks 'u8 备注',
+createBy '创建人',
+createTime '创建日期',
+updateBy '更新人',
+updateTime '更新日期',
+pkOrg '组织',
+delFlag '删除状态',
+memo '备注',
+sort '排序',
+distributionPoint '分销点',
+itemNumber '款号',
+arrivalDate '到货日期',
+inventoryName '存货名称',
+salesUnitPrice '单价(销售)',
+purOrSubOrder '采购/委外订单号',
+orderType '订单类型',
+factoryUnitPrice '工厂单价',
+declarationElements '申报要素',
+numberOfSets '套装件数',
+chineseName '中文品名',
+englishName '英文品名',
+garmentFactory '成衣工厂',

+ 244 - 239
public/index.html

@@ -1,260 +1,265 @@
 <!DOCTYPE html>
 <html lang="zh-cmn-Hans">
-
-<head>
-  <meta charset="utf-8">
-  <meta http-equiv="X-UA-Compatible" content="IE=edge">
-  <meta name="viewport" content="width=device-width,initial-scale=1.0">
-  <title>JeecgBoot 企业级低代码平台</title>
-  <link rel="icon" href="<%= BASE_URL %>logo.png">
-  <script src="<%= BASE_URL %>cdn/babel-polyfill/polyfill_7_2_5.js"></script>
-  <style>
-    html,
-    body,
-    #app {
-      height: 100%;
-      margin: 0px;
-      padding: 0px;
-    }
-    .chromeframe {
-      margin: 0.2em 0;
-      background: #ccc;
-      color: #000;
-      padding: 0.2em 0;
-    }
-    #loader-wrapper {
-      position: fixed;
-      top: 0;
-      left: 0;
-      width: 100%;
-      height: 100%;
-      z-index: 999999;
-    }
-    #loader {
-      display: block;
-      position: relative;
-      left: 50%;
-      top: 50%;
-      width: 120px;
-      height: 120px;
-      margin: -75px 0 0 -75px;
-      border-radius: 50%;
-      border: 3px solid transparent;
-      /* COLOR 1 */
-      border-top-color: #FFF;
-      -webkit-animation: spin 2s linear infinite;
-      /* Chrome, Opera 15+, Safari 5+ */
-      -ms-animation: spin 2s linear infinite;
-      /* Chrome, Opera 15+, Safari 5+ */
-      -moz-animation: spin 2s linear infinite;
-      /* Chrome, Opera 15+, Safari 5+ */
-      -o-animation: spin 2s linear infinite;
-      /* Chrome, Opera 15+, Safari 5+ */
-      animation: spin 2s linear infinite;
-      /* Chrome, Firefox 16+, IE 10+, Opera */
-      z-index: 1001;
-    }
-    #loader:before {
-      content: "";
-      position: absolute;
-      top: 5px;
-      left: 5px;
-      right: 5px;
-      bottom: 5px;
-      border-radius: 50%;
-      border: 3px solid transparent;
-      /* COLOR 2 */
-      border-top-color: #FFF;
-      -webkit-animation: spin 3s linear infinite;
-      /* Chrome, Opera 15+, Safari 5+ */
-      -moz-animation: spin 3s linear infinite;
-      /* Chrome, Opera 15+, Safari 5+ */
-      -o-animation: spin 3s linear infinite;
-      /* Chrome, Opera 15+, Safari 5+ */
-      -ms-animation: spin 3s linear infinite;
-      /* Chrome, Opera 15+, Safari 5+ */
-      animation: spin 3s linear infinite;
-      /* Chrome, Firefox 16+, IE 10+, Opera */
-    }
-    #loader:after {
-      content: "";
-      position: absolute;
-      top: 15px;
-      left: 15px;
-      right: 15px;
-      bottom: 15px;
-      border-radius: 50%;
-      border: 3px solid transparent;
-      border-top-color: #FFF;
-      /* COLOR 3 */
-      -moz-animation: spin 1.5s linear infinite;
-      /* Chrome, Opera 15+, Safari 5+ */
-      -o-animation: spin 1.5s linear infinite;
-      /* Chrome, Opera 15+, Safari 5+ */
-      -ms-animation: spin 1.5s linear infinite;
-      /* Chrome, Opera 15+, Safari 5+ */
-      -webkit-animation: spin 1.5s linear infinite;
-      /* Chrome, Opera 15+, Safari 5+ */
-      animation: spin 1.5s linear infinite;
-      /* Chrome, Firefox 16+, IE 10+, Opera */
-    }
-    @-webkit-keyframes spin {
-      0% {
-        -webkit-transform: rotate(0deg);
+  <head>
+    <meta charset="utf-8" />
+    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
+    <meta name="viewport" content="width=device-width,initial-scale=1.0" />
+    <title>森语</title>
+    <link rel="icon" href="<%= BASE_URL %>logo.png" />
+    <script src="<%= BASE_URL %>cdn/babel-polyfill/polyfill_7_2_5.js"></script>
+    <style>
+      html,
+      body,
+      #app {
+        height: 100%;
+        margin: 0px;
+        padding: 0px;
+      }
+      .chromeframe {
+        margin: 0.2em 0;
+        background: #ccc;
+        color: #000;
+        padding: 0.2em 0;
+      }
+      #loader-wrapper {
+        position: fixed;
+        top: 0;
+        left: 0;
+        width: 100%;
+        height: 100%;
+        z-index: 999999;
+      }
+      #loader {
+        display: block;
+        position: relative;
+        left: 50%;
+        top: 50%;
+        width: 120px;
+        height: 120px;
+        margin: -75px 0 0 -75px;
+        border-radius: 50%;
+        border: 3px solid transparent;
+        /* COLOR 1 */
+        border-top-color: #fff;
+        -webkit-animation: spin 2s linear infinite;
+        /* Chrome, Opera 15+, Safari 5+ */
+        -ms-animation: spin 2s linear infinite;
+        /* Chrome, Opera 15+, Safari 5+ */
+        -moz-animation: spin 2s linear infinite;
+        /* Chrome, Opera 15+, Safari 5+ */
+        -o-animation: spin 2s linear infinite;
+        /* Chrome, Opera 15+, Safari 5+ */
+        animation: spin 2s linear infinite;
+        /* Chrome, Firefox 16+, IE 10+, Opera */
+        z-index: 1001;
+      }
+      #loader:before {
+        content: '';
+        position: absolute;
+        top: 5px;
+        left: 5px;
+        right: 5px;
+        bottom: 5px;
+        border-radius: 50%;
+        border: 3px solid transparent;
+        /* COLOR 2 */
+        border-top-color: #fff;
+        -webkit-animation: spin 3s linear infinite;
+        /* Chrome, Opera 15+, Safari 5+ */
+        -moz-animation: spin 3s linear infinite;
+        /* Chrome, Opera 15+, Safari 5+ */
+        -o-animation: spin 3s linear infinite;
+        /* Chrome, Opera 15+, Safari 5+ */
+        -ms-animation: spin 3s linear infinite;
+        /* Chrome, Opera 15+, Safari 5+ */
+        animation: spin 3s linear infinite;
+        /* Chrome, Firefox 16+, IE 10+, Opera */
+      }
+      #loader:after {
+        content: '';
+        position: absolute;
+        top: 15px;
+        left: 15px;
+        right: 15px;
+        bottom: 15px;
+        border-radius: 50%;
+        border: 3px solid transparent;
+        border-top-color: #fff;
+        /* COLOR 3 */
+        -moz-animation: spin 1.5s linear infinite;
+        /* Chrome, Opera 15+, Safari 5+ */
+        -o-animation: spin 1.5s linear infinite;
+        /* Chrome, Opera 15+, Safari 5+ */
+        -ms-animation: spin 1.5s linear infinite;
+        /* Chrome, Opera 15+, Safari 5+ */
+        -webkit-animation: spin 1.5s linear infinite;
+        /* Chrome, Opera 15+, Safari 5+ */
+        animation: spin 1.5s linear infinite;
+        /* Chrome, Firefox 16+, IE 10+, Opera */
+      }
+      @-webkit-keyframes spin {
+        0% {
+          -webkit-transform: rotate(0deg);
+          /* Chrome, Opera 15+, Safari 3.1+ */
+          -ms-transform: rotate(0deg);
+          /* IE 9 */
+          transform: rotate(0deg);
+          /* Firefox 16+, IE 10+, Opera */
+        }
+        100% {
+          -webkit-transform: rotate(360deg);
+          /* Chrome, Opera 15+, Safari 3.1+ */
+          -ms-transform: rotate(360deg);
+          /* IE 9 */
+          transform: rotate(360deg);
+          /* Firefox 16+, IE 10+, Opera */
+        }
+      }
+      @keyframes spin {
+        0% {
+          -webkit-transform: rotate(0deg);
+          /* Chrome, Opera 15+, Safari 3.1+ */
+          -ms-transform: rotate(0deg);
+          /* IE 9 */
+          transform: rotate(0deg);
+          /* Firefox 16+, IE 10+, Opera */
+        }
+        100% {
+          -webkit-transform: rotate(360deg);
+          /* Chrome, Opera 15+, Safari 3.1+ */
+          -ms-transform: rotate(360deg);
+          /* IE 9 */
+          transform: rotate(360deg);
+          /* Firefox 16+, IE 10+, Opera */
+        }
+      }
+      #loader-wrapper .loader-section {
+        position: fixed;
+        top: 0;
+        width: 51%;
+        height: 100%;
+        background: #49a9ee;
+        /* Old browsers */
+        z-index: 1000;
+        -webkit-transform: translateX(0);
         /* Chrome, Opera 15+, Safari 3.1+ */
-        -ms-transform: rotate(0deg);
+        -ms-transform: translateX(0);
         /* IE 9 */
-        transform: rotate(0deg);
+        transform: translateX(0);
         /* Firefox 16+, IE 10+, Opera */
       }
-      100% {
-        -webkit-transform: rotate(360deg);
+      #loader-wrapper .loader-section.section-left {
+        left: 0;
+      }
+      #loader-wrapper .loader-section.section-right {
+        right: 0;
+      }
+      /* Loaded */
+      .loaded #loader-wrapper .loader-section.section-left {
+        -webkit-transform: translateX(-100%);
         /* Chrome, Opera 15+, Safari 3.1+ */
-        -ms-transform: rotate(360deg);
+        -ms-transform: translateX(-100%);
         /* IE 9 */
-        transform: rotate(360deg);
+        transform: translateX(-100%);
         /* Firefox 16+, IE 10+, Opera */
+        -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
+        transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
       }
-    }
-    @keyframes spin {
-      0% {
-        -webkit-transform: rotate(0deg);
+      .loaded #loader-wrapper .loader-section.section-right {
+        -webkit-transform: translateX(100%);
         /* Chrome, Opera 15+, Safari 3.1+ */
-        -ms-transform: rotate(0deg);
+        -ms-transform: translateX(100%);
         /* IE 9 */
-        transform: rotate(0deg);
+        transform: translateX(100%);
         /* Firefox 16+, IE 10+, Opera */
+        -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
+        transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
+      }
+      .loaded #loader {
+        opacity: 0;
+        -webkit-transition: all 0.3s ease-out;
+        transition: all 0.3s ease-out;
       }
-      100% {
-        -webkit-transform: rotate(360deg);
+      .loaded #loader-wrapper {
+        visibility: hidden;
+        -webkit-transform: translateY(-100%);
         /* Chrome, Opera 15+, Safari 3.1+ */
-        -ms-transform: rotate(360deg);
+        -ms-transform: translateY(-100%);
         /* IE 9 */
-        transform: rotate(360deg);
+        transform: translateY(-100%);
         /* Firefox 16+, IE 10+, Opera */
+        -webkit-transition: all 0.3s 1s ease-out;
+        transition: all 0.3s 1s ease-out;
       }
-    }
-    #loader-wrapper .loader-section {
-      position: fixed;
-      top: 0;
-      width: 51%;
-      height: 100%;
-      background: #49a9ee;
-      /* Old browsers */
-      z-index: 1000;
-      -webkit-transform: translateX(0);
-      /* Chrome, Opera 15+, Safari 3.1+ */
-      -ms-transform: translateX(0);
-      /* IE 9 */
-      transform: translateX(0);
-      /* Firefox 16+, IE 10+, Opera */
-    }
-    #loader-wrapper .loader-section.section-left {
-      left: 0;
-    }
-    #loader-wrapper .loader-section.section-right {
-      right: 0;
-    }
-    /* Loaded */
-    .loaded #loader-wrapper .loader-section.section-left {
-      -webkit-transform: translateX(-100%);
-      /* Chrome, Opera 15+, Safari 3.1+ */
-      -ms-transform: translateX(-100%);
-      /* IE 9 */
-      transform: translateX(-100%);
-      /* Firefox 16+, IE 10+, Opera */
-      -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
-      transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
-    }
-    .loaded #loader-wrapper .loader-section.section-right {
-      -webkit-transform: translateX(100%);
-      /* Chrome, Opera 15+, Safari 3.1+ */
-      -ms-transform: translateX(100%);
-      /* IE 9 */
-      transform: translateX(100%);
-      /* Firefox 16+, IE 10+, Opera */
-      -webkit-transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
-      transition: all 0.7s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1.000);
-    }
-    .loaded #loader {
-      opacity: 0;
-      -webkit-transition: all 0.3s ease-out;
-      transition: all 0.3s ease-out;
-    }
-    .loaded #loader-wrapper {
-      visibility: hidden;
-      -webkit-transform: translateY(-100%);
-      /* Chrome, Opera 15+, Safari 3.1+ */
-      -ms-transform: translateY(-100%);
-      /* IE 9 */
-      transform: translateY(-100%);
-      /* Firefox 16+, IE 10+, Opera */
-      -webkit-transition: all 0.3s 1s ease-out;
-      transition: all 0.3s 1s ease-out;
-    }
-    /* JavaScript Turned Off */
-    .no-js #loader-wrapper {
-      display: none;
-    }
-    .no-js h1 {
-      color: #222222;
-    }
-    #loader-wrapper .load_title {
-      font-family: 'Open Sans';
-      color: #FFF;
-      font-size: 14px;
-      width: 100%;
-      text-align: center;
-      z-index: 9999999999999;
-      position: absolute;
-      top: 60%;
-      opacity: 1;
-      line-height: 30px;
-    }
-    #loader-wrapper .load_title span {
-      font-weight: normal;
-      font-style: italic;
-      font-size: 14px;
-      color: #FFF;
-      opacity: 0.5;
-    }
-    /* 滚动条优化 start */
-    ::-webkit-scrollbar{
-      width:8px;
-      height:8px;
-    }
-    ::-webkit-scrollbar-track{
-      background: #f6f6f6;
-      border-radius:2px;
-    }
-    ::-webkit-scrollbar-thumb{
-      background: #cdcdcd;
-      border-radius:2px;
-    }
-    ::-webkit-scrollbar-thumb:hover{
-      background: #747474;
-    }
-    ::-webkit-scrollbar-corner {
-      background: #f6f6f6;
-    }
-    /* 滚动条优化 end */
-  </style>
-  <!-- 全局配置 -->
-  <script src="<%= BASE_URL %>static/config.js"></script>
-</head>
+      /* JavaScript Turned Off */
+      .no-js #loader-wrapper {
+        display: none;
+      }
+      .no-js h1 {
+        color: #222222;
+      }
+      #loader-wrapper .load_title {
+        font-family: 'Open Sans';
+        color: #fff;
+        font-size: 14px;
+        width: 100%;
+        text-align: center;
+        z-index: 9999999999999;
+        position: absolute;
+        top: 60%;
+        opacity: 1;
+        line-height: 30px;
+      }
+      #loader-wrapper .load_title span {
+        font-weight: normal;
+        font-style: italic;
+        font-size: 14px;
+        color: #fff;
+        opacity: 0.5;
+      }
+      /* 滚动条优化 start */
+      ::-webkit-scrollbar {
+        width: 8px;
+        height: 8px;
+      }
+      ::-webkit-scrollbar-track {
+        background: #f6f6f6;
+        border-radius: 2px;
+      }
+      ::-webkit-scrollbar-thumb {
+        background: #cdcdcd;
+        border-radius: 2px;
+      }
+      ::-webkit-scrollbar-thumb:hover {
+        background: #747474;
+      }
+      ::-webkit-scrollbar-corner {
+        background: #f6f6f6;
+      }
+      /* 滚动条优化 end */
+    </style>
+    <!-- 全局配置 -->
+    <!-- <script src="<%= BASE_URL %>static/config.js"></script>  odd -->
 
-<body>
-<div id="app">
-  <div id="loader-wrapper">
-    <div id="loader"></div>
-    <div class="loader-section section-left"></div>
-    <div class="loader-section section-right"></div>
-    <div class="load_title">正在加载 JeecgBoot 低代码平台,请耐心等待
+    <!-- new 全局配置 -->
+    <script>
+      window._CONFIG = {}
+      window._CONFIG['domianURL'] = 'http://127.0.0.1:8090/jeecg-boot'
+      window._CONFIG['casPrefixUrl'] = 'http://cas.example.org:8443/cas'
+      window._CONFIG['onlinePreviewDomainURL'] = 'http://fileview.jeecg.com/onlinePreview'
+      window._CONFIG['staticDomainURL'] = window._CONFIG['domianURL'] + '/sys/common/static'
+      window._CONFIG['pdfDomainURL'] = window._CONFIG['domianURL'] + '/sys/common/pdf/pdfPreviewIframe'
+    </script>
+  </head>
 
+  <body>
+    <div id="app">
+      <div id="loader-wrapper">
+        <div id="loader"></div>
+        <div class="loader-section section-left"></div>
+        <div class="loader-section section-right"></div>
+        <div class="load_title">正在加载 ,请耐心等待</div>
+      </div>
     </div>
-  </div>
-</div>
-
-</body>
-
-</html>
+  </body>
+</html>

+ 13 - 0
src/api/document/shipmentList.js

@@ -0,0 +1,13 @@
+import { getAction, postAction } from '@/api/manage'
+
+/** 发运明细 **/
+
+// 分页列表查询
+const shipmentList = params => getAction('/shippingDetails/syShippingDetails/list', params)
+
+// 新增
+const addShipmentList = params => postAction('/shippingDetails/syShippingDetails/add', params)
+
+// 参照订单数据
+const queryOrderData = params => getAction('/shippingDetails/syShippingDetails/queryOrderData', params)
+export { shipmentList, addShipmentList, queryOrderData }

+ 42 - 17
src/components/layouts/RouteView.vue

@@ -1,42 +1,67 @@
 <template>
   <div class="main">
-  <keep-alive :include="includedComponents">
-    <router-view v-if="keepAlive" />
-  </keep-alive>
-  <router-view v-if="!keepAlive" />
+    <keep-alive>
+      <router-view v-if="keepAlive" />
+    </keep-alive>
+    <router-view v-if="!keepAlive" />
+  </div>
+
+<!-- 以下注释是原始版本
+
+  <template>
+  <div class="main">
+    <keep-alive :include="includedComponents">
+      <router-view v-if="keepAlive" />
+    </keep-alive>
+    <router-view v-if="!keepAlive" />
   </div>
 </template>
 
 <script>
   import Vue from 'vue'
-  import { CACHE_INCLUDED_ROUTES } from "@/store/mutation-types"
+  import { CACHE_INCLUDED_ROUTES } from '@/store/mutation-types'
 
   export default {
-    name: "RouteView",
+    name: 'RouteView',
     computed: {
-      //update-begin--Author:scott  Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842
+      // update-begin--Author:scott  Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842
       includedComponents() {
         const includedRouters = Vue.ls.get(CACHE_INCLUDED_ROUTES)
-        console.log("includedRouters:" + includedRouters)
+        console.log('includedRouters:' + includedRouters)
 
-        //如果是缓存路由,则加入到 cache_included_routes
+        // 如果是缓存路由,则加入到 cache_included_routes
         if (this.$route.meta.keepAlive && this.$route.meta.componentName) {
           let cacheRouterArray = Vue.ls.get(CACHE_INCLUDED_ROUTES) || []
-          if(!cacheRouterArray.includes(this.$route.meta.componentName)){
+          if (!cacheRouterArray.includes(this.$route.meta.componentName)) {
             cacheRouterArray.push(this.$route.meta.componentName)
             // cacheRouterArray.push("OnlCgformHeadList")
-            console.log("Vue ls set componentName :" + this.$route.meta.componentName)
+            console.log('Vue ls set componentName :' + this.$route.meta.componentName)
             Vue.ls.set(CACHE_INCLUDED_ROUTES, cacheRouterArray)
-            console.log("Vue ls includedRouterArrays :" + Vue.ls.get(CACHE_INCLUDED_ROUTES))
-            return cacheRouterArray;
+            console.log('Vue ls includedRouterArrays :' + Vue.ls.get(CACHE_INCLUDED_ROUTES))
+            return cacheRouterArray
           }
         }
-        return includedRouters;
+        return includedRouters
       },
-      //update-end--Author:scott  Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842
+      // update-end--Author:scott  Date:20201015 for:路由缓存问题,关闭了tab页时再打开就不刷新 #842
       keepAlive () {
         return this.$route.meta.keepAlive
       }
-    },
+    }
   }
-</script>
+</script>
+
+ 以上注释是原始版本    -->
+
+</template>
+
+<script>
+export default {
+    name: 'RouteView',
+    computed: {
+        keepAlive () {
+            return this.$route.meta.keepAlive
+        }
+    }
+}
+</script>

+ 6 - 6
src/components/layouts/UserLayout.vue

@@ -5,11 +5,11 @@
         <div class="header">
           <a href="/">
             <img src="~@/assets/logo.svg" class="logo" alt="logo">
-            <span class="title">Jeecg Boot</span>
+            <span class="title">森语</span>
           </a>
         </div>
         <div class="desc">
-          Jeecg Boot 是中国最具影响力的 企业级 低代码平台
+          关于森语的广告语
         </div>
       </div>
 
@@ -30,11 +30,11 @@
 </template>
 
 <script>
-  import RouteView from "@/components/layouts/RouteView"
+  import RouteView from '@/components/layouts/RouteView'
   import { mixinDevice } from '@/utils/mixin.js'
 
   export default {
-    name: "UserLayout",
+    name: 'UserLayout',
     components: { RouteView },
     mixins: [mixinDevice],
     data () {
@@ -45,7 +45,7 @@
     },
     beforeDestroy () {
       document.body.classList.remove('userLayout')
-    },
+    }
   }
 </script>
 
@@ -147,4 +147,4 @@
       }
     }
   }
-</style>
+</style>

+ 12 - 12
src/components/page/GlobalHeader.vue

@@ -17,8 +17,8 @@
         :type="collapsed ? 'menu-unfold' : 'menu-fold'"
         @click="toggle"/>
 
-      <span v-if="device === 'desktop'">欢迎进入 Jeecg-Boot 企业级低代码平台</span>
-      <span v-else>Jeecg-Boot</span>
+      <span v-if="device === 'desktop'">欢迎进入森语中后台</span>
+      <span v-else>森语</span>
 
       <user-menu :theme="theme"/>
     </div>
@@ -59,7 +59,7 @@
     components: {
       UserMenu,
       SMenu,
-      Logo,
+      Logo
     },
     mixins: [mixin],
     props: {
@@ -91,14 +91,14 @@
     data() {
       return {
         headerBarFixed: false,
-        //update-begin--author:sunjianlei---date:20190508------for: 顶部导航栏过长时显示更多按钮-----
+        // update-begin--author:sunjianlei---date:20190508------for: 顶部导航栏过长时显示更多按钮-----
         topMenuStyle: {
           headerIndexLeft: {},
           topNavHeader: {},
           headerIndexRight: {},
           topSmenuStyle: {}
         },
-        chatStatus: '',
+        chatStatus: ''
       }
     },
     watch: {
@@ -115,14 +115,14 @@
         }
       }
     },
-    //update-end--author:sunjianlei---date:20190508------for: 顶部导航栏过长时显示更多按钮-----
+    // update-end--author:sunjianlei---date:20190508------for: 顶部导航栏过长时显示更多按钮-----
     mounted() {
       window.addEventListener('scroll', this.handleScroll)
-      //update-begin--author:sunjianlei---date:20190508------for: 顶部导航栏过长时显示更多按钮-----
+      // update-begin--author:sunjianlei---date:20190508------for: 顶部导航栏过长时显示更多按钮-----
       if (this.mode === 'topmenu') {
         this.buildTopMenuStyle()
       }
-      //update-end--author:sunjianlei---date:20190508------for: 顶部导航栏过长时显示更多按钮-----
+      // update-end--author:sunjianlei---date:20190508------for: 顶部导航栏过长时显示更多按钮-----
     },
     methods: {
       handleScroll() {
@@ -140,7 +140,7 @@
       toggle() {
         this.$emit('toggle')
       },
-      //update-begin--author:sunjianlei---date:20190508------for: 顶部导航栏过长时显示更多按钮-----
+      // update-begin--author:sunjianlei---date:20190508------for: 顶部导航栏过长时显示更多按钮-----
       buildTopMenuStyle() {
         if (this.mode === 'topmenu') {
           if (this.device === 'mobile') {
@@ -158,12 +158,12 @@
           }
         }
       },
-      //update-begin--author:sunjianlei---date:20190508------for: 顶部导航栏过长时显示更多按钮-----
+      // update-begin--author:sunjianlei---date:20190508------for: 顶部导航栏过长时显示更多按钮-----
 
       // update-begin-author:sunjianlei date:20210508 for: 修复动态功能测试菜单、带参数菜单标题错误、展开错误的问题
       handleUpdateMenuTitle(value) {
         this.$emit('updateMenuTitle', value)
-      },
+      }
       // update-end-author:sunjianlei date:20210508 for: 修复动态功能测试菜单、带参数菜单标题错误、展开错误的问题
 
     }
@@ -224,4 +224,4 @@
 
   /* update_end author:scott date:20190220 for: 缩小首页布局顶部的高度*/
 
-</style>
+</style>

+ 4 - 4
src/components/tools/Logo.vue

@@ -21,7 +21,7 @@
     props: {
       title: {
         type: String,
-        default: 'Jeecg-Boot Pro',
+        default: '森语',
         required: false
       },
       showTitle: {
@@ -32,8 +32,8 @@
       // 点击Logo跳转地址
       routerLinkTo: {
         type: Object,
-        default: () => ({name: 'dashboard'}),
-      },
+        default: () => ({ name: 'dashboard' })
+      }
     }
   }
 </script>
@@ -61,4 +61,4 @@
       background-color: @primary-color;
     }
   }
-</style>
+</style>

+ 24 - 17
src/main.js

@@ -6,21 +6,19 @@ import App from './App.vue'
 import Storage from 'vue-ls'
 import router from './router'
 import store from './store/'
-import { VueAxios } from "@/utils/request"
-
-require('@jeecg/antd-online-mini')
-require('@jeecg/antd-online-mini/dist/OnlineForm.css')
+import { VueAxios } from '@/utils/request'
+// , postFormAction, postAction
+// import { getAction } from '@/api/manage' // new
 
 import Antd, { version } from 'ant-design-vue'
-console.log('ant-design-vue version:', version)
-
 import Viser from 'viser-vue'
-import 'ant-design-vue/dist/antd.less';  // or 'ant-design-vue/dist/antd.less'
+
+import 'ant-design-vue/dist/antd.less' // or 'ant-design-vue/dist/antd.less'
 
 import '@/permission' // permission control
 import '@/utils/filter' // base filter
 import Print from 'vue-print-nb-jeecg'
-/*import '@babel/polyfill'*/
+/* import '@babel/polyfill' */
 import preview from 'vue-photo-preview'
 import 'vue-photo-preview/dist/skin.css'
 import SSO from '@/cas/sso.js'
@@ -36,20 +34,26 @@ import {
   DEFAULT_FIXED_SIDEMENU,
   DEFAULT_CONTENT_WIDTH_TYPE,
   DEFAULT_MULTI_PAGE
-} from "@/store/mutation-types"
+} from '@/store/mutation-types'
 import config from '@/defaultSettings'
 
 import JDictSelectTag from './components/dict/index.js'
 import hasPermission from '@/utils/hasPermission'
-import vueBus from '@/utils/vueBus';
+import vueBus from '@/utils/vueBus'
 import JeecgComponents from '@/components/jeecg/index'
 import '@/assets/less/JAreaLinkage.less'
 import VueAreaLinkage from 'vue-area-linkage'
 import '@/components/jeecg/JVxeTable/install'
 import '@/components/JVxeCells/install'
-//表单验证
+
+// 表单验证
 import { rules } from '@/utils/rules'
+
+require('@jeecg/antd-online-mini')
+require('@jeecg/antd-online-mini/dist/OnlineForm.css')
+console.log('ant-design-vue version:', version)
 Vue.prototype.rules = rules
+
 Vue.config.productionTip = false
 Vue.use(Storage, config.storageOptions)
 Vue.use(Antd)
@@ -59,9 +63,12 @@ Vue.use(hasPermission)
 Vue.use(JDictSelectTag)
 Vue.use(Print)
 Vue.use(preview)
-Vue.use(vueBus);
-Vue.use(JeecgComponents);
-Vue.use(VueAreaLinkage);
+Vue.use(vueBus)
+Vue.use(JeecgComponents)
+Vue.use(VueAreaLinkage)
+
+// 挂载全局使用的方法
+// Vue.prototype.getAction = getAction
 
 SSO.init(() => {
   main()
@@ -70,7 +77,7 @@ function main() {
   new Vue({
     router,
     store,
-    mounted () {
+    mounted() {
       store.commit('SET_SIDEBAR_TYPE', Vue.ls.get(SIDEBAR_TYPE, true))
       store.commit('TOGGLE_THEME', Vue.ls.get(DEFAULT_THEME, config.navTheme))
       store.commit('TOGGLE_LAYOUT_MODE', Vue.ls.get(DEFAULT_LAYOUT_MODE, config.layout))
@@ -81,8 +88,8 @@ function main() {
       store.commit('TOGGLE_WEAK', Vue.ls.get(DEFAULT_COLOR_WEAK, config.colorWeak))
       store.commit('TOGGLE_COLOR', Vue.ls.get(DEFAULT_COLOR, config.primaryColor))
       store.commit('SET_TOKEN', Vue.ls.get(ACCESS_TOKEN))
-      store.commit('SET_MULTI_PAGE',Vue.ls.get(DEFAULT_MULTI_PAGE,config.multipage))
+      store.commit('SET_MULTI_PAGE', Vue.ls.get(DEFAULT_MULTI_PAGE, config.multipage))
     },
     render: h => h(App)
   }).$mount('#app')
-}
+}

+ 401 - 379
src/mixins/JeecgListMixin.js

@@ -1,385 +1,407 @@
 /**
  * 新增修改完成调用 modalFormOk方法 编辑弹框组件ref定义为modalForm
  * 高级查询按钮调用 superQuery方法  高级查询组件ref定义为superQueryModal
- * data中url定义 list为查询列表  delete为删除单条记录  deleteBatch为批量删除
+ * data中 url定义 list为查询列表  delete为删除单条记录  deleteBatch为批量删除
  */
-import { filterObj } from '@/utils/util'
-import { deleteAction, getAction, downFile, getFileAccessHttpUrl } from '@/api/manage'
-import Vue from 'vue'
-import { ACCESS_TOKEN, TENANT_ID } from '@/store/mutation-types'
-import store from '@/store'
+ import { filterObj } from '@/utils/util'
+ import { deleteAction, getAction, downFile, getFileAccessHttpUrl } from '@/api/manage'
+ import Vue from 'vue'
+ // , TENANT_ID
+ import { ACCESS_TOKEN } from '@/store/mutation-types'
+ // import store from '@/store' //new
 
-export const JeecgListMixin = {
-  data() {
-    return {
-      /* 查询条件-请不要在queryParam中声明非字符串值的属性 */
-      queryParam: {},
-      /* 数据源 */
-      dataSource: [],
-      /* 分页参数 */
-      ipagination: {
-        current: 1,
-        pageSize: 10,
-        pageSizeOptions: ['10', '20', '30'],
-        showTotal: (total, range) => {
-          return range[0] + '-' + range[1] + ' 共' + total + '条'
-        },
-        showQuickJumper: true,
-        showSizeChanger: true,
-        total: 0
-      },
-      /* 排序参数 */
-      isorter: {
-        column: 'createTime',
-        order: 'desc'
-      },
-      /* 筛选参数 */
-      filters: {},
-      /* table加载状态 */
-      loading: false,
-      /* table选中keys */
-      selectedRowKeys: [],
-      /* table选中records */
-      selectionRows: [],
-      /* 查询折叠 */
-      toggleSearchStatus: false,
-      /* 高级查询条件生效状态 */
-      superQueryFlag: false,
-      /* 高级查询条件 */
-      superQueryParams: '',
-      /** 高级查询拼接方式 */
-      superQueryMatchType: 'and'
-    }
-  },
-  created() {
-    if (!this.disableMixinCreated) {
-      console.log(' -- mixin created -- ')
-      this.loadData()
-      // 初始化字典配置 在自己页面定义
-      this.initDictConfig()
-    }
-  },
-  computed: {
-    // token header
-    tokenHeader() {
-      let head = { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) }
-      let tenantid = Vue.ls.get(TENANT_ID)
-      if (tenantid) {
-        head['tenant-id'] = tenantid
-      }
-      return head
-    }
-  },
-  methods: {
-    loadData(arg) {
-      if (!this.url.list) {
-        this.$message.error('请设置url.list属性!')
-        return
-      }
-      // 加载数据 若传入参数1则加载第一页的内容
-      if (arg === 1) {
-        this.ipagination.current = 1
-      }
-      var params = this.getQueryParams() // 查询条件
-      this.loading = true
-      getAction(this.url.list, params)
-        .then(res => {
-          if (res.success) {
-            // update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
-            this.dataSource = res.result.records || res.result
-            if (res.result.total) {
-              this.ipagination.total = res.result.total
-            } else {
-              this.ipagination.total = 0
-            }
-            // update-end---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
-          } else {
-            this.$message.warning(res.message)
-          }
-        })
-        .finally(() => {
-          this.loading = false
-        })
-    },
-    initDictConfig() {
-      console.log('--这是一个假的方法!')
-    },
-    handleSuperQuery(params, matchType) {
-      // 高级查询方法
-      if (!params) {
-        this.superQueryParams = ''
-        this.superQueryFlag = false
-      } else {
-        this.superQueryFlag = true
-        this.superQueryParams = JSON.stringify(params)
-        this.superQueryMatchType = matchType
-      }
-      this.loadData(1)
-    },
-    getQueryParams() {
-      // 获取查询条件
-      let sqp = {}
-      if (this.superQueryParams) {
-        sqp['superQueryParams'] = encodeURI(this.superQueryParams)
-        sqp['superQueryMatchType'] = this.superQueryMatchType
-      }
-      var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters)
-      param.field = this.getQueryField()
-      param.pageNo = this.ipagination.current
-      param.pageSize = this.ipagination.pageSize
-      return filterObj(param)
-    },
-    getQueryField() {
-      // todo: 字段权限控制
-      var str = 'id,'
-      this.columns.forEach(function(value) {
-        str += ',' + value.dataIndex
-      })
-      return str
-    },
+ export const JeecgListMixin = {
+   data() {
+     return {
+       // token header BY-----LY 2022-04-28
+       tokenHeader: { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) },
+       /* 查询条件-请不要在queryParam中声明非字符串值的属性 */
+       queryParam: {},
+       /* 数据源 */
+       dataSource: [],
+       /* 分页参数 */
+       ipagination: {
+         current: 1,
+         pageSize: 10,
+         pageSizeOptions: ['10', '20', '30'],
+         showTotal: (total, range) => {
+           return range[0] + '-' + range[1] + ' 共' + total + '条'
+         },
+         showQuickJumper: true,
+         showSizeChanger: true,
+         total: 0
+       },
+       /* 排序参数 */
+       isorter: {
+         column: 'createTime',
+         order: 'desc'
+       },
+       /* 筛选参数 */
+       filters: {},
+       /* table加载状态 */
+       loading: false,
+       /* table选中keys */
+       selectedRowKeys: [],
+       /* table选中records */
+       selectionRows: [],
+       /* 查询折叠 */
+       toggleSearchStatus: false,
+       /* 高级查询条件生效状态 */
+       superQueryFlag: false,
+       /* 高级查询条件 */
+       superQueryParams: '',
+       /** 高级查询拼接方式 */
+       superQueryMatchType: 'and'
+     }
+   },
 
-    onSelectChange(selectedRowKeys, selectionRows) {
-      this.selectedRowKeys = selectedRowKeys
-      this.selectionRows = selectionRows
-    },
-    onClearSelected() {
-      this.selectedRowKeys = []
-      this.selectionRows = []
-    },
-    searchQuery() {
-      this.loadData(1)
-      // 点击查询清空列表选中行
-      // https://gitee.com/jeecg/jeecg-boot/issues/I4KTU1
-      this.selectedRowKeys = []
-      this.selectionRows = []
-    },
-    superQuery() {
-      this.$refs.superQueryModal.show()
-    },
-    searchReset() {
-      this.queryParam = {}
-      this.loadData(1)
-    },
-    batchDel: function() {
-      if (!this.url.deleteBatch) {
-        this.$message.error('请设置url.deleteBatch属性!')
-        return
-      }
-      if (this.selectedRowKeys.length <= 0) {
-        this.$message.warning('请选择一条记录!')
-      } else {
-        var ids = ''
-        for (var a = 0; a < this.selectedRowKeys.length; a++) {
-          ids += this.selectedRowKeys[a] + ','
-        }
-        var that = this
-        this.$confirm({
-          title: '确认删除',
-          content: '是否删除选中数据?',
-          onOk: function() {
-            that.loading = true
-            deleteAction(that.url.deleteBatch, { ids: ids })
-              .then(res => {
-                if (res.success) {
-                  // 重新计算分页问题
-                  that.reCalculatePage(that.selectedRowKeys.length)
-                  that.$message.success(res.message)
-                  that.loadData()
-                  that.onClearSelected()
-                } else {
-                  that.$message.warning(res.message)
-                }
-              })
-              .finally(() => {
-                that.loading = false
-              })
-          }
-        })
-      }
-    },
-    handleDelete: function(id) {
-      if (!this.url.delete) {
-        this.$message.error('请设置url.delete属性!')
-        return
-      }
-      var that = this
-      deleteAction(that.url.delete, { id: id }).then(res => {
-        if (res.success) {
-          // 重新计算分页问题
-          that.reCalculatePage(1)
-          that.$message.success(res.message)
-          that.loadData()
-        } else {
-          that.$message.warning(res.message)
-        }
-      })
-    },
-    reCalculatePage(count) {
-      // 总数量-count
-      let total = this.ipagination.total - count
-      // 获取删除后的分页数
-      let currentIndex = Math.ceil(total / this.ipagination.pageSize)
-      // 删除后的分页数<所在当前页
-      if (currentIndex < this.ipagination.current) {
-        this.ipagination.current = currentIndex
-      }
-      console.log('currentIndex', currentIndex)
-    },
-    handleEdit: function(record) {
-      this.$refs.modalForm.edit(record)
-      this.$refs.modalForm.title = '编辑'
-      this.$refs.modalForm.disableSubmit = false
-    },
-    handleAdd: function() {
-      this.$refs.modalForm.add()
-      this.$refs.modalForm.title = '新增'
-      this.$refs.modalForm.disableSubmit = false
-    },
-    handleTableChange(pagination, filters, sorter) {
-      // 分页、排序、筛选变化时触发
-      // todo: 筛选
-      console.log(pagination)
-      if (Object.keys(sorter).length > 0) {
-        this.isorter.column = sorter.field
-        this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc'
-      }
-      this.ipagination = pagination
-      this.loadData()
-    },
-    handleToggleSearch() {
-      this.toggleSearchStatus = !this.toggleSearchStatus
-    },
-    // 给popup查询使用(查询区域不支持回填多个字段,限制只返回一个字段)
-    getPopupField(fields) {
-      return fields.split(',')[0]
-    },
-    modalFormOk() {
-      // 新增/修改 成功时,重载列表
-      this.loadData()
-      // 清空列表选中
-      this.onClearSelected()
-    },
-    handleDetail: function(record) {
-      this.$refs.modalForm.edit(record)
-      this.$refs.modalForm.title = '详情'
-      this.$refs.modalForm.disableSubmit = true
-    },
-    /* 导出 */
-    handleExportXls2() {
-      let paramsStr = encodeURI(JSON.stringify(this.getQueryParams()))
-      let url = `${window._CONFIG['domianURL']}/${this.url.exportXlsUrl}?paramsStr=${paramsStr}`
-      window.location.href = url
-    },
-    handleExportXls(fileName) {
-      if (!fileName || typeof fileName !== 'string') {
-        fileName = '导出文件'
-      }
-      let param = this.getQueryParams()
-      if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
-        param['selections'] = this.selectedRowKeys.join(',')
-      }
-      console.log('导出参数', param)
-      downFile(this.url.exportXlsUrl, param).then(data => {
-        if (!data) {
-          this.$message.warning('文件下载失败')
-          return
-        }
-        if (typeof window.navigator.msSaveBlob !== 'undefined') {
-          window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
-        } else {
-          let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
-          let link = document.createElement('a')
-          link.style.display = 'none'
-          link.href = url
-          link.setAttribute('download', fileName + '.xls')
-          document.body.appendChild(link)
-          link.click()
-          document.body.removeChild(link) // 下载完成移除元素
-          window.URL.revokeObjectURL(url) // 释放掉blob对象
-        }
-      })
-    },
-    /* 导入 */
-    handleImportExcel(info) {
-      this.loading = true
-      if (info.file.status !== 'uploading') {
-        console.log(info.file, info.fileList)
-      }
-      if (info.file.status === 'done') {
-        this.loading = false
-        if (info.file.response.success) {
-          // this.$message.success(`${info.file.name} 文件上传成功`);
-          if (info.file.response.code === 201) {
-            let {
-              message,
-              result: { msg, fileUrl, fileName }
-            } = info.file.response
-            let href = window._CONFIG['domianURL'] + fileUrl
-            this.$warning({
-              title: message,
-              content: (
-                <div>
-                  <span>{msg}</span>
-                  <br />
-                  <span>
-                    具体详情请{' '}
-                    <a href={href} target="_blank" download={fileName}>
-                      点击下载
-                    </a>{' '}
-                  </span>
-                </div>
-              )
-            })
-          } else {
-            this.$message.success(info.file.response.message || `${info.file.name} 文件上传成功`)
-          }
-          this.loadData()
-        } else {
-          this.$message.error(`${info.file.name} ${info.file.response.message}.`)
-        }
-      } else if (info.file.status === 'error') {
-        this.loading = false
-        if (info.file.response.status === 500) {
-          let data = info.file.response
-          const token = Vue.ls.get(ACCESS_TOKEN)
-          if (token && data.message.includes('Token失效')) {
-            this.$error({
-              title: '登录已过期',
-              content: '很抱歉,登录已过期,请重新登录',
-              okText: '重新登录',
-              mask: false,
-              onOk: () => {
-                store.dispatch('Logout').then(() => {
-                  Vue.ls.remove(ACCESS_TOKEN)
-                  window.location.reload()
-                })
-              }
-            })
-          }
-        } else {
-          this.$message.error(`文件上传失败: ${info.file.msg} `)
-        }
-      }
-    },
-    /* 图片预览 */
-    getImgView(text) {
-      if (text && text.indexOf(',') > 0) {
-        text = text.substring(0, text.indexOf(','))
-      }
-      return getFileAccessHttpUrl(text)
-    },
-    /* 文件下载 */
-    // update--autor:lvdandan-----date:20200630------for:修改下载文件方法名uploadFile改为downloadFile------
-    downloadFile(text) {
-      if (!text) {
-        this.$message.warning('未知的文件')
-        return
-      }
-      if (text.indexOf(',') > 0) {
-        text = text.substring(0, text.indexOf(','))
-      }
-      let url = getFileAccessHttpUrl(text)
-      window.open(url)
-    }
-  }
-}
+   computed: {
+     // token header
+     // tokenHeader() {
+     //   let head = { 'X-Access-Token': Vue.ls.get(ACCESS_TOKEN) }
+     //   let tenantid = Vue.ls.get(TENANT_ID)
+     //   if (tenantid) {
+     //     head['tenant-id'] = tenantid
+     //   }
+     //   return head
+     // }
+     scroll: function() {
+       var width = window.innerWidth
+       // ant-table
+       let $antTable = window.document.getElementsByClassName('ant-table')
+       if ($antTable[0]) {
+         width = $antTable[0].clientWidth
+       }
+       console.log('$antTable', $antTable)
+       return {
+         // x:'max-content',
+         x: width,
+         y: window.innerHeight / 2
+       }
+     }
+   },
+   created() {
+     if (!this.disableMixinCreated) {
+      //  console.log('this.disableMixinCreated:', this.disableMixinCreated)
+      //  console.log(' -- mixin created -- ')
+       this.loadData()
+       // 初始化字典配置 在自己页面定义
+       this.initDictConfig()
+     }
+   },
+   methods: {
+     loadData(arg) {
+      //  console.log('List前面的arg', arg)
+       if (!this.url.list) {
+         console.log('111:', this.url)
+         console.log('this.url.list!!!!!', this.url.list)
+         this.$message.error('请设置url.list属性!')
+         return
+       }
+       // 加载数据 若传入参数1则加载第一页的内容
+       if (arg === 1) {
+         this.ipagination.current = 1
+       }
+       var params = this.getQueryParams() // 查询条件
+       this.loading = true
+       getAction(this.url.list, params)
+         .then(res => {
+           if (res.success) {
+             // update-begin---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
+             this.dataSource = res.result.records || res.result
+             if (res.result.total) {
+               this.ipagination.total = res.result.total
+             } else {
+               this.ipagination.total = 0
+             }
+             // update-end---author:zhangyafei    Date:20201118  for:适配不分页的数据列表------------
+           } else {
+             this.$message.warning(res.message)
+           }
+         })
+         .finally(() => {
+           this.loading = false
+         })
+     },
+     initDictConfig() {
+       console.log('--这是一个假的方法!')
+     },
+     handleSuperQuery(params, matchType) {
+       // 高级查询方法
+       if (!params) {
+         this.superQueryParams = ''
+         this.superQueryFlag = false
+       } else {
+         this.superQueryFlag = true
+         this.superQueryParams = JSON.stringify(params)
+         this.superQueryMatchType = matchType
+       }
+       this.loadData(1)
+     },
+     getQueryParams() {
+       // 获取查询条件
+       let sqp = {}
+       if (this.superQueryParams) {
+         sqp['superQueryParams'] = encodeURI(this.superQueryParams)
+         sqp['superQueryMatchType'] = this.superQueryMatchType
+       }
+       var param = Object.assign(sqp, this.queryParam, this.isorter, this.filters)
+       param.field = this.getQueryField()
+       param.pageNo = this.ipagination.current
+       param.pageSize = this.ipagination.pageSize
+       return filterObj(param)
+     },
+     getQueryField() {
+       // todo: 字段权限控制
+       var str = 'id,'
+       this.columns.forEach(function(value) {
+         str += ',' + value.dataIndex
+       })
+       return str
+     },
+
+     onSelectChange(selectedRowKeys, selectionRows) {
+       this.selectedRowKeys = selectedRowKeys
+       this.selectionRows = selectionRows
+     },
+     onClearSelected() {
+       this.selectedRowKeys = []
+       this.selectionRows = []
+     },
+     searchQuery() {
+       this.loadData(1)
+       // 点击查询清空列表选中行
+       // https://gitee.com/jeecg/jeecg-boot/issues/I4KTU1
+       this.selectedRowKeys = []
+       this.selectionRows = []
+     },
+     superQuery() {
+       this.$refs.superQueryModal.show()
+     },
+     searchReset() {
+       this.queryParam = {}
+       this.loadData(1)
+     },
+     batchDel: function() {
+       if (!this.url.deleteBatch) {
+         this.$message.error('请设置url.deleteBatch属性!')
+         return
+       }
+       if (this.selectedRowKeys.length <= 0) {
+         this.$message.warning('请选择一条记录!')
+       } else {
+         var ids = ''
+         for (var a = 0; a < this.selectedRowKeys.length; a++) {
+           ids += this.selectedRowKeys[a] + ','
+         }
+         var that = this
+         this.$confirm({
+           title: '确认删除',
+           content: '是否删除选中数据?',
+           onOk: function() {
+             that.loading = true
+             deleteAction(that.url.deleteBatch, { ids: ids })
+               .then(res => {
+                 if (res.success) {
+                   // 重新计算分页问题
+                   that.reCalculatePage(that.selectedRowKeys.length)
+                   that.$message.success(res.message)
+                   that.loadData()
+                   that.onClearSelected()
+                 } else {
+                   that.$message.warning(res.message)
+                 }
+               })
+               .finally(() => {
+                 that.loading = false
+               })
+           }
+         })
+       }
+     },
+     handleDelete: function(id) {
+       if (!this.url.delete) {
+         this.$message.error('请设置url.delete属性!')
+         return
+       }
+       var that = this
+       deleteAction(that.url.delete, { id: id }).then(res => {
+         if (res.success) {
+           // 重新计算分页问题
+           that.reCalculatePage(1)
+           that.$message.success(res.message)
+           that.loadData()
+         } else {
+           that.$message.warning(res.message)
+         }
+       })
+     },
+     reCalculatePage(count) {
+       // 总数量-count
+       let total = this.ipagination.total - count
+       // 获取删除后的分页数
+       let currentIndex = Math.ceil(total / this.ipagination.pageSize)
+       // 删除后的分页数<所在当前页
+       if (currentIndex < this.ipagination.current) {
+         this.ipagination.current = currentIndex
+       }
+       console.log('currentIndex', currentIndex)
+     },
+     handleEdit: function(record) {
+       this.$refs.modalForm.edit(record)
+       this.$refs.modalForm.title = '编辑'
+       this.$refs.modalForm.disableSubmit = false
+     },
+     handleAdd: function() {
+       this.$refs.modalForm.add()
+       this.$refs.modalForm.title = '新增'
+       this.$refs.modalForm.disableSubmit = false
+     },
+     handleTableChange(pagination, filters, sorter) {
+       // 分页、排序、筛选变化时触发
+       // todo: 筛选
+       console.log(pagination)
+       if (Object.keys(sorter).length > 0) {
+         this.isorter.column = sorter.field
+         this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc'
+       }
+       this.ipagination = pagination
+       this.loadData()
+     },
+     handleToggleSearch() {
+       this.toggleSearchStatus = !this.toggleSearchStatus
+     },
+     // 给popup查询使用(查询区域不支持回填多个字段,限制只返回一个字段)
+     getPopupField(fields) {
+       return fields.split(',')[0]
+     },
+     modalFormOk() {
+       // 新增/修改 成功时,重载列表
+       this.loadData()
+       // 清空列表选中
+       this.onClearSelected()
+     },
+     handleDetail: function(record) {
+       this.$refs.modalForm.edit(record)
+       this.$refs.modalForm.title = '详情'
+       this.$refs.modalForm.disableSubmit = true
+     },
+     /* 导出 */
+     handleExportXls2() {
+       let paramsStr = encodeURI(JSON.stringify(this.getQueryParams()))
+       let url = `${window._CONFIG['domianURL']}/${this.url.exportXlsUrl}?paramsStr=${paramsStr}`
+       window.location.href = url
+     },
+     handleExportXls(fileName) {
+       if (!fileName || typeof fileName !== 'string') {
+         fileName = '导出文件'
+       }
+       let param = this.getQueryParams()
+       if (this.selectedRowKeys && this.selectedRowKeys.length > 0) {
+         param['selections'] = this.selectedRowKeys.join(',')
+       }
+       console.log('导出参数', param)
+       downFile(this.url.exportXlsUrl, param).then(data => {
+         if (!data) {
+           this.$message.warning('文件下载失败')
+           return
+         }
+         if (typeof window.navigator.msSaveBlob !== 'undefined') {
+           window.navigator.msSaveBlob(new Blob([data], { type: 'application/vnd.ms-excel' }), fileName + '.xls')
+         } else {
+           let url = window.URL.createObjectURL(new Blob([data], { type: 'application/vnd.ms-excel' }))
+           let link = document.createElement('a')
+           link.style.display = 'none'
+           link.href = url
+           link.setAttribute('download', fileName + '.xls')
+           document.body.appendChild(link)
+           link.click()
+           document.body.removeChild(link) // 下载完成移除元素
+           window.URL.revokeObjectURL(url) // 释放掉blob对象
+         }
+       })
+     },
+     /* 导入 */
+     handleImportExcel(info) {
+       this.loading = true
+       if (info.file.status !== 'uploading') {
+         console.log(info.file, info.fileList)
+       }
+       if (info.file.status === 'done') {
+         this.loading = false
+         if (info.file.response.success) {
+           // this.$message.success(`${info.file.name} 文件上传成功`);
+           if (info.file.response.code === 201) {
+             let {
+               message,
+               result: { msg, fileUrl, fileName }
+             } = info.file.response
+             let href = window._CONFIG['domianURL'] + fileUrl
+             this.$warning({
+               title: message,
+               content: (
+                 <div>
+                   <span>{msg}</span>
+                   <br />
+                   <span>
+                     具体详情请{' '}
+                     <a href={href} target="_blank" download={fileName}>
+                       点击下载
+                     </a>{' '}
+                   </span>
+                 </div>
+               )
+             })
+           } else {
+             this.$message.success(info.file.response.message || `${info.file.name} 文件上传成功`)
+           }
+           this.loadData()
+         } else {
+           this.$message.error(`${info.file.name} ${info.file.response.message}.`)
+         }
+       } else if (info.file.status === 'error') {
+         this.loading = false
+         if (info.file.response.status === 500) {
+           let data = info.file.response
+           const token = Vue.ls.get(ACCESS_TOKEN)
+           if (token && data.message.includes('Token失效')) {
+             this.$error({
+               title: '登录已过期',
+               content: '很抱歉,登录已过期,请重新登录',
+               okText: '重新登录',
+               mask: false,
+               onOk: () => {
+                 store.dispatch('Logout').then(() => {
+                   Vue.ls.remove(ACCESS_TOKEN)
+                   window.location.reload()
+                 })
+               }
+             })
+           }
+         } else {
+           this.$message.error(`文件上传失败: ${info.file.msg} `)
+         }
+       }
+     },
+     /* 图片预览 */
+     getImgView(text) {
+       if (text && text.indexOf(',') > 0) {
+         text = text.substring(0, text.indexOf(','))
+       }
+       return getFileAccessHttpUrl(text)
+     },
+     /* 文件下载 */
+     // update--autor:lvdandan-----date:20200630------for:修改下载文件方法名uploadFile改为downloadFile------
+     downloadFile(text) {
+       if (!text) {
+         this.$message.warning('未知的文件')
+         return
+       }
+       if (text.indexOf(',') > 0) {
+         text = text.substring(0, text.indexOf(','))
+       }
+       let url = getFileAccessHttpUrl(text)
+       window.open(url)
+     }
+   }
+ }

+ 40 - 8
src/views/reportForms/fabric-loss-table.vue

@@ -439,8 +439,25 @@ export default {
           scopedSlots: { customRender: 'materialsOutQuantity' }
         },
         { title: '采购数量', dataIndex: 'purchaseAmount', width: 120, className: 'replacecolor' },
-        { title: '单位(根)', dataIndex: 'companyRoot', width: 90, className: 'replacecolor' },
-        { title: '单位(米)', dataIndex: 'companyMeter', width: 90, className: 'replacecolor' },
+
+        {
+          title: '单位',
+          children: [
+            {
+              title: '根',
+              dataIndex: 'unitRoot',
+              width: 90,
+              className: 'replacecolor'
+            },
+            {
+              title: '米',
+              dataIndex: 'unitMeter',
+              width: 90,
+              className: 'replacecolor'
+            }
+          ]
+        },
+
         {
           title: '采购入库数量',
           dataIndex: 'purchaseInQuantity',
@@ -462,8 +479,8 @@ export default {
           factory: '飞亚',
           materialsOutQuantityData: '863',
           purchaseAmount: '**',
-          companyRoot: '**',
-          companyMeter: '**',
+          unitRoot: '77',
+          unitMeter: '12',
           purchaseInQuantity: '848.9',
           materialCode: '**',
           goodsName: '**',
@@ -502,8 +519,23 @@ export default {
           scopedSlots: { customRender: 'materialsOutQuantityAbroad' }
         },
         { title: '采购数量', dataIndex: 'purchaseAmount', width: 120, className: 'replacecolor' },
-        { title: '单位(根)', dataIndex: 'companyRoot', width: 120, className: 'replacecolor' },
-        { title: '单位(米)', dataIndex: 'companyMeter', width: 120, className: 'replacecolor' },
+        {
+          title: '单位',
+          children: [
+            {
+              title: '根',
+              dataIndex: 'unitRoot',
+              width: 90,
+              className: 'replacecolor'
+            },
+            {
+              title: '米',
+              dataIndex: 'unitMeter',
+              width: 90,
+              className: 'replacecolor'
+            }
+          ]
+        },
         {
           title: '采购入库数量',
           dataIndex: 'purchaseInQuantityAbroad',
@@ -525,8 +557,8 @@ export default {
           factory: '飞亚',
           materialsOutQuantityAbroadData: '163',
           purchaseAmount: '**',
-          companyRoot: '**',
-          companyMeter: '**',
+          unitRoot: '88',
+          unitMeter: '22',
           purchaseInQuantityAbroad: '248.9',
           materialCode: '**',
           goodsName: '**',

+ 120 - 62
src/views/shipment-details/addShipDetDrawer.vue

@@ -12,21 +12,23 @@
       <!-- 主表信息 填写-->
       <a-card :bordered="true">
         <div class="table-page-search-wrapper">
-          <a-form-model layout="inline" ref="form" :model="addShipDet" :rules="validatorRules">
+          <!-- :rules="validatorRules" -->
+          <a-form-model layout="inline" ref="form" :model="addShipDet">
             <a-row :gutter="24">
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="单据号" prop="orderNum">
-                  <a-input placeholder="请输入单据号" v-model="addShipDet.orderNum"></a-input>
+                <!-- required 必填项 -->
+                <a-form-model-item label="单据号" prop="documentNo">
+                  <a-input placeholder="请输入单据号" v-model="addShipDet.documentNo"></a-input>
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="单据日期" required prop="billDate">
+                <a-form-model-item label="单据日期" prop="documentDate">
                   <a-date-picker
                     placeholder="请选择单据日期"
                     :format="dateFormat"
                     style="width:100%;"
-                    v-model="addShipDet.billDate"
+                    v-model="addShipDet.documentDate"
                   />
                 </a-form-model-item>
               </a-col>
@@ -38,30 +40,32 @@
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="预发货日期" required prop="scheduledShipDate">
+                <a-form-model-item label="预发货日期" prop="preDeliveryDate">
                   <a-date-picker
                     placeholder="请选择预发货时间"
                     :format="dateFormat"
                     style="width:100%;"
-                    v-model="addShipDet.scheduledShipDate"
+                    v-model="addShipDet.preDeliveryDate"
                   />
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="6" :sm="8">
-                <a-form-model-item label="预完工日期" required prop="scheduledDoneDate">
+                <a-form-model-item label="预完工日期" prop="preCompletionDate">
+                  <!-- :format="dateFormat" -->
                   <a-date-picker
                     placeholder="请选择预完工时间"
                     :format="dateFormat"
                     style="width:100%;"
-                    v-model="addShipDet.scheduledDoneDate"
+                    v-model="addShipDet.preCompletionDate"
                   />
                 </a-form-model-item>
               </a-col>
 
               <a-col :md="18" :sm="18">
-                <a-form-model-item label="备注" prop="note">
-                  <a-input placeholder="请输入备注" v-model="addShipDet.note"></a-input>
+                <!-- 'U8 备注' -->
+                <a-form-model-item label="备注" prop="memo">
+                  <a-input placeholder="请输入备注" v-model="addShipDet.memo"></a-input>
                 </a-form-model-item>
               </a-col>
             </a-row>
@@ -71,16 +75,17 @@
       <!--  参照订单数据 増行-->
       <a-card :bordered="true" style="margin:10px 0">
         <div class="table-operator">
-          <a-button type="primary" @click="referOrderDataOpen" icon="ordered-list">参照订单数据</a-button>
-          <a-button type="primary" @click="handleAddColumn" icon="plus" style="margin-left: 20px">増行</a-button>
+          <a-button type="primary" @click.stop="referOrderDataOpen" icon="ordered-list">参照订单数据</a-button>
+          <a-button type="primary" @click.stop="handleAddColumn" icon="plus" style="margin-left: 20px">増行</a-button>
         </div>
 
-        <!-- 子表  :model="form" :pagination="ipagination" -->
+        <!-- 子表  :model="form" :pagination="ipagination"    rowKey="id" -->
         <a-spin :spinning="confirmLoading">
-          <a-form-model ref="formRef" :rules="validatorRules">
+          <a-form-model ref="formRef">
             <a-table
+              v-if="data"
               bordered
-              :row-key="record => record.id"
+              :rowKey="record => record.id"
               :columns="columns"
               :data-source="data"
               :loading="loading"
@@ -90,7 +95,7 @@
             >
               <!-- 款号 输入框 -->
               <template slot="styleNum" slot-scope="text, record, index">
-                <a-form-model-item prop="styleNum" :rules="rules.styleNum" required>
+                <a-form-model-item prop="styleNum" :rules="rules.styleNum">
                   <a-input style="width:100%" type="text" v-model="record.styleNum" />
                 </a-form-model-item>
               </template>
@@ -103,11 +108,12 @@
               </template>
 
               <!-- 是否TC功能 -->
+              <!-- isTc ' 是否 tc 功能 0 否 1 是', -->
               <template slot="isTC" slot-scope="text, record, index">
                 <a-form-model-item prop="isEnable" :rules="rules.isTC">
                   <a-select v-model="record.isTC">
                     <a-select-option :value="1">是</a-select-option>
-                    <a-select-option :value="2">否</a-select-option>
+                    <a-select-option :value="0">否</a-select-option>
                   </a-select>
                 </a-form-model-item>
               </template>
@@ -155,7 +161,11 @@
     </a-drawer>
 
     <!-- 参照订单数据弹框 -->
-    <referOrderData-modal ref="referOrderDataModal" :father="aa" @ok="referOrderDataOk"></referOrderData-modal>
+    <referOrderData-modal
+      ref="referOrderDataModal"
+      :sonGetList="getOrderList"
+      @ok="referOrderDataOk"
+    ></referOrderData-modal>
   </div>
 </template>
 
@@ -163,8 +173,12 @@
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
+// import 'moment/locale/zh-cn'
+
 import ReferOrderDataModal from '@views/shipment-details/referOrderDataModal.vue'
 
+import { addShipmentList, queryOrderData } from '@api/document/shipmentList'
+
 export default {
   name: 'AddShipDetDrawer', // 新增 发运明细 抽屉
   mixins: [JeecgListMixin],
@@ -184,7 +198,7 @@ export default {
         },
         {
           title: '订单号',
-          dataIndex: 'orderNum',
+          dataIndex: 'documentNo',
           width: 120,
           fixed: 'left',
           className: 'replacecolor'
@@ -211,6 +225,10 @@ export default {
           dataIndex: 'orderDate',
           width: 120,
           className: 'replacecolor'
+          // sorter: true,
+          // customRender: text => {
+          //   return moment(text).format('YYYY-MM-DD')
+          // }
         },
         {
           title: '业务类型',
@@ -399,56 +417,108 @@ export default {
         }
       ],
       // 子表数据
-      data: [
-        {
-          orderNum: 'AA002200001',
-          smallPo: '008',
-          // shipQuantity: '',
-          // isTC: '',
-          paymentClause: '定金达到50%定金达到50%定金达到50%定金达到50%定金达到50%定金达到50%'
-        },
-        {}
-      ],
-
+      data: [{}],
       addShipDet: {}, // 新增发运明细
       visible: false,
       confirmLoading: false,
       dateFormat: 'YYYY-MM-DD',
-      //       dateFormat:{
+
+      // 查询条件
+      queryParam: {
+        pageNo: '', // 初始页
+        orderNumber: '', // 订单号
+        acSetNo: '',
+        pageSize: '-1' // 每页显示条数
+      },
+      // 分页
+      pagination: {
+        total: 0,
+        current: 0,
+        pageSize: 0
+      }
+      // dateFormat:{
       //   type: String,
       //   default: 'YYYY-MM-DD',
       //   required: false
       // },
-      validatorRules: {
-        orderNum: [{ required: true, message: '订单号不能为空', trigger: 'blur' }], // 单据号
-        billDate: [{ required: true, message: '单据日期不能为空', trigger: 'blur' }],
-        customer: [{ required: true, message: '客户不能为空', trigger: 'blur' }], // 客户
-        scheduledShipDate: [{ required: true, message: '预发货日期不能为空', trigger: 'blur' }],
-        scheduledDoneDate: [{ required: true, message: '预完工日期不能为空', trigger: 'blur' }],
-        note: [{ required: false, trigger: 'blur' }],
-        styleNum: [{ required: true, message: '款号不能为空', trigger: 'blur' }],
-        shipQuantity: [{ required: true, message: '发货数量不能为空', trigger: 'blur' }],
-        isTC: [{ required: true, message: '请选择是否TC功能', trigger: 'blur' }],
-        materialComposition: [{ required: true, message: '物料成分不能为空', trigger: 'blur' }]
-      }
+      // validatorRules: {
+      //   documentNo: [{ required: true, message: '单据号不能为空', trigger: 'blur' }], // 单据号
+      //   documentDate: [{ required: true, message: '单据日期不能为空', trigger: 'blur' }],
+      //   customer: [{ required: true, message: '客户不能为空', trigger: 'blur' }], // 客户
+      //   preDeliveryDate: [{ required: true, message: '预发货日期不能为空', trigger: 'blur' }],
+      //   preCompletionDate: [{ required: true, message: '预完工日期不能为空', trigger: 'blur' }],
+      //   memo: [{ required: false, trigger: 'blur' }]
+      // styleNum: [{ required: true, message: '款号不能为空', trigger: 'blur' }],
+      // shipQuantity: [{ required: true, message: '发货数量不能为空', trigger: 'blur' }],
+      // isTC: [{ required: true, message: '请选择是否TC功能', trigger: 'blur' }],
+      // materialComposition: [{ required: true, message: '物料成分不能为空', trigger: 'blur' }]
+      // }
     }
   },
-  created() {
-    // this.getShipmentList() // 发运明细列表
+  // 接收父组件查询方法
+  props: {
+    fatherList: {
+      type: Function,
+      default: null
+    }
   },
+  created() {},
 
   methods: {
     // 参照订单数据
     referOrderDataOpen() {
-      console.log('打开参照订单数据')
+      // console.log('打开参照订单数据,具体信息在弹框中处理')
       this.$refs.referOrderDataModal.referOrderDataModVis = true
+      console.log('加载订单数据')
+      this.getOrderList()
     },
+    // 查询参照订单数据
+    getOrderList() {
+      console.log('000')
+      this.$nextTick(() => {
+        // this.queryParam
+        queryOrderData(this.queryParam).then(res => {
+          console.log('1111')
+          console.log('订单数据列表res', res)
+          if (res.success) {
+            this.shipmentListData = res.result.records
+            console.log('发运明细列表', this.shipmentListData)
+            this.pagination = {
+              // 分页信息赋值
+              total: res.result.total,
+              current: res.result.current,
+              pageSize: res.result.size
+            }
+            // console.log(this.pagination.total, this.pagination.pageSize, this.pagination.current)
+          }
+        })
+      })
+    },
+    // 抽屉 提交
+    submitAdd() {
+      console.log('新增抽屉,提交按钮')
+      var syShippingDetails = {} // 新增一条发运明细
+      syShippingDetails.documentNo = this.addShipDet.documentNo // 单据号
+      syShippingDetails.documentDate = this.addShipDet.documentDate.format('YYYY-MM-DD HH:mm:ss') // 单据日期
+      syShippingDetails.customer = this.addShipDet.customer
+      syShippingDetails.preDeliveryDate = this.addShipDet.preDeliveryDate.format('YYYY-MM-DD HH:mm:ss') // 预发货日期
+      syShippingDetails.preCompletionDate = this.addShipDet.preCompletionDate.format('YYYY-MM-DD HH:mm:ss') // 预完工日期
+      syShippingDetails.memo = this.addShipDet.memo // U8系统适用
+      addShipmentList(syShippingDetails).then(res => {
+        if (res.success) {
+          this.$message.success('新增成功')
+          this.close()
+          this.fatherList() // 调用父组件 查询方法
+        }
+      })
+    },
+
     // 増行
     handleAddColumn() {
       console.log('増行')
       const addrow = {
         accountSet: '',
-        orderNum: '',
+        documentNo: '',
         styleNum: '',
         orderDate: '',
         businessType: '',
@@ -492,22 +562,10 @@ export default {
     // --------------------------------------
     // 抽屉 取消
     handleCancel() {
-      console.log('点击抽屉取消')
-      this.close()
-    },
-    // 抽屉 提交
-    submitAdd() {
-      console.log('保存新增、刷新发运明细列表')
-      const that = this
-      // 触发表单验证
-      this.$refs.form.validate(valid => {
-        if (valid) {
-          that.confirmLoading = true
-        }
-      })
+      // console.log('点击抽屉取消')
       this.close()
-      // this.getShipmentList() // 刷新发运明细列表
     },
+
     // --------------------------------------
     close() {
       this.$emit('close')

+ 8 - 0
src/views/shipment-details/editShipDetDrawer.vue

@@ -429,6 +429,13 @@ export default {
       }
     }
   },
+  // 接收父组件查询方法
+  props: {
+    fatherList: {
+      type: Function,
+      default: null
+    }
+  },
   created() {
     // this.getShipmentList() // 刷新发运明细列表
   },
@@ -505,6 +512,7 @@ export default {
           that.confirmLoading = true
         }
       })
+      this.sonGetList() // 调用父组件的查询方法
       this.close()
       // this.getShipmentList() // 刷新 发运明细列表
     },

+ 43 - 12
src/views/shipment-details/referOrderDataModal.vue

@@ -16,13 +16,13 @@
           <a-row :gutter="24">
             <a-col :md="6" :sm="8">
               <a-form-item label="订单号">
-                <a-input placeholder="请输入订单号" v-model="queryParam.orderNum"></a-input>
+                <a-input placeholder="请输入订单号" v-model="queryParam.orderNumber"></a-input>
               </a-form-item>
             </a-col>
 
             <a-col :md="6" :sm="8">
               <a-form-item label="账套">
-                <a-select placeholder="请选择账套" v-model="queryParam.accountSet">
+                <a-select placeholder="请选择账套" v-model="queryParam.acSetNo">
                   <a-select-option value="">请选择</a-select-option>
                   <a-select-option :value="0">香港森语(101)</a-select-option>
                   <a-select-option :value="1">宁波森语(102)</a-select-option>
@@ -45,16 +45,16 @@
         </a-form>
       </div>
 
-      <!-- 勾选表    size="small"-->
+      <!-- 勾选表         :row-key="record => record.id"-->
       <div>
         <a-table
           bordered
           rowKey="id"
+          v-if="referOerderData"
           :columns="referOerderColumns"
           :data-source="referOerderData"
           :loading="loading"
           :pagination="ipagination"
-          :row-key="record => record.id"
           :rowSelection="{ selectedRowKeys: selectedRowKeys, onChange: onSelectChange }"
           @change="handleTableChange"
           :scroll="{ x: 1500, y: 300 }"
@@ -69,6 +69,7 @@
 import { JeecgListMixin } from '@/mixins/JeecgListMixin'
 import JEllipsis from '@/components/jeecg/JEllipsis'
 import moment from 'moment'
+import { queryOrderData } from '@api/document/shipmentList'
 
 export default {
   name: 'ReferOrderDataModal', // 参照订单数据弹框
@@ -85,7 +86,7 @@ export default {
       referOerderColumns: [
         {
           title: '订单号',
-          dataIndex: 'orderNum',
+          dataIndex: 'orderNumber',
           width: 120,
           fixed: 'left',
           className: 'replacecolor'
@@ -106,7 +107,7 @@ export default {
         },
         {
           title: '账套',
-          dataIndex: 'accountSet',
+          dataIndex: 'acSetNo',
           width: 120,
           className: 'replacecolor'
         },
@@ -294,15 +295,24 @@ export default {
           className: 'replacecolor'
         }
       ],
-      referOerderData: [{ orderNum: '26449845' }, {}, {}],
+      referOerderData: [],
       // orderDataform: this.$form.createForm(this),
       confirmLoading: false,
       referOrderDataModVis: false,
 
       // 查询条件
       queryParam: {
-        orderNum: '', // 订单号
-        accountSet: '' // 账套
+        orderNumber: '', // 订单号
+        acSetNo: '',
+        pageNo: '', // 初始页
+        pageSize: '-1' // 每页显示条数
+        // 账套
+      },
+      // 分页
+      pagination: {
+        total: 0,
+        current: 0,
+        pageSize: 0
       }
     }
   },
@@ -315,12 +325,33 @@ export default {
   },
   created() {},
   methods: {
+    getOrderList() {
+      // this.$nextTick(() => {
+      queryOrderData(this.queryParam).then(res => {
+        console.log('参照订单数据res', res)
+        if (res.success) {
+          this.referOerderData = res.result.records
+          console.log('参照订单数据', this.referOerderData)
+          this.pagination = {
+            // 分页信息赋值
+            total: res.result.total,
+            current: res.result.current,
+            pageSize: res.result.size
+          }
+        }
+      })
+      // })
+    },
     // 弹框查询按钮
-    searchQuery() {},
+    searchQuery() {
+      this.getOrderList()
+    },
+
     // 重置
     searchReset() {
-      this.queryParam = {}
-      // this.getShipmentList()
+      this.queryParam.orderNumber = ''
+      this.queryParam.acSetNo = ''
+      this.getOrderList()
     },
     // 弹框确定
     onSubmit() {

+ 101 - 64
src/views/shipment-details/shipmentList.vue

@@ -8,7 +8,7 @@
           <a-row :gutter="24">
             <a-col :md="6" :sm="8">
               <a-form-item label="单据号">
-                <a-input placeholder="请输入单据号" v-model="queryParam.documentNum"></a-input>
+                <a-input placeholder="请输入单据号" v-model="queryParam.documentNo"></a-input>
               </a-form-item>
             </a-col>
 
@@ -25,7 +25,7 @@
 
             <a-col :md="6" :sm="8">
               <a-form-item label="结束时间" style="width:100%;">
-                <a-month-picker
+                <a-date-picker
                   placeholder="请选择结束时间"
                   :format="dateFormat"
                   style="width: 100%"
@@ -54,7 +54,7 @@
 
               <a-col :md="6" :sm="8">
                 <a-form-item label="款号">
-                  <a-input placeholder="请输入款号" v-model="queryParam.styleNum"></a-input>
+                  <a-input placeholder="请输入款号" v-model="queryParam.itemNumber"></a-input>
                 </a-form-item>
               </a-col>
 
@@ -87,13 +87,14 @@
     <!-- 操作按钮区域 -->
     <a-card :bordered="false" style=" marginTop:10px;">
       <div class="table-operator">
-        <a-button type="primary" @click="addShipDet" icon="plus">新增</a-button>
+        <a-button type="primary" @click.stop="addShipDet" icon="plus">新增</a-button>
       </div>
 
-      <!-- 子表 -->
+      <!-- 子表  :row-key="record => record.id"-->
       <a-table
+        v-if="shipmentListData"
         bordered
-        :row-key="record => record.id"
+        rowKey="id"
         :columns="shipmentListColumns"
         :data-source="shipmentListData"
         :loading="loading"
@@ -145,10 +146,16 @@
       </a-table>
     </a-card>
 
-    <!-- 新增 详情 修改 抽屉 -->
-    <addShipDet-drawer ref="addShipDetDrawer" :father="aa" @ok="modalFormOk"></addShipDet-drawer>
-    <detailsShipDet-drawer ref="detailsShipDetDrawer" :father="bb" @ok="modalFormOk"></detailsShipDet-drawer>
-    <editShipDet-drawer ref="editShipDetDrawer" :father="cc" @ok="modalFormOk"></editShipDet-drawer>
+    <!-- 抽屉 -->
+    <div>
+      <addShipDet-drawer ref="addShipDetDrawer" :fatherList="getShipmentList" @ok="modalFormOk"></addShipDet-drawer>
+      <detailsShipDet-drawer
+        ref="detailsShipDetDrawer"
+        :fatherList="getShipmentList"
+        @ok="modalFormOk"
+      ></detailsShipDet-drawer>
+      <editShipDet-drawer ref="editShipDetDrawer" :fatherList="getShipmentList" @ok="modalFormOk"></editShipDet-drawer>
+    </div>
   </div>
 </template>
 
@@ -160,6 +167,9 @@ import moment from 'moment'
 import addShipDetDrawer from '@views/shipment-details/addShipDetDrawer.vue'
 import detailsShipDetDrawer from '@views/shipment-details/detailsShipDetDrawer.vue'
 import editShipDetDrawer from '@views/shipment-details/editShipDetDrawer.vue'
+
+import { shipmentList } from '@api/document/shipmentList'
+
 export default {
   name: 'ShipmentList', // 发运明细列表
   mixins: [JeecgListMixin],
@@ -174,31 +184,27 @@ export default {
       shipmentListColumns: [
         {
           title: '单据号',
-          dataIndex: 'documentNum',
+          dataIndex: 'documentNo',
           fixed: 'left',
           width: 120,
           className: 'replacecolor'
         },
         {
           title: '订单号',
-          dataIndex: 'orderNum',
+          dataIndex: 'orderNumber',
           fixed: 'left',
           width: 120,
           className: 'replacecolor'
         },
-        //         {
-        //   title: '创建时间',
-        //   dataIndex: 'createTime',
-        //   align: 'center',
-        //   sorter: true,
-        //   customRender: text => {
-        //     return moment(text).format('YYYY-MM-DD')
-        //   }
-        // },
+
         {
           title: '单据日期',
-          dataIndex: 'billDate',
+          dataIndex: 'documentDate',
           width: 140,
+          // sorter: true,
+          // customRender: text => {
+          //   return moment(text).format('YYYY-MM-DD')
+          // },
           className: 'replacecolor'
         },
         {
@@ -216,7 +222,7 @@ export default {
 
         {
           title: '款号',
-          dataIndex: 'styleNum',
+          dataIndex: 'itemNumber',
           width: 120,
           className: 'replacecolor'
         },
@@ -228,19 +234,19 @@ export default {
         },
         {
           title: 'hscode',
-          dataIndex: 'hscode',
+          dataIndex: 'HScode',
           width: 120,
           className: 'replacecolor'
         },
         {
           title: '英文品名',
-          dataIndex: 'englishProName',
+          dataIndex: 'englishName',
           width: 120,
           className: 'replacecolor'
         },
         {
           title: '账套',
-          dataIndex: 'accountSet',
+          dataIndex: 'acSetNo',
           width: 120,
           className: 'replacecolor'
         },
@@ -253,7 +259,7 @@ export default {
         },
         {
           title: '业务类型',
-          dataIndex: 'businessType',
+          dataIndex: 'businessTypeValue',
           width: 120,
           className: 'replacecolor'
         },
@@ -303,13 +309,13 @@ export default {
         },
         {
           title: '销售类型',
-          dataIndex: 'saleType',
+          dataIndex: 'salesTypeValue',
           width: 120,
           className: 'replacecolor'
         },
         {
           title: '客户简称',
-          dataIndex: 'customerShortName',
+          dataIndex: 'customerAbbreviation',
           width: 120,
           className: 'replacecolor'
         },
@@ -328,7 +334,7 @@ export default {
         },
         {
           title: '整单合计',
-          dataIndex: 'wholeSingleCombined',
+          dataIndex: 'wholeOrderTota',
           width: 120,
           className: 'replacecolor'
         },
@@ -347,13 +353,13 @@ export default {
 
         {
           title: '币种',
-          dataIndex: 'currency',
+          dataIndex: 'currencyValue',
           width: 120,
           className: 'replacecolor'
         },
         {
           title: '品牌方',
-          dataIndex: 'brand',
+          dataIndex: 'brandSide',
           width: 120,
           className: 'replacecolor'
         },
@@ -366,7 +372,7 @@ export default {
 
         {
           title: '定金比例(%)',
-          dataIndex: 'depositRate',
+          dataIndex: 'depositRatio',
           width: 120,
           className: 'replacecolor'
         },
@@ -384,35 +390,35 @@ export default {
         },
         {
           title: '付款条件',
-          dataIndex: 'paymentClause',
+          dataIndex: 'termOfPayment',
           width: 120,
           customRender: t => ellipsis(t),
           className: 'replacecolor'
         },
         {
           title: '最终客户',
-          dataIndex: 'finalCustomer',
+          dataIndex: 'endCustomer',
           width: 120,
           className: 'replacecolor'
         },
 
         {
           title: '订单备注',
-          dataIndex: 'orderNote',
+          dataIndex: 'orderRemarks',
           width: 160,
           customRender: t => ellipsis(t),
           className: 'replacecolor'
         },
         {
           title: '价格备注',
-          dataIndex: 'priceNote',
+          dataIndex: 'priceRemarks',
           width: 160,
           customRender: t => ellipsis(t),
           className: 'replacecolor'
         },
         {
           title: '订单变更说明',
-          dataIndex: 'orderChangeDesc',
+          dataIndex: 'orderChangeDescription',
           width: 160,
           customRender: t => ellipsis(t),
           className: 'replacecolor'
@@ -420,13 +426,13 @@ export default {
 
         {
           title: '预发货日期',
-          dataIndex: 'scheduledShipDate',
+          dataIndex: 'preDeliveryDate',
           width: 140,
           className: 'replacecolor'
         },
         {
           title: '预完工日期',
-          dataIndex: 'scheduledDoneDate',
+          dataIndex: 'preCompletionDate',
           width: 140,
           className: 'replacecolor'
         },
@@ -455,41 +461,84 @@ export default {
           className: 'replacecolor'
         }
       ],
-      shipmentListData: [{}, {}, {}, {}],
+      shipmentListData: [], // 发运明细数据
 
       // 查询条件
       queryParam: {
-        pageNo: '', // 页
-        documentNum: '', // 单据号
+        pageNo: '', // 初始
+        documentNo: '', // 单据号
         startTime: '',
         endTime: '',
         deliveryDate: '',
         salesman: '',
-        styleNum: '',
-        refer: ''
+        itemNumber: '',
+        refer: '',
+        pageSize: '-1' // 每页显示条数
+      },
+      // 分页
+      pagination: {
+        total: 0,
+        current: 0,
+        pageSize: 0
       },
       dateFormat: 'YYYY-MM-DD'
     }
   },
   created() {
-    // this.getShipmentList() // 发运明细列表
+    this.getShipmentList() // 渲染 发运明细列表
   },
   methods: {
+    // 分页查询 发运明细
+    getShipmentList() {
+      this.$nextTick(() => {
+        shipmentList(this.queryParam).then(res => {
+          if (res.success) {
+            this.shipmentListData = res.result.records
+            console.log('发运明细列表', this.shipmentListData)
+            this.pagination = {
+              // 分页信息赋值
+              total: res.result.total,
+              current: res.result.current,
+              pageSize: res.result.size
+            }
+            // console.log(this.pagination.total, this.pagination.pageSize, this.pagination.current)
+          }
+        })
+      })
+    },
+    // 分页、排序、筛选变化时触发
+    // handleTableChange(pagination, filters, sorter) {
+    //   console.log('当前页信息>>>>', pagination)
+    //   // this.queryParam.pageNo = pagination.current
+    //   if (Object.keys(sorter).length > 0) {
+    //     this.isorter.column = sorter.field
+    //     this.isorter.order = sorter.order == 'ascend' ? 'asc' : 'desc'
+    //   }
+    //   console.log('sorter:', sorter)
+    //   this.ipagination = pagination
+    //   this.getShipmentList()
+    // },
     // 查询按钮
     searchQuery() {
-      // this.getAnnList() // 渲染公告
+      this.getShipmentList() // 渲染 发运明细列表
     },
     // 重置
     searchReset() {
-      console.log('>>>>重置')
-      this.queryParam = {}
-      // this.getAnnList()
+      // console.log('>>>>重置')
+      this.queryParam.documentNo = ''
+      this.queryParam.startTime = ''
+      this.queryParam.endTime = ''
+      this.queryParam.deliveryDate = ''
+      this.queryParam.salesman = ''
+      this.queryParam.styleNum = ''
+      this.queryParam.refer = ''
+      this.getShipmentList() // 渲染 发运明细列表
     },
     // --------------------------------------
 
     // 新增 按钮
     addShipDet() {
-      console.log('新增发运明细')
+      console.log('新增,负责打开抽屉,其余在子组件的提交按钮')
       this.$refs.addShipDetDrawer.visible = true
     },
 
@@ -513,19 +562,7 @@ export default {
     // 操作 删除
     handleDelete(id) {
       console.log('id:', id)
-    },
-
-    // 分页、排序、筛选变化时触发
-    // handleTableChange(pagination, filters, sorter) {
-    //   // console.log('当前页信息>>>>',pagination)
-    //   this.queryParam.pageNo = pagination.current
-    //   // this.getAnnList()
-    // }
-
-    // father方法
-    aa() {},
-    bb() {},
-    cc() {}
+    }
   },
   computed: {},
   mounted() {}

+ 14 - 14
vue.config.js

@@ -1,5 +1,5 @@
 const path = require('path')
-const CompressionPlugin = require("compression-webpack-plugin")
+const CompressionPlugin = require('compression-webpack-plugin')
 
 function resolve(dir) {
   return path.join(__dirname, dir)
@@ -14,8 +14,8 @@ module.exports = {
    */
   // 如果你不需要生产环境的 source map,可以将其设置为 false 以加速生产环境构建。
   productionSourceMap: false,
-  //qiankuan打包时放开
-  //outputDir: "../dist/main",
+  // qiankuan打包时放开
+  // outputDir: "../dist/main",
   // 多入口配置
   // pages: {
   //   index: {
@@ -24,10 +24,10 @@ module.exports = {
   //     filename: 'index.html',
   //   }
   // },
-  //打包app时放开该配置
-  //publicPath:'/',
+  // 打包app时放开该配置
+  // publicPath:'/',
   configureWebpack: config => {
-    //生产环境取消 console.log
+    // 生产环境取消 console.log
     if (process.env.NODE_ENV === 'production') {
       config.optimization.minimizer[0].options.terserOptions.compress.drop_console = true
     }
@@ -40,7 +40,7 @@ module.exports = {
       .set('@comp', resolve('src/components'))
       .set('@views', resolve('src/views'))
 
-    //生产环境,开启js\css压缩
+    // 生产环境,开启js\css压缩
     if (process.env.NODE_ENV === 'production') {
         config.plugin('compressionPlugin').use(new CompressionPlugin({
           test: /\.(js|css|less)$/, // 匹配文件名
@@ -68,7 +68,6 @@ module.exports = {
       .use()
       .loader('babel-loader')
       .end()
-
   },
 
   css: {
@@ -78,9 +77,9 @@ module.exports = {
           /* less 变量覆盖,用于自定义 ant design 主题 */
           'primary-color': '#1890FF',
           'link-color': '#1890FF',
-          'border-radius-base': '4px',
+          'border-radius-base': '4px'
         },
-        javascriptEnabled: true,
+        javascriptEnabled: true
       }
     }
   },
@@ -104,16 +103,17 @@ module.exports = {
         pathRewrite: {
           '/jeecg-boot': ''  //默认所有请求都加了jeecg-boot前缀,需要去掉
         }
-      },*/
+      }, */
       /* 注意:jeecgboot前端做了改造,此处不需要配置跨域和后台接口(只需要改.env相关配置文件即可)
-          issues/3462 很多人此处做了配置,导致刷新前端404问题,请一定注意*/
+          issues/3462 很多人此处做了配置,导致刷新前端404问题,请一定注意 */
       '/jeecg-boot': {
         target: 'http://localhost:8080',
+        // target: 'http://106.15.206.14:8087', // 测试环境 2022-03-28 LY
         ws: false,
         changeOrigin: true
-      },
+      }
     }
   },
 
   lintOnSave: undefined
-}
+}