<!--铁水-->
<template>
  <div class="app-container">
    <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
      <el-row style="display: inline-block;width: 260px">
        <el-col :span="24">
          <el-form-item label="磅点" prop="poundid" label-width="40">
            <el-select v-model="queryParams.poundid" placeholder="请选择磅点" clearable>
              <el-option
                v-for="dict in dict.type.pound"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="类型" prop="poundname" label-width="40">
            <el-input
              v-model="queryParams.poundname"
              placeholder="请输入类型"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-col>
      </el-row>
      <el-form-item style="width: 70px;color: #606266;margin: 0 0 0 0;">
        <label  style="margin-left: 10px;">过磅方式</label>
        <el-radio-group v-model="queryParams.weighttype">
          <el-radio v-for="dict in dict.type.weighttype" :key="dict.value" :label="dict.value">{{ dict.label }}</el-radio>
        </el-radio-group>
        <!--        <el-button type="primary" size="mini" @click="handleQuery" style="width: 78px">生成榜单</el-button>-->
      </el-form-item>
      <!--      <el-form-item label="车号" prop="carno">-->
      <!--        <el-input-->
      <!--          v-model="queryParams.carno"-->
      <!--          placeholder="请输入车号"-->
      <!--          style=""-->
      <!--          clearable-->
      <!--          @keyup.enter.native="handleQuery"-->
      <!--        />-->
      <!--        <el-button type="primary" size="mini" @click="handleQuery" style="position: absolute;left: 150px;top: 2px;">刷新</el-button>-->
      <!--      </el-form-item>-->
      <el-form-item label="重量" prop="1aaa">
        <el-input
          style=""
          clearable
        />
      </el-form-item>
      <el-row style="display: inline-block;width: 300px">
        <el-col :span="24">
          <el-form-item label="收货单位" prop="poundid">
            <el-select v-model="queryParams.poundid" placeholder="请选择收货单位" clearable>
              <el-option
                v-for="dict in dict.type.pound"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="品名" prop="poundname">
            <el-input
              v-model="queryParams.poundname"
              placeholder="请输入品名"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-col>
      </el-row>
      <el-row style="display: inline-block;width: 300px">
        <el-col :span="24">
          <el-form-item label="承运单位" prop="poundid">
            <el-select v-model="queryParams.poundid" placeholder="请选择收货单位" clearable>
              <el-option
                v-for="dict in dict.type.pound"
                :key="dict.value"
                :label="dict.label"
                :value="dict.value"
              />
            </el-select>
          </el-form-item>
        </el-col>
        <el-col :span="24">
          <el-form-item label="发货单位" prop="poundname">
            <el-input
              v-model="queryParams.poundname"
              placeholder="请输入品名"
              clearable
              @keyup.enter.native="handleQuery"
            />
          </el-form-item>
        </el-col>
      </el-row>
      <el-form-item>
        <el-button type="primary" size="mini" @click="handleQuery">新增皮重</el-button>
        <el-button type="primary" size="mini" @click="handleQuery">保存皮重</el-button>
      </el-form-item>
    </el-form>

    <!-- 主磅单信息 -->
    <div>
      <el-card>
        <div>
          <div>
            <el-button class="transition-all duration-200" type="primary" size="mini">主磅单信息</el-button>
          </div>
          <div >
            <el-table v-loading="loading"
                      :data="operationpoundList"
                      border
                      stripe
                      @selection-change="handleSelectionChange">
              <el-table-column type="selection" width="55" align="center" />
              <el-table-column label="按钮1" align="center" prop="id" />
              <el-table-column label="状态" align="center" prop="billstate">
                <template slot-scope="scope">
                  <dict-tag :options="dict.type.pound_status" :value="scope.row.billstate"/>
                </template>
              </el-table-column>
              <el-table-column label="磅单号" align="center" prop="usrcode" />
              <el-table-column label="车号/车厢" align="center" prop="carno" />
              <el-table-column label="毛重" align="center" prop="wghmqty" />
              <el-table-column label="皮重" align="center" prop="empmqty" />
              <el-table-column label="净重" align="center" prop="netmqty" />
              <el-table-column label="过重磅时间" align="center" prop="wghdt" width="180">
                <template slot-scope="scope">
                  <span>{{ parseTime(scope.row.wghdt, '{y}-{m}-{d}') }}</span>
                </template>
              </el-table-column>
              <el-table-column label="过皮重时间" align="center" prop="empdt" width="180">
                <template slot-scope="scope">
                  <span>{{ parseTime(scope.row.empdt, '{y}-{m}-{d}') }}</span>
                </template>
              </el-table-column>
              <el-table-column label="原磅单号" align="center" prop="srcpunmqty" />
              <el-table-column label="原毛重" align="center" prop="srcwghmqty" />
              <el-table-column label="原皮重" align="center" prop="srcempmqty" />
              <el-table-column label="原净重" align="center" prop="srcnetmqty" />
              <el-table-column label="名称" align="center" prop="itmname" />
              <el-table-column label="毛重司磅员" align="center" prop="wghdtoprname" />
              <el-table-column label="皮重司磅员" align="center" prop="empdtoprname" />
              <el-table-column label="规格" align="center" prop="specification" />
              <el-table-column label="计量单位" align="center" prop="msrname" />
              <el-table-column label="磅点" align="center" prop="poundid">
                <template slot-scope="scope">
                  <dict-tag :options="dict.type.pound" :value="scope.row.poundid"/>
                </template>
              </el-table-column>
              <el-table-column label="磅点名称" align="center" prop="poundname" />
              <el-table-column label="皮重称重id" align="center" prop="empsysid" />
              <el-table-column label="皮重单号" align="center" prop="empusrcode" />
              <el-table-column label="毛重id" align="center" prop="wghsysid" />
              <el-table-column label="毛重单号" align="center" prop="wghusrcode" />
              <el-table-column label="收货单位" align="center" prop="recunitid" />
              <el-table-column label="收货单位名称" align="center" prop="recunitname" />
              <el-table-column label="发货单位" align="center" prop="sendunitid" />
              <el-table-column label="发货单位名称" align="center" prop="sendunitname" />
              <el-table-column label="承运单位" align="center" prop="trnunitid" />
              <el-table-column label="承运单位名称" align="center" prop="trnunitname" />
              <el-table-column label="业务单位" align="center" prop="bsnunitid" />
              <el-table-column label="业务单位名称" align="center" prop="bsnunitname" />
              <el-table-column label="业务部门id" align="center" prop="bsndptid" />
              <el-table-column label="业务部门名称" align="center" prop="bsndptname" />
              <el-table-column label="过磅类型" align="center" prop="wghtype">
                <template slot-scope="scope">
                  <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.wghtype"/>
                </template>
              </el-table-column>
              <el-table-column label="称重方式" align="center" prop="scltype">
                <template slot-scope="scope">
                  <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.scltype"/>
                </template>
              </el-table-column>
              <el-table-column label="驾驶员" align="center" prop="cardriver" />
              <el-table-column label="来源单据类型" align="center" prop="srcblltype">
                <template slot-scope="scope">
                  <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.srcblltype"/>
                </template>
              </el-table-column>
              <el-table-column label="申请来源" align="center" prop="pondsrc" />
              <el-table-column label="申请单号" align="center" prop="wetusrcode" />
              <el-table-column label="来源编号" align="center" prop="srcbllusrcode" />
              <el-table-column label="备注" align="center" prop="remark" />
              <el-table-column label="炉号" align="center" prop="boilerno" />
              <el-table-column label="钢号" align="center" prop="steeno" />
              <el-table-column label="长度" align="center" prop="unitlen" />
              <el-table-column label="序号" align="center" prop="indexid" />
              <el-table-column label="冷轧支数" align="center" prop="carnolz" />
              <el-table-column label="钢种" align="center" prop="steeltype" />
              <el-table-column label="线材类型" align="center" prop="linetype" />
              <el-table-column label="批号" align="center" prop="batno" />
              <el-table-column label="连铸" align="center" prop="lzno" />
              <el-table-column label="支数" align="center" prop="lqty" />
              <el-table-column label="编号" align="center" prop="bdcode" />
              <el-table-column label="登记部门" align="center" prop="crtorgid" />
              <el-table-column label="是否启用" align="center" prop="isinuse">
                <template slot-scope="scope">
                  <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isinuse"/>
                </template>
              </el-table-column>
              <el-table-column label="创建时间" align="center" prop="crtdt" width="180">
                <template slot-scope="scope">
                  <span>{{ parseTime(scope.row.crtdt, '{y}-{m}-{d}') }}</span>
                </template>
              </el-table-column>
              <el-table-column label="创建人" align="center" prop="crtopr" />
              <el-table-column label="最后修改时间" align="center" prop="lstedtdt" width="180">
                <template slot-scope="scope">
                  <span>{{ parseTime(scope.row.lstedtdt, '{y}-{m}-{d}') }}</span>
                </template>
              </el-table-column>
              <el-table-column label="最后修改人" align="center" prop="lstedtopr" />
            </el-table>
          </div>
        </div>
      </el-card>
    </div>

    <!-- 底部列表区域 -->
    <div style="display: inline-block;width: 1450px;overflow: hidden ">
      <el-card>
        <div style="width: 5000px">
          <div>
            <el-button v-for="tab in tabs" :key="tab.name" :type="activeTab === tab.name ? 'primary' : 'default'"
                       @click="activeTab = tab.name" size="mini" class="transition-all duration-200"> {{ tab.label }}</el-button>
          </div>
          <div>
            <el-form :model="queryParams" v-if="activeTab === 'tareRequest'" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
              <el-form-item label="起始日期" prop="lstedtdt">
                <el-date-picker clearable
                                v-model="queryParams.lstedtdt"
                                type="date"
                                value-format="yyyy-MM-dd"
                                placeholder="请选择最后修改时间">
                </el-date-picker>
              </el-form-item>
              <el-form-item label="截止日期" prop="lstedtdt">
                <el-date-picker clearable
                                v-model="queryParams.lstedtdt"
                                type="date"
                                value-format="yyyy-MM-dd"
                                placeholder="请选择最后修改时间">
                </el-date-picker>
              </el-form-item>
              <el-form-item label="车号" prop="carno" label-width="40">
                <el-input
                  v-model="queryParams.carno"
                  placeholder="请输入车号"
                  clearable
                  @keyup.enter.native="handleQuery"
                />
              </el-form-item>
              <el-form-item label="磅单号" prop="usrcode" label-width="40">
                <el-input
                  v-model="queryParams.usrcode"
                  placeholder="请输入磅单号"
                  clearable
                  @keyup.enter.native="handleQuery"
                />
              </el-form-item>
              <el-button class="transition-all duration-200" type="primary" size="mini" @click="handleQuery">查询磅单</el-button>
            </el-form>
            <div>
              <el-table style="width: 900px;display: inline-block;float: left;"
                        v-loading="loading"
                        :data="operationpoundList"
                        v-if="activeTab === 'weighingRequest'"
                        border
                        stripe
                        @selection-change="handleSelectionChange">
                <el-table-column type="selection" width="55" align="center" />
                <el-table-column label="按钮1" align="center" prop="id" />
                <el-table-column label="状态" align="center" prop="billstate">
                  <template slot-scope="scope">
                    <dict-tag :options="dict.type.pound_status" :value="scope.row.billstate"/>
                  </template>
                </el-table-column>
                <el-table-column label="磅单号" align="center" prop="usrcode" />
                <el-table-column label="车号/车厢" align="center" prop="carno" />
                <el-table-column label="毛重" align="center" prop="wghmqty" />
                <el-table-column label="皮重" align="center" prop="empmqty" />
                <el-table-column label="净重" align="center" prop="netmqty" />
                <el-table-column label="过重磅时间" align="center" prop="wghdt" width="180">
                  <template slot-scope="scope">
                    <span>{{ parseTime(scope.row.wghdt, '{y}-{m}-{d}') }}</span>
                  </template>
                </el-table-column>
                <el-table-column label="过皮重时间" align="center" prop="empdt" width="180">
                  <template slot-scope="scope">
                    <span>{{ parseTime(scope.row.empdt, '{y}-{m}-{d}') }}</span>
                  </template>
                </el-table-column>
                <el-table-column label="原磅单号" align="center" prop="srcpunmqty" />
                <el-table-column label="原毛重" align="center" prop="srcwghmqty" />
                <el-table-column label="原皮重" align="center" prop="srcempmqty" />
                <el-table-column label="原净重" align="center" prop="srcnetmqty" />
                <el-table-column label="名称" align="center" prop="itmname" />
                <el-table-column label="毛重司磅员" align="center" prop="wghdtoprname" />
                <el-table-column label="皮重司磅员" align="center" prop="empdtoprname" />
                <el-table-column label="规格" align="center" prop="specification" />
                <el-table-column label="计量单位" align="center" prop="msrname" />
                <el-table-column label="磅点" align="center" prop="poundid">
                  <template slot-scope="scope">
                    <dict-tag :options="dict.type.pound" :value="scope.row.poundid"/>
                  </template>
                </el-table-column>
                <el-table-column label="磅点名称" align="center" prop="poundname" />
                <el-table-column label="皮重称重id" align="center" prop="empsysid" />
                <el-table-column label="皮重单号" align="center" prop="empusrcode" />
                <el-table-column label="毛重id" align="center" prop="wghsysid" />
                <el-table-column label="毛重单号" align="center" prop="wghusrcode" />
                <el-table-column label="收货单位" align="center" prop="recunitid" />
                <el-table-column label="收货单位名称" align="center" prop="recunitname" />
                <el-table-column label="发货单位" align="center" prop="sendunitid" />
                <el-table-column label="发货单位名称" align="center" prop="sendunitname" />
                <el-table-column label="承运单位" align="center" prop="trnunitid" />
                <el-table-column label="承运单位名称" align="center" prop="trnunitname" />
                <el-table-column label="业务单位" align="center" prop="bsnunitid" />
                <el-table-column label="业务单位名称" align="center" prop="bsnunitname" />
                <el-table-column label="业务部门id" align="center" prop="bsndptid" />
                <el-table-column label="业务部门名称" align="center" prop="bsndptname" />
                <el-table-column label="过磅类型" align="center" prop="wghtype">
                  <template slot-scope="scope">
                    <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.wghtype"/>
                  </template>
                </el-table-column>
                <el-table-column label="称重方式" align="center" prop="scltype">
                  <template slot-scope="scope">
                    <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.scltype"/>
                  </template>
                </el-table-column>
                <el-table-column label="驾驶员" align="center" prop="cardriver" />
                <el-table-column label="来源单据类型" align="center" prop="srcblltype">
                  <template slot-scope="scope">
                    <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.srcblltype"/>
                  </template>
                </el-table-column>
                <el-table-column label="申请来源" align="center" prop="pondsrc" />
                <el-table-column label="申请单号" align="center" prop="wetusrcode" />
                <el-table-column label="来源编号" align="center" prop="srcbllusrcode" />
                <el-table-column label="备注" align="center" prop="remark" />
                <el-table-column label="炉号" align="center" prop="boilerno" />
                <el-table-column label="钢号" align="center" prop="steeno" />
                <el-table-column label="长度" align="center" prop="unitlen" />
                <el-table-column label="序号" align="center" prop="indexid" />
                <el-table-column label="冷轧支数" align="center" prop="carnolz" />
                <el-table-column label="钢种" align="center" prop="steeltype" />
                <el-table-column label="线材类型" align="center" prop="linetype" />
                <el-table-column label="批号" align="center" prop="batno" />
                <el-table-column label="连铸" align="center" prop="lzno" />
                <el-table-column label="支数" align="center" prop="lqty" />
                <el-table-column label="编号" align="center" prop="bdcode" />
                <el-table-column label="登记部门" align="center" prop="crtorgid" />
                <el-table-column label="是否启用" align="center" prop="isinuse">
                  <template slot-scope="scope">
                    <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isinuse"/>
                  </template>
                </el-table-column>
                <el-table-column label="创建时间" align="center" prop="crtdt" width="180">
                  <template slot-scope="scope">
                    <span>{{ parseTime(scope.row.crtdt, '{y}-{m}-{d}') }}</span>
                  </template>
                </el-table-column>
                <el-table-column label="创建人" align="center" prop="crtopr" />
                <el-table-column label="最后修改时间" align="center" prop="lstedtdt" width="180">
                  <template slot-scope="scope">
                    <span>{{ parseTime(scope.row.lstedtdt, '{y}-{m}-{d}') }}</span>
                  </template>
                </el-table-column>
                <el-table-column label="最后修改人" align="center" prop="lstedtopr" />
              </el-table>
              <el-table style="width: 1400px;display: inline-block;float: left;"
                        v-loading="loading"
                        :data="operationpoundList"
                        v-if="activeTab === 'tareRequest'"
                        border
                        stripe
                        @selection-change="handleSelectionChange">
                <el-table-column type="selection" width="55" align="center" />
                <el-table-column label="按钮2" align="center" prop="id" />
                <el-table-column label="状态" align="center" prop="billstate">
                  <template slot-scope="scope">
                    <dict-tag :options="dict.type.pound_status" :value="scope.row.billstate"/>
                  </template>
                </el-table-column>
                <el-table-column label="磅单号" align="center" prop="usrcode" />
                <el-table-column label="车号/车厢" align="center" prop="carno" />
                <el-table-column label="毛重" align="center" prop="wghmqty" />
                <el-table-column label="皮重" align="center" prop="empmqty" />
                <el-table-column label="净重" align="center" prop="netmqty" />
                <el-table-column label="过重磅时间" align="center" prop="wghdt" width="180">
                  <template slot-scope="scope">
                    <span>{{ parseTime(scope.row.wghdt, '{y}-{m}-{d}') }}</span>
                  </template>
                </el-table-column>
                <el-table-column label="过皮重时间" align="center" prop="empdt" width="180">
                  <template slot-scope="scope">
                    <span>{{ parseTime(scope.row.empdt, '{y}-{m}-{d}') }}</span>
                  </template>
                </el-table-column>
                <el-table-column label="原磅单号" align="center" prop="srcpunmqty" />
                <el-table-column label="原毛重" align="center" prop="srcwghmqty" />
                <el-table-column label="原皮重" align="center" prop="srcempmqty" />
                <el-table-column label="原净重" align="center" prop="srcnetmqty" />
                <el-table-column label="名称" align="center" prop="itmname" />
                <el-table-column label="毛重司磅员" align="center" prop="wghdtoprname" />
                <el-table-column label="皮重司磅员" align="center" prop="empdtoprname" />
                <el-table-column label="规格" align="center" prop="specification" />
                <el-table-column label="计量单位" align="center" prop="msrname" />
                <el-table-column label="磅点" align="center" prop="poundid">
                  <template slot-scope="scope">
                    <dict-tag :options="dict.type.pound" :value="scope.row.poundid"/>
                  </template>
                </el-table-column>
                <el-table-column label="磅点名称" align="center" prop="poundname" />
                <el-table-column label="皮重称重id" align="center" prop="empsysid" />
                <el-table-column label="皮重单号" align="center" prop="empusrcode" />
                <el-table-column label="毛重id" align="center" prop="wghsysid" />
                <el-table-column label="毛重单号" align="center" prop="wghusrcode" />
                <el-table-column label="收货单位" align="center" prop="recunitid" />
                <el-table-column label="收货单位名称" align="center" prop="recunitname" />
                <el-table-column label="发货单位" align="center" prop="sendunitid" />
                <el-table-column label="发货单位名称" align="center" prop="sendunitname" />
                <el-table-column label="承运单位" align="center" prop="trnunitid" />
                <el-table-column label="承运单位名称" align="center" prop="trnunitname" />
                <el-table-column label="业务单位" align="center" prop="bsnunitid" />
                <el-table-column label="业务单位名称" align="center" prop="bsnunitname" />
                <el-table-column label="业务部门id" align="center" prop="bsndptid" />
                <el-table-column label="业务部门名称" align="center" prop="bsndptname" />
                <el-table-column label="过磅类型" align="center" prop="wghtype">
                  <template slot-scope="scope">
                    <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.wghtype"/>
                  </template>
                </el-table-column>
                <el-table-column label="称重方式" align="center" prop="scltype">
                  <template slot-scope="scope">
                    <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.scltype"/>
                  </template>
                </el-table-column>
                <el-table-column label="驾驶员" align="center" prop="cardriver" />
                <el-table-column label="来源单据类型" align="center" prop="srcblltype">
                  <template slot-scope="scope">
                    <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.srcblltype"/>
                  </template>
                </el-table-column>
                <el-table-column label="申请来源" align="center" prop="pondsrc" />
                <el-table-column label="申请单号" align="center" prop="wetusrcode" />
                <el-table-column label="来源编号" align="center" prop="srcbllusrcode" />
                <el-table-column label="备注" align="center" prop="remark" />
                <el-table-column label="炉号" align="center" prop="boilerno" />
                <el-table-column label="钢号" align="center" prop="steeno" />
                <el-table-column label="长度" align="center" prop="unitlen" />
                <el-table-column label="序号" align="center" prop="indexid" />
                <el-table-column label="冷轧支数" align="center" prop="carnolz" />
                <el-table-column label="钢种" align="center" prop="steeltype" />
                <el-table-column label="线材类型" align="center" prop="linetype" />
                <el-table-column label="批号" align="center" prop="batno" />
                <el-table-column label="连铸" align="center" prop="lzno" />
                <el-table-column label="支数" align="center" prop="lqty" />
                <el-table-column label="编号" align="center" prop="bdcode" />
                <el-table-column label="登记部门" align="center" prop="crtorgid" />
                <el-table-column label="是否启用" align="center" prop="isinuse">
                  <template slot-scope="scope">
                    <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isinuse"/>
                  </template>
                </el-table-column>
                <el-table-column label="创建时间" align="center" prop="crtdt" width="180">
                  <template slot-scope="scope">
                    <span>{{ parseTime(scope.row.crtdt, '{y}-{m}-{d}') }}</span>
                  </template>
                </el-table-column>
                <el-table-column label="创建人" align="center" prop="crtopr" />
                <el-table-column label="最后修改时间" align="center" prop="lstedtdt" width="180">
                  <template slot-scope="scope">
                    <span>{{ parseTime(scope.row.lstedtdt, '{y}-{m}-{d}') }}</span>
                  </template>
                </el-table-column>
                <el-table-column label="最后修改人" align="center" prop="lstedtopr" />
              </el-table>
              <div style=" width: 250px; display: inline-block;float: left;position: relative;top: -29px;"
                   v-if="activeTab === 'weighingRequest'">
                <div>
                  <el-button class="transition-all duration-200" type="primary" size="mini" @click="handleQuery">历史皮重</el-button>
                </div>
                <div>
                  <el-button style="width: 250px" type="info" size="mini" @click="handleQuery">称皮重</el-button>
                </div>
                <div >
                  <el-table v-loading="loading" style="width: 400px;display: inline-block;"
                            :data="operationpoundList"
                            border
                            stripe
                            @selection-change="handleSelectionChange">
                    <el-table-column type="selection" width="55" align="center" />
                    <el-table-column label="按钮1" align="center" prop="id" />
                    <el-table-column label="状态" align="center" prop="billstate">
                      <template slot-scope="scope">
                        <dict-tag :options="dict.type.pound_status" :value="scope.row.billstate"/>
                      </template>
                    </el-table-column>
                    <el-table-column label="磅单号" align="center" prop="usrcode" />
                    <el-table-column label="车号/车厢" align="center" prop="carno" />
                    <el-table-column label="毛重" align="center" prop="wghmqty" />
                    <el-table-column label="皮重" align="center" prop="empmqty" />
                    <el-table-column label="净重" align="center" prop="netmqty" />
                    <el-table-column label="过重磅时间" align="center" prop="wghdt" width="180">
                      <template slot-scope="scope">
                        <span>{{ parseTime(scope.row.wghdt, '{y}-{m}-{d}') }}</span>
                      </template>
                    </el-table-column>
                    <el-table-column label="过皮重时间" align="center" prop="empdt" width="180">
                      <template slot-scope="scope">
                        <span>{{ parseTime(scope.row.empdt, '{y}-{m}-{d}') }}</span>
                      </template>
                    </el-table-column>
                    <el-table-column label="原磅单号" align="center" prop="srcpunmqty" />
                    <el-table-column label="原毛重" align="center" prop="srcwghmqty" />
                    <el-table-column label="原皮重" align="center" prop="srcempmqty" />
                    <el-table-column label="原净重" align="center" prop="srcnetmqty" />
                    <el-table-column label="名称" align="center" prop="itmname" />
                    <el-table-column label="毛重司磅员" align="center" prop="wghdtoprname" />
                    <el-table-column label="皮重司磅员" align="center" prop="empdtoprname" />
                    <el-table-column label="规格" align="center" prop="specification" />
                    <el-table-column label="计量单位" align="center" prop="msrname" />
                    <el-table-column label="磅点" align="center" prop="poundid">
                      <template slot-scope="scope">
                        <dict-tag :options="dict.type.pound" :value="scope.row.poundid"/>
                      </template>
                    </el-table-column>
                    <el-table-column label="磅点名称" align="center" prop="poundname" />
                    <el-table-column label="皮重称重id" align="center" prop="empsysid" />
                    <el-table-column label="皮重单号" align="center" prop="empusrcode" />
                    <el-table-column label="毛重id" align="center" prop="wghsysid" />
                    <el-table-column label="毛重单号" align="center" prop="wghusrcode" />
                    <el-table-column label="收货单位" align="center" prop="recunitid" />
                    <el-table-column label="收货单位名称" align="center" prop="recunitname" />
                    <el-table-column label="发货单位" align="center" prop="sendunitid" />
                    <el-table-column label="发货单位名称" align="center" prop="sendunitname" />
                    <el-table-column label="承运单位" align="center" prop="trnunitid" />
                    <el-table-column label="承运单位名称" align="center" prop="trnunitname" />
                    <el-table-column label="业务单位" align="center" prop="bsnunitid" />
                    <el-table-column label="业务单位名称" align="center" prop="bsnunitname" />
                    <el-table-column label="业务部门id" align="center" prop="bsndptid" />
                    <el-table-column label="业务部门名称" align="center" prop="bsndptname" />
                    <el-table-column label="过磅类型" align="center" prop="wghtype">
                      <template slot-scope="scope">
                        <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.wghtype"/>
                      </template>
                    </el-table-column>
                    <el-table-column label="称重方式" align="center" prop="scltype">
                      <template slot-scope="scope">
                        <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.scltype"/>
                      </template>
                    </el-table-column>
                    <el-table-column label="驾驶员" align="center" prop="cardriver" />
                    <el-table-column label="来源单据类型" align="center" prop="srcblltype">
                      <template slot-scope="scope">
                        <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.srcblltype"/>
                      </template>
                    </el-table-column>
                    <el-table-column label="申请来源" align="center" prop="pondsrc" />
                    <el-table-column label="申请单号" align="center" prop="wetusrcode" />
                    <el-table-column label="来源编号" align="center" prop="srcbllusrcode" />
                    <el-table-column label="备注" align="center" prop="remark" />
                    <el-table-column label="炉号" align="center" prop="boilerno" />
                    <el-table-column label="钢号" align="center" prop="steeno" />
                    <el-table-column label="长度" align="center" prop="unitlen" />
                    <el-table-column label="序号" align="center" prop="indexid" />
                    <el-table-column label="冷轧支数" align="center" prop="carnolz" />
                    <el-table-column label="钢种" align="center" prop="steeltype" />
                    <el-table-column label="线材类型" align="center" prop="linetype" />
                    <el-table-column label="批号" align="center" prop="batno" />
                    <el-table-column label="连铸" align="center" prop="lzno" />
                    <el-table-column label="支数" align="center" prop="lqty" />
                    <el-table-column label="编号" align="center" prop="bdcode" />
                    <el-table-column label="登记部门" align="center" prop="crtorgid" />
                    <el-table-column label="是否启用" align="center" prop="isinuse">
                      <template slot-scope="scope">
                        <dict-tag :options="dict.type.sys_yes_no" :value="scope.row.isinuse"/>
                      </template>
                    </el-table-column>
                    <el-table-column label="创建时间" align="center" prop="crtdt" width="180">
                      <template slot-scope="scope">
                        <span>{{ parseTime(scope.row.crtdt, '{y}-{m}-{d}') }}</span>
                      </template>
                    </el-table-column>
                    <el-table-column label="创建人" align="center" prop="crtopr" />
                    <el-table-column label="最后修改时间" align="center" prop="lstedtdt" width="180">
                      <template slot-scope="scope">
                        <span>{{ parseTime(scope.row.lstedtdt, '{y}-{m}-{d}') }}</span>
                      </template>
                    </el-table-column>
                    <el-table-column label="最后修改人" align="center" prop="lstedtopr" />
                  </el-table>
                </div>
              </div>
              <div style=" width: 300px; display: inline-block;float: left;position: relative;top: -31px;"
                   v-if="activeTab === 'weighingRequest'">
                <div>
                  <el-button class="transition-all duration-200" type="primary" size="mini" @click="handleQuery">操作</el-button>
                </div>
                <div >
                  <el-form :model="queryParams" ref="queryForm" size="small" :inline="true" v-show="showSearch" label-width="68px">
                    <el-row>
                      <el-col :span="6">
                        <el-form-item prop="poundid" label-width="40">
                          <p></p>
                        </el-form-item>
                      </el-col>
                      <el-col :span="18">
                        <el-form-item prop="poundid" label-width="40">
                          <el-button type="info" style="width: 200px;font-size: 20px">增明细</el-button>
                        </el-form-item>
                      </el-col>
                    </el-row>
                    <el-row>
                      <el-col :span="6">
                        <el-form-item prop="poundid" label-width="40">
                          <p></p>
                        </el-form-item>
                      </el-col>
                      <el-col :span="18">
                        <el-form-item prop="poundname" label-width="40">
                          <el-button type="info" style="width: 200px;font-size: 20px">取消增明细</el-button>
                        </el-form-item>
                      </el-col>
                    </el-row>
                    <el-row>
                      <el-col :span="6">
                        <el-form-item prop="poundid" label-width="40">
                          <span style="font-size: 20px">炉次</span>
                        </el-form-item>
                      </el-col>
                      <el-col :span="18">
                        <el-form-item prop="poundid" label-width="40">
                          <el-select v-model="queryParams.poundid" placeholder="请选择磅点" clearable style="width: 200px">
                            <el-option
                              v-for="dict in dict.type.pound"
                              :key="dict.value"
                              :label="dict.label"
                              :value="dict.value"
                            />
                          </el-select>
                        </el-form-item>
                      </el-col>
                    </el-row>
                    <el-row>
                      <el-col :span="6">
                        <el-form-item prop="poundid" label-width="40">
                          <span style="font-size: 20px">罐号</span>
                        </el-form-item>
                      </el-col>
                      <el-col :span="18">
                        <el-form-item prop="poundname" label-width="40">
                          <el-input
                            v-model="queryParams.poundname" style="width: 200px"
                            placeholder="请输入类型"
                            clearable
                            @keyup.enter.native="handleQuery"
                          />
                        </el-form-item>
                      </el-col>
                    </el-row>
                    <el-row>
                      <el-col :span="6">
                        <el-form-item prop="poundid" label-width="40">
                          <p></p>
                        </el-form-item>
                      </el-col>
                      <el-col :span="18">
                        <el-form-item prop="poundid" label-width="40">
                          <el-button type="info" style="width: 200px;font-size: 20px">称毛重</el-button>
                        </el-form-item>
                      </el-col>
                    </el-row>
                    <el-row>
                      <el-col :span="6">
                        <el-form-item prop="poundid" label-width="40">
                          <p></p>
                        </el-form-item>
                      </el-col>
                      <el-col :span="18">
                        <el-form-item prop="poundname" label-width="40">
                          <el-button type="info" style="width: 200px;font-size: 20px">称皮重</el-button>
                        </el-form-item>
                      </el-col>
                    </el-row>
                  </el-form>
                </div>
              </div>
            </div>
          </div>
        </div>
      </el-card>
    </div>
  </div>
