瀏覽代碼

修改bug

chenrui 2 年之前
父節點
當前提交
59ba1801eb

+ 1 - 4
src/views/dealerManagement/businessOwnerSettings/addModal.vue

@@ -119,9 +119,7 @@ export default {
       })
     },
     resetSearchForm () {
-      if (!this.itemId) {
-        this.$refs.userName.resetForm()
-      }
+      this.$refs.userName.resetForm()
       this.user_name = ''
       this.$refs.ruleForm.resetFields()
     },
@@ -129,7 +127,6 @@ export default {
       this.form.userSn = val.key
     },
     getEditInfo (obj) {
-      // this.user_name = obj.userName
       this.$refs.userName.setDufaultVal(obj.userName)
       this.form = {
         userSn: obj.userSn,

+ 1 - 0
src/views/dealerManagement/businessOwnerSettings/list.vue

@@ -116,6 +116,7 @@ export default {
     },
     // 新增
     handleAdd () {
+      this.itemId = ''
       this.openAddModal = true
     },
     //  重置

+ 13 - 4
src/views/reportData/receivedSendStorageReport/index.vue

@@ -13,6 +13,7 @@
                 <a-month-picker
                   :disabled-date="disabledStartDate"
                   format="YYYY-MM"
+                  v-model="startValue"
                   placeholder="开始月份"
                   @openChange="handleStartOpenChange"
                   @change="getStartDate"
@@ -21,6 +22,7 @@
                 <a-month-picker
                   :disabled-date="disabledEndDate"
                   format="YYYY-MM"
+                  v-model="endValue"
                   placeholder="结束月份"
                   :open="endOpen"
                   @openChange="handleEndOpenChange"
@@ -149,6 +151,8 @@ export default {
       tableHeight: 0,
       endOpen: false,
       showExport: false,
+      startValue: null,
+      endValue: null,
       columns: [
         { title: '产品编码', dataIndex: 'productCode', width: '15%', align: 'center', customRender: function (text) { return text || '--' } },
         { title: '产品名称', dataIndex: 'productName', width: '30%', align: 'center', customRender: function (text) { return text || '--' }, ellipsis: true },
@@ -205,14 +209,14 @@ export default {
     },
     // 选择月份限制
     disabledStartDate (startValue) {
-      const endValue = this.endMonthVal
+      const endValue = this.endValue
       if (!startValue || !endValue) {
         return startValue.valueOf() > this.moment().valueOf()
       }
       return startValue.valueOf() >= endValue.valueOf()
     },
     disabledEndDate (endValue) {
-      const startValue = this.startMonthVal
+      const startValue = this.startValue
       if (!startValue) {
         return endValue.valueOf() > this.moment().valueOf()
       }
@@ -226,7 +230,7 @@ export default {
     },
     getStartDate (date, dateString) {
       this.form.time[0] = dateString
-      this.queryParam.beginDate = this.moment(dateString).startOf('month').format('YYYY-MM-DD') + ' 00:00:00'
+      this.queryParam.beginDate = date ? this.moment(dateString).startOf('month').format('YYYY-MM-DD') + ' 00:00:00' : ''
     },
     // 结束时间
     handleEndOpenChange (open) {
@@ -234,7 +238,7 @@ export default {
     },
     getEndDate (date, dateString) {
       this.form.time[1] = dateString
-      this.queryParam.endDate = this.moment(dateString).endOf('month').format('YYYY-MM-DD') + ' 59:59:59'
+      this.queryParam.endDate = date ? this.moment(dateString).endOf('month').format('YYYY-MM-DD') + ' 59:59:59' : ''
     },
 
     //  产品分类  change
@@ -297,6 +301,11 @@ export default {
     // 重置
     resetSearchForm () {
       this.$refs.ruleForm.resetFields()
+      this.startValue = null
+      this.endValue = null
+      this.time = []
+      this.queryParam.beginDate = undefined
+      this.queryParam.endDate = undefined
       this.queryParam.productCode = undefined
       this.queryParam.productName = undefined
       this.queryParam.productBrandSn = undefined