Selaa lähdekoodia

所有页签不刷新

chenrui 3 vuotta sitten
vanhempi
commit
6a64c2ce0c
26 muutettua tiedostoa jossa 275 lisäystä ja 1105 poistoa
  1. 14 4
      src/components/MultiTab/MultiTab.vue
  2. 0 58
      src/config/router.config.js
  3. 2 1
      src/store/getters.js
  4. 15 14
      src/store/modules/app.js
  5. 13 7
      src/views/purchasingManagement/purchaseOrder/detail.vue
  6. 15 10
      src/views/purchasingManagement/purchaseOrder/edit.vue
  7. 17 13
      src/views/purchasingManagement/purchaseOrder/list.vue
  8. 14 8
      src/views/purchasingManagement/purchaseOrder/warehousing.vue
  9. 13 12
      src/views/purchasingManagement/purchaseReturn/detail.vue
  10. 12 9
      src/views/purchasingManagement/purchaseReturn/edit.vue
  11. 16 12
      src/views/purchasingManagement/purchaseReturn/list.vue
  12. 15 11
      src/views/salesManagement/giftRecord/list.vue
  13. 0 132
      src/views/salesManagement/quotation/basicInfoModal.vue
  14. 0 136
      src/views/salesManagement/quotation/detail.vue
  15. 0 370
      src/views/salesManagement/quotation/edit.vue
  16. 0 209
      src/views/salesManagement/quotation/list.vue
  17. 13 7
      src/views/salesManagement/salesQuery/detail.vue
  18. 11 9
      src/views/salesManagement/salesQuery/edit.vue
  19. 14 11
      src/views/salesManagement/salesQuery/list.vue
  20. 13 7
      src/views/salesManagement/salesReturn/detail.vue
  21. 15 11
      src/views/salesManagement/salesReturn/list.vue
  22. 11 7
      src/views/salesManagement/salesReturn/salesReturnEdit.vue
  23. 13 9
      src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue
  24. 13 9
      src/views/salesManagement/salesman/list.vue
  25. 13 20
      src/views/salesManagement/urgentItemsOffset/detail.vue
  26. 13 9
      src/views/salesManagement/urgentItemsOffset/list.vue

+ 14 - 4
src/components/MultiTab/MultiTab.vue

