line-grid.html 6.5 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113
<div :class="{ 'grid': true, 'show-paging-bar': isEnablePagingBar, 'hidden-paging-bar': !isEnablePagingBar }">
    <i-form>
        <el-table v-if="isDisplay === true"
            :default-sort="{ prop: minorSortPSDEF, order: Object.is(minorSortDir, 'ASC') ? 'ascending' : Object.is(minorSortDir, 'DESC') ? 'descending' : '' }"  
            @sort-change="onSortChange($event)"  
            :border="isDragendCol"
            :highlight-current-row ="isSingleSelect"
            :row-class-name="getRowClassName.bind(_self)"
            :cell-class-name="getCellClassName.bind(_self)"
            size="mini"
            stripe
            :height="tableHeight"
            @row-click="rowClick($event)"  
            @select-all="selectAll($event)"  
            @select="select($event)"  
            @row-class-name="onRowClassName($event)"  
            @row-dblclick="rowDBLClick($event)"  
            ref='multipleTable' :data="items" :show-header="!isHideHeader"
        >
            <template slot="empty">
                {{$t('entities.purchase_requisition_line.line_grid.nodata')}} 
                <span class="quick-toolbar">
                </span>
            </template>
            <template v-if="!isSingleSelect">
                <el-table-column align="center" type='selection' :width="checkboxColWidth"></el-table-column>
            </template>
            <template v-if="getColumnState('product_name')">
                <el-table-column show-overflow-tooltip :prop="'product_name'" :label="$t('entities.purchase_requisition_line.line_grid.columns.product_name')" :width="180"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.purchase_requisition_line.line_grid.columns.product_name')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.product_name}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('product_qty')">
                <el-table-column show-overflow-tooltip :prop="'product_qty'" :label="$t('entities.purchase_requisition_line.line_grid.columns.product_qty')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.purchase_requisition_line.line_grid.columns.product_qty')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template >
            <app-span name='product_qty' editorType="TEXTBOX" :value="row.product_qty" dataType="FLOAT" precision="0" ></app-span>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('qty_ordered')">
                <el-table-column show-overflow-tooltip :prop="'qty_ordered'" :label="$t('entities.purchase_requisition_line.line_grid.columns.qty_ordered')" :width="160"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.purchase_requisition_line.line_grid.columns.qty_ordered')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template >
            <app-span name='qty_ordered' editorType="TEXTBOX" :value="row.qty_ordered" dataType="INT" precision="0" ></app-span>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('product_uom_name')">
                <el-table-column show-overflow-tooltip :prop="'product_uom_name'" :label="$t('entities.purchase_requisition_line.line_grid.columns.product_uom_name')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.purchase_requisition_line.line_grid.columns.product_uom_name')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <span>{{row.product_uom_name}}</span>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('schedule_date')">
                <el-table-column show-overflow-tooltip :prop="'schedule_date'" :label="$t('entities.purchase_requisition_line.line_grid.columns.schedule_date')" :width="160"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.purchase_requisition_line.line_grid.columns.schedule_date')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template >
            <app-span name='schedule_date' editorType="DATEPICKER" :value="row.schedule_date" dataType="DATE" precision="0" ></app-span>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="getColumnState('price_unit')">
                <el-table-column show-overflow-tooltip :prop="'price_unit'" :label="$t('entities.purchase_requisition_line.line_grid.columns.price_unit')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.purchase_requisition_line.line_grid.columns.price_unit')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template >
            <app-span name='price_unit' editorType="TEXTBOX" :value="row.price_unit" dataType="FLOAT" precision="0" ></app-span>
                        </template>
                    </template>
                </el-table-column>
            </template>
            <template v-if="adaptiveState">
                <el-table-column></el-table-column>
            </template>
        </el-table>
    </i-form>
</div>