</template>

<script>
import { listMoltenironpound, getMoltenironpound, delMoltenironpound, addMoltenironpound, updateMoltenironpound } from "@/api/measurement/operation/moltenironpound"

export default {
  name: "Moltenironpound",
  dicts: ['pound_status', 'pound', 'sys_yes_no','weighttype'],
  data() {
    return {
      // 遮罩层
      loading: true,
      // 选中数组
      ids: [],
      // 非单个禁用
      single: true,
      // 非多个禁用
      multiple: true,
      // 显示搜索条件
      showSearch: true,
      // 总条数
      total: 0,
      // 铁水磅表格数据
      operationpoundList: [],
      // 弹出层标题
      title: "",
      // 是否显示弹出层
      open: false,
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        billstate: null,
        usrcode: null,
        carno: null,
        wghmqty: null,
        empmqty: null,
        netmqty: null,
        wghdt: null,
        empdt: null,
        srcpunmqty: null,
        srcwghmqty: null,
        srcempmqty: null,
        srcnetmqty: null,
        itmname: null,
        wghdtoprname: null,
        empdtoprname: null,
        specification: null,
        msrname: null,
        poundid: null,
        poundname: null,
        empsysid: null,
        empusrcode: null,
        wghsysid: null,
        wghusrcode: null,
        recunitid: null,
        recunitname: null,
        sendunitid: null,
        sendunitname: null,
        trnunitid: null,
        trnunitname: null,
        bsnunitid: null,
        bsnunitname: null,
        bsndptid: null,
        bsndptname: null,
        wghtype: null,
        scltype: null,
        cardriver: null,
        srcblltype: null,
        pondsrc: null,
        wetusrcode: null,
        srcbllusrcode: null,
        boilerno: null,
        steeno: null,
        unitlen: null,
        indexid: null,
        carnolz: null,
        steeltype: null,
        linetype: null,
        batno: null,
        lzno: null,
        lqty: null,
        bdcode: null,
        crtorgid: null,
        isinuse: null,
        crtdt: null,
        crtopr: null,
        lstedtdt: null,
        lstedtopr: null
      },
      // 表单参数
      form: {},
      tabs: [
      { name: 'weighingRequest', label: '过磅明细' },
      { name: 'tareRequest', label: '完成磅单' },
    ],
      activeTab: 'weighingRequest',
      // 表单校验
      rules: {
      }
    }
  },
  created() {
    this.getList()
  },
  methods: {
    /** 查询铁水磅列表 */
    getList() {
      this.loading = true
      listMoltenironpound(this.queryParams).then(response => {
        this.operationpoundList = response.rows
        this.total = response.total
        this.loading = false
      })
    },
    // 取消按钮
    cancel() {
      this.open = false
      this.reset()
    },
    // 表单重置
    reset() {
      this.form = {
        id: null,
        billstate: null,
        usrcode: null,
        carno: null,
        wghmqty: null,
        empmqty: null,
        netmqty: null,
        wghdt: null,
        empdt: null,
        srcpunmqty: null,
        srcwghmqty: null,
        srcempmqty: null,
        srcnetmqty: null,
        itmname: null,
        wghdtoprname: null,
        empdtoprname: null,
        specification: null,
        msrname: null,
        poundid: null,
        poundname: null,
        empsysid: null,
        empusrcode: null,
        wghsysid: null,
        wghusrcode: null,
        recunitid: null,
        recunitname: null,
        sendunitid: null,
        sendunitname: null,
        trnunitid: null,
        trnunitname: null,
        bsnunitid: null,
        bsnunitname: null,
        bsndptid: null,
        bsndptname: null,
        wghtype: null,
        scltype: null,
        cardriver: null,
        srcblltype: null,
        pondsrc: null,
        wetusrcode: null,
        srcbllusrcode: null,
        remark: null,
        boilerno: null,
        steeno: null,
        unitlen: null,
        indexid: null,
        carnolz: null,
        steeltype: null,
        linetype: null,
        batno: null,
        lzno: null,
        lqty: null,
        bdcode: null,
        crtorgid: null,
        isinuse: null,
        crtdt: null,
        crtopr: null,
        lstedtdt: null,
        lstedtopr: null
      }
      this.resetForm("form")
    },
    /** 搜索按钮操作 */
    handleQuery() {
      this.queryParams.pageNum = 1
      this.getList()
    },
    /** 重置按钮操作 */
    resetQuery() {
      this.resetForm("queryForm")
      this.handleQuery()
    },
    // 多选框选中数据
    handleSelectionChange(selection) {
      this.ids = selection.map(item => item.id)
      this.single = selection.length!==1
      this.multiple = !selection.length
    },
    /** 新增按钮操作 */
    handleAdd() {
      this.reset()
      this.open = true
      this.title = "添加铁水磅"
    },
    /** 修改按钮操作 */
    handleUpdate(row) {
      this.reset()
      const id = row.id || this.ids
      getMoltenironpound(id).then(response => {
        this.form = response.data
        this.open = true
        this.title = "修改铁水磅"
      })
    },
    /** 提交按钮 */
    submitForm() {
      this.$refs["form"].validate(valid => {
        if (valid) {
          if (this.form.id != null) {
            updateMoltenironpound(this.form).then(response => {
              this.$modal.msgSuccess("修改成功")
              this.open = false
              this.getList()
            })
          } else {
            addMoltenironpound(this.form).then(response => {
              this.$modal.msgSuccess("新增成功")
              this.open = false
              this.getList()
            })
          }
        }
      })
    },
    /** 删除按钮操作 */
    handleDelete(row) {
      const ids = row.id || this.ids
      this.$modal.confirm('是否确认删除铁水磅编号为"' + ids + '"的数据项？').then(function() {
        return delMoltenironpound(ids)
      }).then(() => {
        this.getList()
        this.$modal.msgSuccess("删除成功")
      }).catch(() => {})
    },
    /** 导出按钮操作 */
    handleExport() {
      this.download('measurement/operation/moltenironpound/export', {
        ...this.queryParams
      }, `moltenironpound_${new Date().getTime()}.xlsx`)
    }
  }
}
</script>