@@ -44,6 +44,17 @@ export default {
     onEdit (targetKey, action) {
       this[action](targetKey)
     },
+    onChange (targetKey) {
+      const index = this.tabsList.indexOf(targetKey)
+      if (index >= 0) {
+        const row = this.pages[index]
+        if (row && row.fullPath && row.fullPath.indexOf('/list') == -1) { // 非列表页
+          this.$store.state.app.isNewSubTab = true
+        } else {
+          this.$store.state.app.isNewSubTab = false
+        }
+      }
+    },
     remove (targetKey) {
       this.pages = this.pages.filter(page => page.name !== targetKey)
       this.tabsList = this.tabsList.filter(name => name !== targetKey)
@@ -55,7 +66,6 @@ export default {
     selectedLastPath () {
       this.activeKey = this.tabsList[this.tabsList.length - 1]
     },
-
     // content menu
     refashThat (e) {
       this.reloadView()
@@ -155,7 +165,7 @@ export default {
     }
   },
   render () {
-    const { onEdit, refashThat, $data: { pages } } = this
+    const { onEdit, onChange, refashThat, $data: { pages } } = this
     const panes = pages.map(page => {
       return (
         <a-tab-pane
@@ -164,7 +174,7 @@ export default {
         >
           <span slot="tab">
             {this.renderTabPane(page.meta.customTitle || page.meta.title, page.name)}
-            {this.activeKey == 'page.name' ? (<a-icon
+            {this.activeKey == page.name ? (<a-icon
               {...{ on: { click: refashThat } }}
               style={{ marginLeft: '8px', fontSize: '12px' }}
               type="reload" />) : ''}
@@ -180,7 +190,7 @@ export default {
             type={'editable-card'}
             v-model={this.activeKey}
             tabBarStyle={{ background: '#FFF', margin: 0, paddingLeft: '16px', paddingTop: '1px' }}
-            {...{ on: { edit: onEdit } }}>
+            {...{ on: { edit: onEdit, 'change': onChange } }}>
             {panes}
           </a-tabs>
         </div>

+ 0 - 58
src/config/router.config.js

@@ -233,64 +233,6 @@ export const asyncRouterMap = [
               }
             ]
           },
-          // {    二期
-          //   path: '/salesManagement/quotation',
-          //   redirect: '/salesManagement/quotation/list',
-          //   name: 'quotation',
-          //   component: BlankLayout,
-          //   meta: {
-          //     title: '报价单',
-          //     icon: 'idcard'
-          //     // permission: 'M_goodsManage_list'
-          //   },
-          //   hideChildrenInMenu: true,
-          //   children: [
-          //     {
-          //       path: 'list',
-          //       name: 'quotationList',
-          //       component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/quotation/list.vue'),
-          //       meta: {
-          //         title: '报价单列表',
-          //         icon: 'idcard',
-          //         hidden: true
-          //         // permission: 'M_goodsManage_list'
-          //       }
-          //     },
-          //     {
-          //       path: 'add',
-          //       name: 'quotationAdd',
-          //       component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/quotation/edit.vue'),
-          //       meta: {
-          //         title: '新增报价单',
-          //         icon: 'idcard',
-          //         hidden: true
-          //         // permission: 'M_goodsManage_list'
-          //       }
-          //     },
-          //     {
-          //       path: 'edit/:id',
-          //       name: 'quotationEdit',
-          //       component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/quotation/edit.vue'),
-          //       meta: {
-          //         title: '编辑报价单',
-          //         icon: 'idcard',
-          //         hidden: true
-          //         // permission: 'M_goodsManage_list'
-          //       }
-          //     },
-          //     {
-          //       path: 'detail/:id',
-          //       name: 'quotationDetail',
-          //       component: () => import(/* webpackChunkName: "salesManagement" */ '@/views/salesManagement/quotation/detail.vue'),
-          //       meta: {
-          //         title: '报价单详情',
-          //         icon: 'idcard',
-          //         hidden: true
-          //         // permission: 'M_goodsManage_list'
-          //       }
-          //     }
-          //   ]
-          // },
           {
             path: '/salesManagement/giftRecord',
             redirect: '/salesManagement/giftRecord/list',

+ 2 - 1
src/store/getters.js

@@ -16,7 +16,8 @@ const getters = {
   lang: state => state.i18n.lang,
   nowRoute: state => state.app.nowRoute,
   isShowVideo: state => state.app.isShowVideo,
-  isNewTab: state => state.app.isNewTab
+  isNewTab: state => state.app.isNewTab,
+  isNewSubTab: state => state.app.isNewSubTab
 }
 
 export default getters

+ 15 - 14
src/store/modules/app.js

@@ -26,8 +26,9 @@ const app = {
     weak: false,
     multiTab: true,
     nowRoute: '', // 当前路由
-    isShowVideo: false ,// 是否显示视频弹窗
-    isNewTab: false
+    isShowVideo: false, // 是否显示视频弹窗
+    isNewTab: false,
+    isNewSubTab: false
   },
   mutations: {
     SET_SIDEBAR_TYPE: (state, type) => {
@@ -88,32 +89,32 @@ const app = {
     }
   },
   actions: {
-    setSidebar({
+    setSidebar ({
       commit
     }, type) {
       commit('SET_SIDEBAR_TYPE', type)
     },
-    CloseSidebar({
+    CloseSidebar ({
       commit
     }) {
       commit('CLOSE_SIDEBAR')
     },
-    ToggleDevice({
+    ToggleDevice ({
       commit
     }, device) {
       commit('TOGGLE_DEVICE', device)
     },
-    ToggleTheme({
+    ToggleTheme ({
       commit
     }, theme) {
       commit('TOGGLE_THEME', theme)
     },
-    ToggleLayoutMode({
+    ToggleLayoutMode ({
       commit
     }, mode) {
       commit('TOGGLE_LAYOUT_MODE', mode)
     },
-    ToggleFixedHeader({
+    ToggleFixedHeader ({
       commit
     }, fixedHeader) {
       if (!fixedHeader) {
@@ -121,32 +122,32 @@ const app = {
       }
       commit('TOGGLE_FIXED_HEADER', fixedHeader)
     },
-    ToggleFixSiderbar({
+    ToggleFixSiderbar ({
       commit
     }, fixSiderbar) {
       commit('TOGGLE_FIXED_SIDERBAR', fixSiderbar)
     },
-    ToggleFixedHeaderHidden({
+    ToggleFixedHeaderHidden ({
       commit
     }, show) {
       commit('TOGGLE_FIXED_HEADER_HIDDEN', show)
     },
-    ToggleContentWidth({
+    ToggleContentWidth ({
       commit
     }, type) {
       commit('TOGGLE_CONTENT_WIDTH', type)
     },
-    ToggleColor({
+    ToggleColor ({
       commit
     }, color) {
       commit('TOGGLE_COLOR', color)
     },
-    ToggleWeak({
+    ToggleWeak ({
       commit
     }, weakFlag) {
       commit('TOGGLE_WEAK', weakFlag)
     },
-    ToggleMultiTab({
+    ToggleMultiTab ({
       commit
     }, bool) {
       commit('TOGGLE_MULTI_TAB', bool)

+ 13 - 7
src/views/purchasingManagement/purchaseOrder/detail.vue

@@ -87,6 +87,7 @@
               :rowKey="(record) => record.id"
               :columns="columns"
               :data="loadData"
+              :defaultLoadData="false"
               bordered>
               <!-- 采购数量 -->
               <template slot="origqty" slot-scope="text, record">
@@ -281,15 +282,20 @@ export default {
     }
   },
   mounted () {
-    this.getDetail()
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.$refs.table.refresh(true)
+      this.getDetail()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.$refs.table.refresh(true)
+      this.getDetail()
+    }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      if (!vm.disabled) {
-        vm.getDetail()
-        vm.$refs.table.refresh()
-      }
-    })
+    next(vm => {})
   }
 }
 </script>

+ 15 - 10
src/views/purchasingManagement/purchaseOrder/edit.vue

@@ -573,21 +573,26 @@ export default {
     //  返回列表
     handleBack () {
       this.$router.push({ path: '/purchasingManagement/purchaseOrder/list', query: { closeLastOldTab: true } })
+    },
+    pageInit () {
+      this.getOrderDetail()
+      this.resetPurchaseForm()
+      this.resetSearchForm()
     }
   },
   mounted () {
-    this.getOrderDetail()
-    this.resetPurchaseForm()
-    this.resetSearchForm()
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.pageInit()
+    }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      if (!vm.disabled) {
-        vm.getOrderDetail()
-        vm.resetPurchaseForm()
-        vm.resetSearchForm()
-      }
-    })
+    next(vm => {})
   }
 }
 </script>

+ 17 - 13
src/views/purchasingManagement/purchaseOrder/list.vue

@@ -98,6 +98,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 采购单号 -->
         <template slot="purchaseBillNo" slot-scope="text, record">
@@ -291,17 +292,19 @@ export default {
         }
       })
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.openModal = false
+      this.getSupperList()
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 275
     }
   },
-  mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
-  },
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
@@ -310,20 +313,21 @@ export default {
       }, 400)
     }
   },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
+      this.pageInit()
       this.resetSearchForm()
     }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.openModal = false
-      vm.getSupperList()
-      if (!vm.disabled) {
-        vm.$refs.table.refresh()
-      }
-    })
+    next(vm => {})
   }
 }
 </script>

+ 14 - 8
src/views/purchasingManagement/purchaseOrder/warehousing.vue

@@ -275,19 +275,25 @@ export default {
           this.spinning = false
         }
       })
+    },
+    pageInit () {
+      this.getDetail()
+      this.getWarehouseCascade()
     }
   },
   mounted () {
-    this.getDetail()
-    this.getWarehouseCascade()
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.pageInit()
+    }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      if (!vm.spinning) {
-        vm.getDetail()
-        vm.getWarehouseCascade()
-      }
-    })
+    next(vm => {})
   }
 }
 </script>

+ 13 - 12
src/views/purchasingManagement/purchaseReturn/detail.vue

@@ -12,11 +12,6 @@
           id="purchaseReturnDetail-edit-btn"
           @click.stop="handleEdit">编辑</a-button>
       </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <!-- <template slot="extra">
-        <a-button key="2" id="purchaseReturnDetail-preview-btn">打印预览</a-button>
-        <a-button key="1" type="primary" id="purchaseReturnDetail-print-btn">快速打印</a-button>
-      </template> -->
     </a-page-header>
     <!-- 基础信息 -->
     <a-card size="small" :bordered="false" class="purchaseReturnDetail-cont">
@@ -46,6 +41,7 @@
             :rowKey="(record) => record.id"
             :columns="columns"
             :data="loadData"
+            :defaultLoadData="false"
             bordered>
           </s-table>
         </a-collapse-panel>
@@ -126,15 +122,20 @@ export default {
     }
   },
   mounted () {
-    this.getDetail()
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.$refs.table.refresh(true)
+      this.getDetail()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.$refs.table.refresh(true)
+      this.getDetail()
+    }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      if (!vm.disabled) {
-        vm.getDetail()
-        vm.$refs.table.refresh()
-      }
-    })
+    next(vm => {})
   }
 }
 </script>

+ 12 - 9
src/views/purchasingManagement/purchaseReturn/edit.vue

@@ -84,7 +84,6 @@
           <a-collapse-panel key="1">
             <template slot="header">
               已选产品
-              <!-- <a-button size="small" class="import-btn" id="purchaseReturnEdit-import-btn" @click.stop="handleImport">导入明细</a-button> -->
               <a-button
                 size="small"
                 type="primary"
@@ -359,16 +358,20 @@ export default {
     }
   },
   mounted () {
-    this.$refs.chooseTable.refresh()
-    this.resetSearchForm()
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.$refs.chooseTable.refresh(true)
+      this.resetSearchForm()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.$refs.chooseTable.refresh(true)
+      this.resetSearchForm()
+    }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      if (!vm.disabled) {
-        vm.resetSearchForm()
-        vm.$refs.chooseTable.refresh()
-      }
-    })
+    next(vm => {})
   }
 }
 </script>

