<template>
  <el-container>
    <el-header style="width: 100%; height: 60px;font-size: 12px">

      <el-form :inline="true"  label-width="65px"  label-position="left">
        <el-row>

          <el-col :span="22">
            <el-form-item label="工程编号:"  >
              <el-select v-model="queryParam.czbh" filterable  placeholder="工程编号" @change="czbhChange" clearable >
                <el-option
                  v-for="item in dictData.czbhs"
                  :key="item.czbh"
                  :label="item.czbh"
                  :value="item.czbh">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="需求部门:">
              <el-select v-model="queryParam.xqdw" filterable  placeholder="需求部门" clearable   :disabled="this.flag" >
<!--              <el-select v-model="queryParam.xqdw" filterable  placeholder="需求部门" clearable   >-->
                <el-option
                  v-for="item in dictData.xqdws"
                  :key="item.bm"
                  :label="item.mc"
                  :value="item.bm">
                </el-option>
              </el-select>
            </el-form-item>
            <el-form-item label="分段号:">
              <el-input v-model="queryParam.fdh" type="search" placeholder="分段号" ></el-input>
            </el-form-item>
            <el-form-item label="托盘表号:">
              <el-input v-model="queryParam.tpbh" type="search" placeholder="托盘表号" ></el-input>
            </el-form-item>
            <template v-if="this.apbm==='P30000'">
              <el-form-item label="作业车间:">
                <el-select v-model="queryParam.cjmc" filterable  placeholder="作业车间" clearable   @change="cjmcChange"  >
                  <!--              <el-select v-model="queryParam.xqdw" filterable  placeholder="需求部门" clearable   >-->
                  <el-option

                    v-for="item in dictData.cjmcs"
                    :key="item.cjmc"
                    :label="item.cjmc"
                    :value="item.cjmc">
                  </el-option>
                </el-select>
              </el-form-item>


              <el-form-item label="场地:">
                <el-select v-model="queryParam.cdmc" filterable  placeholder="场地" clearable    >
                  <!--              <el-select v-model="queryParam.xqdw" filterable  placeholder="需求部门" clearable   >-->
                  <el-option
                    v-for="item in dictData.cdmcs1"
                    :key="item.cdmc"
                    :label="item.cdmc"
                    :value="item.cdmc">
                  </el-option>
                </el-select>
              </el-form-item>
            </template>
            <template v-else>
              <el-form-item label="作业车间及场地:"  label-width="100px" >
                <el-input v-model="queryParam.zyzzcjmc" type="search" placeholder="作业车间及场地"  ></el-input>
              </el-form-item>
            </template>




          </el-col>
          <el-col :span="2">
            <el-form-item style="float: right" >
              <el-button type="success" @click="loadData">查询</el-button>
            </el-form-item>
          </el-col>
        </el-row>

      </el-form>
    </el-header>
    <el-container :style="defaultHeight" style="padding-top: 10px">
      <!--    <el-container >-->

      <el-main>

          <el-tabs v-model="activeName" >
            <el-tab-pane label="汇总" name="first" >
              <span slot="label" class="fontClass">汇总</span>
              <div class="mytable">
                <vxe-grid
                  id="id"
                  ref="xGridMain"
                  border
                  resizable
                  :custom-config="{storage: true}"
                  :height="height"
                  :row-config="{isHover: true,isCurrent:true}"
                  :columns="tableColumnMain"
                  :data="tableDataMain"
                  align="center"
                  @cell-click="cellClick"
                  :cell-style="cellStyle"
                  :span-method="spanMethods"
                  show-header-overflow
                >

                  <template #tpbh="{ row }">
                    <span style="cursor:pointer;color: blue" @click="tpbhClcik(row)">{{ row.tpbh }}</span>
                  </template>
                  <template #fdh="{ row }">
                    <span style="cursor:pointer;color: blue" @click="fdhClcik(row)">{{ row.fdh }}</span>
                  </template>
