Ver Fonte

bug修复 查询条件3个月

chenrui há 3 anos atrás
pai
commit
b609e82627

+ 11 - 7
src/views/allocationManagement/transferOut/list.vue

@@ -1,14 +1,13 @@
 <template>
   <a-card size="small" :bordered="false" class="allocateBillList-wrap">
     <a-spin :spinning="spinning" tip="Loading...">
-
       <!-- 搜索条件 -->
       <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" />
+                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -119,6 +118,7 @@
 
 <script>
 import moment from 'moment'
+import getDate from '@/libs/getDate.js'
 import { STable, VSelect } from '@/components'
 import basicInfoModal from './basicInfoModal.vue'
 import rangeDate from '@/views/common/rangeDate.vue'
@@ -132,9 +132,13 @@ export default {
       spinning: false,
       advanced: false, // 高级搜索 展开/关闭
       tableHeight: 0,
+      time: [
+        moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
+        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
+      ],
       queryParam: { //  查询条件
-        beginDate: '',
-        endDate: '',
+        beginDate: getDate.getThreeMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
         targetName: '', //  调往对象
         allocateTypeSn: undefined, //  调拨类型
         state: undefined, //  业务状态
@@ -188,9 +192,9 @@ export default {
     },
     //  重置
     resetSearchForm () {
-      this.$refs.rangeDate.resetDate()
-      this.queryParam.beginDate = ''
-      this.queryParam.endDate = ''
+      this.$refs.rangeDate.resetDate(this.time)
+      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.queryParam.targetName = ''
       this.queryParam.allocateTypeSn = undefined
       this.queryParam.state = undefined

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

@@ -7,7 +7,7 @@
           <a-row :gutter="15">
             <a-col :md="6" :sm="24">
               <a-form-item label="创建时间">
-                <rangeDate ref="rangeDate" @change="dateChange" />
+                <rangeDate ref="rangeDate" :value="time" @change="dateChange" />
               </a-form-item>
             </a-col>
             <a-col :md="6" :sm="24">
@@ -135,7 +135,6 @@
             v-if="record.billStatus == 'WAIT_AUDIT'&&$hasPermissions('B_salesAudit')"
             @click="handleEexamine(record)"
           >审核</a-button>
-
           <a-button
             size="small"
             type="link"
@@ -143,7 +142,6 @@
             v-if="record.billStatus == 'OUTING_WAREHOUSE'&&record.totalUnpushedQty>0&&$hasPermissions('B_salesDispatch')"
             @click="handleDispatch(record)"
           >下推</a-button>
-
           <a-button
             size="small"
             type="link"
@@ -180,7 +178,7 @@
           >
             取消
           </a-button>
-          <span v-if="record.billStatus == 'FINISH'||record.billStatus == 'CANCEL'||(record.billStatus == 'OUTING_WAREHOUSE'&&record.totalUnpushedQty<=0)">--</span>
+          <span v-if="!(record.billStatus == 'WAIT_AUDIT'&&$hasPermissions('B_salesAudit')) && !(record.billStatus == 'OUTING_WAREHOUSE'&&record.totalUnpushedQty>0&&$hasPermissions('B_salesDispatch')) && !(record.salesBillSource != 'PURCHASE' && (record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT')&&$hasPermissions('B_salesEdit')) && !(record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'HQ_CHANGE')&&$hasPermissions('B_salesEdit')) && !(record.salesBillSource != 'PURCHASE' && (record.billStatus == 'WAIT_SUBMIT' || record.billStatus == 'WAIT_AUDIT' || record.billStatus == 'AUDIT_REJECT')&&$hasPermissions('B_salesDel')) && !(record.salesBillSource == 'PURCHASE' && (record.billStatus == 'WAIT_AUDIT'||record.billStatus == 'HQ_CHANGE')&&$hasPermissions('B_salesDel'))">--</span>
         </template>
       </s-table>
     </a-spin>
@@ -192,6 +190,8 @@
 </template>
 
 <script>
+import moment from 'moment'
+import getDate from '@/libs/getDate.js'
 import rangeDate from '@/views/common/rangeDate.vue'
 import { STable, VSelect } from '@/components'
 import auditModal from '@/views/common/auditModal.vue'
@@ -209,10 +209,14 @@ export default {
       advanced: false, // 高级搜索 展开/关闭
       disabled: false, //  查询、重置按钮是否可操作
       openModal: false, // 选择客户弹框是否显示
+      time: [
+        moment(getDate.getThreeMonthDays().starttime, 'YYYY-MM-DD'),
+        moment(getDate.getCurrMonthDays().endtime, 'YYYY-MM-DD')
+      ],
       // 查询参数
       queryParam: {
-        beginDate: '',
-        endDate: '',
+        beginDate: getDate.getThreeMonthDays().starttime,
+        endDate: getDate.getCurrMonthDays().endtime,
         buyerSn: undefined, //  客户名称
         salesBillNo: '', //  销售单号
         purchaseBillNo: '',
@@ -367,9 +371,9 @@ export default {
     },
     // 重置
     resetSearchForm () {
-      this.$refs.rangeDate.resetDate()
-      this.queryParam.beginDate = ''
-      this.queryParam.endDate = ''
+      this.$refs.rangeDate.resetDate(this.time)
+      this.queryParam.beginDate = getDate.getThreeMonthDays().starttime
+      this.queryParam.endDate = getDate.getCurrMonthDays().endtime
       this.$refs.custList.resetForm()
       this.queryParam.buyerSn = undefined
       this.queryParam.salesBillNo = ''