+ 16 - 12
src/views/purchasingManagement/purchaseReturn/list.vue

@@ -65,6 +65,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 采退单号 -->
         <template slot="purchaseReturnNo" slot-scope="text, record">
@@ -257,17 +258,18 @@ export default {
         }
       })
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      this.getParentDealer()
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 235
     }
   },
-  mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
-  },
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
@@ -276,19 +278,21 @@ export default {
       }, 400)
     }
   },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
+      this.pageInit()
       this.resetSearchForm()
     }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.getParentDealer()
-      if (!vm.disabled) {
-        vm.$refs.table.refresh()
-      }
-    })
+    next(vm => {})
   }
 }
 </script>

+ 15 - 11
src/views/salesManagement/giftRecord/list.vue

@@ -52,6 +52,7 @@
       :columns="columns"
       :data="loadData"
       :scroll="{ y: tableHeight }"
+      :defaultLoadData="false"
       bordered>
     </s-table>
   </a-card>
@@ -130,17 +131,17 @@ export default {
       }
       this.$refs.table.refresh(true)
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 195
     }
   },
-  mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
-  },
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
@@ -149,18 +150,21 @@ export default {
       }, 400)
     }
   },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
+      this.pageInit()
       this.resetSearchForm()
     }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      if (!vm.disabled) {
-        vm.$refs.table.refresh()
-      }
-    })
+    next(vm => {})
   }
 }
 </script>

+ 0 - 132
src/views/salesManagement/quotation/basicInfoModal.vue

@@ -1,132 +0,0 @@
-<template>
-  <a-modal
-    centered
-    class="quotation-basicInfo-modal"
-    :footer="null"
-    :maskClosable="false"
-    title="选择客户"
-    v-model="isShow"
-    @cancle="isShow=false"
-    width="80%">
-    <a-spin :spinning="spinning" tip="Loading...">
-      <a-form-model
-        id="quotation-basicInfo-form"
-        ref="ruleForm"
-        :model="form"
-        :rules="rules"
-        :label-col="formItemLayout.labelCol"
-        :wrapper-col="formItemLayout.wrapperCol" >
-        <a-form-model-item label="客户名称" prop="name" extra="(未搜索到客户时可直接录入,但客户信息不保存于客户资料)">
-          <a-auto-complete id="quotation-basicInfo-bundleName" allowClear v-model="form.name" placeholder="请输入客户名称">
-            <template slot="dataSource">
-              <a-select-option v-for="item in optData" :key="item">{{ item }}</a-select-option>
-            </template>
-          </a-auto-complete>
-        </a-form-model-item>
-        <a-form-model-item label="价格类型" prop="priceType">
-          <v-select code="PRICE_TYPE" id="quotation-basicInfo-priceType" v-model="form.priceType" allowClear placeholder="请选择价格类型" ></v-select>
-        </a-form-model-item>
-        <a-form-model-item label="电话" prop="phone">
-          <a-input id="quotation-basicInfo-bundleName" v-model="form.bundleName" allowClear :maxLength="30" placeholder="请输入电话(最多30个字符)"/>
-        </a-form-model-item>
-        <a-form-model-item label="联系人" prop="phone">
-          <a-input id="quotation-basicInfo-bundleName" v-model="form.bundleName" allowClear :maxLength="30" placeholder="请输入联系人(最多30个字符)"/>
-        </a-form-model-item>
-        <a-form-model-item label="备注" prop="phone">
-          <a-textarea id="quotation-basicInfo-bundleName" v-model="form.bundleName" allowClear :maxLength="120" placeholder="请输入备注(最多120个字符)"/>
-        </a-form-model-item>
-      </a-form-model>
-      <div class="btn-cont">
-        <a-button type="primary" id="quotation-basicInfo-modal-submit" @click="handleSubmit">提交</a-button>
-        <a-button id="quotation-basicInfo-modal-back" @click="isShow = false" style="margin-left: 15px;">取消</a-button>
-      </div>
-    </a-spin>
-  </a-modal>
-</template>
-
-<script>
-  import { VSelect } from '@/components'
-  export default{
-    name: 'BasicInfoModal',
-    components: { VSelect },
-    props: {
-      openModal: { //  弹框显示状态
-        type: Boolean,
-        default: false
-      }
-    },
-    data(){
-      return{
-        spinning: false,
-        isShow: this.openModal, //  是否打开弹框
-        formItemLayout: {
-          labelCol: { span: 6 },
-          wrapperCol: { span: 16 }
-        },
-        form: {
-          name: '', // 仓库名称
-          priceType: undefined,  //  价格类型
-        },
-        rules: {
-          name: [
-            { required: true, message: '请输入客户名称', trigger: 'blur' }
-          ],
-          priceType: [
-            { required: true, message: '请选择价格类型', trigger: 'change' },
-          ],
-        },
-        optData: ['aa', 'bb', 'cc'],
-        dataSource: [
-          {name: '111', id:1},
-          {name: '222', id:2},
-          {name: '333', id:3},
-        ],
-      }
-    },
-    methods: {
-      //  提交
-      handleSubmit(){
-        const _this = this
-        // this.$refs.ruleForm.validate(valid => {
-        //   if (valid) {
-            _this.$emit('ok')
-            _this.isShow = false
-        //   } else {
-        //     console.log('error submit!!')
-        //     return false
-        //   }
-        // })
-      },
-      filterOption(input, option) {
-        console.log(input, option)
-      	return (
-      		option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      	)
-      },
-    },
-    watch: {
-      //  父页面传过来的弹框状态
-      openModal (newValue, oldValue) {
-        this.isShow = newValue
-      },
-      //  重定义的弹框状态
-      isShow (newValue, oldValue) {
-        if (!newValue) {
-          this.$emit('close')
-        }
-      }
-    }
-  }
-</script>
-
-<style lang="less">
-  .quotation-basicInfo-modal{
-    .ant-modal-body {
-    	padding: 40px 40px 24px;
-    }
-    .btn-cont {
-    	text-align: center;
-    	margin: 35px 0 10px;
-    }
-  }
-</style>

+ 0 - 136
src/views/salesManagement/quotation/detail.vue

