lilei 4 mēneši atpakaļ
vecāks
revīzija
8193102435

+ 4 - 11
src/views/salesManagement/salesQueryNew/comps/activeStatisticsList.vue

@@ -155,7 +155,7 @@ export default {
       const _this = this
       // 格式化数字金额单元格
       const formatTd = (row, column, rowIndex, uniKey, fun) => {
-        if (row[column.field]) {
+        if (column.field != 'regularBaseVal' && column.field != 'regularNextVal' ? row[column.field] : row[column.field] == 0) {
           return (<div onClick={() => fun ? fun(row, uniKey) : false}><span class={fun ? 'table-link-btn' : (column.field == 'geteBalance' || column.field == 'regularBaseVal') ? 'table-word-color' : ''}>{row[column.field]}</span><span style="font-size:10px;zoom:0.7;margin-left:3px;">{row[uniKey]}</span></div>)
         } else {
           return ''
@@ -423,14 +423,7 @@ export default {
           renderBodyCell: ({ row, column, rowIndex }, h) => {
             return (
               <div>
-                <a-button
-                  type="link"
-                  size="small"
-                  class={row.enabledFlag == 0 ? 'button-success' : 'button-error'}
-                  on-click={() => this.enableRow(row)}
-                >
-                  {row.enabledFlag == 0 ? '启用' : '禁用'}
-                </a-button>
+                <a-switch checked-children="启" un-checked-children="禁" checked={row.enabledFlag == 1} on-change={(c, e) => this.enableRow(c, e, row)}/>
               </div>
             )
           }
@@ -438,7 +431,7 @@ export default {
         cols.push({
           field: '',
           key: '25',
-          title: '产品',
+          title: '操作',
           width: 130,
           center: 'center',
           fixed: 'right',
@@ -682,7 +675,7 @@ export default {
         _this.spinning = false
       })
     },
-    enableRow (item) {
+    enableRow (c, e, item) {
       const _this = this
       // 启用
       if (item.enabledFlag == 0) {