浏览代码

Merge branch 'develop_lb1' of jianguan-web/qpls-md-html into pre-release

李磊 3 年之前
父节点
当前提交
5a29e40f3b

+ 2 - 0
public/index.html

@@ -17,6 +17,8 @@
       var isElectronApp = userAgent.indexOf(' electron/') > -1
       if (isElectronApp){
          var ipcRenderer = require('electron').ipcRenderer
+         var clipboardElectron = require('electron').clipboard
+         var nativeImageElectron = require('electron').nativeImage
          ipcRenderer.send("ready-to-show");
       }
      </script>

+ 1 - 1
public/version.json

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

+ 1 - 0
src/layouts/BasicLayout.vue

@@ -234,6 +234,7 @@ export default {
         description: `临到月底了,请尽快处理系统中没有完结的单据!`
       })
     }
+    this.$store.state.app.isNewTab = true
     // 打印设置
     this.$store.commit('SET_pdfPrintList', [])
     this.$store.commit('SET_showPdfPrint', false)

+ 11 - 1
src/libs/getDate.js

@@ -135,5 +135,15 @@ export default {
     obj.starttime = moment(moment().month(moment().month() - 2).startOf('month').valueOf()).format('YYYY-MM-DD 00:00:00')
     obj.endtime = moment(moment().month(moment().month() - 2).endOf('month').valueOf()).format('YYYY-MM-DD 23:59:59')
     return obj
-  }
+  },
+  // 获取从今天到指定月的
+  getMonthDays (month) {
+    const obj = {
+      starttime: '',
+      endtime: ''
+    }
+    obj.starttime = moment(moment().month(moment().month() - month).valueOf()).format('YYYY-MM-DD 00:00:00')
+    obj.endtime = moment().format('YYYY-MM-DD 23:59:59')
+    return obj
+  },
 }

+ 71 - 27
src/views/Home.vue

@@ -2,7 +2,7 @@
   <div class="home" :class="[fontSize]">
     <!-- <a-alert :message="message" type="info" /> -->
     <a-card size="small" :bordered="false" class="page-cont" :bodyStyle="{padding: '17px 30px 20px'}">
-      <h3 class="page-tit">客户信息</h3>
+      <h3 class="page-tit"><span>客户信息</span></h3>
       <ul class="page-list">
         <li>商户名称:{{ $store.getters.userInfo.orgName || '--' }}</li>
         <li>商户别名:{{ dealerData&&dealerData.dealerAlias || '--' }}</li>
@@ -232,36 +232,51 @@
     <div>
       <a-row>
         <a-col :span="16">
-          <a-card size="small" :bordered="false" class="page-cont" :bodyStyle="{padding: '17px 30px 20px'}">
-            <h3 class="page-tit">销售/采购/调拨指引</h3>
-            <div class="page-nav-main">
-              <!-- 导航指引  start -->
-              <div class="page-nav-con" v-for="(item, index) in navList" :key="index">
-                <div class="page-nav-box" v-for="(subItem, subInd) in item" :key="subInd">
-                  <a-badge
-                    :count="countData&&unitItem.permission&&unitItem.orderNum&&$hasPermissions(unitItem.permission) ? countData[unitItem.orderNum] : 0"
-                    class="page-nav-badge"
-                    v-for="(unitItem, unitInd) in subItem"
-                    :key="unitInd"
-                    @click="unitItem.permission&&unitItem.url&&$hasPermissions(unitItem.permission) ? goPage(unitItem,subInd) : null"
-                    :style="{cursor: unitItem.permission&&unitItem.url&&$hasPermissions(unitItem.permission)?'pointer': 'initial'}">
-                    <div :class="['page-nav-item', unitItem.styleC]">
-                      <div class="page-nav-n">
-                        <img v-show="unitItem.icon" :src="unitItem.icon" width="16" height="16" />
-                        <span>{{ unitItem.name }}</span>
+          <a-spin :spinning="spinning" tip="Loading...">
+            <a-card size="small" :bordered="false" class="page-cont" :bodyStyle="{padding: '17px 30px 20px'}">
+              <h3 class="page-tit">
+                <span>销售/采购/调拨指引</span>
+                <a-radio-group v-model="curDate" @change="onDateChange">
+                  <!-- <a-radio-button value="6">
+                  最近半年
+                </a-radio-button> -->
+                  <a-radio-button value="12">
+                    最近一年
+                  </a-radio-button>
+                  <a-radio-button value="0">
+                    全部
+                  </a-radio-button>
+                </a-radio-group>
+              </h3>
+              <div class="page-nav-main">
+                <!-- 导航指引  start -->
+                <div class="page-nav-con" v-for="(item, index) in navList" :key="index">
+                  <div class="page-nav-box" v-for="(subItem, subInd) in item" :key="subInd">
+                    <a-badge
+                      :count="countData&&unitItem.permission&&unitItem.orderNum&&$hasPermissions(unitItem.permission) ? countData[unitItem.orderNum] : 0"
+                      class="page-nav-badge"
+                      v-for="(unitItem, unitInd) in subItem"
+                      :key="unitInd"
+                      @click="unitItem.permission&&unitItem.url&&$hasPermissions(unitItem.permission) ? goPage(unitItem,subInd) : null"
+                      :style="{cursor: unitItem.permission&&unitItem.url&&$hasPermissions(unitItem.permission)?'pointer': 'initial'}">
+                      <div :class="['page-nav-item', unitItem.styleC]">
+                        <div class="page-nav-n">
+                          <img v-show="unitItem.icon" :src="unitItem.icon" width="16" height="16" />
+                          <span>{{ unitItem.name }}</span>
+                        </div>
+                        <a-icon type="caret-right" v-show="unitItem.permission&&unitItem.url&&$hasPermissions(unitItem.permission)" style="color: #BBBBBB;" />
                       </div>
