李林
2024-02-26 8d817b3847f9a96850c1a28f7923940697df7235
src/components/view/data-comparison.vue
@@ -58,7 +58,7 @@
            <div class="search_label">登记日期:</div>
            <div class="search_input">
               <el-date-picker size="small" v-model="componentData.entity.createTime" type="date" placeholder="选择日期"
                  value-format="yyyy-MM-dd" clearable></el-date-picker>
                  value-format="yyyy-MM-dd" :clearable="false" :editable="false"></el-date-picker>
            </div>
         </div>
         <div class="search_thing" style="padding-left: 30px;">
@@ -118,42 +118,29 @@
            mm = "0" + mm;
         }
         this.componentData.entity.createTime = `${yyyy}-${mm}-${dd} 00:00:00`
         this.componentData.entity.name = localStorage.getItem('data_com_name')==undefined?null:localStorage.getItem('data_com_name')
      },
      mounted() {
         this.entityCopy = this.HaveJson(this.componentData.entity)
         // this.selectDataComparisonDtoPageList()
      },
      methods: {
         refreshTable() {
            if (this.componentData.entity.name == null || this.componentData.entity.name == '') {
               this.$message.error('账户名称是必填项')
               this.$message.error('主账户名称是必填项')
            } else if (this.componentData.entity.comparisonName == null || this.componentData.entity.comparisonName == '') {
               this.$message.error('对比的账户名称是必填项')
               this.$message.error('子账户名称是必填项')
            } else if (this.componentData.entity.createTime == null) {
               this.$message.error('登记时间是必填项')
            } else if (this.componentData.entity.name === this.componentData.entity.comparisonName) {
               this.$message.error('对比的账户不能重复')
            } else {
               localStorage.setItem('data_com_name', this.componentData.entity.name)
               this.$refs['ValueTable'].selectList()
            }
         },
         refresh() {
            this.componentData.entity = this.HaveJson(this.entityCopy)
            this.upIndex++
         },
         selectDataComparisonDtoPageList() {
            this.$axios.post(this.$api.dataReporting.selectDataComparisonDtoPageList, {
               headers: {
                  'Content-Type': 'application/json'
               }
            }).then(res => {
               res.data.forEach(a => {
                  a.isClick = false
                  a.look = false
               })
               this.menu = res.data
               this.menuCopy = this.HaveJson(res.data)
            })
         }
      }
   }