@@ -1,136 +0,0 @@
-<template>
-  <div class="quotationDetail-wrap">
-    <a-page-header :ghost="false" @back="handleBack" class="quotationDetail-back">
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="quotationDetail-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <!-- <template slot="extra">
-        <a-button key="3" type="danger" id="quotationDetail-export-btn">导出</a-button>
-        <a-button key="2" id="quotationDetail-preview-btn">打印预览</a-button>
-        <a-button key="1" type="primary" id="quotationDetail-print-btn">快速打印</a-button>
-      </template> -->
-    </a-page-header>
-    <a-card size="small" :bordered="false" class="quotationDetail-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1" header="基础信息">
-          <a-descriptions :column="3">
-            <a-descriptions-item label="客户名称">箭冠营销中心</a-descriptions-item>
-            <a-descriptions-item label="客户地址">箭冠营销中心</a-descriptions-item>
-            <a-descriptions-item label="报价单号">箭冠营销中心</a-descriptions-item>
-            <a-descriptions-item label="联系电话">箭冠营销中心</a-descriptions-item>
-            <a-descriptions-item label="备注">箭冠营销中心</a-descriptions-item>
-            <a-descriptions-item label="业务员">箭冠营销中心</a-descriptions-item>
-            <a-descriptions-item label="制单人">箭冠营销中心</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-card size="small" :bordered="false" class="quotationDetail-cont">
-      <!-- 总计 -->
-      <a-alert type="info" style="margin-bottom:10px">
-        <div slot="message">总款数:<strong>1</strong>,总数量:<strong>1</strong>,总赠品数量:<strong>0</strong>,总售价:<strong>14</strong>,总成本:<strong>6.33</strong>,总毛利: <strong>6</strong></div>
-      </a-alert>
-      <!-- 列表 -->
-      <s-table
-        class="sTable"
-        ref="table"
-        size="small"
-        :rowKey="(record) => record.id"
-        :columns="columns"
-        :data="loadData"
-        :scroll="{ x: 1160 }"
-        bordered></s-table>
-    </a-card>
-  </div>
-</template>
-
-<script>
-import { STable, VSelect } from '@/components'
-export default {
-  components: { STable, VSelect },
-  data () {
-    return {
-      queryParam: {
-
-      },
-      disabled: false, //  查询、重置按钮是否可操作
-      brandData: [], //  产品品牌  下拉数据
-      typeData: [], //  产品类别  下拉数据
-      // 表头
-      columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center', fixed: 'left' },
-        { title: '产品编码', dataIndex: 'productCode', width: 140, align: 'center' },
-        { title: '产品名称', dataIndex: 'productName', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
-        { title: '原厂编码', dataIndex: 'productOrigCode', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '品牌', dataIndex: 'producstOrigCode', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '成本价', dataIndex: 'costPrice', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '销售价', dataIndex: 'price', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '数量', dataIndex: 'qty', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '单位', dataIndex: 'productOrigUnit', width: 100, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '售价小计', dataIndex: 'salePriceSubtotal', width: 100, align: 'center' }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
-        //   const data = res.data
-        //   const no = (data.pageNo - 1) * data.pageSize
-        //   for (var i = 0; i < data.list.length; i++) {
-        //     data.list[i].no = no + i + 1
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: [
-              { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
-            ],
-            count: 10
-          }
-          const no = (data.pageNo - 1) * data.pageSize
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = no + i + 1
-          }
-          _this.disabled = false
-          resolve(data)
-        })
-      }
-    }
-  },
-  methods: {
-    //  重置
-    resetSearchForm () {
-      this.queryParam.orderBundleNo = ''
-      this.queryParam.orderBundle.custMobile = ''
-      this.queryParam.bundleName = ''
-      this.queryParam.itemName = ''
-      this.oldTime = undefined
-      this.newTime = undefined
-      this.$refs.table.refresh(true)
-    },
-    //  提交
-    handleSubmit () {},
-    //  返回列表
-    handleBack () {
-      this.$router.push({ path: '/salesManagement/quotation/list', query: { closeLastOldTab: true } })
-    }
-  }
-}
-</script>
-
-<style lang="less">
-  .quotationDetail-wrap{
-    .quotationDetail-back{
-      margin-bottom: 10px;
-    }
-    .quotationDetail-cont{
-      margin-bottom: 10px;
-    }
-  }
-</style>

+ 0 - 370
src/views/salesManagement/quotation/edit.vue

