Browse Source

bug 修复

lilei 3 years ago
parent
commit
bff782791d

+ 10 - 7
src/components/MultiTab/MultiTab.vue

@@ -143,14 +143,8 @@ export default {
   },
   watch: {
     '$route': function (newVal, oldVal) {
-      // 父页面(列表)进入子页面(编辑、详情)再返回至父页面时关闭子页面页签   子页面点击“返回列表”
-      if (oldVal && oldVal.name && newVal.query.closeLastOldTab) {
-        if (oldVal.name.indexOf('List') == -1) { // 要关闭的页面不能是列表页
-          this.remove(oldVal.name) // 关闭子页面
-        }
-      }
-      this.activeKey = newVal.name
       const index = this.tabsList.indexOf(newVal.name)
+      if (newVal.name == oldVal.name) { return }
       // 解决页面地址相同参数不同时打开多个页签问题(例 详情页id或sn不同时)
       if (index < 0) { // 不存在
         this.tabsList.push(newVal.name)
@@ -160,8 +154,17 @@ export default {
         this.pages.splice(index, 1, newVal)
         this.$store.state.app.isNewTab = false
       }
+      // 父页面(列表)进入子页面(编辑、详情)再返回至父页面时关闭子页面页签   子页面点击“返回列表”
+      if (oldVal && oldVal.name && newVal.query.closeLastOldTab) {
+        if (oldVal.name.indexOf('List') == -1) { // 要关闭的页面不能是列表页
+          this.remove(oldVal.name) // 关闭子页面
+          this.$store.state.app.isNewTab = true
+        }
+      }
+      this.activeKey = newVal.name
     },
     activeKey: function (newPathKey) {
+      console.log(newPathKey, 'newVal')
       const row = this.pages.find(item => item.name == newPathKey)
       if (row.fullPath.indexOf('/list') == -1) {
         this.$router.push({ path: row.fullPath })

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

@@ -123,6 +123,7 @@ export default {
     this.localPagination = ['auto', true].includes(this.showPagination) && Object.assign({}, this.localPagination, {
       current: localPageNum,
       pageSize: this.pageSize,
+      pageSizeOptions:['5','10', '20', '30', '40'],
       showTotal: total => `共 ${total} 条记录`,
       showSizeChanger: this.showSizeChanger
     }) || false

+ 1 - 1
src/components/custom.less

@@ -157,7 +157,7 @@ body{
     margin: 0;
     tr:hover{
       td{
-        background: rgba(255, 170, 0, 0.4);
+        background: #ffb60a;
         color: #fff;
       }
     }

+ 1 - 1
src/components/global.less

@@ -718,7 +718,7 @@ body {
 }
  
 .ant-btn-link.button-warning {
-  color: #c67c03;
+  color: #aa6a02;
   &:hover, &:focus {
     color: #c68d07;
   }

+ 1 - 1
src/views/productManagement/productInfoJg/list.vue

@@ -191,7 +191,7 @@ export default {
     getColumns () {
       this.columns = [
         { title: '序号', dataIndex: 'no', width: 70, align: 'center' },
-        { title: '产品编码', dataIndex: 'code', align: 'center', width: 120, customRender: function (text) { return text || '--' } },
+        { title: '产品编码', dataIndex: 'code', align: 'center', width: 250, customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'name', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '原厂编码', dataIndex: 'origCode', align: 'center', width: 120, customRender: function (text) { return (!text || text == ' ') ? '--' : text } },
         { title: '产品图片', scopedSlots: { customRender: 'imageUrl' }, width: 80, align: 'center' }

+ 1 - 0
src/views/salesManagement/salesQuery/list.vue

@@ -441,6 +441,7 @@ export default {
     }
   },
   activated () {
+    console.log(this.$store.state.app.isNewTab)
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
       this.pageInit()

+ 1 - 1
src/views/salesManagement/salesQuery/queryPart.vue

@@ -150,7 +150,7 @@
         <a-button
           size="small"
           type="link"
-          class="button-geekblue"
+          class="button-error"
           @click="handleAdd(record)"
           id="productInfoList-edit-btn">添加</a-button>
         <a-button