chenrui vor 1 Monat
Ursprung
Commit
6df2448805

+ 7 - 8
src/views/setting/dailyReportSettings/categoryTargetList.vue

@@ -18,8 +18,7 @@
                   style="width: 100%"
                   placeholder="请选择年份"
                   :value="queryParam.confYear"
-                  @change="changeYear"
-                  s>
+                  @change="changeYear">
                   <a-select-option :id="'estimatedOrderList-'+item" v-for="item in years" :value="item" :key="item">
                     {{ item }}
                   </a-select-option>
@@ -58,7 +57,6 @@
           :defaultLoadData="false"
           :showPagination="false"
           bordered>
-          <!-- $hasPermissions('B_tireSubsidySetting_edit')&& -->
           <!-- 1月~12月 -->
           <template
             v-for="col in 12"
@@ -76,7 +74,7 @@
                 :value="text"
                 :precision="2"
                 :id="'estimatedOrderList-input-'+record.id"
-                @change="e => handleChange(e,record, col)" />
+                @blur="e => handleChange(e.target.value,record, col)"/>
               <template v-else>
                 {{ text?toThousands(text):'0.00' }}
               </template>
@@ -119,7 +117,6 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import debounce from 'lodash/debounce'
 // 组件
 import { STable } from '@/components'
 // 接口
@@ -135,8 +132,6 @@ export default {
     }
   },
   data () {
-    const _this = this
-    _this.handleChange = debounce(_this.handleChange, 800)
     return {
       spinning: false,
       disabled: false, //  查询、重置按钮是否可操作
@@ -235,6 +230,7 @@ export default {
     handleSearch () {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
+          this.editingKey = ''
           this.$refs.table.refresh(true)
         } else {
           this.$message.error('请选择年份')
@@ -320,7 +316,10 @@ export default {
 }
 </script>
 <style lang="less" scoped>
-::v-deep.button-info[disabled] {
+/deep/.button-info[disabled] {
   color: gray;
 }
+/deep/.ant-input-number-handler-wrap {
+  display: none;
+}
 </style>

+ 9 - 9
src/views/setting/dailyReportSettings/estimatedOrderList.vue

@@ -71,12 +71,12 @@
                 :min="0"
                 :max="999999999"
                 placeholder="请输入"
-                :precision="0"
+                :precision="pageType === 'REGIONAL_ESTIMATED_ORDER'?2:0"
                 :value="text"
                 :id="'estimatedOrderList-input-'+record.id"
-                @change="e => handleChange(e,record, col)" />
+                @blur="e => handleChange(e.target.value,record, col)" />
               <template v-else>
-                {{ text }}
+                {{ pageType === 'REGIONAL_ESTIMATED_ORDER'?toThousands(text) :text }}
               </template>
             </div>
           </template>
@@ -117,7 +117,6 @@
 
 <script>
 import { commonMixin } from '@/utils/mixin'
-import debounce from 'lodash/debounce'
 // 组件
 import { STable } from '@/components'
 // 接口
@@ -133,8 +132,6 @@ export default {
     }
   },
   data () {
-    const _this = this
-    _this.handleChange = debounce(_this.handleChange, 800)
     return {
       spinning: false,
       disabled: false, //  查询、重置按钮是否可操作
@@ -205,7 +202,7 @@ export default {
         { title: '10月', dataIndex: 'value10', width: '8%', align: 'right', scopedSlots: { customRender: 'month10' } },
         { title: '11月', dataIndex: 'value11', width: '8%', align: 'right', scopedSlots: { customRender: 'month11' } },
         { title: '12月', dataIndex: 'value12', width: '8%', align: 'right', scopedSlots: { customRender: 'month12' } },
-        { title: '合计', dataIndex: 'summation', width: '11%', align: 'right', customRender: function (text) { return ((text || text == 0) ? text : '--') } },
+        { title: '合计', dataIndex: 'summation', width: '11%', align: 'right', customRender: function (text) { return ((text || text == 0) ? (_this.pageType === 'REGIONAL_ESTIMATED_ORDER' ? _this.toThousands(text) : text) : '--') } },
         { title: '操作', scopedSlots: { customRender: 'action' }, width: '11%', align: 'center' }
       ]
       if (_this.pageType === 'REGIONAL_ESTIMATED_ORDER') {
@@ -246,6 +243,7 @@ export default {
     handleSearch () {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
+          this.editingKey = ''
           this.$refs.table.refresh(true)
         } else {
           this.$message.error('请选择年份')
@@ -301,7 +299,6 @@ export default {
     calculateTotal (rowData) {
       const keys = Array.from({ length: 12 }, (_, i) => 'value' + this.padZero(i + 1))
       const totalNum = keys.reduce((sum, key) => sum + (Number(rowData[key]) || 0), 0)
-      console.log('sdsdsd:', totalNum)
       return totalNum
     },
     //  重置
@@ -331,7 +328,10 @@ export default {
 }
 </script>
 <style lang="less" scoped>
-::v-deep.button-info[disabled] {
+/deep/.button-info[disabled] {
   color: gray;
 }
+/deep/.ant-input-number-handler-wrap {
+  display: none;
+}
 </style>

+ 5 - 3
src/views/setting/dailyReportSettings/partitionTargetList.vue

@@ -75,7 +75,7 @@
                 :precision="2"
                 :value="text"
                 :id="'estimatedOrderList-input-'+record.id"
-                @change="e => handleChange(e,record, col)" />
+                @blur="e => handleChange(e.target.value,record, col)"/>
               <template v-else>
                 {{ text?toThousands(text):'0.00' }}
               </template>
@@ -134,8 +134,6 @@ export default {
     }
   },
   data () {
-    const _this = this
-    _this.handleChange = debounce(_this.handleChange, 800)
     return {
       spinning: false,
       disabled: false, //  查询、重置按钮是否可操作
@@ -258,6 +256,7 @@ export default {
     handleSearch () {
       this.$refs.ruleForm.validate(valid => {
         if (valid) {
+          this.editingKey = ''
           this.$refs.table.refresh(true)
         } else {
           this.$message.error('请选择年份')
@@ -354,4 +353,7 @@ export default {
     bottom: 0;
     z-index: 2;
   }
+/deep/.ant-input-number-handler-wrap {
+    display: none;
+  }
 </style>