@@ -1,370 +0,0 @@
-<template>
-  <div class="quotationEdit-wrap">
-    <!-- 内容 -->
-    <a-page-header :ghost="false" @back="handleBack" class="quotationEdit-cont">
-      <!-- 自定义的二级文字标题 -->
-      <template slot="subTitle">
-        <a id="quotationEdit-back-btn" href="javascript:;" @click="handleBack">返回列表</a>
-      </template>
-      <!-- 操作区,位于 title 行的行尾 -->
-      <!-- <template slot="extra">
-        <a-button key="2" id="quotationEdit-preview-btn">打印预览</a-button>
-        <a-button key="1" type="primary" id="quotationEdit-print-btn">快速打印</a-button>
-      </template> -->
-    </a-page-header>
-    <!-- 基础信息 -->
-    <a-card size="small" :bordered="false" class="quotationEdit-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1">
-          <template slot="header">
-            基础信息
-            <a-button type="primary" shape="circle" size="small" icon="edit" class="edit-circle-btn" id="quotationEdit-edit-circle-btn" @click.stop="handleEditInfo" />
-          </template>
-          <a-descriptions :column="3">
-            <a-descriptions-item label="客户名称">箭冠营销中心</a-descriptions-item>
-            <a-descriptions-item label="价格类型">箭冠营销中心</a-descriptions-item>
-            <a-descriptions-item label="电话">箭冠营销中心</a-descriptions-item>
-            <a-descriptions-item label="联系人">箭冠营销中心</a-descriptions-item>
-            <a-descriptions-item label="备注">箭冠营销中心</a-descriptions-item>
-          </a-descriptions>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 选择产品 -->
-    <a-card size="small" :bordered="false" class="quotationEdit-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1">
-          <template slot="header">选择产品</template>
-          <!-- 选择产品 -->
-          <div>
-            <!-- 搜索条件 -->
-            <div class="table-page-search-wrapper">
-              <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-                <a-row :gutter="15">
-                  <a-col :md="6" :sm="24">
-                    <a-form-item label="产品编码">
-                      <a-input id="quotationEdit-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="请输入产品编码"/>
-                    </a-form-item>
-                  </a-col>
-                  <a-col :md="6" :sm="24">
-                    <a-form-item label="产品名称">
-                      <a-input id="quotationEdit-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="请输入产品名称"/>
-                    </a-form-item>
-                  </a-col>
-                  <a-col :md="6" :sm="24">
-                    <a-form-item label="原厂编码">
-                      <a-input id="quotationEdit-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="请输入原厂编码"/>
-                    </a-form-item>
-                  </a-col>
-                  <template v-if="advanced">
-                    <a-col :md="6" :sm="24">
-                      <a-form-item label="车架号(VIN)">
-                        <a-input id="quotationEdit-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="请输入车架号(VIN)"/>
-                      </a-form-item>
-                    </a-col>
-                    <a-col :md="6" :sm="24">
-                      <a-form-item label="产品品牌">
-                        <a-select placeholder="请选择" id="quotationEdit-state" allowClear v-model="queryParam.dataSourceNo" :showSearch="true" option-filter-prop="children" :filter-option="filterOption">
-                          <a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
-                        </a-select>
-                      </a-form-item>
-                    </a-col>
-                    <a-col :md="6" :sm="24">
-                      <a-form-item label="产品类别">
-                        <a-cascader :options="typeData" expand-trigger="hover" id="quotationEdit-state" placeholder="请选择产品类别" allowClear v-model="queryParam.brand" />
-                      </a-form-item>
-                    </a-col>
-                  </template>
-                  <a-col :md="6" :sm="24">
-                    <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="quotationEdit-refresh">查询</a-button>
-                    <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="quotationEdit-reset">重置</a-button>
-                    <a @click="advanced=!advanced" style="margin-left: 8px">
-                      {{ advanced ? '收起' : '展开' }}
-                      <a-icon :type="advanced ? 'up' : 'down'"/>
-                    </a>
-                  </a-col>
-                </a-row>
-              </a-form>
-            </div>
-            <!-- 列表 -->
-            <s-table
-              class="sTable"
-              ref="table"
-              size="small"
-              :rowKey="(record) => record.id"
-              :columns="columns"
-              :data="loadData"
-              bordered>
-              <!-- 采购数量 -->
-              <template slot="storageQuantity" slot-scope="text, record">
-                <a-input-number
-                  id="quotationEdit-storageQuantity"
-                  :value="record.storageQuantity"
-                  :precision="0"
-                  :min="0"
-                  :max="999999"
-                  placeholder="请输入" />
-              </template>
-              <!-- 操作 -->
-              <template slot="action" slot-scope="text, record">
-                <a-button size="small" type="primary" @click="handleAdd(record)" id="quotationEdit-add-btn">添加</a-button>
-              </template>
-            </s-table>
-          </div>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <!-- 已选产品 -->
-    <a-card size="small" :bordered="false" class="quotationEdit-cont">
-      <a-collapse :activeKey="['1']">
-        <a-collapse-panel key="1">
-          <template slot="header">已选产品</template>
-          <!-- 已选产品 -->
-          <div>
-            <!-- 总计 -->
-            <a-alert type="info" style="margin-bottom:10px">
-              <div slot="message">总售价:<strong>6</strong> ,总款数:<strong>6</strong> ,总数量:<strong>6.33</strong></div>
-            </a-alert>
-            <!-- 搜索条件 -->
-            <div class="table-page-search-wrapper">
-              <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-                <a-row :gutter="15">
-                  <a-col :md="6" :sm="24">
-                    <a-form-item label="产品编码">
-                      <a-input id="quotationEdit-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="请输入产品编码"/>
-                    </a-form-item>
-                  </a-col>
-                  <a-col :md="6" :sm="24">
-                    <a-form-item label="产品名称">
-                      <a-input id="quotationEdit-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="请输入产品名称"/>
-                    </a-form-item>
-                  </a-col>
-                  <a-col :md="6" :sm="24">
-                    <a-button style="margin-bottom: 18px;" type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="quotationEdit-refresh">查询</a-button>
-                    <a-button style="margin: 0 0 18px 8px" @click="resetSearchForm" :disabled="disabled" id="quotationEdit-reset">重置</a-button>
-                  </a-col>
-                </a-row>
-              </a-form>
-            </div>
-            <!-- 列表 -->
-            <s-table
-              class="sTable"
-              ref="table"
-              size="small"
-              :rowKey="(record) => record.id"
-              :columns="chooseColumns"
-              :data="chooseLoadData"
-              bordered>
-              <!-- 销售价 -->
-              <template slot="mementPay" slot-scope="text, record">
-                <a-input-number
-                  id="quotationEdit-mementPay"
-                  :value="record.mementPay"
-                  :precision="0"
-                  :min="0"
-                  :max="999999"
-                  placeholder="请输入" />
-              </template>
-              <!-- 销售数量 -->
-              <template slot="storageQuantity" slot-scope="text, record">
-                <a-input-number
-                  id="quotationEdit-storageQuantity"
-                  :value="record.storageQuantity"
-                  :precision="0"
-                  :min="0"
-                  :max="999999"
-                  placeholder="请输入" />
-              </template>
-              <!-- 操作 -->
-              <template slot="action" slot-scope="text, record">
-                <a-button size="small" type="primary" @click="handleDel(record)" id="quotationEdit-del-btn">删除</a-button>
-              </template>
-            </s-table>
-          </div>
-        </a-collapse-panel>
-      </a-collapse>
-    </a-card>
-    <a-affix :offset-bottom="0">
-      <div style="text-align: center;width: 100%;background-color: #fff;padding: 12px 0;box-shadow: 0 0 20px #dcdee2;">
-        <a-button type="danger" id="quotationEdit-transfer-order" size="large" @click="handleTransferOrder" style="padding: 0 60px;margin: 0 30px;">转销售单</a-button>
-        <a-button type="primary" id="quotationEdit-submit" size="large" @click="handleSubmit" style="padding: 0 60px;margin: 0 30px;">提交</a-button>
-      </div>
-    </a-affix>
-    <!-- 选择基本信息弹框 -->
-    <basic-info-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
-  </div>
-</template>
-
-<script>
-  import { STable, VSelect } from '@/components'
-  import basicInfoModal from './basicInfoModal.vue'
-  export default{
-    components: { STable, VSelect, basicInfoModal },
-    data(){
-      return{
-        queryParam: {
-          
-        },
-        brandData: [],  //  产品品牌  下拉数据
-        typeData: [],  //  产品类别  下拉数据
-        advanced: false,  //  高级搜索 展开/关闭
-        disabled: false, //  查询、重置按钮是否可操作
-        // 表头
-        columns: [
-          { title: '产品编码', dataIndex: 'creatDate', align: 'center', sorter: true },
-          { title: '产品名称', dataIndex: 'custName', align: 'center' },
-          { title: '原厂编码', dataIndex: 'totalP', align: 'center' },
-          { title: '产品级别', dataIndex: 'custsName', align: 'center' },
-          { title: '品牌', dataIndex: 'totalNums', align: 'center', sorter: true },
-          { title: '单位', scopedSlots: { customRender: 'outOfStockNum' }, align: 'center' },
-          { title: '成本价(¥)', dataIndex: 'mementPay', align: 'center' },
-          { title: '销售指导价(¥)', dataIndex: 'storageQuantity', align: 'center' },
-        ],
-        // 加载数据方法 必须为 Promise 对象
-        loadData: parameter => {
-          this.disabled = true
-          // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
-          //   const data = res.data
-          //   const no = (data.pageNo - 1) * data.pageSize
-          //   for (var i = 0; i < data.list.length; i++) {
-          //     data.list[i].no = no + i + 1
-          //   }
-          //   this.disabled = false
-          //   return data
-          // })
-          const _this = this
-          return new Promise(function(resolve, reject){
-            const data = {
-              pageNo: 1,
-              pageSize: 10,
-              list: [
-                { id: '1', purchaseNo: 'jgqp11111111111', creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
-              ],
-              count: 10
-            }
-            const no = (data.pageNo - 1) * data.pageSize
-            for (var i = 0; i < data.list.length; i++) {
-              data.list[i].no = no + i + 1
-            }
-            _this.disabled = false
-            resolve(data)
-          })
-        },
-        // 表头
-        chooseColumns: [
-          { title: '序号', dataIndex: 'no', align: 'center' },
-          { title: '产品编码', dataIndex: 'creatDaite', align: 'center', sorter: true },
-          { title: '产品名称', dataIndex: 'custNayme', align: 'center' },
-          { title: '原厂编码', dataIndex: 'totalP', align: 'center' },
-          { title: '品牌', dataIndex: 'totalNums', align: 'center', sorter: true },
-          { title: '销售价', scopedSlots: { customRender: 'mementPay' }, align: 'center' },
-          { title: '销售数量', scopedSlots: { customRender: 'storageQuantity' }, align: 'center' },
-          { title: '单位', dataIndex: 'custsNakme', align: 'center' },
-          { title: '售价小计', dataIndex: 'custssNakme', align: 'center', customRender: function (text) { return ((text || text == 0) ? '¥'+text : '--') } },
-          { title: '操作', scopedSlots: { customRender: 'action' }, width: 150, align: 'center' }
-        ],
-        // 加载数据方法 必须为 Promise 对象
-        chooseLoadData: parameter => {
-          this.disabled = true
-          // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
-          //   const data = res.data
-          //   const no = (data.pageNo - 1) * data.pageSize
-          //   for (var i = 0; i < data.list.length; i++) {
-          //     data.list[i].no = no + i + 1
-          //   }
-          //   this.disabled = false
-          //   return data
-          // })
-          const _this = this
-          return new Promise(function(resolve, reject){
-            const data = {
-              pageNo: 1,
-              pageSize: 10,
-              list: [
-                { id: '1', purchaseNo: 'jgqp11111111111', custssName: 0, creatDate: '产品1', custName: 'jgqp111123545', totalP: '箭冠品牌', totalNums: '产品分类1', totalPrice: '5', payType: '122' }
-              ],
-              count: 10
-            }
-            const no = (data.pageNo - 1) * data.pageSize
-            for (var i = 0; i < data.list.length; i++) {
-              data.list[i].no = no + i + 1
-            }
-            _this.disabled = false
-            resolve(data)
-          })
-        },
-        openModal: false, // 选择基本信息弹框是否显示
-      }
-    },
-    methods: {
-      //  重置
-      resetSearchForm () {
-        this.queryParam.orderBundleNo = ''
-        this.queryParam.orderBundle.custMobile = ''
-        this.queryParam.bundleName = ''
-        this.queryParam.itemName = ''
-        this.oldTime = undefined
-        this.newTime = undefined
-        this.$refs.table.refresh(true)
-      },
-      //  转销售单
-      handleTransferOrder(){},
-      //  提交
-      handleSubmit(){},
-      //  添加
-      handleAdd(row){},
-      //  删除
-      handleDel(row){},
-      //  编辑基本信息
-      handleEditInfo(){
-        this.openModal = true
-      },
-      //  基本信息  保存
-      handleOk(){
-        
-      },
-      //  返回列表
-      handleBack(){
-        this.$router.push({ path: '/salesManagement/quotation/list', query: { closeLastOldTab: true }})
-      },
-      //  编辑客户名称
-      handleEditCustom(){},
-      filterOption(input, option) {
-      	return (
-      		option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      	)
-      },
-    },
-    beforeRouteEnter (to, from, next) {
-      next(vm => {
-        vm.openModal = false
-      })
-    }
-  }
-</script>
-
-<style lang="less">
-  .quotationEdit-wrap{
-    .quotationEdit-cont{
-      margin-bottom: 10px;
-      .sub-title{
-        font-size: 12px;
-        color: #808695;
-        margin-left: 10px;
-      }
-      .tag-txt{
-        font-size: 12px;
-        color: #ed1c24;
-      }
-      .edit-circle-btn{
-        margin-left: 15px;
-        i{
-          vertical-align: text-bottom;
-        }
-      }
-      .import-btn{
-        margin-left: 15px;
-      }
-    }
-  }
-</style>

+ 0 - 209
src/views/salesManagement/quotation/list.vue

@@ -1,209 +0,0 @@
-<template>
-  <a-card size="small" :bordered="false" class="quotationList-wrap">
-    <!-- 搜索条件 -->
-    <div class="table-page-search-wrapper">
-      <a-form layout="inline" @keyup.enter.native="$refs.table.refresh(true)">
-        <a-row :gutter="15">
-          <a-col :md="6" :sm="24">
-            <a-form-item label="创建时间">
-              <rangeDate ref="rangeDate" @change="dateChange" />
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="客户名称">
-              <a-select
-                id="quotationList-bundleName"
-                placeholder="请选择"
-                allowClear
-                v-model="queryParam.dataSourceNo"
-                :showSearch="true"
-                option-filter-prop="children"
-                :filter-option="filterOption">
-                <a-select-option v-for="item in brandData" :key="item.salesChannelNo" :value="item.salesChannelNo">{{ item.salesChannelName }}</a-select-option>
-              </a-select>
-            </a-form-item>
-          </a-col>
-          <a-col :md="6" :sm="24">
-            <a-form-item label="关联销售单号">
-              <a-input id="quotationList-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="请输入关联销售单号"/>
-            </a-form-item>
-          </a-col>
-          <template v-if="advanced">
-            <a-col :md="6" :sm="24">
-              <a-form-item label="报价单号">
-                <a-input id="quotationList-bundleName" v-model.trim="queryParam.bundleName" allowClear placeholder="请输入报价单号"/>
-              </a-form-item>
-            </a-col>
-          </template>
-          <a-col :md="6" :sm="24">
-            <a-button type="primary" @click="$refs.table.refresh(true)" :disabled="disabled" id="quotationList-refresh">查询</a-button>
-            <a-button style="margin-left: 8px" @click="resetSearchForm" :disabled="disabled" id="quotationList-reset">重置</a-button>
-            <a @click="advanced=!advanced" style="margin-left: 8px">
-              {{ advanced ? '收起' : '展开' }}
-              <a-icon :type="advanced ? 'up' : 'down'"/>
-            </a>
-          </a-col>
-        </a-row>
-      </a-form>
-    </div>
-    <!-- 操作按钮 -->
-    <div class="table-operator">
-      <a-button id="quotationList-add" type="primary" class="button-error" @click="handleAdd">新增</a-button>
-    </div>
-    <!-- 列表 -->
-    <s-table
-      class="sTable"
-      ref="table"
-      size="small"
-      :rowKey="(record) => record.id"
-      :columns="columns"
-      :data="loadData"
-      :scroll="{ x: 1310 }"
-      bordered>
-      <!-- 是否转销售单 -->
-      <template slot="invenstoryNum" slot-scope="text, record">
-        <span>{{ record.invenstoryNum == 1 ? '是' : '否' }}</span>
-      </template>
-      <!-- 操作 -->
-      <template slot="action" slot-scope="text, record">
-        <a-button size="small" type="link" @click="handleEdit(record)" id="quotationList-edit-btn">编辑</a-button>
-        <a-divider type="vertical" style="margin: 0;" />
-        <a-button size="small" type="link" @click="handleDetail(record)" id="quotationList-detail-btn">详情</a-button>
-        <a-divider type="vertical" style="margin: 0;" />
-        <a-button size="small" type="link" @click="handleDel(record)" id="quotationList-del-btn">删除</a-button>
-      </template>
-    </s-table>
-    <!-- 选择基本信息弹框 -->
-    <basic-info-modal :openModal="openModal" @ok="handleOk" @close="openModal=false" />
-  </a-card>
-</template>
-
-<script>
-import { STable, VSelect } from '@/components'
-import rangeDate from '@/views/common/rangeDate.vue'
-import basicInfoModal from './basicInfoModal.vue'
-export default {
-  components: { STable, VSelect, basicInfoModal, rangeDate },
-  data () {
-    return {
-      advanced: true, // 高级搜索 展开/关闭
-      queryParam: { //  查询条件
-        beginDate: '',
-        endDate: '',
-        bundleName: '', //  供应商名称
-        state: undefined //  状态
-      },
-      disabled: false, //  查询、重置按钮是否可操作
-      columns: [
-        { title: '序号', dataIndex: 'no', width: 80, align: 'center' },
-        { title: '创建时间', dataIndex: 'inventoryMoney', width: 160, align: 'center' },
-        { title: '报价单号', dataIndex: 'inventosryMoney', width: 140, align: 'center' },
-        { title: '关联销售单号', dataIndex: 'productType', width: 140, align: 'center', customRender: function (text) { return text || '--' } },
-        { title: '客户名称', dataIndex: 'productName', align: 'center', ellipsis: true, customRender: function (text) { return text || '--' } },
-        { title: '总款数', dataIndex: 'productBrand', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总数量', dataIndex: 'psroductBrand', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '总价格', dataIndex: 'invdentoryNum', width: 100, align: 'center', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
-        { title: '是否转销售单', scopedSlots: { customRender: 'invenstoryNum' }, width: 120, align: 'center' },
-        { title: '操作', scopedSlots: { customRender: 'action' }, width: 170, align: 'center', fixed: 'right' }
-      ],
-      // 加载数据方法 必须为 Promise 对象
-      loadData: parameter => {
-        this.disabled = true
-        // return customerBundleDelayList( Object.assign(parameter, this.queryParam) ).then(res => {
-        //   const data = res.data
-        //   const no = (data.pageNo - 1) * data.pageSize
-        //   for (var i = 0; i < data.list.length; i++) {
-        //     data.list[i].no = no + i + 1
-        //   }
-        //   this.disabled = false
-        //   return data
-        // })
-        const _this = this
-        return new Promise(function (resolve, reject) {
-          const data = {
-            pageNo: 1,
-            pageSize: 10,
-            list: [
-              { id: '1', productNum: 'jgqp11111111111', productName: '产品1', productOldNum: 'jgqp111123545', productBrand: '箭冠品牌', productType: '产品分类1', inventoryNum: '5', inventoryMoney: '122' }
-            ]
-          }
-          const no = (data.pageNo - 1) * data.pageSize
-          for (var i = 0; i < data.list.length; i++) {
-            data.list[i].no = no + i + 1
-          }
-          _this.disabled = false
-          resolve(data)
-        })
-      },
-      brandData: [],
-      openModal: false // 基本信息弹框是否显示
-    }
-  },
-  activated () {
-    // 如果是新页签打开,则重置当前页面
-    if (this.$store.state.app.isNewTab) {
-      this.resetSearchForm()
-    }
-  },
-  methods: {
-    //  时间  change
-    dateChange (date) {
-      this.queryParam.beginDate = date[0]
-      this.queryParam.endDate = date[1]
-    },
-    filterOption (input, option) {
-      return (
-        option.componentOptions.children[0].text.toLowerCase().indexOf(input.toLowerCase()) >= 0
-      )
-    },
-    //  重置
-    resetSearchForm () {
-      this.$refs.rangeDate.resetDate()
-      this.queryParam.beginDate = ''
-      this.queryParam.endDate = ''
-      this.queryParam.orderBundleNo = ''
-      this.queryParam.orderBundle.custMobile = ''
-      this.queryParam.bundleName = ''
-      this.queryParam.itemName = ''
-      this.oldTime = undefined
-      this.newTime = undefined
-      this.$refs.table.refresh(true)
-    },
-    //  基本信息  保存
-    handleOk () {
-      this.$router.push({ path: `/salesManagement/quotation/add` })
-    },
-    //  新增
-    handleAdd () {
-      this.openModal = true
-    },
-    //  编辑
-    handleEdit (row) {
-      this.$router.push({ path: `/salesManagement/quotation/edit/${row.id}` })
-    },
-    //  详情
-    handleDetail (row) {
-      this.$router.push({ path: `/salesManagement/quotation/detail/${row.id}` })
-    },
-    //  删除
-    handleDel (row) {
-      const _this = this
-      this.$confirm({
-        title: '提示',
-        content: '删除后不可恢复,确定要进行删除吗?',
-        centered: true,
-        onOk () {
-          // warehouseDel({
-          //   id: row.id
-          // }).then(res => {
-          //   if (res.status == 200) {
-          //     _this.$message.success(res.message)
-          //     _this.$refs.table.refresh()
-          //   }
-          // })
-        }
-      })
-    }
-  }
-}
-</script>

+ 13 - 7
src/views/salesManagement/salesQuery/detail.vue

@@ -82,6 +82,7 @@
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
+          :defaultLoadData="false"
           bordered>
         </s-table>
       </a-card>
@@ -237,15 +238,20 @@ export default {
     }
   },
   mounted () {
-    this.getDetail()
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.$refs.table.refresh(true)
+      this.getDetail()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.$refs.table.refresh(true)
+      this.getDetail()
+    }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      if (!vm.disabled) {
-        vm.getDetail()
-        vm.$refs.table.refresh()
-      }
-    })
+    next(vm => {})
   }
 }
 </script>