<!--                  <template #psbfb="{ row }">-->
<!--                    <el-progress :stroke-width="10" :percentage="row.psbfb"></el-progress>-->
<!--                  </template>-->

                </vxe-grid>
              </div>
            </el-tab-pane>
            <el-tab-pane label="明细" name="second">
              <span slot="label" class="fontClass">明细</span>
              <div class="mytable" >
                <vxe-grid
                  id="id"
                  ref="xGrid"
                  border
                  :footer-method="footerMethod"
                  resizable
                  show-header-overflow
                  :custom-config="{storage: true}"
                  :height="height"
                  :row-config="{isHover: true,isCurrent:true}"
                  :columns="tableColumn"
                  :data="tableData"
                  align="center"
                  @cell-click="cellClick"
                  :header-cell-style="headerCellStyle"
                  :row-class-name="rowClassName"
                  :show-footer="true"
                >


                </vxe-grid>

              </div>
            </el-tab-pane>

          </el-tabs>

      </el-main>

    </el-container>

  </el-container>

</template>

<script>
import { startLoading, endLoading } from '@/utils'
import { mapGetters } from 'vuex'
import { getToken } from '@/utils/auth'
import { Message } from 'element-ui'
import { getTpBase, findTppsQk ,findTPxqjh} from '@/api/fd/base'
import {monthOne,getSumAdd} from '@/utils/rpkj'
import XEUtils from 'xe-utils'
export default {
  // 船只分段直观图定义
  name: 'Fdfltppsqk',
  data() {
    return {

      defaultHeight: { height: '' },

      heads: { token: getToken() },
      uploadAction: process.env.VUE_APP_BASE_API + '/api/dmCzfddyb/upload',
      uploadData: {},
      queryParam: {
        czbh: '',
        fdh:'',
        tpbh:'',
        xqdw:'',
        zyzzcjmc:'',
        cjmc:'',
        dcmc:''
      },
      uploadState: 0,
      isupload:'01',
      dictData: {},
      projectData: [],
      tableDataMain:[],
      col:0,
      //    tableData: [],
      tableColumn: [
        { type: 'seq', width: 60, title: '序号' },
        { field: 'jhqh', title: '计划期号', width: 100 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'czbh', title: '船只编号', width: 90 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'zyjd', title: '作业阶段', width: 90 ,formatter: ['dictXtFormat','ZYJD'],

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'fdh', title: '分段号', width: 80 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'tpbh', title: '托盘表号', width: 110 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'hh', title: '行号', width: 80 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'azth', title: '安装图号', width: 100 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'zztph', title: '批号/卡号', width: 80 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'zzth', title: '制作图号', width: 110 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'zztmc', title: '制作图名称', width: 150 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'bjdh', title: '部件号', width: 80 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'bjmc', title: '部件名称', width: 100 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'wpgg', title: '规格+型号+材质', width: 210 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'jhxqrq', title: '集团三月滚动计划期', width: 150 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'fdxqrq', title: '分段计划需求期', width: 130 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'zyzzssbm', title: '需求部门', width: 100 ,formatter: ['ddeptFormat'],

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'zyzzcjmc', title: '作业车间及场地', width: 140 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'xqsl', title: '需求数量', width: 70 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'bjzl', title: '单重', width: 80 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'bjzzl', title: '总重', width: 80 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'xzjhrkrq', title: '舾装公司计划集配入库', width: 160 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'zdcp', title: '重点产品', width: 100 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'tplx', title: '部件分类', width: 100 ,formatter: ['dictFormat','TPLX'],

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'ygpprq', title: '预计配送期', width: 100 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'fkpprq', title: '反馈配送期', width: 150 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'xqtsc', title: '需求/反馈差距', width: 160 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'fkwtsm', title: '反馈说明', width: 100 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'sscj', title: '所属车间', width: 100 ,formatter: ['dictFormat','BMBM'],

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'jhlx', title: '计划类型', width: 100 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'jhjtrq', title: '设计院计划发图日期', width: 150 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'jtxqts', title: '需求发图天数差', width: 150 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'sjltsj', title: '实际接图日期', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'ltxqts', title: '需求来图天数差', width: 130 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'jhxqrq_sq', title: '上期滚动计划需求日期', width: 160 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'jhbgts', title: '变更天数', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'jhxqrq_ls', title: '滚动计划需求期变更历史', width: 165 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'por_no', title: '采购需求编号', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'lc', title: '来处', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },

        { field: 'zzt_zt', title: '技术处理状态', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'zzt_gyspsj', title: '工艺审批时间', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'zzt_cplx', title: '产品类型', width: 120 ,formatter: ['dictFormat','CPLX'],

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'zzt_clfs', title: '表面处理方式', width: 120 ,formatter: ['dictFormat','CLFS'],

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'zzt_bmcl', title: '表面处理', width: 120 ,formatter: ['dictFormat','CLFS'],

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'zzt_ntzdm', title: '内表面涂装代码', width: 130 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'zzt_wtzdm', title: '外表面涂装代码', width: 130 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'xglx', title: '修改类型', width: 120 ,formatter: ['dictFormat','TPXG'],

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'xgph', title: '修改批号/卡号', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'xgsj', title: '修改时间', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'xgtzdh', title: '修改通知单号', width: 140 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'sc_zt', title: '制作状态', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'sgdw', title: '结构施工单位', width: 120 ,formatter: ['deptFormat'],

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'jgwgrq', title: '结构实际完工日期', width: 140 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'tzdw', title: '表面处理单位', width: 120 ,formatter: ['deptFormat'],

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'tzjsrq', title: '表面处理接收日期', width: 140 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'tzwgrq', title: '表面处理时间完工日期', width: 140 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'scqkbz', title: '生产情况备注', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'psdw', title: '配送单位', width: 120 ,formatter: ['deptFormat'],

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'jprkrq', title: '集配入库完工时间', width: 140 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'ps_zt', title: '配送状态', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'qfsqrq', title: '前方配送申请日期', width: 140 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'qfxqrq', title: '前方实际需求期', width: 140 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'qfpssl', title: '前方配送数量', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'qfpswc', title: '配送完成情况', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'qfpsrq', title: '实际配送日期', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'qfqrrq', title: '配送确认日期', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'psqkbz', title: '配送情况备注', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'jhdrry', title: '计划导入人员', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'jhdrrq', title: '计划导入日期', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
      ],
      tableColumnMain:[
        { type: 'seq', width: 60, title: '序号' },

        { field: 'czbh', title: '船只编号', width: 90 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'fdh', title: '分段号', width: 80 ,
          slots: { default: 'fdh' },
          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'tpbh', title: '托盘表号', width: 110 ,
          slots: { default: 'tpbh' },
          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'zyzzssbm', title: '需求部门', width: 100 ,formatter: ['ddeptFormat'],

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'zyzzcjmc', title: '作业车间及场地', width: 140 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'tplx', title: '物质类别', width: 110 ,formatter: ['dictFormat','TPLX'],

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'xqsl', title: '需求数量', width: 90 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'pssl', title: '配送数量', width: 90 ,formatter:['numberFormat','zero'],

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'psbfb', title: '实际配送率', width: 100 ,formatter:['numberFormat','percent',2],

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'pssl0', title: '按期配送率', width: 100 ,formatter:['numberFormat','percent',2],

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'pssl5', title: '预计5日配送率', width: 100 ,formatter:['numberFormat','percent',2],

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'pssl10', title: '预计10日配送率', width: 100 ,formatter:['numberFormat','percent',2],

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'pssl15', title: '预计15日配送率', width: 100 ,formatter:['numberFormat','percent',2],

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'qfxqrq', title: '前方实际需求期 ', width: 130 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'fdxqrq', title: '分段计划需求期', width: 130 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'jhxqrq', title: '集团计划需求期', width: 130 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },

        { field: 'sjpsrqmin', title: '配送开始期', width: 110 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'sjpsrqmax', title: '配送结束期', width: 110 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'yjtgq', title: '预计提供期', width: 110 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
      ],
      activeName: 'first',
      tableData: [

      ]
    }
  },
  computed: {
    ...mapGetters([
      'name',
      'bmbm',
      'apbm'
    ]),




  },
  created() {
    window.addEventListener('resize', this.getHeight)
    this.getHeight()
    this.baseSeacrh()
    if(this.apbm.length>2){
      this.queryParam.xqdw=this.apbm
      this.flag=true;
    }else{
      this.flag=false;
    }
    if(this.flag){
      this.tableColumn= [
        { type: 'seq', width: 60, title: '序号' },
        // { field: 'jhqh', title: '计划期号', width: 100 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        { field: 'czbh', title: '船只编号', width: 90 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'zyjd', title: '作业阶段', width: 90 ,formatter: ['dictXtFormat','ZYJD'],

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'fdh', title: '分段号', width: 80 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'tpbh', title: '托盘表号', width: 110 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        // { field: 'hh', title: '行号', width: 80 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        // { field: 'azth', title: '安装图号', width: 100 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        // { field: 'zztph', title: '批号/卡号', width: 80 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        // { field: 'zzth', title: '制作图号', width: 110 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        // { field: 'zztmc', title: '制作图名称', width: 150 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        { field: 'bjdh', title: '部件号', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'bjmc', title: '部件名称', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'wpgg', title: '规格+型号+材质', width: 210 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },

        // { field: 'jhxqrq', title: '集团三月滚动计划期', width: 150 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        // { field: 'fdxqrq', title: '分段计划需求期', width: 150 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        // { field: 'zyzzssbm', title: '需求部门', width: 100 ,formatter: ['ddeptFormat'],
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        { field: 'zyzzcjmc', title: '作业车间及场地', width: 140 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        // { field: 'xqsl', title: '需求数量', width: 70 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        { field: 'bjzl', title: '单重', width: 80 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'bjzzl', title: '总重', width: 80 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        // { field: 'xzjhrkrq', title: '舾装公司计划集配入库', width: 160 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        // { field: 'zdcp', title: '重点产品', width: 100 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        { field: 'tplx', title: '部件分类', width: 100 ,formatter: ['dictFormat','TPLX'],

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'ygpprq', title: '预计配送期', width: 100 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'fkpprq', title: '反馈配送期', width: 150 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'xqtsc', title: '需求/反馈差距', width: 160 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        // { field: 'fkwtsm', title: '反馈说明', width: 100 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        { field: 'sscj', title: '所属车间', width: 100 ,formatter: ['dictFormat','BMBM'],

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        // { field: 'jhlx', title: '计划类型', width: 100 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        // { field: 'jhjtrq', title: '设计院计划发图日期', width: 150 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        // { field: 'jtxqts', title: '需求发图天数差', width: 150 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        // { field: 'sjltsj', title: '实际接图日期', width: 120 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        // { field: 'ltxqts', title: '需求来图天数差', width: 130 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        // { field: 'jhxqrq_sq', title: '上期滚动计划需求日期', width: 160 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        // { field: 'jhbgts', title: '变更天数', width: 120 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        // { field: 'jhxqrq_ls', title: '滚动计划需求期变更历史', width: 165 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        // { field: 'por_no', title: '采购需求编号', width: 120 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        // { field: 'lc', title: '来处', width: 120 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },


        // { field: 'zzt_cplx', title: '产品类型', width: 120 ,formatter: ['dictFormat','CPLX'],
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        // { field: 'zzt_clfs', title: '表面处理方式', width: 120 ,formatter: ['dictFormat','CLFS'],
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        // { field: 'zzt_bmcl', title: '表面处理', width: 120 ,formatter: ['dictFormat','CLFS'],
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        // { field: 'zzt_ntzdm', title: '内表面涂装代码', width: 130 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        // { field: 'zzt_wtzdm', title: '外表面涂装代码', width: 130 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        { field: 'xglx', title: '修改类型', width: 120 ,formatter: ['dictFormat','TPXG'],

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        // { field: 'xgph', title: '修改批号/卡号', width: 120 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        { field: 'xgsj', title: '修改时间', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'xgtzdh', title: '修改通知单号', width: 140 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'jprkrq', title: '集配入库完工时间', width: 140 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },

        // { field: 'qfsqrq', title: '前方配送申请日期', width: 140 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        { field: 'qfxqrq', title: '前方实际需求期', width: 140 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'qfpssl', title: '前方配送数量', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'qfpswc', title: '配送完成情况', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'qfpsrq', title: '实际配送日期', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        { field: 'qfqrrq', title: '配送确认日期', width: 120 ,

          filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
          filterRender: { name: 'FilterCombination' },
        },
        // { field: 'psqkbz', title: '配送情况备注', width: 120 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        // { field: 'jhdrry', title: '计划导入人员', width: 120 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        // { field: 'jhdrrq', title: '计划导入日期', width: 120 ,
        //
        //   filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
        //   filterRender: { name: 'FilterCombination' },
        // },
        //
      ]
      // this.tableColumn= [
      //   { type: 'seq', width: 60, title: '序号' },
      //   { field: 'jhqh', title: '计划期号', width: 100 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'czbh', title: '船只编号', width: 90 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'zyjd', title: '作业阶段', width: 90 ,formatter: ['dictXtFormat','ZYJD'],
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'fdh', title: '分段号', width: 80 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'tpbh', title: '托盘表号', width: 110 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'hh', title: '行号', width: 80 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'azth', title: '安装图号', width: 100 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'zztph', title: '批号/卡号', width: 80 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'zzth', title: '制作图号', width: 110 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'zztmc', title: '制作图名称', width: 150 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'bjdh', title: '部件号', width: 120 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'bjmc', title: '部件名称', width: 120 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'wpgg', title: '规格+型号+材质', width: 210 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'jhxqrq', title: '集团三月滚动计划期', width: 150 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'fdxqrq', title: '分段计划需求期', width: 130 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'zyzzssbm', title: '需求部门', width: 100 ,formatter: ['ddeptFormat'],
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'zyzzcjmc', title: '作业车间及场地', width: 140 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'xqsl', title: '需求数量', width: 70 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'bjzl', title: '单重', width: 80 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'bjzzl', title: '总重', width: 80 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'xzjhrkrq', title: '舾装公司计划集配入库', width: 160 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'zdcp', title: '重点产品', width: 100 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'tplx', title: '部件分类', width: 100 ,formatter: ['dictFormat','TPLX'],
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'ygpprq', title: '预计配送期', width: 100 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'fkpprq', title: '反馈配送期', width: 150 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'xqtsc', title: '需求/反馈差距', width: 160 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'fkwtsm', title: '反馈说明', width: 100 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'sscj', title: '所属车间', width: 100 ,formatter: ['dictFormat','BMBM'],
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'jhlx', title: '计划类型', width: 100 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'jhjtrq', title: '设计院计划发图日期', width: 150 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'jtxqts', title: '需求发图天数差', width: 150 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'sjltsj', title: '实际接图日期', width: 120 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'ltxqts', title: '需求来图天数差', width: 130 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'jhxqrq_sq', title: '上期滚动计划需求日期', width: 160 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'jhbgts', title: '变更天数', width: 120 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'jhxqrq_ls', title: '滚动计划需求期变更历史', width: 165 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'por_no', title: '采购需求编号', width: 120 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'lc', title: '来处', width: 120 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //
      //
      //   { field: 'zzt_cplx', title: '产品类型', width: 120 ,formatter: ['dictFormat','CPLX'],
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'zzt_clfs', title: '表面处理方式', width: 120 ,formatter: ['dictFormat','CLFS'],
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'zzt_bmcl', title: '表面处理', width: 120 ,formatter: ['dictFormat','CLFS'],
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'zzt_ntzdm', title: '内表面涂装代码', width: 130 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'zzt_wtzdm', title: '外表面涂装代码', width: 130 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'xglx', title: '修改类型', width: 120 ,formatter: ['dictFormat','TPXG'],
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'xgph', title: '修改批号/卡号', width: 120 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'xgsj', title: '修改时间', width: 120 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'xgtzdh', title: '修改通知单号', width: 140 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //
      //   { field: 'jprkrq', title: '集配入库完工时间', width: 140 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'qfsqrq', title: '前方配送申请日期', width: 140 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'qfxqrq', title: '前方实际需求期', width: 140 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'qfpssl', title: '前方配送数量', width: 120 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'qfpswc', title: '配送完成情况', width: 120 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'qfpsrq', title: '实际配送日期', width: 120 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'qfqrrq', title: '配送确认日期', width: 120 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'psqkbz', title: '配送情况备注', width: 120 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'jhdrry', title: '计划导入人员', width: 120 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },
      //   { field: 'jhdrrq', title: '计划导入日期', width: 120 ,
      //
      //     filters: [{ data: { checks: [], sVal: '', sMenu: '', fType1: '', fVal1: '', fMode: 'and', fType2: '', fVal2: '' } }],
      //     filterRender: { name: 'FilterCombination' },
      //   },]
    }

    // this.queryParam.bmbm='02'
    // this.loadData()
  },
  methods: {
    czbhChange(){

    },
    cjmcChange(){
        if(this.queryParam.cjmc!==''){
          this.dictData.cdmcs1= this.dictData.cdmcs.filter((item) => {
            return item.cjmc ==this.queryParam.cjmc
          });
        }else{
          this.dictData.cdmcs1=this.dictData.cdmcs
        }
    },
    cellClick(row){
      console.log(row)
    },

    rowClassName({ row, rowIndex ,column}){
      console.log(row.qfpsrq)
      if(row.qfpsrq!=='' && row.qfpsrq!==undefined && row.qfpsrq!==null){
        return 'row-green'
      }else if(row.xqtsc<-7){
        return 'row-yellow'
      }

    },
    cellStyle({ row, rowIndex, column }) {
      console.log(row)
      console.log(column)
      if(column.field==='psbfb') {
        if (row.psbfb >= 90) {
          console.log(1)

          return {
            backgroundColor: '#00FF00'
          }

        } else if (row.psbfb < 90 && row.psbfb >= 50) {
          return {
            backgroundColor: '#FFFF00'
          }
        } else if (row.psbfb < 50 && (row.qfxqrq !== undefined &&row.qfxqrq !== '' &&row.qfxqrq !== null)) {
          return {
            backgroundColor: '#FF0000',
            color: '#fff'
          }
        }
      }
    },










    spanMethods({row, $rowIndex, column, data}){
      let fields = ["czbh","fdh", "tpbh"]
      let tempcol=column.property
      if(tempcol==='czbh'){
        tempcol='fdh'
      }
      let cellValue = row[tempcol]
      if (cellValue && fields.includes(column.property)) {

        let prevRow = data[$rowIndex - 1]
        let nextRow = data[$rowIndex + 1]
        if (prevRow && prevRow[tempcol] === cellValue) {
          return {rowspan: 0, colspan: 0}
        } else {
          let countRowspan = 1
          while (nextRow && nextRow[tempcol] === cellValue) {
            nextRow = data[++countRowspan + $rowIndex]
          }
          if (countRowspan > 1) {
            return {rowspan: countRowspan, colspan: 1}
          }
        }
      }

    },


    headerCellStyle ({ column, columnIndex }) {
      if (['jhxqrq','fdxqrq',
        "jhjtrq","jtxqts","qfxqrq"].includes(column.property)) {
        return {
          backgroundColor: '#2db7f5',
          color: '#ffffff'
        }
      }
      if (['sjltsj',"'ltxqts'",'qfpsrq',"qfqrrq","ltxqts"
        ].includes(column.property)) {
        return {
          backgroundColor: '#43b812',
          color: '#ffffff'
        }
      }
      if (['xzjhrkrq','ygpprq','fkpprq',"xqtsc",
      ].includes(column.property)) {
        return {
          backgroundColor: '#e4bc0a',
          color: '#ffffff'
        }
      }

    },

    footerMethod ({ columns, data }) {
      return [
        columns.map((column, columnIndex) => {
          if (['xqsl','bjzzl'].includes(column.property)) {

            return getSumAdd(data, column.property)
          }
          if (columnIndex === 1) {
            return '合计'
          }
          return null
        })
      ]
    },





    tpbhClcik(row){

      findTPxqjh({czbh1:row.czbh,tpbh1:row.tpbh}).then(res=>{
        if(res.success){
          this.activeName='second'
          this.$refs.xGrid.reloadData(res.data)
        }

      })
    },
    fdhClcik(row){
      findTPxqjh({czbh1:row.czbh,fdh:row.fdh}).then(res=>{
        this.activeName='second'
        this.$refs.xGrid.reloadData(res.data)
      })
    },

    async baseSeacrh() {
      getTpBase({  }).then(response => {
        this.dictData = response.data
        this.dictData.cdmcs1= this.dictData.cdmcs
      })
    },
    loadData() {
      if(this.queryParam.czbh===''){
        this.$message.warning('请选择工程编号')
        return
      }
      findTppsQk(this.queryParam).then(res=>{

        if(res.success){



          //this.tableData=res.data.data
      // this.tableDataMain=res.data

          this.$refs.xGridMain.reloadData(res.data)

          //this.list=res.data.data
        }
      })

    },



    getHeight() {

      // this.height = window.innerHeight - 180
      // this.defaultHeight.height = window.innerHeight - 115 + 'px'
      this.height = window.innerHeight - 210
      // this.defaultHeight.height = window.innerHeight - 150 + 'px'
    },
  }
}
</script>

<style lang="scss" scoped >

.el-header{margin:0;padding: 5px;height:auto;
  .el-input{
    width: 140px;
  }
  .el-select{
    width: 140px;
  }

}
.el-container{padding: 0;margin:0;}
.el-main{padding: 0;}
.el-col{padding: 0;height: 32px;}
.el-aside{background: #fff;padding: 0}
.el-container{padding: 0}
.el-row {}
.el-row:last-child {margin-bottom: 0; }

.tableStyles{
  background: #0a76a4;
}

.my-dropdown {
  width: 400px;
  height: 400px;
  background-color: #fff;
  border: 1px solid #dcdfe6;
  box-shadow: 0 0 6px 2px rgba(0, 0, 0, 0.1);
  font-size: 12px;

}
.mytable1{

}
.borderClass{

}
.vxe-input {
  display: inline-block !important;
  position: relative !important;
  width: auto;
}
.el-input {
  display: inline-block !important;
  position: relative !important;
  width: auto;
}
.keyword-lighten {
  color: #000;
  background-color: #FFFF00;
}

.vxe-textarea--inner {
  line-height: inherit;
}
.el-form-item__label-wrap {
  margin-left: 0px !important;
  float: left;
}
.fontClass{
  font-size: 12px;
  font-weight: bold;
}


</style>
<style lang="scss"  >

  //.row-green {
  //  background-color: #187;
  //  color: #fff;
  //}

</style>