-                      <a-icon type="caret-right" v-show="unitItem.permission&&unitItem.url&&$hasPermissions(unitItem.permission)" style="color: #BBBBBB;" />
-                    </div>
-                  </a-badge>
+                    </a-badge>
+                  </div>
                 </div>
-              </div>
               <!-- 导航指引  end -->
-            </div>
-          </a-card>
+              </div>
+            </a-card>
+          </a-spin>
         </a-col>
         <a-col :span="8">
           <a-card size="small" :bordered="false" class="page-cont right-con" :bodyStyle="{padding: '17px 30px 20px'}">
-            <h3 class="page-tit">财务指引</h3>
+            <h3 class="page-tit"><span>财务指引</span></h3>
             <!-- 财务指引  start -->
             <div class="page-nav-con" v-for="(item, index) in navFinancialList" :key="index">
               <div class="page-nav-box" v-for="(subItem, subInd) in item" :key="subInd" style="width: 50%;">
@@ -279,7 +294,7 @@
             <!-- 财务指引  end -->
           </a-card>
           <a-card size="small" :bordered="false" class="page-cont right-con" :bodyStyle="{padding: '17px 30px 20px'}">
-            <h3 class="page-tit">其他指引</h3>
+            <h3 class="page-tit"><span>其他指引</span></h3>
             <!-- 其他指引  start -->
             <div class="page-nav-con" v-for="(item, index) in navOtherList" :key="index">
               <div class="page-nav-box" v-for="(subItem, subInd) in item" :key="subInd" style="width: 50%;">
@@ -331,6 +346,7 @@
 
 <script>
 import { mixin, commonMixin } from '@/utils/mixin'
+import getDate from '@/libs/getDate.js'
 import { mapGetters } from 'vuex'
 import ResetPwd from '@/views/user/ResetPwd.vue'
 import newProduct from '@/views/productManagement/newProduct/modal.vue'
