1
yangpeixing
2025-12-04 885092869d8a27a0b77d6e55d3dd3f00f29e8002
ÏîÄ¿´úÂë/WMS/WIDESEA_WMSClient/src/components/basic/VolTable.vue
@@ -20,7 +20,7 @@
      <el-table-column v-if="ck" type="selection" :fixed="fixed" :selectable="selectable" width="55"></el-table-column>
      <!-- 2020.10.10移除table第一行强制排序 -->
      <el-table-column v-for="(column, cindex) in    filterColumns   " :prop="column.field" :label="column.title"
      <el-table-column v-for="(column, cindex) in filterColumns" :prop="column.field" :label="column.title"
        :min-width="column.width" :formatter="formatter" :fixed="column.fixed" :key="column.field + cindex"
        :align="column.align" :sortable="column.sort ? 'custom' : false" :show-overflow-tooltip="true">
        <template #header>
@@ -87,34 +87,34 @@
                <!-- 2020.07.24增加日期onChange事件 -->
                <el-date-picker clearable size="default" style="width: 100%"
                  v-if="['date', 'datetime'].indexOf(column.edit.type) != -1" v-model="scope.row[column.field]" @change="(val) => {
                    column.onChange && column.onChange(scope.row, column, val)
                  }
                      column.onChange && column.onChange(scope.row, column, val)
                    }
                    " :type="column.edit.type" :placeholder="column.placeholder || column.title"
                  :disabledDate="(val) => getDateOptions(val, column)" :value-format="getDateFormat(column)"
                  :disabled="initColumnDisabled(scope.row, column)">
                </el-date-picker>
                <el-time-picker clearable size="default" style="width: 100%" v-else-if="column.edit.type == 'time'"
                  v-model="scope.row[column.field]" @change="(val) => {
                    column.onChange && column.onChange(scope.row, column, val)
                  }
                      column.onChange && column.onChange(scope.row, column, val)
                    }
                    " :placeholder="column.placeholder || column.title" :value-format="column.format || 'HH:mm:ss'"
                  :disabled="initColumnDisabled(scope.row, column)">
                </el-time-picker>
                <el-switch v-else-if="column.edit.type == 'switch'" v-model="scope.row[column.field]"
                  active-color="#0f84ff" inactive-color="rgb(194 194 194)" active-text="是" inactive-text="否" inline-prompt
                  @change="(val) => {
                    switchChange(val, scope.row, column)
                  }
                      switchChange(val, scope.row, column)
                    }
                    " :active-value="typeof scope.row[column.field] == 'boolean'
    ? true
    : typeof scope.row[column.field] == 'string'
      ? '1'
      : 1
      ? true
      : typeof scope.row[column.field] == 'string'
        ? '1'
        : 1
    " :inactive-value="typeof scope.row[column.field] == 'boolean'
    ? false
    : typeof scope.row[column.field] == 'string'
      ? '0'
      : 0
      ? false
      : typeof scope.row[column.field] == 'string'
        ? '0'
        : 0
    " :disabled="initColumnDisabled(scope.row, column)">
                </el-switch>
                <template v-else-if="['select', 'selectList'].indexOf(column.edit.type) != -1">
@@ -194,8 +194,7 @@
              @click="dowloadFile(file)">{{ file.name }}</a>
            <span v-else-if="column.type == 'date'">{{ formatterDate(scope.row, column) }}</span>
            <div v-else-if="column.type == 'jsx'" @click="formatterClick(scope.row, column, $event)">
              <el-button v-for="item in column.formatter(scope.row, column) " :key="item" :type="item.type">{{
                item.name
              <el-button v-for="item in column.formatter(scope.row, column)" :key="item" :type="item.type">{{ item.name
              }}</el-button>
            </div>
            <div v-else-if="column.formatter" @click="formatterClick(scope.row, column, $event)"
@@ -211,8 +210,8 @@
              {{ scope.row[column.field] }}
            </div>
            <div @click="() => {
              column.click && formatterClick(scope.row, column)
            }
                column.click && formatterClick(scope.row, column)
              }
              " v-else-if="column.bind">
              <el-tag v-if="useTag" class="cell-tag" :class="[isEmptyTag(scope.row, column)]"
                :type="getColor(scope.row, column)" :effect="column.effect">{{ formatter(scope.row, column, true)