<script src="../../../api/schedule/order_schedule.js"></script>
<template>
  <div class="customer-css" >
    <!--  查询时间和产品  -->
    <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -5px;" >
      <el-form-item :label="'录入日期:'">
        <el-date-picker class="el-time-width"
                        style=""
                        v-model="searchData.enterTime1"
                        value-format="yyyy-MM-dd">
        </el-date-picker>
      </el-form-item>
      <el-form-item :label="''">
        <el-date-picker class="el-time-width"
                        style="margin-top: 30px;"
                        v-model="searchData.enterTime2"
                        value-format="yyyy-MM-dd" placeholder="">
        </el-date-picker>
      </el-form-item>
      <el-form-item :label="'要求完工日期:'">
        <el-date-picker class="el-time-width"
                        style=""
                        v-model="searchData.needTime1"
                        value-format="yyyy-MM-dd" placeholder="">
        </el-date-picker>
      </el-form-item>
      <el-form-item :label="''">
        <el-date-picker class="el-time-width"
                        style="margin-top: 30px;"
                        v-model="searchData.needTime2"
                        value-format="yyyy-MM-dd" placeholder="">
        </el-date-picker>
      </el-form-item>
      <el-form-item :label="'产成品编码:'">
        <el-input v-model="searchData.partNo" style="width: 120px"></el-input>
      </el-form-item>
    </el-form>
    <!--  排序规则  -->
    <fieldset class="customer-field" style="margin-left: 630px; margin-top: -50px; width: 135px;" >
      <legend>排序</legend><br>
      <el-form :inline="true" label-position="top" label-width="100px" >
        <el-form-item :label="''" style="margin-bottom: 5px;">
          <el-radio-group v-model="searchData.sortField">
            <el-radio label="needDate">要求完工日期</el-radio>
            <el-radio label="orderNo">订单号</el-radio>
            <el-radio label="partNo">产品编码</el-radio>
          </el-radio-group>
        </el-form-item>
      </el-form>
    </fieldset>
    <!-- 排产信息   -->
    <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -20px;" >
      <el-form-item :label="'排产信息'"></el-form-item>
    </el-form>
    <!--  排产日期  -->
    <el-form :inline="true" label-position="top" label-width="100px"  >
      <el-form-item :label="'排产日期:'">
        <el-date-picker class="el-time-width"
                        style=""
                        v-model="searchData.scheduleTime"
                        value-format="yyyy-MM-dd">
        </el-date-picker>
      </el-form-item>
      <el-form-item :label="''">
        <el-time-picker
          format="HH:mm"
          arrow-control
          style="margin-top: 30px; width: 65px"
          v-model="searchData.timePeriod"
          value-format="HH:mm">
        </el-time-picker>
      </el-form-item>
      <el-form-item :label="''" style="margin-left: -5px;">
        <el-checkbox style="margin-top: 28px;" label="仅查看前道工序已排产的工序" name="type"></el-checkbox>
      </el-form-item>
    </el-form>
    <!--  记录示意图  -->
    <fieldset style="margin-left: 380px; margin-top: -40px; width: 180px;">
      <legend>记录示意图</legend>
      <el-form :inline="true" label-position="top" label-width="100px" class="customer-card">
        <el-form-item :label="'已关闭,已达数量'">
          <el-card class="customer-el-card customer-el-card-pink"></el-card>
        </el-form-item>
        <el-form-item :label="'已关闭,未达数量'">
          <el-card class="customer-el-card customer-el-card-orange"></el-card>
        </el-form-item>
        <el-form-item :label="'未关闭,未达数量'">
          <el-card class="customer-el-card customer-el-card-blue"></el-card>
        </el-form-item>
      </el-form>
    </fieldset>
    <!--  等待订单  -->
    <fieldset  style="margin-left: 585px; margin-top: -93px; width: 180px; ">
      <legend>等待订单</legend>
      <el-form :inline="true" label-position="left" label-width="100px" class="customer-border">
        <el-form-item :label="'等待时间(分钟):'" >
          <el-input type="number" v-model="searchData.waitTimes"
                    style="margin-top: 15px; width: 48px;">
          </el-input>
        </el-form-item>
        <el-form-item :label="''" style="text-align: center;">
          <el-button type="primary" style="margin-left: 30px; margin-top: 13px; margin-bottom: 5px;">插入等待订单</el-button>
        </el-form-item>
      </el-form>
    </fieldset>
    <el-form :inline="true" label-position="top" label-width="100px" style="margin-top: -50px;">
      <el-form-item :label="'工厂编号:'">
        <el-input v-model="searchData.site" style="width: 85px"></el-input>
      </el-form-item>
      <el-form-item :label="'机台编号:'">
        <el-input v-model="searchData.resourceId" style="width: 120px"></el-input>
      </el-form-item>
      <el-form-item :label="'加工中心编码:'">
        <el-input v-model="searchData.workCenterNo" style="width: 120px"></el-input>
      </el-form-item>
    </el-form>
    <!--  机台班次信息  -->
    <el-main style="margin-left: 750px; margin-top: -210px; width: 300px;">
      <el-table
        height="190"
        :data="resourceShiftList"
        border
        v-loading="dataListLoading"
        style="width: 100%;">
        <el-table-column
          v-for="(item,index) in columnTimeArray" :key="index"
          :sortable="item.columnSortable"
          :prop="item.columnProp"
          :header-align="item.headerAlign"
          :show-overflow-tooltip="item.showOverflowTooltip"
          :align="item.align"
          :fixed="item.fixed"
          :width="item.columnWidth"
          :label="item.columnLabel">
          <template slot-scope="scope">
            <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
            <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
                                               style="width: 100px; height: 80px"/></span>
          </template>
        </el-table-column>
      </el-table>
    </el-main>

    <!--  工单主表信息  -->
    <el-main style="margin-left: -20px; margin-top: -35px; width: 104%;">
      <el-form :inline="true"  label-position="top" label-width="100px">
        <el-form-item :label="'主记录'">
        </el-form-item>
      </el-form>
      <el-table
        height="120"
        :data="shopOrderList"
        border
        v-loading="dataListLoading"
        style="width: 100%;">
        <el-table-column
          v-for="(item,index) in columnOrderArray" :key="index"
          :sortable="item.columnSortable"
          :prop="item.columnProp"
          :header-align="item.headerAlign"
          :show-overflow-tooltip="item.showOverflowTooltip"
          :align="item.align"
          :fixed="item.fixed"
          :width="item.columnWidth"
          :label="item.columnLabel">
          <template slot-scope="scope">
            <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
            <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
                                               style="width: 100px; height: 80px"/></span>
          </template>
        </el-table-column>
      </el-table>
    </el-main>
    <!--  工单明细表信息  -->
    <el-main style="margin-left: -20px; margin-top: -35px; width: 104%;">
      <el-form :inline="true"  label-position="top" label-width="100px">
        <el-form-item :label="'明细记录'">
        </el-form-item>
      </el-form>
      <el-table
        height="135"
        :data="resourceShiftList"
        border
        v-loading="dataListLoading"
        style="width: 100%;">
        <el-table-column
          v-for="(item,index) in columnOrderArray" :key="index"
          :sortable="item.columnSortable"
          :prop="item.columnProp"
          :header-align="item.headerAlign"
          :show-overflow-tooltip="item.showOverflowTooltip"
          :align="item.align"
          :fixed="item.fixed"
          :width="item.columnWidth"
          :label="item.columnLabel">
          <template slot-scope="scope">
            <span v-if="!item.columnHidden"> {{scope.row[item.columnProp]}}</span>
            <span v-if="item.columnImage"><img :src="scope.row[item.columnProp]"
                                               style="width: 100px; height: 80px"/></span>
          </template>
        </el-table-column>
      </el-table>
    </el-main>
  </div>