@@ -342,11 +358,17 @@ export default {
   mixins: [mixin, commonMixin],
   data () {
     return {
+      spinning: false,
       message: '欢迎登录' + process.env.VUE_APP_PRO_NAME,
       hiddenBizData: true, // 隐藏数据概览
       openResetPwd: false, //  重置密码是否显示
       openNewProduct: false,
       onlineFalg: '1', // 上下线标识  1为上线,0为下线
+      queryParams: {
+        beginDate: getDate.getMonthDays(12).starttime,
+        endDate: getDate.getMonthDays(12).endtime
+      },
+      curDate: '12',
       navList: [
         [ // 客户
           [
@@ -799,20 +821,36 @@ export default {
     },
     // 导航指引合计
     getNavCount () {
-      bizStateCount({}).then(res => {
+      this.spinning = true
+      bizStateCount(this.queryParams).then(res => {
         if (res.status == 200) {
           this.countData = res.data
         } else {
           this.countData = null
         }
+        this.spinning = false
       })
     },
+    onDateChange (e) {
+      console.log(e.target.value)
+      const v = e.target.value
+      if (v != 0) {
+        this.queryParams.beginDate = getDate.getMonthDays(v).starttime
+        this.queryParams.endDate = getDate.getMonthDays(v).endtime
+      } else {
+        this.queryParams.beginDate = undefined
+        this.queryParams.endDate = undefined
+      }
+      this.getNavCount()
+    },
     // 导航跳转
     goPage (data, subInd) {
       if (data) {
         let params = null
         // 有待办数据,则跳转带有条件的;若无待办数据,则跳转全部数据
         if (data.orderNum && this.countData[data.orderNum] || data.params) {
+          data.params.beginDate = this.queryParams.beginDate
+          data.params.endDate = this.queryParams.endDate
           params = { pageParams: data.params, type: 'todo' }
         } else {
           params = { pageParams: null, type: subInd == 1 ? 'new' : 'todo' }
@@ -878,6 +916,12 @@ export default {
         font-size: 16px;
         font-weight: 500;
         margin-bottom: 18px;
+        display: flex;
+        justify-content: space-between;
+        align-items: center;
+        span{
+          font-weight: bold;
+        }
       }
       .page-list{
         list-style: none;

+ 4 - 2
src/views/allocationManagement/chainTransferOut/list.vue

@@ -271,11 +271,13 @@ export default {
       this.queryParam.allocationType = undefined
       this.queryParam.state = undefined
       this.queryParam.settleState = undefined
+	    if (!flag) {
+	      this.setIsHomeNav(this.$route.name, null)
+	    }
     },
     //  基本信息  保存
     handleOk (data) {
       this.resetData()
-      this.setIsHomeNav(this.$route.name, null)
       this.$router.push({ path: `/allocationManagement/chainTransferOut/add/${data.id}/${data.allocationLinkageOutSn}` })
     },
     //  删除
@@ -386,12 +388,12 @@ export default {
         if (isHomeNav.type == 'new') {
           this.resetSearchForm()
           this.openModal = true
-          this.setIsHomeNav(this.$route.name, null)
         }
         // 待办
         if (isHomeNav.type == 'todo') {
           this.resetData(true)
           this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.rangeDate.resetDate([this.queryParam.beginDate, this.queryParam.endDate])
           this.$refs.table.refresh(true)
         }
       } else {

+ 4 - 3
src/views/allocationManagement/storeTransferOut/list.vue

@@ -242,7 +242,6 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      console.log('resetSearchForm')
       this.resetData()
       this.$refs.table.refresh(true)
     },
@@ -262,11 +261,13 @@ export default {
       this.queryParam.callOutType = undefined
       this.queryParam.state = undefined
       this.queryParam.settleState = undefined
+      if (!flag) {
+        this.setIsHomeNav(this.$route.name, null)
+      }
     },
     //  基本信息  保存
     handleOk (data) {
       this.resetData()
-      this.setIsHomeNav(this.$route.name, null)
       this.$router.push({ path: `/allocationManagement/storeTransferOut/add/${data.id}/${data.storeCallOutSn}` })
     },
     //  删除
@@ -372,12 +373,12 @@ export default {
         if (isHomeNav.type == 'new') {
           this.resetSearchForm()
           this.openModal = true
-          this.setIsHomeNav(this.$route.name, null)
         }
         // 待办
         if (isHomeNav.type == 'todo') {
           this.resetData(true)
           this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.rangeDate.resetDate([this.queryParam.beginDate, this.queryParam.endDate])
           this.$refs.table.refresh(true)
         }
       } else {

+ 4 - 2
src/views/allocationManagement/warehouseAllocation/list.vue

@@ -213,6 +213,9 @@ export default {
       this.queryParam.outWarehouseSn = undefined
       this.queryParam.putWarehouseSn = undefined
       this.queryParam.state = undefined
+      if (!flag) {
+        this.setIsHomeNav(this.$route.name, null)
+      }
     },
     //  删除
     handleDel (row) {
@@ -264,7 +267,6 @@ export default {
     handleEdit (row, flag) {
       if (!flag) {
         this.resetData()
-        this.setIsHomeNav(this.$route.name, null)
       }
       this.$router.push({ path: `/allocationManagement/warehouseAllocation/edit/${row.id}/${row.allocationWarehouseSn}` })
     },
@@ -289,12 +291,12 @@ export default {
         if (isHomeNav.type == 'new') {
           this.resetSearchForm()
           this.openModal = true
-          this.setIsHomeNav(this.$route.name, null)
         }
         // 待办
         if (isHomeNav.type == 'todo') {
           this.resetData(true)
           this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.rangeDate.resetDate([this.queryParam.beginDate, this.queryParam.endDate])
           this.$refs.table.refresh(true)
         }
       } else {

+ 4 - 2
src/views/bulkManagement/bulkReturnGoods/list.vue

@@ -264,11 +264,13 @@ export default {
       this.queryParam.isGrab = undefined
       this.queryParam.settleState = undefined
       this.queryParam.state = undefined
+      if (!flag) {
+        this.setIsHomeNav(this.$route.name, null)
+      }
     },
     //  基本信息  保存
     handleOk (data) {
       this.resetData()
-      this.setIsHomeNav(this.$route.name, null)
       this.handleEdit(data)
     },
     //  新增
@@ -376,12 +378,12 @@ export default {
         if (isHomeNav.type == 'new') {
           this.resetSearchForm()
           this.openModal = true
-          this.setIsHomeNav(this.$route.name, null)
         }
         // 待办
         if (isHomeNav.type == 'todo') {
           this.resetData(true)
           this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.rangeDate.resetDate([this.queryParam.beginDate, this.queryParam.endDate])
           this.$refs.table.refresh(true)
         }
       } else {

+ 4 - 2
src/views/bulkManagement/bulkWarehousingOrder/list.vue

@@ -255,7 +255,6 @@ export default {
     //  基本信息  保存
     handleOk (row) {
       this.resetData()
-      this.setIsHomeNav(this.$route.name, null)
       this.$router.push({ path: `/bulkManagement/bulkWarehousingOrder/add/${row.id}/${row.sparePartsPurchaseSn}/${row.supplierSn}` })
     },
     //  编辑
@@ -325,6 +324,9 @@ export default {
       this.queryParam.supplierSn = undefined
       this.queryParam.state = undefined
       this.queryParam.settleState = undefined
+      if (!flag) {
+        this.setIsHomeNav(this.$route.name, null)
+      }
     },
     filterOption (input, option) {
       return (
@@ -377,12 +379,12 @@ export default {
         if (isHomeNav.type == 'new') {
           this.resetSearchForm()
           this.openModal = true
-          this.setIsHomeNav(this.$route.name, null)
         }
         // 待办
         if (isHomeNav.type == 'todo') {
           this.resetData(true)
           this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.rangeDate.resetDate([this.queryParam.beginDate, this.queryParam.endDate])
           this.$refs.table.refresh(true)
         }
       } else {

+ 105 - 19
src/views/common/pdfViewModal.vue

@@ -17,8 +17,13 @@
           <div>
             调整比例:{{ Math.round(scalVal*100) }}%
             <div>
-              <a-button size="small" @click="setScalVal(0)"><a-icon type="minus" /> 缩小</a-button>
-              <a-button size="small" @click="setScalVal(1)"><a-icon type="plus" /> 放大</a-button>
+              <a-button :disabled="scalLoading" style="margin-right: 10px;" size="small" @click="setScalVal(0)"><a-icon type="minus" /> 缩小</a-button>
+              <a-button :disabled="scalLoading" size="small" @click="setScalVal(1)"><a-icon type="plus" /> 放大</a-button>
+            </div>
+          </div>
+          <div>
+            <div v-if="hasClipboard">
+              <a-button :disabled="scalLoading" size="small" @click="handleCapture('export')"><a-icon type="export" /> 导出图片</a-button>
             </div>
           </div>
           <div>
@@ -32,24 +37,25 @@
             </div>
           </div>
         </div>
-        <vue-scroll :ops="ops" :style="{width: Math.round(scalVal*100)+'%',height: '70vh',margin:'0 auto'}">
+        <vue-scroll :ops="ops" :style="{width: '100%',height: '70vh',margin:'0 auto',padding: '10px 0'}">
           <div v-if="loadedRatio > 0 && loadedRatio < 1" style="background-color: green; color: white; text-align: center" :style="{ width: loadedRatio * 100 + '%' }">{{ Math.floor(loadedRatio * 100) }}%</div>
           <pdf
             ref="pdf"
             v-for="(item,index) in pdfList"
             :key="'pdf-'+index"
-            :style="{width: '100%'}"
+            :style="{width: Math.round(scalVal*100)+'%',margin:'0 auto'}"
             :src="getUrl('data:application/pdf;base64,' + item)"
             :page="page"
             :rotate="rotate"
-            @progress="loadedRatio = $event"
             @error="error"
-            @num-pages="numPages = $event"
-            @link-clicked="page = $event"></pdf>
+          ></pdf>
         </vue-scroll>
       </div>
       <div class="btn-box">
         <a-button size="large" style="margin-right: 25px;" @click="handleCommonCancel" v-if="isCancel">{{ cancelText }}</a-button>
+        <a-button size="large" style="margin-right: 25px;" type="default" @click="handleCapture(hasClipboard?'copy':'export')">
+          {{ hasClipboard?'复制截图':'导出图片' }}
+        </a-button>
         <a-button size="large" type="primary" :loading="$store.state.app.printLoading" @click="handleCommonOk">
           {{ $store.state.app.printLoading?'打印中...':okText }}
         </a-button>
@@ -59,6 +65,7 @@
 </template>
 
 <script>
+import moment from 'moment'
 import pdf from 'vue-pdf-signature'
 import CMapReaderFactory from 'vue-pdf-signature/src/CMapReaderFactory.js'
 import { pdfPrint, getPrintList, hasExitTaskByName } from '@/libs/JGPrint'
@@ -95,6 +102,8 @@ export default {
   },
   data () {
     return {
+      scalLoading: false,
+      pdfAllLoad: 0,
       scalVal: 0.75,
       isShow: this.openModal, //  是否打开弹框
       show: true,
@@ -125,6 +134,12 @@ export default {
       printList: []
     }
   },
+  computed: {
+    hasClipboard () {
+      console.log(typeof ClipboardItem)
+      return typeof ClipboardItem !== 'undefined'
+    }
+  },
   methods: {
     // 选择打印机
     changePrint (v) {
@@ -134,12 +149,18 @@ export default {
     },
     // 缩放
     setScalVal (t) {
-      this.scalVal = this.scalVal + (t ? 0.05 : -0.05)
-      if (this.scalVal > 1) {
-        this.scalVal = 1
-      }
-      if (this.scalVal < 0.5) {
-        this.scalVal = 0.5
+      if (!this.scalLoading) {
+        this.scalLoading = true
+        this.scalVal = this.scalVal + (t ? 0.05 : -0.05)
+        if (this.scalVal > 1) {
+          this.scalVal = 1
+        }
+        if (this.scalVal < 0.5) {
+          this.scalVal = 0.5
+        }
+        setTimeout(() => {
+          this.scalLoading = false
+        }, 1000)
       }
     },
     getUrl (item) {
@@ -149,7 +170,6 @@ export default {
     setData (data) {
       // console.log(data)
       this.pdfList = data
-      this.src = data[0]
       this.curpage = 1
       this.total = data.length
       // 获取打印机列表
@@ -183,9 +203,74 @@ export default {
       this.$emit('cancel')
       this.scalVal = 0.75
     },
-    // 下载
-    handleDownload () {
-      console.log(this.$refs.pdf[0].pdf)
+    // 截图
+    handleCapture (type) {
+      if (this.scalLoading) { return }
+      const pdf = this.$refs.pdf
+      const len = pdf.length
+      const imgsList = []
+      const canvas = document.createElement('canvas')
+      let maxHeight = 0
+      const maxWidth = pdf[0].$refs.canvas.width
+      for (let i = 0; i < len; i++) {
+        const imgs = pdf[i].$refs.canvas
+        maxHeight = maxHeight + imgs.height
+        imgsList.push(imgs)
+      }
+      // 设置画布宽度和高度
+      canvas.width = maxWidth
+      canvas.height = maxHeight
+      const ctx = canvas.getContext('2d')
+      // 开始合并
+      let y = 0
+      imgsList.map(item => {
+        ctx.drawImage(item, 0, y, item.width, item.height)
+        y = y + item.height
+      })
+      const base64Str = canvas.toDataURL('image/png')
+      // 复制图片
+      if (type == 'copy') {
+        this.copyImgBtn(base64Str)
+      }
+      // 下载图片
+      if (type == 'export') {
+        const fileName = moment().format('YYYYMMDDHHmmss')
+        this.downloadFile(fileName, base64Str)
+      }
+      // 清除画布
+      ctx.clearRect(0, 0, maxWidth, maxHeight)
+    },
+    downloadFile (fileName, base64Data) {
+      const aLink = document.createElement('a')
+      const blob = this.convertBase64ToBlob(base64Data.split(',')[1], 'image/png')
+      const evt = document.createEvent('HTMLEvents')
+      // initEvent 不加后两个参数在FF下会报错  事件类型,是否冒泡,是否阻止浏览器的默认行为
+      evt.initEvent('click', true, true)
+      aLink.download = fileName
+      aLink.href = URL.createObjectURL(blob)
+      aLink.click()
+    },
+    // 将照片复制到剪贴版
+    copyImgBtn (base64Data) {
+      const blobInput = this.convertBase64ToBlob(base64Data.split(',')[1], 'image/png')
+      if (navigator.clipboard) {
+        const clipboardItemInput = new ClipboardItem({ 'image/png': blobInput })
+        navigator.clipboard.write([clipboardItemInput])
+        this.$message.success('复制截图成功!')
+      } else {
+        const image = nativeImageElectron.createFromDataURL(base64Data)
+        clipboardElectron.writeImage(image)
+        this.$message.success('复制截图成功!')
+      }
+    },
+    convertBase64ToBlob (base64, type) {
+      var bytes = window.atob(base64)
+      var ab = new ArrayBuffer(bytes.length)
+      var ua = new Uint8Array(ab)
+      for (var i = 0; i < bytes.length; i++) {
+        ua[i] = bytes.charCodeAt(i)
+      }
+      return new Blob([ab], { type: type })
     }
   },
   watch: {
@@ -206,16 +291,17 @@ export default {
 <style lang="less">
   .common-pdfView-modal{
     .ant-modal-body{
-      padding: 0 0 30px 0;
+      padding: 0 0 20px 0;
     }
     .common-main{
-      background-color: #fff;
+      background-color: #666;
       .tools{
         padding: 10px;
         display: flex;
         align-items: center;
         border-bottom: 1px solid #eee;
         background-color: #f8f8f8;
+        justify-content: space-between;
         > div{
           display: flex;
           align-items: center;

+ 6 - 3
src/views/financialManagement/financialCollection/list.vue

@@ -35,11 +35,11 @@
                   ></v-select>
                 </a-form-item>
               </a-col>
-              <!-- <a-col :md="6" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="创建时间">
                   <rangeDate ref="createDate" @change="createDateChange" />
                 </a-form-item>
-              </a-col> -->
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="审核时间">
                   <rangeDate ref="rangeDate" @change="dateChange" />
@@ -295,6 +295,8 @@ export default {
       settleReceiptQuerySum(params).then(res => {
         if (res.status == 200) {
           this.totalData = Object.assign(this.totalData, res.data)
+          const tab = this.tabPaneData.find(item => item.bizType == this.queryParam.bizType)
+          tab.countNum = this.totalData.count || 0
         }
       })
     },
@@ -405,7 +407,7 @@ export default {
     resetData () {
       if (this.advanced) {
         this.$refs.rangeDate.resetDate()
-        // this.$refs.createDate.resetDate()
+        this.$refs.createDate.resetDate()
       }
       this.$refs.table.clearSelected() // 清空表格选中项
       this.queryParam = {
@@ -458,6 +460,7 @@ export default {
       this.curBizType = isHomeNav.pageParams.bizType
       this.resetData()
       this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+      this.$refs.createDate.resetDate([this.queryParam.beginDate, this.queryParam.endDate])
       this.pageInit()
     } else {
       // 如果是新页签打开,则重置当前页面

+ 6 - 3
src/views/financialManagement/financialPayment/list.vue

@@ -34,11 +34,11 @@
                     allowClear></v-select>
                 </a-form-item>
               </a-col>
-              <!-- <a-col :md="6" :sm="24">
+              <a-col :md="6" :sm="24">
                 <a-form-item label="创建时间">
                   <rangeDate ref="createDate" @change="createDateChange" />
                 </a-form-item>
-              </a-col> -->
+              </a-col>
               <a-col :md="6" :sm="24">
                 <a-form-item label="审核时间">
                   <rangeDate ref="rangeDate" @change="dateChange" />
@@ -234,6 +234,8 @@ export default {
       settlePayQuerySum(params).then(res => {
         if (res.status == 200) {
           this.totalData = Object.assign(this.totalData, res.data)
+          const tab = this.tabPaneData.find(item => item.bizType == this.queryParam.bizType)
+          tab.countNum = this.totalData.count || 0
         }
       })
     },
@@ -345,7 +347,7 @@ export default {
     resetData () {
       if (this.advanced) {
         this.$refs.rangeDate.resetDate()
-        // this.$refs.createDate.resetDate()
+        this.$refs.createDate.resetDate()
       }
       this.$refs.table.clearSelected() // 清空表格选中项
       this.queryParam = {
@@ -398,6 +400,7 @@ export default {
       this.curBizType = isHomeNav.pageParams.bizType
       this.resetData()
       this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+      this.$refs.createDate.resetDate([this.queryParam.beginDate, this.queryParam.endDate])
       this.pageInit()
     } else {
       // 如果是新页签打开,则重置当前页面

+ 1 - 0
src/views/financialManagement/warehousingAudit/list.vue

@@ -273,6 +273,7 @@ export default {
     if (isHomeNav && isHomeNav.type == 'todo') {
       this.resetData(true)
       this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+      this.$refs.rangeDate.resetDate([this.queryParam.beginDate, this.queryParam.endDate])
       this.$refs.table.refresh(true)
     } else {
       // 如果是新页签打开

+ 1 - 1
src/views/numsGoodsShelves/settlementManagement/list.vue

@@ -15,7 +15,7 @@
                 <custList ref="custList" @change="custChange" :itemSn="queryParam.customerSn" :isEnabled="true"></custList>
               </a-form-item>
             </a-col>
-            <a-col :md="6" :sm="24">
+            <a-col :md="4" :sm="24">
               <a-form-item label="结算方式">
                 <v-select code="SHELF_SETTLE_TYPE" v-model="queryParam.settleType" allowClear placeholder="请选择状态"></v-select>
               </a-form-item>

+ 16 - 2
src/views/numsGoodsShelves/settlementManagement/unSettlementDetail.vue

@@ -72,12 +72,14 @@
         </a-alert>
         <s-table
           class="sTable fixPagination"
+          :style="{ height: tableHeight+77+'px' }"
           ref="table"
           size="small"
           rowKey="id"
           :columns="columns"
           :data="loadData"
           :defaultLoadData="false"
+          :scroll="{ y:tableHeight }"
           bordered>
         </s-table>
       </a-card>
@@ -101,6 +103,7 @@ export default {
       disabled: false,
       isEdit: false, // 货位号是否为编辑
       openModal: false, // 货位模板弹窗初始状态
+      tableHeight: 0,
       formItemLayout: {
         labelCol: { span: 6 },
         wrapperCol: { span: 16 }
@@ -208,18 +211,29 @@ export default {
         orderBillNo: ''
       }
       this.$refs.table.refresh(true)
+    },
+    pageInit () {
+      const _this = this
+      this.getPageInfo()
+      this.$nextTick(() => { // 页面渲染完成后的回调
+        _this.setTableH()
+      })
+    },
+    setTableH () {
+      const tableSearchH = this.$refs.tableSearch.offsetHeight
+      this.tableHeight = window.innerHeight - tableSearchH - 300
     }
   },
   mounted () {
     if (!this.$store.state.app.isNewTab) { // 页签刷新时调用
-      this.getPageInfo()
+      this.pageInit()
       this.resetSearchForm()
     }
   },
   activated () {
     // 如果是新页签打开或者进入新的子页(例:存在列表第2条数据编辑页页签时再打开第4条数据的编辑页),则重置当前页面
     if (this.$store.state.app.isNewTab || !this.$store.state.app.isNewSubTab) {
-      this.getPageInfo()
+      this.pageInit()
       this.resetSearchForm()
     }
   }

+ 1 - 0
src/views/outboundOrderManagement/outboundOrder/list.vue

@@ -373,6 +373,7 @@ export default {
     if (isHomeNav && isHomeNav.type == 'todo') {
       this.resetData(true)
       this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+	    this.$refs.rangeDate.resetDate([this.queryParam.beginDate, this.queryParam.endDate])
       this.$refs.table.refresh(true)
     } else {
       // 如果是新页签打开

+ 2 - 1
src/views/purchasingManagement/purchaseOrder/list.vue

@@ -314,6 +314,7 @@ export default {
       this.queryParam.purchaseBillSource = undefined
       if (!flag) {
         this.$refs.table.refresh(true)
+        this.setIsHomeNav(this.$route.name, null)
       }
     },
     filterOption (input, option) {
@@ -353,12 +354,12 @@ export default {
         if (isHomeNav.type == 'new') {
           this.resetSearchForm()
           this.openModal = true
-          this.setIsHomeNav(this.$route.name, null)
         }
         // 待办
         if (isHomeNav.type == 'todo') {
           this.resetSearchForm(true)
           this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.rangeDate.resetDate([this.queryParam.beginDate, this.queryParam.endDate])
           this.$refs.table.refresh(true)
         }
       } else {

+ 4 - 2
src/views/purchasingManagement/purchaseReturn/list.vue

@@ -215,6 +215,9 @@ export default {
       this.queryParam.purchaseReturnNo = ''
       this.queryParam.state = undefined
       this.queryParam.settleState = undefined
+      if (!flag) {
+        this.setIsHomeNav(this.$route.name, null)
+      }
     },
     //  删除
     handleDel (row) {
@@ -270,7 +273,6 @@ export default {
                 _this.spinning = false
                 // 重置查询条件
                 _this.resetData()
-                _this.setIsHomeNav(_this.$route.name, null)
                 _this.$router.push({ path: `/purchasingManagement/purchaseReturn/add/${data.id}/${data.purchaseReturnSn}/${data.returnTargetName}` })
               } else {
                 _this.spinning = false
@@ -352,12 +354,12 @@ export default {
         if (isHomeNav.type == 'new') {
           this.resetSearchForm()
           this.openModal = true
-          this.setIsHomeNav(this.$route.name, null)
         }
         // 待办
         if (isHomeNav.type == 'todo') {
           this.resetData(true)
           this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.rangeDate.resetDate([this.queryParam.beginDate, this.queryParam.endDate])
           this.$refs.table.refresh(true)
         }
       } else {

+ 4 - 2
src/views/purchasingManagement/purchaseReturnOutSync/list.vue

@@ -245,6 +245,9 @@ export default {
       this.queryParam.settleState = undefined
       this.queryParam.returnTargetSn = undefined
       this.queryParam.grabFlag = undefined
+      if (!flag) {
+        this.setIsHomeNav(this.$route.name, null)
+      }
     },
     // 获取供应商数据
     setPurchaseTragetType (data) {
@@ -276,7 +279,6 @@ export default {
       // 新增后跳转到编辑页,非列表点击的编辑,重置查询条件
       if (!flag) {
         this.resetData()
-        this.setIsHomeNav(this.$route.name, null)
       }
       this.$router.push({ name: row.grabFlag == 1 ? 'purchaseReturnOutSyncGrapEdit' : 'purchaseReturnOutSyncEdit', params: { sn: row.purchaseReturnSn, returnTargetType: row.returnTargetType } })
     },
@@ -347,12 +349,12 @@ export default {
         if (isHomeNav.type == 'new') {
           this.resetSearchForm()
           this.openModal = true
-          this.setIsHomeNav(this.$route.name, null)
         }
         // 待办
         if (isHomeNav.type == 'todo') {
           this.resetData(true)
           this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.rangeDate.resetDate([this.queryParam.beginDate, this.queryParam.endDate])
           this.$refs.table.refresh(true)
         }
       } else {

+ 4 - 2
src/views/salesManagement/salesQuery/list.vue

@@ -389,7 +389,6 @@ export default {
     // 选择客户成功
     chooseCustomOk (data) {
       this.resetData()
-      this.setIsHomeNav(this.$route.name, null)
       this.$router.push({ name: 'salesAdd', params: { id: data.id, sn: data.salesBillSn, priceType: data.priceType } })
     },
     // 删除
@@ -448,6 +447,9 @@ export default {
       this.queryParam.financialStatus = undefined
       this.queryParam.salesBillSource = undefined
       this.$refs.custList.resetForm()
+      if (!flag) {
+        this.setIsHomeNav(this.$route.name, null)
+      }
     },
     //  导出
     handleExport () {
@@ -496,12 +498,12 @@ export default {
         if (isHomeNav.type == 'new') {
           this.resetSearchForm()
           this.openModal = true
-          this.setIsHomeNav(this.$route.name, null)
         }
         // 待办
         if (isHomeNav.type == 'todo') {
           this.resetData(true)
           this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.rangeDate.resetDate([this.queryParam.beginDate, this.queryParam.endDate])
           this.$refs.table.refresh(true)
         }
       } else {

+ 4 - 2
src/views/salesManagement/salesReturn/list.vue

@@ -225,7 +225,6 @@ export default {
       // 新增后跳转到编辑页,非列表点击的编辑,重置查询条件
       if (!flag) {
         this.resetData()
-        this.setIsHomeNav(this.$route.name, null)
       }
       this.$router.push({ name: row.grabFlag == 1 ? 'salesReturnGrabEdit' : 'salesReturnEdit', params: { id: row.id, sn: row.salesReturnSn, buyerSn: row.buyerSn } })
     },
@@ -293,6 +292,9 @@ export default {
       this.queryParam.salesReturnNo = ''
       this.queryParam.state = undefined
       this.$refs.custList.resetForm()
+      if (!flag) {
+        this.setIsHomeNav(this.$route.name, null)
+      }
     },
     // 客户 change
     custChange (obj) {
@@ -318,12 +320,12 @@ export default {
         if (isHomeNav.type == 'new') {
           this.resetSearchForm()
           this.openModal = true
-          this.setIsHomeNav(this.$route.name, null)
         }
         // 待办
         if (isHomeNav.type == 'todo') {
           this.resetData(true)
           this.queryParam = Object.assign(this.queryParam, isHomeNav.pageParams)
+          this.$refs.rangeDate.resetDate([this.queryParam.beginDate, this.queryParam.endDate])
           this.$refs.table.refresh(true)
         }
       } else {

+ 1 - 1
vue.config.js

@@ -211,7 +211,7 @@ const vueConfig = {
     // If you want to turn on the proxy, please remove the mockjs /src/main.jsL11
     proxy: {
       '/api': {
-        // target: 'http://192.168.16.151/qpls-md',
+        // target: 'http://192.168.16.105:8503/qpls-md',
         target: 'http://p.iscm.360arrow.com/qpls-md',
         // ws: false,
         ws: true,