<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.lineedit_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.lineedit_grid.columns.product_name')" :width="180"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.purchase_requisition_line.lineedit_grid.columns.product_name')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template v-if="actualIsOpenEdit">
                            <app-form-item :error="gridItemsModel[$index][column.property].error">
                                
            <app-picker  
              :formState="viewState" 
              :data="row"
              :context="context"
              :viewparams="viewparams"
              :localContext ='{ }' 
              :localParam ='{ }' 
              :disabled="getColumnDisabled(row,column.property)" 
              name='product_name' 
              deMajorField='name'
              deKeyField='product_product'
              :service="service"
              :acParams="{ serviceName: 'Product_productService', interfaceName: 'FetchDefault'}"
              valueitem='product_id' 
              :value="row[column.property]" 
              editortype="dropdown" 
              style="" 
              @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}">
            </app-picker>
            
                            </app-form-item>
                        </template>
                        <template v-if="!actualIsOpenEdit">
            <app-span name='product_name' editorType="PICKER" :value="row.product_name" dataType="PICKUPTEXT" precision="0" ></app-span>
                        </template>
                    </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.lineedit_grid.columns.product_qty')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.purchase_requisition_line.lineedit_grid.columns.product_qty')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template v-if="actualIsOpenEdit">
                            <app-form-item :error="gridItemsModel[$index][column.property].error">
                                <input-box 
              
              :disabled="getColumnDisabled(row,column.property)" 
              v-model="row[column.property]" 
              style=""
              type="text"
              
              
              @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
            </input-box>
            
                            </app-form-item>
                        </template>
                        <template v-if="!actualIsOpenEdit">
            <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.lineedit_grid.columns.qty_ordered')" :width="160"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.purchase_requisition_line.lineedit_grid.columns.qty_ordered')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template v-if="actualIsOpenEdit">
                            <app-form-item :error="gridItemsModel[$index][column.property].error">
                                <input-box 
              
              :disabled="getColumnDisabled(row,column.property)" 
              v-model="row[column.property]" 
              style=""
              type="text"
              
              
              @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
            </input-box>
            
                            </app-form-item>
                        </template>
                        <template v-if="!actualIsOpenEdit">
            <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.lineedit_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.lineedit_grid.columns.product_uom_name')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template v-if="actualIsOpenEdit">
                            <app-form-item :error="gridItemsModel[$index][column.property].error">
                                
            <app-picker  
              :formState="viewState" 
              :data="row"
              :context="context"
              :viewparams="viewparams"
              :localContext ='{ }' 
              :localParam ='{ }' 
              :disabled="getColumnDisabled(row,column.property)" 
              name='product_uom_name' 
              deMajorField='name'
              deKeyField='uom_uom'
              :service="service"
              :acParams="{ serviceName: 'Uom_uomService', interfaceName: 'FetchDefault'}"
              valueitem='product_uom_id' 
              :value="row[column.property]" 
              editortype="dropdown" 
              style="" 
              @formitemvaluechange="($event)=>{onGridItemValueChange(row,$event,$index)}">
            </app-picker>
            
                            </app-form-item>
                        </template>
                        <template v-if="!actualIsOpenEdit">
            <app-span name='product_uom_name' editorType="PICKER" :value="row.product_uom_name" dataType="PICKUPTEXT" precision="0" ></app-span>
                        </template>
                    </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.lineedit_grid.columns.schedule_date')" :width="160"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.purchase_requisition_line.lineedit_grid.columns.schedule_date')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template v-if="actualIsOpenEdit">
                            <app-form-item :error="gridItemsModel[$index][column.property].error">
                                <date-picker type="date" :transfer="true" format="yyyy-MM-dd" placeholder="请选择时间..." :disabled="getColumnDisabled(row,column.property)" :value="row[column.property]" style="" @on-change="(val1, val2) => { row[column.property] = val1; gridEditItemChange(row, column.property, val1, $index)}"></date-picker>
            
                            </app-form-item>
                        </template>
                        <template v-if="!actualIsOpenEdit">
            <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.lineedit_grid.columns.price_unit')" :width="100"  :align="'left'" :sortable="'custom'">
                    <template v-slot:header="{column}">
                      <span class="column-header ">
                        {{$t('entities.purchase_requisition_line.lineedit_grid.columns.price_unit')}}
                      </span>
                    </template>
                    <template v-slot="{row,column,$index}">
                        <template v-if="actualIsOpenEdit">
                            <app-form-item :error="gridItemsModel[$index][column.property].error">
                                <input-box 
              
              :disabled="getColumnDisabled(row,column.property)" 
              v-model="row[column.property]" 
              style=""
              type="text"
              
              
              @change="($event)=>{gridEditItemChange(row, column.property, $event, $index)}">
            </input-box>
            
                            </app-form-item>
                        </template>
                        <template v-if="!actualIsOpenEdit">
            <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>