SchedulerTransactionList.vue 6.44 KB
<template>
  <a-card :bordered="false">
    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <a-form layout="inline" @keyup.enter.native="searchQuery">
        <a-row :gutter="24">
          <a-col :md="4" :sm="8">
            <a-form-item label="项目号" :labelCol="{span: 6}" :wrapperCol="{span: 14, offset: 1}">
              <a-input placeholder="请输入项目号" v-model="queryParam.projectCode"></a-input>
            </a-form-item>
          </a-col>
          <a-col :md="4" :sm="8">
            <a-form-item label="项目名称" :labelCol="{span: 6}" :wrapperCol="{span: 14, offset: 1}">
              <a-input placeholder="请输入项目名称" v-model="queryParam.projectName"></a-input>
            </a-form-item>
          </a-col>
          <a-col :md="4" :sm="8">
            <a-form-item label="生产令号" :labelCol="{span: 6}" :wrapperCol="{span: 14, offset: 1}">
              <a-input placeholder="请输入生产令号" v-model="queryParam.orderNo"></a-input>
            </a-form-item>
          </a-col>
          <a-col :md="4" :sm="8">
            <a-form-item label="图号" :labelCol="{span: 6}" :wrapperCol="{span: 14, offset: 1}">
              <a-input placeholder="请输入图纸号" v-model="queryParam.drawingNo"></a-input>
            </a-form-item>
          </a-col>
          <a-col :md="4" :sm="8">
            <a-form-item label="部件号" :labelCol="{span: 6}" :wrapperCol="{span: 14, offset: 1}">
              <a-input placeholder="请输入部件号" v-model="queryParam.partNo"></a-input>
            </a-form-item>
          </a-col>
          <a-col :md="4" :sm="8">
            <a-form-item label="名称" :labelCol="{span: 6}" :wrapperCol="{span: 14, offset: 1}">
              <a-input placeholder="请输入名称" v-model="queryParam.name"></a-input>
            </a-form-item>
          </a-col>
          <a-col :md="4" :sm="8">
            <a-form-item label="完成人":labelCol="labelCol" :wrapperCol="{span: 14, offset: 1}">
              <j-select-user-by-dep v-model="queryParam.completeBy" :multi="false"></j-select-user-by-dep>
            </a-form-item>
          </a-col>
          <a-col :md="4" :sm="8">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">
              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">重置</a-button>
            </span>
          </a-col>
        </a-row>
      </a-form>
    </div>
    <!-- 查询区域-END -->

    <!-- table区域-begin -->
    <div>

      <a-table
        ref="table"
        rowKey="id"
        size="middle"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        @change="handleTableChange">

      </a-table>
    </div>
<!--    <schedulerHeader-modal ref="modalForm" @ok="modalFormOk"></schedulerHeader-modal>-->
  </a-card>
</template>

<script>
import { JeecgListMixin } from '@/mixins/JeecgListMixin'
export default {
  name: 'SchedulerTransactionList',
  mixins:[JeecgListMixin],
  data() {
    return {
      description: '生产记录页面',
      visible: false,
      // 表头
      columns: [
        {
          title: '项目号',
          align: "left",
          dataIndex: 'projectCode',
        },
        {
          title: '项目名称',
          align: "left",
          dataIndex: 'projectName',
        },
        {
          title: '生产令号',
          align: "left",
          dataIndex: 'orderNo',
        },
        {
          title: '部件号',
          align: "left",
          dataIndex: 'partNo',
        },
        {
          title: '下图时间',
          align: "left",
          dataIndex: 'preDate',
        },
        {
          title: '图号',
          align: "left",
          dataIndex: 'drawingNo',
        },{
          title: '父图号',
          align: "left",
          dataIndex: 'parentDrawingNo',
        },{
          title: '名称',
          align: "left",
          dataIndex: 'name',
        },{
          title: '数量',
          align: "left",
          dataIndex: 'qty',
        },{
          title: '工艺类型',
          align: "left",
          dataIndex: 'technologyType',
        },{
          title: '工艺',
          align: "left",
          dataIndex: 'technology',
        },{
          title: '完成人',
          align: "left",
          dataIndex: 'completeBy',
        },{
          title: '完成时间',
          align: "left",
          dataIndex: 'completeDate',
        }, {
          title:'创建人',
          align:"center",
          dataIndex: 'createBy'
        },
        {
          title:'创建日期',
          align:"center",
          dataIndex: 'createTime',
          customRender:function (text) {
            return !text?"":(text.length>10?text.substr(0,10):text)
          }
        },
        {
          title:'更新人',
          align:"center",
          dataIndex: 'updateBy'
        },
        {
          title:'更新日期',
          align:"center",
          dataIndex: 'updateTime',
          customRender:function (text) {
            return !text?"":(text.length>10?text.substr(0,10):text)
          }
        },
      ],
      labelCol: {
        xs: {span: 8},
        sm: {span: 5},
      },
      wrapperCol: {
        xs: {span: 16},
        sm: {span: 19},
      },
      url: {
        list: "/scheduler/schedulerTransaction/list",
        delete: "/scheduler/schedulerTransaction/delete",
        exportXlsUrl: "scheduler/schedulerTransaction/exportXls",
        importExcelUrl: "scheduler/schedulerTransaction/importExcel",
        queryAllDictItems: "scheduler/schedulerTransaction/queryAllDictItems",
      },
    }
  },
  computed: {
    importExcelUrl: function () {
      return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}`;
    }
  },
  methods: {
    //取消选择
    cancelDict() {
      this.dict = "";
      this.visible = false;
      this.loadData();
    },
    //编辑工艺类型数据
    editTechnologyItem(record) {
      this.$refs.technologyItemList.edit(record);
    },
    // 重置字典类型搜索框的内容
    searchReset() {
      var that = this;
      that.queryParam.type = "";
      that.queryParam.name = "";
      that.loadData(this.ipagination.current);
    }
  },
  watch: {
    openKeys(val) {
      console.log('openKeys', val)
    },
  },
}
</script>

<style scoped>

</style>