+ 11 - 9
src/views/salesManagement/salesQuery/edit.vue

@@ -284,7 +284,6 @@ export default {
       }).then(res => {
         this.resetSearchForm(true)
         if (res.status == 200) {
-          // this.$refs.partQuery.resetCurForm()
           this.$refs.partQuery.pageInit()
           this.$message.info(res.message)
         }
@@ -527,7 +526,6 @@ export default {
       }).then(res => {
         if (res.status == 200) {
           this.resetSearchForm(true)
-          // this.$refs.partQuery.resetCurForm()
           this.$message.success('产品添加成功', 2.5)
           this.$refs.partQuery.pageInit()
         }
@@ -565,18 +563,22 @@ export default {
       vm.orderId = vm.$route.params.id
       vm.salesBillSn = vm.$route.params.sn
       vm.getOrderDetail()
-      if (!vm.disabled) {
-        vm.resetForm()
-      }
+      vm.$refs.table.refresh(true)
     }
   },
   mounted () {
-    this.pageInit()
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.pageInit()
+    }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.pageInit()
-    })
+    next(vm => {})
   }
 }
 </script>

+ 14 - 11
src/views/salesManagement/salesQuery/list.vue

@@ -102,6 +102,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ y:tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 销售单号 -->
         <template slot="salesBillNo" slot-scope="text, record">