</template>

<script>

import {
  getResourceRestList,
  getShopOrderList,
  getOrderScheduleList,
} from '@/api/schedule/order_schedule.js'

export default {
  data() {
    return {
      height: 200,
      modelFlag: false,
      modelInputFlag: true,
      selectList: [],
      searchData: {
        site: this.$store.state.user.site,
        resourceId: '',
        workCenterNo: '',
        enterTime1: new Date(),
        enterTime2: '',
        needTime1: new Date(),
        needTime2: '',
        sortField: '',
        status: 1,
        user: this.$store.state.user.name
      },
      resourceShiftList: [],
      orderList: [],
      dataListLoading: false,
      buttons: {
        search: '查询',
      },
      columnTimeArray: [
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301ShiftShiftDate',
          tableId: "5301Shift",
          tableName: "工作日历",
          columnProp: "shiftDate",
          headerAlign: "center",
          align: "center",
          columnLabel: "日期",
          columnWidth: 90,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301ShiftShiftInfo',
          tableId: "5301Shift",
          tableName: "工作日历",
          columnProp: "shiftInfo",
          headerAlign: "center",
          align: "center",
          columnLabel: "休息时间览表",
          columnWidth: 169,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        }
      ],
      columnOrderArray: [
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderOrderNo',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "订单号",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemNo',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "工序号",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 60,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "工序名称",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "要求完工日期",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "产品编码",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "客户名称",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "客户产品料号",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "产成品名称",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "订单量",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "待排产数量",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "已排产数量",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "已报工数量",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "规格型号",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "工厂编号",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "加工中心",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "下道工序",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "下道工序名称",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "下道工序已排产",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "上道工序",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "上道工序名称",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "上道工序已排产",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "是否排产",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "可用机台",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "录入日期",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "计划时间",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "单位产出",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "前道工序已排产数量",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "前道工序已报合格数",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "SAP参考号",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "待排产时间",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "效率",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "已排料",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "刀模已发",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "工单表",
          columnProp: "印版已发",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        }
      ],
      columnOrderScheduleArray: [
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderOrderNo',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "排产序号",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemNo',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "计划开工时间",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 60,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "计划完工时间",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "计划时间",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "订单号",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "需求日期",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "工序号",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "工序名称",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "产品编码",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "产品名称",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "规格型号",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "待生产数量",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "派工单需求数量",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "已报告数量",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "前道工序",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "前道工序名称",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "前道工序是否排产",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "后道工序",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "后道工序名称",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "后道工序是否排产",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "机台号",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "客户名称",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "录入日期",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "可用机台",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "加工中心",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "单位产出",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "调机时间",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "产出单位",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "工厂编号",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "复制",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "前道工序已排产数量",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "晚于发货时间",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "RecordType",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "是否关闭",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "是否关闭",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "是否关闭",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "暂停",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "派工单需求工时",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "派工单早于上工序",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "备注",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "SAP参考号",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "客户产品料号",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "效率",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "延误小时数",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "已排料",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        },
        {
          userId: this.$store.state.user.name,
          functionId: 5301,
          serialNumber: '5301OrderItemDesc',
          tableId: "5301Order",
          tableName: "排产明细表",
          columnProp: "排产完成时间早于上工序",
          headerAlign: "center",
          align: "center",
          columnLabel: "",
          columnWidth: 80,
          columnHidden: false,
          columnImage: false,
          columnSortable: false,
          sortLv: 0,
          status: true,
          fixed: false
        }
      ],
    }
  },
  mounted() {
    this.$nextTick(() => {
      this.height = window.innerHeight - 300;
    })
  },
  methods: {
    getResourceShiftData() {
      let queryData = {
        site: this.searchData.site,
        resourceId: this.searchData.resourceId
      }
      getResourceRestList(this.queryData).then(({data}) => {
        this.resourceShiftList = data.rows
      })
    },
    getShopOrderData() {
      let queryData = {
        site: this.site
      }
      getShopOrderList(this.queryData).then(({data}) => {
        this.resourceShiftList = data.rows
      })
    },
  },
  created() {

  }
}
</script>

<style>
.el-textarea__inner {
  padding: 5px 5px;
}

</style>

<!--当前页面的标签样式-->
<style scoped lang="scss">

/*针对el-card*/
.customer-card .el-form-item__content{
  margin-top: -15px;
}
.customer-card .el-form-item{
  height: 22px;
}

.customer-border .el-form-item__content{
  margin-top: -30px;
}

/*全局年与日类型  宽度*/
div.el-time-width{
  width: 110px !important;
}
/* 全局时间右边框*/
.customer-css input.el-input__inner{
  height: 22px !important;
  padding-right: 0px !important;
}
/* 控制el-card标签的数据*/
div.customer-el-card {
  margin-left: 110px;
  margin-top: -15px;
  height: 20px;
  width: 60px;
}
/* 颜色控制 */
div.customer-el-card-pink {
  background: #FF00FF;
}

div.customer-el-card-orange {
  background: #FFD700;
}

div.customer-el-card-blue {
  background: #0000CD;
}

/*清掉样式*/
.el-radio+.el-radio {
  margin-left: 0px;
}


/*控制上下间距*/
</style>
