YangZhiJie 2 лет назад
Родитель
Сommit
ccc2f04758
4 измененных файлов с 171 добавлено и 94 удалено
  1. 1 1
      package.json
  2. 1 0
      public/index.html
  3. 5 3
      src/components/AssetBasicSetting.vue
  4. 164 90
      src/components/customer/AssetLabelPrint.vue

+ 1 - 1
package.json

@@ -1,7 +1,7 @@
 {
 {
   "name": "client-eam-v3",
   "name": "client-eam-v3",
   "description": "Leanwo Prodog Client",
   "description": "Leanwo Prodog Client",
-  "version": "3.0.54",
+  "version": "3.0.57",
   "author": "yangzhijie1488 <yangzhijie1488@163.com>",
   "author": "yangzhijie1488 <yangzhijie1488@163.com>",
   "scripts": {
   "scripts": {
     "dev": "cross-env webpack serve --config ./webpack.dev.js",
     "dev": "cross-env webpack serve --config ./webpack.dev.js",

+ 1 - 0
public/index.html

@@ -27,6 +27,7 @@
 	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/vue-i18n/dist/vue-i18n.global.js"></script>
 	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/vue-i18n/dist/vue-i18n.global.js"></script>
 	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/vuex/dist/vuex.global.js"></script>
 	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/vuex/dist/vuex.global.js"></script>
 	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/vue-router/dist/vue-router.global.js"></script>
 	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/vue-router/dist/vue-router.global.js"></script>
+	<script nonce="*NONCE_TOKEN*" type="text/javascript" src="/static/colResizable/colResizable-1.6.js"></script>
 	
 	
 
 
 
 

+ 5 - 3
src/components/AssetBasicSetting.vue

@@ -833,10 +833,11 @@ export default {
         successData => {
         successData => {
           if(successData.errorCode != 0) {
           if(successData.errorCode != 0) {
             Notify.error('提示','重新更新缩略图失败。', false);
             Notify.error('提示','重新更新缩略图失败。', false);
-            return;
+            _self.loading=false;
+          } else {
+            Notify.success('提示', '重新生成缩略图成功。', false);
+            _self.loading=false;
           }
           }
-          Notify.success('提示', '重新生成缩略图成功。', false);
-          _self.loading=false;
         },
         },
         errorData => {
         errorData => {
           Common.processException(errorData);
           Common.processException(errorData);
@@ -858,6 +859,7 @@ export default {
             _self.loading=false;
             _self.loading=false;
           } else {
           } else {
             Notify.error('提示',successData.errorMessage, false);
             Notify.error('提示',successData.errorMessage, false);
+            _self.loading=false;
           }
           }
         },
         },
         errorData => {
         errorData => {

+ 164 - 90
src/components/customer/AssetLabelPrint.vue

@@ -1,27 +1,29 @@
 <template>
 <template>
-  <div>
+  <div style="width: 98% !important;">
     <Navbar
     <Navbar
       :title="$t('lang.AssetLabelPrint.assetLabelPrint')"
       :title="$t('lang.AssetLabelPrint.assetLabelPrint')"
       :is-go-back="false"
       :is-go-back="false"
     />
     />
-    <div>
-      <div class="form-inline" style="margin-top: 0px !important">
-        <ul class="ulStyle">
-          <li class="listStyle">
-            <label class="labelStyle">所属部门</label>
-            <div class="form-inline-div">
-              <SearchWidget
-                style="width: 200px"
-                :info-window-no="organizationWindowNo"
-                :field="organizationField"
-                :field-value="organizationFieldValue"
-                :display-name="organizationField.listDisplayFieldName"
-                :where-clause-source="organizationWCS"
-                @value-changed="organizationValueChanged"
-              />
+    <div class="all">
+      <div class="globalMain">
+        <ul class="siteList">
+          <li class="last">
+            <div class="site">
+              <label class="labelStyle">所属部门</label>
+              <div class="form-inline-div">
+                <SearchWidget
+                  style="width: 200px"
+                  :info-window-no="organizationWindowNo"
+                  :field="organizationField"
+                  :field-value="organizationFieldValue"
+                  :display-name="organizationField.listDisplayFieldName"
+                  :where-clause-source="organizationWCS"
+                  @value-changed="organizationValueChanged"
+                />
+              </div>
             </div>
             </div>
           </li>
           </li>
-          <li class="listStyle">
+          <li class="site">
             <label class="labelStyle">责任人</label>
             <label class="labelStyle">责任人</label>
             <div class="form-inline-div">
             <div class="form-inline-div">
               <SearchWidget
               <SearchWidget
@@ -35,7 +37,7 @@
               />
               />
             </div>
             </div>
           </li>
           </li>
-          <li class="listStyle">
+          <li class="site">
             <label class="labelStyle">保管人</label>
             <label class="labelStyle">保管人</label>
             <div class="form-inline-div">
             <div class="form-inline-div">
               <SearchWidget
               <SearchWidget
@@ -49,7 +51,7 @@
               />
               />
             </div>
             </div>
           </li>
           </li>
-          <li class="listStyle">
+          <li class="site">
             <label class="labelStyle">申购人</label>
             <label class="labelStyle">申购人</label>
             <div class="form-inline-div">
             <div class="form-inline-div">
               <SearchWidget
               <SearchWidget
@@ -63,37 +65,51 @@
               />
               />
             </div>
             </div>
           </li>
           </li>
-          <li class="listStyle">
+          <li class="site">
             <label class="labelStyle">资产名称</label>
             <label class="labelStyle">资产名称</label>
             <div class="form-inline-div">
             <div class="form-inline-div">
               <a-input
               <a-input
                 v-model:value="searchParams.assetInstanceName"
                 v-model:value="searchParams.assetInstanceName"
+                class="form-control"
                 style="width: 200px"
                 style="width: 200px"
+                @keyup.enter="reQuery"
               />
               />
             </div>
             </div>
           </li>
           </li>
-          <li class="listStyle">
+          <li class="site">
             <label class="labelStyle">资产编号</label>
             <label class="labelStyle">资产编号</label>
             <div class="form-inline-div">
             <div class="form-inline-div">
               <a-input
               <a-input
                 v-model:value="searchParams.assetNo"
                 v-model:value="searchParams.assetNo"
+                class="form-control"
                 style="width: 200px"
                 style="width: 200px"
+                @keyup.enter="reQuery"
               />
               />
             </div>
             </div>
           </li>
           </li>
-          <li class="listStyle">
+          <li class="site">
             <label class="labelStyle">规格型号</label>
             <label class="labelStyle">规格型号</label>
             <div class="form-inline-div">
             <div class="form-inline-div">
-              <a-input v-model:value="searchParams.type" style="width: 200px" />
+              <a-input
+                v-model:value="searchParams.type"
+                class="form-control"
+                style="width: 200px"
+                @keyup.enter="reQuery"
+              />
             </div>
             </div>
           </li>
           </li>
-          <li class="listStyle">
+          <li class="site">
             <label class="labelStyle">epc</label>
             <label class="labelStyle">epc</label>
             <div class="form-inline-div">
             <div class="form-inline-div">
-              <a-input v-model:value="searchParams.epc" style="width: 200px" />
+              <a-input
+                v-model:value="searchParams.epc"
+                class="form-control"
+                style="width: 200px"
+                @keyup.enter="reQuery"
+              />
             </div>
             </div>
           </li>
           </li>
-          <li class="listStyle">
+          <li class="site">
             <label class="labelStyle">{{
             <label class="labelStyle">{{
               $t("lang.AssetLabelPrint.printStatus")
               $t("lang.AssetLabelPrint.printStatus")
             }}</label>
             }}</label>
@@ -113,22 +129,30 @@
               </select>
               </select>
             </div>
             </div>
           </li>
           </li>
-        </ul>
-      </div>
 
 
-      <div style="display: flex">
-        <div style="margin-left: 18px">
-          <button class="btn btn-default m-btn" @click="reQuery()">
-            {{ $t("lang.AssetLabelPrint.query") }}
-          </button>
-          <button class="btn btn-default m-btn" @click="clearFilter()">
-            {{ $t("lang.AssetLabelPrint.clear") }}
-          </button>
-        </div>
+          <li
+            style="
+              margin-left: 36px;
+              display: flex;
+              justify-content: space-between;
+            "
+          >
+            <a-button style="width: 80px" @click="reQuery()">
+              {{ $t("lang.AssetLabelPrint.query") }}
+            </a-button>
+            <a-button
+              style="width: 80px; margin-left: 12px"
+              type="dashed"
+              @click="clearFilter()"
+            >
+              {{ $t("lang.AssetLabelPrint.clear") }}
+            </a-button>
+          </li>
+        </ul>
       </div>
       </div>
-      <div class="form-inline" style="margin-top: 0px !important">
-        <div class="form-group m-form-group">
-          <label for="assetNo" class="m-form-group-label" style="width: 100px;padding: 8px;">{{
+      <ul class="siteList">
+        <li class="site">
+          <label class="labelStyle">{{
             $t("lang.AssetLabelPrint.selectPrintTemplate")
             $t("lang.AssetLabelPrint.selectPrintTemplate")
           }}</label>
           }}</label>
           <div class="form-inline-div">
           <div class="form-inline-div">
@@ -147,9 +171,9 @@
               </option>
               </option>
             </select>
             </select>
           </div>
           </div>
-        </div>
-        <div class="form-group m-form-group">
-          <label for="selectPrinter" class="m-form-group-label" style="width: 100px;padding: 8px;">{{
+        </li>
+        <li class="site">
+          <label for="selectPrinter" class="labelStyle">{{
             $t("lang.AssetLabelPrint.selectPrinter")
             $t("lang.AssetLabelPrint.selectPrinter")
           }}</label>
           }}</label>
           <div class="form-inline-div">
           <div class="form-inline-div">
@@ -168,25 +192,35 @@
               </option>
               </option>
             </select>
             </select>
           </div>
           </div>
-        </div>
-        <div class="form-group m-form-group">
-          <button class="btn btn-default m-btn" @click="print()">
+        </li>
+        <li
+          style="
+            margin-left: 36px;
+            display: flex;
+            justify-content: space-between;
+          "
+        >
+          <a-button style="width: 80px" @click="print()">
             {{ $t("lang.AssetLabelPrint.print") }}
             {{ $t("lang.AssetLabelPrint.print") }}
-          </button>
-        </div>
-        <div class="form-group m-form-group">
+          </a-button>
           <PrintEpc
           <PrintEpc
             ref="printEpc"
             ref="printEpc"
             v-model:visible="printEpcVisible"
             v-model:visible="printEpcVisible"
             :printer-name="selectedPrinterCard"
             :printer-name="selectedPrinterCard"
             @ok="closePrintEpc"
             @ok="closePrintEpc"
           />
           />
-          <button class="btn btn-default m-btn" @click="cardEpc()">发卡</button>
-        </div>
-      </div>
+          <a-button
+            style="width: 80px; margin-left: 12px"
+            type="dashed"
+            @click="cardEpc()"
+          >
+            发卡
+          </a-button>
+        </li>
+      </ul>
     </div>
     </div>
 
 
-    <div class="grid-item-3">
+    <div class="grid-item-row2-column2">
       <table class="fixed-table table table-striped table-bordered">
       <table class="fixed-table table table-striped table-bordered">
         <thead>
         <thead>
           <tr>
           <tr>
@@ -204,7 +238,7 @@
             <td style="width: 150px">资产编号</td>
             <td style="width: 150px">资产编号</td>
             <td style="width: 150px">规格型号</td>
             <td style="width: 150px">规格型号</td>
             <td style="width: 150px">使用状态</td>
             <td style="width: 150px">使用状态</td>
-            <td style="width: 220px">epc</td>
+            <td style="width: 150px">epc</td>
             <td style="width: 100px">打印状态</td>
             <td style="width: 100px">打印状态</td>
           </tr>
           </tr>
         </thead>
         </thead>
@@ -267,7 +301,6 @@
 
 
 <script>
 <script>
 import { Common, PrintUtil, Notify, PrintEpc } from 'pc-component-v3';
 import { Common, PrintUtil, Notify, PrintEpc } from 'pc-component-v3';
-
 export default {
 export default {
   components: {
   components: {
     PrintEpc,
     PrintEpc,
@@ -366,32 +399,28 @@ export default {
   computed: {},
   computed: {},
 
 
   watch: {},
   watch: {},
-
-  /**
-   * 冻结表头
-   */
   fixedTableHeader: function () {
   fixedTableHeader: function () {
     let _self = this;
     let _self = this;
 
 
     _self.$nextTick(function () {
     _self.$nextTick(function () {
       $('.fixed-table').tableFixer({
       $('.fixed-table').tableFixer({
-        left: 0,
+        left: 3,
         head: true,
         head: true,
       });
       });
     });
     });
   },
   },
-
   mounted: function () {
   mounted: function () {
     const _self = this;
     const _self = this;
-    // $('.fixed-table').tableFixer({
-    //   'left': 0,
-    //   'head': true,
-    // });
-
-    // $('.fixed-table').colResizable({
-    //   resizeMode: 'overflow',
-    //   partialRefresh: true,
-    // });
+    $('.fixed-table').tableFixer({
+      left: 0,
+      head: true,
+    });
+
+    $('.fixed-table').colResizable({
+      resizeMode: 'overflow',
+      partialRefresh: true,
+    });
+    
     _self.pagination.current_page = 1;
     _self.pagination.current_page = 1;
     _self.getAssetInstancePrint();
     _self.getAssetInstancePrint();
     _self.loadTemplateData();
     _self.loadTemplateData();
@@ -778,6 +807,7 @@ export default {
             );
             );
           }
           }
           _self.loading = false;
           _self.loading = false;
+          _self.fixedTableHeader();
         },
         },
         error: function (XMLHttpRequest, textStatus, errorThrown) {
         error: function (XMLHttpRequest, textStatus, errorThrown) {
           Common.processException(XMLHttpRequest, textStatus, errorThrown);
           Common.processException(XMLHttpRequest, textStatus, errorThrown);
@@ -817,6 +847,14 @@ export default {
       this.pagination.current_page = 1;
       this.pagination.current_page = 1;
       this.getAssetInstancePrint();
       this.getAssetInstancePrint();
     },
     },
+    fixedTableHeader: function () {
+      let _self = this;
+      _self.$nextTick(function () {
+        $('.fixed-table').tableFixer({
+          head: true,
+        });
+      });
+    },
   },
   },
 };
 };
 </script>
 </script>
@@ -864,23 +902,21 @@ export default {
 
 
 <style scoped>
 <style scoped>
 .fixed-table {
 .fixed-table {
-  table-layout: fixed;
-  width: 800px !important;
-  min-width: 800px !important;
-  border-top: 1px solid #ddd;
+    table-layout: fixed;
+    width: 800px !important;
+    min-width: 800px !important;
+    text-align: center;
 }
 }
 
 
 table.fixed-table tr {
 table.fixed-table tr {
-  height: 40px;
-  font-size: small;
+    height: 40px;
 }
 }
 
 
 table.fixed-table th,
 table.fixed-table th,
 table.fixed-table td {
 table.fixed-table td {
-  overflow: hidden;
-  white-space: nowrap;
-  text-overflow: ellipsis;
-  border: 1px solid #ddd;
+    overflow: hidden;
+    white-space: nowrap;
+    text-overflow: ellipsis;
 }
 }
 </style>
 </style>
 
 
@@ -936,10 +972,11 @@ table.fixed-table td {
 
 
 .table-header-left {
 .table-header-left {
   float: left;
   float: left;
-  /* margin: 20px 0;*/
+  /* margin: 20px 0; */
 }
 }
 
 
 .table-header-right {
 .table-header-right {
+  margin-top: -2px;
   float: right;
   float: right;
 }
 }
 </style>
 </style>
@@ -980,22 +1017,59 @@ table.fixed-table td {
   width: 100%;
   width: 100%;
 }
 }
 .labelStyle {
 .labelStyle {
-  width: 100px;
-  text-align: center;
+  width: 120px;
+  text-align: right;
   padding: 8px;
   padding: 8px;
 }
 }
 
 
-.ulStyle {
-  width: 100%;
+.grid-item-row2-column2 {
+  grid-row-start: 2;
+  grid-row-end: 3;
+  grid-column-start: 2;
+  grid-column-end: 3;
+  overflow: auto;
+  margin-top: -20px;
+}
+.globalMain {
+  max-width: 100%;
+  margin-left: auto;
+  margin-right: auto;
+}
+.siteList {
   display: flex;
   display: flex;
-  flex-direction: row;
   flex-wrap: wrap;
   flex-wrap: wrap;
+  justify-content: space-between;
+}
+@media (min-width: 500px) {
+  .siteList {
+    margin-left: 0;
+    margin-right: -25px;
+    justify-content: flex-start;
+  }
+}
+.siteList > li {
+  margin-bottom: 10px;
+}
+@media (min-width: 500px) {
+  .siteList > li {
+    margin-right: 8px;
+  }
+}
+
+.siteList .site {
+  width: 300px;
+  display: flex;
+  justify-content: center;
+  align-items: center;
+  /* flex-direction: column; */
+  position: relative;
+}
+
+* {
   margin: 0;
   margin: 0;
   padding: 0;
   padding: 0;
-}
-.listStyle {
-  width: 32%;
-  margin-top: 8px;
   list-style: none;
   list-style: none;
+  box-sizing: border-box;
 }
 }
+
 </style>
 </style>