@@ -415,14 +416,20 @@ export default {
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 265
+    },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+      _this.getSettleStyle()
     }
   },
   mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
-    _this.getSettleStyle()
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
   },
   watch: {
     advanced (newValue, oldValue) {
@@ -435,16 +442,12 @@ export default {
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
+      this.pageInit()
       this.resetSearchForm()
     }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      if (!vm.disabled) {
-        vm.getSettleStyle()
-        vm.$refs.table.refresh()
-      }
-    })
+    next(vm => {})
   }
 }
 </script>

+ 13 - 7
src/views/salesManagement/salesReturn/detail.vue

@@ -65,6 +65,7 @@
           :rowKey="(record) => record.id"
           :columns="columns"
           :data="loadData"
+          :defaultLoadData="false"
           bordered>
         </s-table>
       </a-card>
@@ -212,15 +213,20 @@ export default {
     }
   },
   mounted () {
-    this.getDetail()
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.$refs.table.refresh(true)
+      this.getDetail()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.$refs.table.refresh(true)
+      this.getDetail()
+    }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      if (!vm.disabled) {
-        vm.getDetail()
-        vm.$refs.table.refresh()
-      }
-    })
+    next(vm => {})
   }
 }
 </script>

+ 15 - 11
src/views/salesManagement/salesReturn/list.vue

