于杰
2 天以前 121ef0e477b9ab0e3a610de08a92f08eb955d556
north-glass-erp/northglass-erp/src/views/pp/productionBasicData/SelectProductionBasicData.vue
@@ -62,7 +62,6 @@
      break
    }
    case  'setType':{
      alert('我接收到子组件传送的反审状态')
      break
    }
  }
@@ -152,7 +151,7 @@
    return[
      columns.map((column, columnIndex) => {
        if (columnIndex === 0) {
          return '合计:'
          return t('basicData.total')
        }
        if (footList.includes(column.field)) {
          return sumNum(data, column.field)
@@ -184,54 +183,58 @@
</script>
<template>
  <div class="main-div-customer">
    <vxe-grid
        max-height="100%"
        class="mytable-scrollbar"
        ref="xGrid"
        v-bind="gridOptions"
  <div  style="width: 100%;height: 100%">
    <div class="main-table">
      <vxe-grid
          height="100%"
          class="mytable-scrollbar"
          ref="xGrid"
          v-bind="gridOptions"
    >
      <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
      <!--      下拉显示所有信息插槽-->
      <template #content="{ row }">
        <ul class="expand-wrapper">
          <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined ">
            <span style="font-weight: bold">{{ item.title + ':  ' }}</span>
            <span v-if="hasDecimal(item.field)">{{ row[item.field.split('.')[0]][item.field.split('.')[1]] }}</span>
            <span v-else>{{ row[item.field] }}</span>
      >
        <!--      @toolbar-button-click="toolbarButtonClickEvent"-->
        <!--      下拉显示所有信息插槽-->
        <template #content="{ row }">
          <ul class="expand-wrapper">
            <li v-for="(item,index) in gridOptions.columns" v-show="item.field!=undefined ">
              <span style="font-weight: bold">{{ item.title + ':  ' }}</span>
              <span v-if="hasDecimal(item.field)">{{ row[item.field.split('.')[0]][item.field.split('.')[1]] }}</span>
              <span v-else>{{ row[item.field] }}</span>
          </li>
        </ul>
      </template>
            </li>
          </ul>
        </template>
      <!--左边固定显示的插槽-->
      <template #button_slot="{ row }">
<!--        <el-button @click="getTableRow(row,'edit');" link type="primary" size="small">{{$t('basicData.edit')}}</el-button>-->
        <el-button @click="getTableRow(row,'edit')"
                   v-if="userStore.user.permissions.indexOf('selectProductionBasicData.edit') > -1"
                   link
                   type="primary"
                   size="small">
          {{ $t('basicData.edit') }}
        </el-button>
        <el-popconfirm   @confirm="getTableRow(row,'delete')" :title="$t('searchOrder.deleteConfirm')">
          <template #reference>
            <el-button  link type="primary" size="small">{{ $t('basicData.delete') }}</el-button>
          </template>
        </el-popconfirm>
      </template>
        <!--左边固定显示的插槽-->
        <template #button_slot="{ row }">
          <!--        <el-button @click="getTableRow(row,'edit');" link type="primary" size="small">{{$t('basicData.edit')}}</el-button>-->
          <el-button @click="getTableRow(row,'edit')"
                     v-if="userStore.user.permissions.indexOf('selectProductionBasicData.edit') > -1"
                     link
                     type="primary"
                     size="small">
            {{ $t('basicData.edit') }}
          </el-button>
          <el-popconfirm   @confirm="getTableRow(row,'delete')" :title="$t('searchOrder.deleteConfirm')">
            <template #reference>
              <el-button  link type="primary" size="small">{{ $t('basicData.delete') }}</el-button>
            </template>
          </el-popconfirm>
        </template>
      <template #num1_filter="{ column, $panel }">
        <div>
          <div v-for="(option, index) in column.filters" :key="index">
            <input type="text" v-model="option.data" @input="changeFilterEvent($event, option, $panel)"/>
        <template #num1_filter="{ column, $panel }">
          <div>
            <div v-for="(option, index) in column.filters" :key="index">
              <input type="text" v-model="option.data"
                     @keyup.enter.native="$panel.confirmFilter()"
                     @input="changeFilterEvent($event, option, $panel)"/>
            </div>
          </div>
        </div>
      </template>
        </template>
    </vxe-grid>
      </vxe-grid>
    </div>
    <el-dialog v-model="dialogTableVisible" :title="$t('productionBasicData.basicDataEdit')">
      <el-row>
@@ -289,11 +292,13 @@
</template>
<style scoped>
.main-div-customer{
  width: 99%;
  height: 100%;
.head{
  width: 100%;
  height: 35px;
}
.el-row{
  margin: 10px;
.main-table{
  width: 100%;
  height: calc(100% - 0px);
}
</style>