@@ -74,6 +74,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 单号 -->
         <template slot="salesReturnNo" slot-scope="text, record">
@@ -266,17 +267,17 @@ export default {
     custChange (obj) {
       this.queryParam.buyerSn = obj.key || undefined
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 270
     }
   },
-  mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
-  },
   watch: {
     advanced (newValue, oldValue) {
       const _this = this
@@ -285,18 +286,21 @@ export default {
       }, 400)
     }
   },
+  mounted () {
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
+  },
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
+      this.pageInit()
       this.resetSearchForm()
     }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      if (!vm.disabled) {
-        vm.$refs.table.refresh()
-      }
-    })
+    next(vm => {})
   }
 }
 </script>

+ 11 - 7
src/views/salesManagement/salesReturn/salesReturnEdit.vue

@@ -555,18 +555,22 @@ export default {
       this.buyerSn = this.$route.params.buyerSn
       this.getOrderDetail()
       this.getWarehouseCascade()
-      if (!this.disabled) {
-        this.resetForm()
-      }
+      this.resetForm()
     }
   },
   mounted () {
-    this.pageInit()
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.pageInit()
+    }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.pageInit()
-    })
+    next(vm => {})
   }
 }
 </script>

+ 13 - 9
src/views/salesManagement/salesReturn/salesReturnGrabEdit.vue

@@ -541,20 +541,24 @@ export default {
       this.orderId = this.$route.params.id
       this.orderSn = this.$route.params.sn
       this.buyerSn = this.$route.params.buyerSn
-      if (!this.disabled) {
-        this.getOrderDetail()
-        this.getWarehouseCascade()
-        this.resetForm()
-      }
+      this.getOrderDetail()
+      this.getWarehouseCascade()
+      this.resetForm()
     }
   },
   mounted () {
-    this.pageInit()
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.pageInit()
+    }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      vm.pageInit()
-    })
+    next(vm => {})
   }
 }
 </script>

+ 13 - 9
src/views/salesManagement/salesman/list.vue

@@ -45,6 +45,7 @@
       :columns="columns"
       :data="loadData"
       :scroll="{ y: tableHeight }"
+      :defaultLoadData="false"
       bordered>
       <!-- 操作 -->
       <template slot="action" slot-scope="text, record">
@@ -179,6 +180,12 @@ export default {
       this.openModal = false
       this.$refs.table.refresh(true)
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 245
@@ -193,23 +200,20 @@ export default {
     }
   },
   mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
   },
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
+      this.pageInit()
       this.resetSearchForm()
     }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      if (!vm.disabled) {
-        vm.$refs.table.refresh()
-      }
-    })
+    next(vm => {})
   }
 }
 </script>

+ 13 - 20
src/views/salesManagement/urgentItemsOffset/detail.vue

@@ -7,11 +7,6 @@
         <template slot="subTitle" v-if="!outBizSn">
           <a id="urgentItemsOffsetDetail-btn-back" href="javascript:;" @click="handleBack"><a-icon type="left" /> 返回列表</a>
         </template>
-        <!-- 操作区,位于 title 行的行尾 -->
-        <template slot="extra">
-          <!-- <a-button key="2" @click="handlePreview" id="urgentItemsOffsetDetail-btn-preview">打印预览</a-button>
-          <a-button key="1" type="primary" @click="handlePrint" id="urgentItemsOffsetDetail-btn-print">快速打印</a-button> -->
-        </template>
       </a-page-header>
       <!-- 急件单信息 -->
       <a-card size="small" :bordered="false" class="urgentItemsOffsetDetail-info-wrapper">
@@ -52,6 +47,7 @@
           :rowKey="(record) => record.id"
           :columns="isWriteDown ? columns : unColumns"
           :data="loadData"
+          :defaultLoadData="false"
           bordered>
           <!-- 库存数量 -->
           <template slot="inventoryQuantity" slot-scope="text, record">
@@ -169,26 +165,23 @@ export default {
           })
         }
       })
-    },
-    //  快速打印
-    handlePrint () {
-
-    },
-    //  打印预览
-    handlePreview () {
-
     }
   },
   mounted () {
-    this.getDetail()
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.$refs.table.refresh(true)
+      this.getDetail()
+    }
+  },
+  activated () {
+    // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
+    if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
+      this.$refs.table.refresh(true)
+      this.getDetail()
+    }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      if (!vm.disabled) {
-        vm.getDetail()
-        vm.$refs.table.refresh()
-      }
-    })
+    next(vm => {})
   }
 }
 </script>

+ 13 - 9
src/views/salesManagement/urgentItemsOffset/list.vue

@@ -59,6 +59,7 @@
         :columns="columns"
         :data="loadData"
         :scroll="{ y: tableHeight }"
+        :defaultLoadData="false"
         bordered>
         <!-- 单号 -->
         <template slot="urgentBillNo" slot-scope="text, record">
@@ -145,16 +146,22 @@ export default {
     custChange (obj) {
       this.queryParam.buyerSn = obj.key || undefined
     },
+    pageInit () {
+      const _this = this
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
     setTableH () {
       const tableSearchH = this.$refs.tableSearch.offsetHeight
       this.tableHeight = window.innerHeight - tableSearchH - 195
     }
   },
   mounted () {
-    const _this = this
-    this.$nextTick(() => { // 页面渲染完成后的回调
-      _this.setTableH()
-    })
+    if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
+      this.pageInit()
+      this.resetSearchForm()
+    }
   },
   watch: {
     advanced (newValue, oldValue) {
@@ -167,15 +174,12 @@ export default {
   activated () {
     // 如果是新页签打开,则重置当前页面
     if (this.$store.state.app.isNewTab) {
+      this.pageInit()
       this.resetSearchForm()
     }
   },
   beforeRouteEnter (to, from, next) {
-    next(vm => {
-      if (!vm.disabled) {
-        vm.$refs.table.refresh()
-      }
-    })
+    next(vm => {})
   }
 }
 </script>